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,WAA1BA,CAA0B,WAA1BA,CAA0B,WAA1BA,CAA0B,cAI+CA,0DAAwB,oCAAyCga,uBAAqB,yBAAvJha,QACAA,oBACFA,cAKNA,mBAA0B,yBAUtBA,2BAAyC,yBAAzCA,CAAyC,sBAAzCA,CAAyC,mBAAzCA,CAAyC,mBAAzCA,CAAyC,0CAmBzCA,gDAMAA,gDAOAA,2BAMAA,2BAOFA,mBA1EwBA,iEACYA,6DAGmDA,0DAQ5DA,uDAA4CA,8BAYrEA,+CAA8B,qBAA9BA,CAA8B,yBAA9BA,CAA8B,gCAMZA,qCAAwB,mCAE9BA,8BAMVA,6BAOAA,kEAMAA,yEAOAA,kEAGyBA,kDAMAA,2NErE3B,MAAOwkW,wDCMDxkW,mBACEA,8BACFA,eADEA,4FAEFA,SACEA,mBAAqBA,SAAgBA,QACvCA,8BADuBA,wEA2DjBA,kBAAiD,2BAI7CA,qEAASA,mBAAa,GACxBA,gDAHEA,6BAAiB,wEAmB3BA,qBAIEA,yDAASA,iBAAQ,GACfA,8BACJA,cADIA,6EAqBJA,eACEA,sCACFA,eAD2BA,mECxGjC,MAAOykW,GAkUX/lW,YACU8sD,EACAhtC,EACAoL,EACAY,GAHAvsB,uBACAA,0BACAA,gBACAA,iBArUDA,gBAAqB,KAGdA,cAAmB,eAEnBA,WAAkB,CAChC,aACA,SACA,SACA,OACA,YACA,eACA,aACA,cACA,cACA,SACA,cACA,QACA,aACA,iBACA,WACA,OACA,aACA,SACA,YACA,aACA,aACA,OACA,YACA,cACA,6BACA,sBACA,mBACA,mBACA,oBACA,SACA,gBACA,YACA,OACA,cACA,eACA,mBACA,eACA,eACA,eACA,aACA,WACA,WACA,WACA,WACA,SACA,eACA,WACA,cACA,UACA,gBACA,eACA,aACA,SACA,kBACA,kBACA,WACA,cACA,QACA,cACA,eACA,eACA,cACA,OACA,cACA,YACA,QACA,gBACA,uBACA,iBACA,UACA,eACA,gBACA,gBACA,eACA,QACA,mBACA,uBACA,iBACA,aACA,mBACA,uBACA,iBACA,aACA,gBACA,YACA,WACA,OACA,iBACA,WACA,kBACA,YACA,cACA,cACA,OACA,iBACA,WACA,cACA,SACA,aACA,YACA,aACA,mBACA,YACA,aACA,WACA,OACA,YACA,MACA,uBACA,qBACA,qBACA,cACA,YACA,cACA,gBACA,UACA,gBACA,oBACA,cACA,UACA,YACA,kBACA,gBACA,iBACA,gBACA,gBACA,iBACA,uBACA,gBACA,eACA,iBACA,eACA,WACA,QACA,aACA,oBACA,cACA,OACA,yBACA,gBACA,kBACA,eACA,eACA,gBACA,eACA,MACA,cACA,QACA,gBACA,eACA,gBACA,QACA,UACA,cACA,wBACA,YACA,OACA,OACA,qBACA,kBACA,qBACA,kBACA,qBACA,yBACA,sBACA,yBACA,sBACA,yBACA,iBACA,aACA,iBACA,cACA,KACA,WACA,UACA,aACA,iBACA,WACA,cACA,aACA,SACA,iBACA,iBACA,mBACA,OACA,cACA,UACA,WACA,WACA,WACA,eACA,aACA,YACA,UACA,WACA,eACA,cACA,UACA,MACA,UACA,MACA,YACA,gBACA,eACA,mBACA,mBACA,eACA,YACA,cACA,eACA,SACA,gBACA,YACA,yBACA,wBACA,mBACA,uBACA,qBACA,qBACA,cACA,iBACA,sBACA,0BACA,uBACA,QACA,aACA,oBACA,UACA,mBACA,OACA,oBACA,cACA,QACA,WACA,aACA,aACA,QACA,WACA,UACA,mBACA,YACA,MACA,aACA,eACA,aACA,QACA,kBACA,YACA,OACA,YACA,mBACA,qBACA,cACA,aACA,aACA,oBACA,cACA,cACA,kBACA,YACA,WACA,OACA,UACA,aACA,QACA,UACA,QACA,QACA,YACA,cACA,gBACA,kBACA,sBACA,gBACA,YACA,aACA,YACA,gBACA,cACA,QACA,aACA,gBACA,gBACA,YACA,iBACA,eACA,gBACA,mBACA,kBACA,kBACA,aACA,aACA,cACA,qBACA,mBACA,wBACA,uBACA,qBACA,qBACA,mBACA,eACA,aACA,cACA,aAGKA,WAAuB,IAAIumW,IAE1BvmW,cAAmB,yCACnBA,gBAA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BACA,aACA,gBACA,aACA,gBACA,mBACA,gBACA,aACA,gBACA,YACA,eACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,mBACA,gBACA,mBACA,gBACA,aACA,gBACA,aACA,gBACA,gBACA,mBACA,gBACA,mBACA,eACA,kBACA,gBACA,mBACA,gBACA,mBACA,gBACA,mBACA,gBACA,mBACA,gBACA,mBACA,aACA,gBACA,aACA,gBACA,mBACA,gBACA,mBACA,gBACA,mBACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,cACA,iBACA,aACA,gBACA,aACA,gBACA,mBACA,gBACA,mBACA,gBACA,WACA,cACA,aACA,gBACA,aACA,gBACA,YACA,eACA,mBACA,sBACA,kBACA,qBACA,aACA,gBACA,aACA,gBACA,WACA,cACA,aACA,gBACA,aACA,gBACA,gBACA,mBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,mBACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,mBACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,mBACA,gBACA,aACA,gBACA,iBACA,oBACA,gBACA,mBACA,aACA,gBACA,aACA,gBACA,mBACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,kBACA,qBACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,cACA,iBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,gBACA,mBACA,cACA,iBACA,aACA,gBACA,cACA,iBACA,cACA,kBACA,qBACA,iBACA,gBACA,mBACA,aACA,gBACA,aACA,gBACA,aACA,kBACA,qBACA,gBACA,aACA,gBACA,mBACA,sBACA,aACA,gBACA,gBACA,mBACA,gBACA,mBACA,gBACA,mBACA,gBACA,oBAIA,eACA,cACA,YACA,CACA,gBACA,gBACA,gDACA,iCACAroJ,EACA,CACA,aACA,CACAsqW,kBACA,sBACA,EACAA,aACApQ,aACAoQ","names":["String","prototype","isEmpty","this","trim","length","Equals","v","toString","APP_CONFIG","InjectionToken","ActivityService","constructor","http","config","Subject","BehaviorSubject","ActivityChanged","activityChanged","next","ActivitiesChanged","activities","activitiesDataSource","GetJobActivityTypes","get","apiLocations","ServiceSight","pipe","switchMap","d","of","ModelCollection","core","factory","i0","Select","ActivitiesSelectBoxComponent","activityService","showTitle","inGrid","showActivities","EventEmitter","typesDictionary","GetText","bind","GetDropDownWidth","ngOnInit","subscribe","types","Object","assign","map","x","ActivityTypeID","ActivityName","data","activitySelectedEvent","emit","selectedActivityId","ActivityId","ActivityType","Description","selectors","PhraseBookType","EquipJobListSource","EquipmentStatus","JobTabEnum","Module","SettingId","NewQuoteEquipment","PageableDatastoreService","key","datasource","pageIndex","isLastPage","itemIndex","hasLoaded","GetDataSource","resetDatasource","GetDataSourceObject","SetCurrentItem","currentId","_this","items","index","findIndex","load","IsPreviousAvailable","validateCall","IsNextAvailable","GetNextId","GetDirectionalId","GetPreviousId","Error","direction","_this2","pageChange","EquipmentDataService","odataService","super","odataKey","equipmentODataUrl","EquipmentOData","GetJobListDataSource","customerId","url","ServiceSightOData","keyType","queryStringParams","GetEquipmentRefrigerantDataSource","MoveEquipmentToJob","model","put","UpdateEquipmentStatus","RemoveJobEquipment","equipmentItemIds","request","body","RemoveJobMakeModel","RemoveQuoteEquipment","quoteId","revisionId","Quotes","UpdateQuoteWorkRequired","UpdateWorkRequired","UpdateJobMakeModelWorkRequired","UpdateFlatCharge","UpdateJobEquipment","UpdateMakeModelLine","UpdateWorkReport","GetJobEquipment","jobId","GetEquipmentForJob","GetInstalledEquipmentForJob","GetJobMakeModelInstall","SaveJobMakeModel","post","makeModels","GetQuotebEquipment","GetJobVisit","GetMeterReading","equipmentId","Equipment","GetEquipmentInStockDataSource","makeModelId","paging","pageSize","GetEquipmentDataSource","enablePaging","undefined","GetEquipmentDataStore","GetStore","GetJobDataSource","GetEquipmentStockSource","GetViewPermission","actionName","res","IsAllowedView","GetButtonsCreatePermissions","GetDetails","GetContactDetails","siteId","locationId","contactId","GetMakeModel","GetAttributes","GetLocationsDataStore","GetCustomerLocationsDataStore","LocationId","CustomerID","AddEquipmentToJob","AddEquipmentToQuoteJob","SaveEquipmentsToQuoteJob","AddVisit","AddMakeModelToVisit","CopyToNewJob","equipmentIds","makeModelInstallIds","isNewJob","selectedJobId","GetAllCustomerLocations","GetCustomerEquipmentSystemDataStore","UpdateEquipmentCondition","conditionId","JobDataService","auth","SiteId","value","EquipmentId","JobEquipmentChanged","jobEquipmentChanged","toPromise","GetActiveEquipmentJobDataSource","equipId","DataSourceOptions","GetJobStatus","GetDefaultContactID","GetDocuments","documentType","GetAllGroups","DownloadDocument","fileGuid","observe","responseType","IsReadyToComplete","GetJobCreatePermission","IsAllowedCreateJob","SaveRequestJob","job","options","sortSelector","sortDesc","beforeSend","e","params","$orderby","replace","$filter","_","capture","ModuleService","GetEnabledModules","getModulesFromServer","GetEnabledModulesAccess","val","arrayToModuleAccess","GetPortalIsEnabled","dbName","GateKeeper","CompanyExist","context","withCache","cacheKey","catchError","modules","ConsumerPortalEnabled","includes","Portal","AccountsLinkEnabled","AccountsLink","EquipmentEnabled","RecurringJobsEnabled","RecurringJobs","ServiceContractsEnabled","ServiceContract","StockEnabled","Stock","PurchaseOrdersEnabled","PurchaseOrders","ProEnabled","Pro","SalesOrderEnabled","SalesOrders","PowerBiEnabled","PowerBI","SalesOpportunityEnabled","SalesOpportunity","SalesCampaignsEnabled","SalesCampaigns","FGasEnabled","FGas","GasSafeEnabled","GasSafe","CustomerFeedbackEnabled","CustomerFeedback","TimesheetsEnabled","Timesheets","AdvancedQuotesEnabled","AdvancedQuotes","CFTSEnabled","CFTS","Sfg20Enabled","Sfg20","ProjectEnabled","Projects","SettingsService","authService","appConfig","subscription","ReplaySubject","cachedSettings","Init","getLocale","JSON","parse","localStorage","getItem","navigator","language","unsubscribe","settingId","hasOwnProperty","settingIdValue","substring","combineLatest","timer","IsAuthenticated","tap","settings","forEach","setting","SettingID","settingsSubject","getSettingPromise","bypassCache","firstValueFrom","getSetting","observable","getSettingFromServer","distinctUntilChanged","takeWhile","SaveSetting","UpdateCacheValue","UpdateFile","GetSettingsDataSource","settingFromServer","OdataService","DataSource","store","paginate","token","Token","ODataStore","version","deserializeDates","headers","Authorization","GetDataSourceWithLookups","sourceData","sourceKey","lookupMapping","CustomStore","update","HandleUpdateCustomStore","remove","HandleRemoveCustomStore","insert","HandleInsertCustomStore","HandleLoadCustomStore","array","p","sourceItem","Promise","resolve","then","promises","lookup","byKey","dataKey","itemData","displayExprs","displayExpr","all","splice","insertedData","push","loadLookup","error","reject","promiseArray","SetLookupPromiseArray","lookupDataParts","lookupData","concat","apply","SetLookupDataDisplayExpression","allValues","Set","preFilter","lookupKey","filter","i","pop","dataSource","stringify","sourceDataItem","lookupDataItem","find","l","target","original","StoreService","storeODataBaseUrl","StockOData","GetStores","FormMessages","Errors","Warnings","ResponseType","FormMesssageService","responseMap","ClearForm","formName","RegisterObservable","saveObservable","replacement","Map","resultSubject","IsProteanResponse","IsSuccess","SuccessWithWarnings","HandleSuccess","HandleError","response","RegisterChainableObservable","complete","RegisterPromise","promise","catch","RegisterComponent","isNewlyCreated","ShowWarning","message","messages","control","obj","summaryErrors","errors","keys","DoReplacements","join","Messages","Message","full","contents","PhraseBookService","GetPhrases","phraseTypeId","OnSaveButtonClicked","OnCancelButtonClicked","PhraseBookListComponent","phraseBookService","selectedPhrases","IsModal","modalWindow","OnSearchPhraseChanged","phrase","grid","instance","clearFilter","OnSelectionChanged","getSelectedRowsData","phrases","clearSelection","OnCloseWindow","ngOnChanges","phraseType","phraseBookOData","onShowing","visible","ctx","PhraseBookModalComponent","showWindow","Show","PhraseBookTextAreaComponent","moduleService","UntypedFormControl","disabled","phraseBookEnabled","proEnabled","buttonId","id","text","disable","enable","setValue","onValueChanged","valueChanged","applyPhrases","combinedText","Phrase","unshift","SelectActivity","WorkRequiredComponent","title","workRequired","showDialog","isProEnabled","SetText","item","WorkRequired","document","querySelector","classList","add","workRequiredEvent","ClearData","Cancel","OnHiding","OnChangeDebouncedDirective","debounceTime","changeDebounced","emitEvent","takeUntil","emitChange","ngOnDestroy","onKeyUp","event","preventDefault","EquipmentStatusPipe","Returned","ForHire","OnHire","Rental","CustomersOwn","Retired","Sold","transform","safeValue","Number","isNaN","stringValueMapping","status","pure","FilterStoreList","onEquipmentSystemGroupChecked","ToggleRow","column_r28","CreateNewEquipment","AddEquipmentComponent","dataService","jobDataService","formMessageService","router","settingsService","storeService","routerLink","skipWorkRequired","EquipmentTab","usedEquipment","newEquipmentSearchText","selectedEquipmentKeys","isEquipmentSystemsEnabled","useAdditionalStores","storeId","isPortal","isPortalUser","jobDetailBaseLink","link","baseDetailLinkJob","calculateStatusFilter","IsInstallTab","displaySource","InstallTab","changes","currentValue","HideDialog","equipmentSystemDataStore","EquipmentSystems","ValueBool","UseAdditionalStores","settingData","storeList","showSystemGroups","IsSelectedEquipment","newEquipmentGrid","deselectAll","GetDataSources","refresh","WorkRequiredOpen","AddItem","workRequiredComponent","UseRouterLink","selectedEquipmentIds","el","EquipId","JobId","SelectedEquipmentIds","IsInstall","newQuoteEquipment","self","o","Notes","shouldAdd","closed","NewEquipmentFilterChanged","$event","newEquipmentFilter","currentTarget","retiredStatus","SetFilters","NewEquipmentSearchTextChanged","searchByText","activeJobCount","jobDataSources","delete","set","navigate","state","sourceTab","Install","onGridSelectionChanged","args","useGroupCheckBoxes","SynchronizeCheckBoxes","currentDeselectedRowKeys","selectedRowKeys","collapsedItems","selectRows","deselectRows","filters","equipmentDataSource","filterUsedEquipment","equipmentSystemGroupSelectedValues","EquipmentSystemId","equipmentFilter","filterValue","selectedFilterOperation","filterType","FilteredStatus","defaultCalculateFilterExpression","toUpperCase","rowIndex","getRowIndexByKey","equipmentSystemId","cellValue","group","everyChecked","every","someChecked","some","AttributeType","HelpItemTagEnum","HelpService","httpClient","description","href","type","tags","JobType","MaterialType","Employees","CancelReason","PublicHolidays","LabourRate","Jobs","Customers","SecurityRoles","Currencies","InspectionTemplate","PhraseBook","Dashboard","GeneralSettings","UserReferences","JobPlannerboard","ReasonsNotDone","JobTitle","ReminderType","JobGroup","Reminders","CustomerUpload","Contacts","TaxProfiles","PaymentSettings","LicenceViewer","EquipmentCondition","getItemsByTags","walkthroughsResult","walkthroughs","tag","videosResult","videos","knowledgebaseResult","knowledgebase","searchVideos","query","split","word","part","toLowerCase","searchWalkthroughs","searchKnowledgeBase","Observable","observer","encodeURIComponent","html","parseString","err","result","niceData","ul","li","a","span","$","openHelpModal","openHelpRequested","ButtonWithHelpComponent","helpService","translateService","helpItems","primaryActionText","primaryActionTranslationKey","setItems","primaryActionLink","primaryAction","primaryActionUrl","primaryActionFunction","helpItemsTags","itemClick","action","window","location","icon","ChartLoaderService","injector","factoryResolver","getChartComponent","component","componentRef","resolveComponentFactory","create","BaseChartComponent","EquipmentUpTimeComponent","translate","datasourceAlt","instant","EquipmentChartService","GetWatchList","EmptyChartComponent","EquipmentWatchListComponent","equipmentService","showChart","titleY","OnsiteResponseTimesComponent","ChartsModule","CommonModule","DxCircularGaugeModule","DxChartModule","TranslateModule","data_r1","ColourDropdownComponent","newValue","selectedValue","onTouchedCallback","onChangeCallback","selectedValueChange","writeValue","registerOnChange","fn","registerOnTouched","provide","NG_VALUE_ACCESSOR","useExisting","forwardRef","multi","decls","CreditNoteStatus","GridKind","CreditNoteService","GetCreditNotes","GridService","gridUrl","GetLayout","kind","SaveLayout","layout","Layout","ResetLayout","CustomDatePipe","format","formatDate","console","CurrencyPipe","currencyCode","Intl","NumberFormat","currentLang","style","currency","CreditNoteStatusPipe","Credited","Entry","CreditNoteStatusBarPipe","bg","bgcolors","bar","filterChanged","CreditNotesListComponent","gridService","creditNoteService","showCustomerNameService","searchText","selectedStatusCreditNote","baseLink","ShowCustomerName","showCustomerName","CreditNotes","dataGrid","getDataSources","enabledModules","searchTextChanged","encodeURI","saveLayout","resetLayout","viewDetails","Id","creditNotesDataSource","DespatchNoteStatus","SalesOrdersType","DespatchNotesService","SalesOrdersOData","GridExportService","exportGridAsPdf","dataGridInstance","filename","customizeCellFunction","exportGridAsPdfAsync","doc","jsPDF","exportDataGridToPdf","jsPDFDocument","customizeCell","save","exportGridAsXlsx","exportXlsxOrCsvAsync","exportGridAsCsv","exportGridAsXlsxAsync","exportGridAsCsvAsync","workbook","ExcelJS","worksheet","addWorksheet","exportDataGridToXlsx","gridCell","excelCell","rowType","column","dataType","exportXlsx","exportCsv","xlsx","writeBuffer","buffer","saveAs","Blob","csv","PermissionsService","ArePermissionsLoaded","getPermissionsHttp","permissions","CurrentUserHasPermission","permission","CurrentUserHasPermissions","cache","allowed","reduce","dictionary","DespatchNoteStatusBarPipe","Cancelled","Pending","Allocated","Despatched","Invoiced","DespatchNoteStatusPipe","despatchStatus","FilterChanged","OpenColumnChooser","onExportItemClick","DespatchNotesListComponent","despatchNotesService","permissionsService","gridExportService","IsProEnabled","SearchText","EdmLiteral","name","label","Parts","Materials","gridState","despatchNotesExcelCustomCellFunction","dataField","getDespatchNotesTypeText","despatchNotesPdfCustomCellFunction","pdfCell","CalculateSearchFilterForDespatchId","CalculateSearchFilterForSalesId","CalculateSearchFilterForInvoiceNo","CalculateStatusFilter","Load","isAllowedView","onInitialized","option","SearchTextChanged","EquipmentAndParts","All","PartsAndMaterials","EquipmentAndMaterials","DespatchNotes","showColumnChooser","orientation","columnVisible","defaultValue","columns","GoToDetail","CalculateSearchFilter","despatchNoteData","typeValue","IncludeEquipment","IncludeParts","IncludeMaterials","EngineersService","GetEngineerTypes","GetAllEngineers","EngineerSelectorComponent","sanitizer","engineersService","Engineers","onChange","initialValue","selectedEngineer","getEngineer","onTouched","TypeId","Name","engineers","eng","IsActive","sort","b","OnEngineerChanged","selectedEngineerChanged","PreviousEngineerId","previousValue","CurrentEngineerId","SelectedEngineer","GetImage","base64string","bypassSecurityTrustResourceUrl","selectBoxOpened","list","_list","_scrollView","reload","employeeId","UICustomisation","UserRefType","CustomerService","GetCustomersDataSource","GetCustomerDataStore","GetSiteIdsByInvoiceId","invoiceId","customers","customer","Get","GetCustomerSimpleModel","GetCustomerMetaData","GetCustomerHistory","GetCustomerAndSite","site","forkJoin","DefaultReverseChargeValue","IsOrderNumberRequired","GetCustomerContactsAsync","GetCustomerSitesAsync","GetNewCustomer","accountType","parentId","CreateCustomer","UserReferenceService","UserRefs","getLabel","customisation","ref","r","UICustomisationID","CustomText","OriginalText","getListDataSource","userReferenceId","getListDataStore","uploadButtonItemClick","NewEquipment","openColumnChooser","item_r41","EquipmentListComponent","customerService","route","userRefService","isAllowedCreateEquipment","IsRecurringJobModuleEnabled","IsFGasModuleEnabled","IsServiceContractModuleEnabled","EquipmentFilters","uploadButtonItems","equipFilter","displayEquipmentConditionsOnWebPortal","baseDetailLink","serviceContractDetailsBaseLink","contractBaseLink","nav","getCurrentNavigation","extras","equipIds","columnHidePriority","columnName","hidePriority","indexOf","DisplayEquipmentConditionsOnWebPortal","userRef1Label","EQUIPMENT_REF1","userRef2Label","EQUIPMENT_REF2","userRef3Label","EQUIPMENT_REF3","EQUIP_1","cachedUserRef1","IsAllowedEquipmentCreate","translations","FilterByCustomer","SetDisplayValue","InvoiceId","CustomerId","CustomerLogo","isConditionColumnVisible","statusFilter","ids","RefrigerantData","CustomerEquipmentSystemsService","GetEquipmentSystem","RefrigerantTypeService","refrigerantTypeODataBaseUrl","FGasOData","CustomerAccountType","LogPreviewType","RefrigerantTransactionType","RefrigerantTransactionTypePipe","Addition","Removal","LeakTest","Decant","InitialCharge","refrigerantTransactionType","RefrigerantTransactionService","GetRefrigerantTransactions","GetCorrections","transactionId","ViewLog","AddLog","data_r27","item_r32","item_r51","item_r73","FGasLogComponent","transactionsService","refrigerantTransactionTypePipe","cylinderId","agentId","systemId","displayAddButton","disabledAddButton","hasDecantPermission","units","Prospect","logTypeDataOptions","gridKind","fGasLogCustomCellFunction","formatCellValue","SrcTypeId","DestTypeId","contactForCustomerType","CustomerType","getTransactionTypeSortValue","isHostPageMainFgasLog","isHostPageOverview","isCustomerPage","isCylinderPage","isEquipmentPage","isCustomer","Customer","isManagingAgent","ManagingAgent","isSite","Site","RefrigerantTransactionsCylinder","RefrigerantTransactionsCustomer","RefrigerantTransactionsEquipment","RefrigerantTransactions","FGasRefrigerantUnits","ValueListSelectedId","SetDataSources","toLocalString","row","date","Date","LogDate","getTime","getTimezoneOffset","toLocaleDateString","calculateLoggedDateFilter","rowData","piped","TransactionType","Status","selectionMode","logsDataSource","logTypeId","TransactionId","docId","previewType","Main","System","Cylinder","gridFilter","getCombinedFilter","previewPath","queryParams","addLogEntry","ctx_r3","EquipmentRefrigerantComponent","customerEquipmentSystemsService","refrigerantTypeService","system","equipmentModel","equipment","systemModel","systemUrl","hasSystem","globalWarmingPotential","refrigerantType","GlobalWarmingPotential","co2equivalent","DesignCapacity","leakTestFrequency","RefrigerantTypeId","getEmptyRefrigrantData","refrigerantTypeDataSource","unit","OpenLogEntryDialog","openLogEntryDialog","UpdateRefrigerantType","refrigerantTypeId","refrigerantTypeChange","OnLogAdded","logList","OnLogUpdated","CurrentCharge","CurrentChargeEditable","RefrigerantTypeEditable","ControlContainer","deps","Optional","NgForm","useFactory","ngForm","AddVisitComponent","service","jobVisitCollection","selectedVisit","IsJobSessionSelected","jobVisitGrid","visits","Save","SessionId","SessionID","EquipmentItemIds","MakeModelInstallIds","JobStatus","InspectionService","RefreshDataSource","refreshDataSource","EquipmentChanged","equipmentChanged","InspectionChanged","inspectionChanged","MoveToJobDialogComponent","inspectionsService","selectedJob","IsJobSelected","COMPLETED","jobListGrid","jobDataSource","CreateNewJob","shift","JobEquipmentStatus","EquipmentConditionService","BaseUrl","ODataBaseUrl","GetCondition","DeleteCondition","GetConditionDataSource","GetConditionUsageCount","GetAll","UpdateSortOrder","fromIndex","toIndex","SaveCondition","condition","InspectionDataService","InspectionsOData","GetNumberOfEquipmentInspections","Inspections","InstallLineTypeEnum","MakeModelSharedService","GetMakeModelsDataSource","GetMakeModelsDataStore","MakeModelStoreEquipmentCount","Sfg20Service","GetSfg20ScheduleIntervals","scheduleId","GetDataStore","onItemClick","Sfg20ScheduleSelectBoxComponent","sfg20service","rowMode","isEnabled","scheduleCodesSource","Sort","selector","desc","itemSelected","Sfg20ScheduleId","form","markAsDirty","valueCleared","valueChange","ModuleAccessModel","EquipmentPermissionsService","Reload","HasAddEquipmentPermission","AddEquipment","HasEditEquipmentPermission","EditEquipment","HasDeleteEquipmentPermission","DeleteEquipment","HasAddAttributePermission","AddAttribute","HasEditAttributePermission","EditAttribute","HasDeleteAttributePermission","DeleteAttribute","HasAddCategoryPermission","AddCategory","HasEditCategoryPermission","EditCategory","HasDeleteCategoryPermission","DeleteCategory","HasAddMakeModelPermission","AddMakeModel","HasEditMakeModelPermission","EditMakeModel","HasDeleteMakeModelPermission","DeleteMakeModel","RedirectTo","MakeModelListComponent","makeModelService","isAddDialogue","selected","supplierId","equipmentStockCount","calculateCount","hasAddPermission","modulesAccess","MakeModels","supplierIdChange","repaint","SetFilter","selectedChange","makeModelDataSource","storeCount","MakeModelId","count","Stores","StoreId","Count","CustomSortingFunction","Make","Model","CalculateFilterExpression","Sfg20ScheduleIntervalSelectBoxComponent","sfg20Service","isVisible","intervalSelectionDisabled","scheduleIntervals","interval","FrequencyDuration","JobEquipmentPipe","Outstanding","NotDone","Done","Skipped","Moved","jobEquipmentStatus","UpdateStatus","AddToVisit","MoveToNewJob","OpenNewEquipmentDialog","OpenNewMakeModelDialog","NavigateToFiles","conditionValueChanged","OpenSessionWindow","item_r87","item_r94","item_r97","NavigateToInspection","item_r111","item_r117","EditWorkReport","cellData_r133","ctx_r43","OnSfgScheduleChanged","OnSfgIntervalChanged","Close","EquipmentJobListComponent","inspectionsDataService","translation","conditionService","filesColumnEnabled","jobEquipmentCollection","showPriceColumn","equipmentEditId","isLoading","selectedLineIds","moveToJobDisabled","showDeleteMessage","jobEquipStatus","jobStatusValue","showConditionInPortal","intallationTypes","makeModelDialogVisible","selectedMakeModelIds","addVisitText","StatusId","showWarning","EditRowDisabled","GetJobEquipmentData","SaveState","LoadState","EditorPreparing","sfg20Enabled","sfg20Schedules","conditions","SelectedEquipItemIds","IsSelectedLine","ModifyEnabled","PortalModifyEnabled","WebModifyEnabled","showCondition","EditMode","jobStatus","LineId","InstallLineType","EquipItemId","SelectedMakeModelInstallIds","MakeModel","MakeModelInstallId","ButtonDisabled","makeModelStore","addVisitOptions","EditWorkRequired","jobEquipmentGrid","cellData","SetSfg20IntervalValue","FrequencyInterval","FrequencyPeriod","SfgIntervalEditDisabled","GetJobEquipmentRowScheduleId","GetSfg20IntervalDisplayValue","Sfg20FrequencyInterval","Sfg20FrequencyPeriod","frequencyInterval","frequencyPeriod","OnRowUpdated","FlatCharge","Price","ReloadView","Cost","Qty","Remove","deleteMessage","lastValueFrom","JobEquip","currentStateColumns","savedStateColumns","savedStateColumNames","newColumn","newColumnIndex","visibleIndex","SfgColumnVisible","parentType","isEquipmentLine","editorOptions","MeterColumnVisible","showMeterColumn","ConfirmDeleteAction","jobEquipmentCollectionChange","observablesArray","CancelDeleteAction","addVisitComponent","OnAddVisitClosed","validator","subscriber","moveToNewJobComponent","EntityId","Failure","addEquipmentComponent","AddEquipments","selectedEquipment","Equip","EquipNumber","Guid","MarkAsOutOfAction","isOutOfActionCondition","ConditionId","makeModelWorkRequiredComponent","AddMakeModels","_this3","makeModelsToSave","makeModel","supplierPrice","SupplierPrices","s","Preferred","OnMoveToJobClosed","openVisit","equipItemId","workReportComponent","workRequiredDialogueModel","jobEquip","OnEditWorkRequired","updateEquipmentWorkRequiredObservable","updateMakeModelWorkRequiredObservable","OnEditWorkReport","stopPropagation","openInspections","openFiles","locationStore","onEquipmentSelectionChanged","selectedRowsData","eq","MeterUnits","onCellPrepared","cellTemplate","cellElement","className","element","on","arg","conditionTooltipText","ConditionName","tooltip","show","hide","Ooa","Array","getJobMakeModelInstallObservable","getJobEquipmentObservable","results","equip","makeModelsToEquip","mapMakeModelsToEquipmentJobModels","equipmentCalls","rd","reading","ec","meterReading","MeterReading","jobSessionsCollection","m","lineId","FurtherWork","Visit","FilesCount","AddedOnMobile","DxTooltipComponent","ErrorMessages","ErrorMessagePipe","isGeneric","GenericFormMessagesComponent","successMessage","showSuccess","formErrors","formWarnings","serverErrors","canShowSuccessMessage","dirty","ClearFormErrors","markAsPristine","ngAfterContentInit","onSubmit","viewModelErrors","viewModel","Validate","invalid","controls","errorObjs","er","values","cancelBubble","ngSubmit","DocumentTypeEnum","AttributesService","ODataStoreAttributes","docTypeId","docType","ODataStoreCategories","GetAttributeListDataSource","attributeId","DateOnlyService","RecalculateDateOnLoad","datetime","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","RecalculateDateOnSave","UTC","getFullYear","getMonth","getDate","getHours","getMinutes","ReverseUTC","SelectedTypePipe","List","Memo","YesNo","Numeric","Text","attributesTypes","OnCftsDataChanges","DeleteGenericAttributes","ShowAddAttributesDialogue","ctx_r34","data_r38","ShowEditAttributesDialogue","SetValue","SetListValue","SetDate","ctx_r11","GenericAttributesComponent","attributeService","dateOnlyService","readOnly","showDeleteConfirmationMessage","cftsAreaVisible","attributelist","attributeType","selectedCategoryId","showAttributeDialog","editorAttributeType","showEditAttributeDialog","selectedAttributeIds","selectedGenericAttributeIds","usedAttributes","isCftsEnabled","YearOfManufacture","AttachmentLc","AttachmentSwl","Lc","Swl","attributesDataStore","SetDataSource","attributesAddDialogDataSource","categoriesDataStore","genericAttributes","AttributeId","genericAttributeGrid","cftsData","equipmentCfts","customerCftsMemberNumber","attributeGrid","AttributeCatId","filterUsedAttributes","Job","genericId","overflow","CloseEditAttributesDialogue","editValue","Value","editText","editAttributeData","GetType","attributeTypeListDataSource","CloseAttributesDialogue","DialogClosed","AddAttributes","newItem","genericAttributesChanged","DeleteAttributes","f","GetValue","displayValue","DisplayDate","attribute","AttributeTypeId","SetBoolean","toLocaleString","textContent","EditAttributes","ValueSorting","calculateCellValue","cftsDataChanged","genericAttributesDataSource","VideoModalComponent","videoTitle","videoUrl","videoVisible","internalVideoVisble","pauseVideo","videoVisibleChange","playVideo","video","nativeElement","play","pause","ElementRef","item_r3","searchValueChanged","HelpModalComponent","suggestedHelpLink","helpVisible","selectedIndex","searchValue","defaultSearchResults","searchResults","displayVideoTitle","displayVideoUrl","displayVideoVisible","handleKeydown","internalHelpVisble","helpVisibleChange","suggestedHelpPage","parts","c","removeEventListener","gtag","event_category","addEventListener","searchChanged","event_label","openItem","Appcues","open","getTypeText","getTypeIcon","scrollToActiveItem","activeItem","scrollView","scrollToElement","DxScrollViewComponent","InspectionStatus","InspectionStatusPipe","InspectionsListComponent","isRecurringJobsModuleEnabled","plannerBoardEnabled","skippedStatus","inspectionDetailBaseLink","UseJobRouterLink","inspectionsDataSource","calculateJobSession","InspectionId","InvoiceExportOption","ProteanSystem","InvoiceDataService","GetInvoiceListMetaData","GetInvoiceIdByNumber","invoiceNo","GetInvoiceHeader","GetInvoiceMetadata","GetInvoiceDocuments","MarkPrinted","MarkAsPaid","MarkAsUnpaid","DocumentTypePipe","Service","SalesOrder","Despatches","exportInvoices","InvoiceListComponent","invoiceDataService","ng1InvoiceService","translator","selectedItem","creditNoteBaseLink","batchInvoicesBaseLink","XeroConnected","QBConnected","IsAccountsConnected","IsAllowedToSync","IsQbConnected","IsSageConnected","IsXeroConnected","invoiceDetailBaseLink","Invoice","metadata","sageExportOptions","Sage50","SageBusinessCloud","RestoreSavedLayout","invoiceDataSource","getFilterId","exportOption","calculateSearchFilterForInvoiceNo","snapshot","paramMap","JobOrderStatus","JobStatusPipe","CANCELLED","ENTRY","CREDIT_HOLD","ORDER_NO_REQ","AUTO_ENTRY","ESTIMATED","QUOTED","REQUESTED","UNALLOCATED","PARTS_IN","WAITING_ACCEPTANCE","ALLOCATED","EN_ROUTE","ON_SITE","AWAITING_PARTS","SITE_ATTENDED","FURTHER_WORK_REQUIRED","READY_TO_COMPLETE","AWAITING_DETAILS","AUTHORISE_REQ","COMPLETED_UNCHARGEABLE","INVOICE_MARKED","INVOICED","BATCH_UPDATED","ARCHIVED","PriorityService","OrderedPrioritiesDataSource","PurchaseOrderDataService","GetJobOrderDataStore","PurchaseOrdersOData","PlannedJobsReportService","GetReport","RecurringJob","GetSvcJobRunReport","svcJobRunId","JobStatusBarPipe","Chargeable","Code","JobStatusBarPortalPipe","GetPortalCode","valueOf","newJob","data_r44","item_r69","onMasterDetailCellPrepared","ctx_r21","JobsListComponent","jobStatusPipe","jobsService","purchaseOrderDataService","plannedJobsReportService","settingService","jobEquipmentPipe","currencyPipe","priorityService","showHeader","preselectedFilter","dataSources","locationsDataSources","helpItemTagEnum","isPurchaseOrderModuleEnabled","jobGroups","inspectionsEnabled","isJobWizardEnabled","isSalesOpportunityEnabled","Subscription","statusDisplayValue","GetSortJobEquipmentStatusDescription","FormatCurrency","jobOrderCellValue","onEditorPreparing","statusDataSource","EquipmentOOAVisible","EquipmentOoaColumnInGridVisible","getVisibleColumns","RjRunStatus","IsRecurringJobRunInProgress","rjRunProgress","jobEquipmentDataSource","jobOrderDataStore","prioritiesDataSource","GetUserReferences","searchJobsByEquipmentId","searchJobsBySvcJobRunId","rjRunProgressSubscription","startWith","showRjRunProgress","jobsDataSource","queryParamMap","getAll","isAllowedCreateJob","isEquipmentModuleEnabled","JobCreationWizard","jobWizardSetting","onDataErrorOccurred","requestOptions","$top","stack","JobTotal","baseCurrencyCode","searchJobsDataSource","jobGroupId","JobGroupID","jobGroup","UICustomisations","userRefJob1","userRefJob1Label","userRefJob2","userRefJob2Label","svcJobRunIdFilter","equipIdFilter","jobEquips","Infinity","search","calculateEquipmentIdsValue","EquipmentIds","calculateDueDateFilter","calculateNextVisitDateFilter","GetStatus","getEquipments","GetLocationDataStore","source","SortOrderStatus","JobID","rowdata","tooltipText","editorName","prioritiesNames","JobOrderOutstandingDays","BookedIn","calculateJobOrderFilter","log","calculatePriorityFilter","report","JobCount","NoOfJobs","moment","diff","CreatedDate","LeavingFormMessageService","ShowMessage","subject","asObservable","Result","ShowInfoMessage","SetResult","LeavingFormMessageComponent","leavingService","Proceed","CloseModal","showMessage","MultipleSelectionComponent","selectNodesRecursive","treeBoxValue","syncTreeViewSelection","treeView","unselectAll","selectItem","getSelectedItemsKeys","selectedItems","treeView_itemSelectionChanged","nodes","getNodes","DxTreeViewComponent","PhraseBookModule","DxDataGridModule","DxTextBoxModule","DxTextAreaModule","DxButtonModule","DxPopupModule","FormsModule","ReactiveFormsModule","SalesQuoteStatus","QuoteDataService","GetQuotesDataSource","QuotesOData","QuoteStatusBarPipe","Quoted","Lost","LOST","Won","WON","Requested","NotRequired","NOT_REQUIRED","QuoteStatusPipe","quoteStatus","ctx_r20","QuotesListComponent","quoteDataService","salesOpportunityEnabled","salesCampaignsEnabled","quotedStatus","requestedStatus","wonStatus","lostStatus","cancelledStatus","quoteDetailsBaseLink","quoteBaseLink","baseQuotelLink","tempmessage","quotesDataSource","allowLink","SalesQuotationId","RevisionId","columnOption","TotalValue","userRefQuote1","QUOTE_REF1","UserRef1Label","userRefQuote2","QUOTE_REF2","UserRef2Label","ReportViewerComponent","reportUrl","firstRun","invokeAction","isDocumentExist","ajaxSetup","isMobile","innerWidth","isNetCore","callPrint","viewer","bindingSender","Print","callDownload","ExportTo","print","download","CustomizeMenuActions","zoomAction","GetById","ActionId","zoom","multipageAction","clickAction","DxReportViewerComponent","SalesOrderStatus","SalesOrderService","SalesOrderStatusBarPipe","Placed","PartiallyDispatched","Complete","SalesOrderStatusPipe","salesOrderStatus","SalesOrdersListComponent","salesOrderService","userRefsService","isAllowedCreate","orderStatus","salesOrderExcelCustomCellFunction","getSalesOrderTypeText","salesOrderPdfCustomCellFunction","getUserReferenceLabels","GoToSalesOrder","userRefSales1Label","SALES_REF1","userRefSales2Label","SALES_REF2","salesOrderData","SecondLevelNavigationComponent","permissionService","hasAnyDevice","MatchingRootPath","Items","translationKey","jsRoute","routeSegments","isActive","hash","enabled","powerBiEnabled","customerContactsPermission","quotesPermission","surveysEnabled","inspectionViewPermission","plannerBoardPermission","recurringJobsEnabled","projectsEnabled","equipmentEnabled","stockAdjustmentPermission","purchaseOrdersEnabled","showItems","authSub","isAuthenticated","dataSub","InspectionView","StockAdjustmentView","QuoteView","CustomerContactView","LocationChanged","onUrlChangeUnsubscribe","onUrlChange","SetItems","isMarketing","endsWith","matchFound","navTree","test","n","JobVisitDataService","GetJobsDataStore","GetJobVisits","SelectJobVisitComponent","SelectItem","ServiceContractStatus","ServiceContractStatusPipe","static","stringVal","transformFromEnum","ServiceContractPermissionService","ServiceContracts","AddContractTypePermission","ContractTypeAdd","AddContractPermission","ContractAdd","ViewContractPermission","ContractView","ServiceContractsService","ServiceContractsOData","fieldTypes","MaintContractId","GetEquipmentContractDataSource","ServiceContractStatusColourPipe","Active","ActiveInvoice","TerminatedAwaitingReadings","Terminated","InvoiceMarked","Completed","Archived","numericValue","cssClass","UploadSelected","ServiceContractsListComponent","routerLinkService","serviceContractsService","serviceContractsPermissionService","statusPipe","isAllowedCreateContract","serviceContractDataSource","uploadEnabled","ynDataSource","StatusToText","CalculateSearchFilterForMaintContactId","uploads","Contracts","OnFilterChange","AnnualCharge","userRefCylinder1","MAINT_CONTRACT_REF1","userRefCylinder2","MAINT_CONTRACT_REF2","ServicePartsSorting","ServicingComponentUsageEnum","StockService","GetStockParts","removePaging","GetStockStoreParts","StockHeaderId","GetUserRef1Stock","GetUserRef2Stock","ODataStockTypeServiceLevels","ObsoleteOption","AddPartsBaseComponent","showEquivalentsFilter","ActiveParts","supersededPartsIds","obsoleteFilter","OnStockListRowPrepared","Obsolete","rowElement","filterEquivalences","ShowEquivalent","ClearSearchText","EquivalencyId","selectedPartName","PartNo","ClearEquivalencesFilters","ObsoleteOptionChanged","AllParts","setObsoleteOptions","obsoleteOptions","part_r9","DeleteParts","OpenAddPartsDialog","ParentInputChanged","ctx_r0","option_r23","ServicePartsComponent","stockService","UserRef1Stock","UserRef2Stock","stockTypeOData","selectedServiceParts","ServicePartsItems","showAddPartsDialog","newStockPartSearchText","selectedPartTypes","isStockEnabled","sortingType","allCheckboxValue","componentUsedOn","storeIdFilter","sortingDescending","stockPartsDataSource","setInitFilters","servicingSource","servicingSourceEl","servicingEl","ServiceLevelId","serviceLevelId","ServiceParts","NewStockPartSearchTextChanged","NewStockPartsFilterChanged","stockTypeIdFilter","EmitStockParts","usedStockHeaderIds","SetPartsToHighlight","AddStockParts","selectedPart","serviceParts","InputChanged","stockHeaderId","selectedItemsQuantity","indeterminateCheckboxValue","RemoveButtonDisabled","sortCol","s1","s2","Default","compare","allowIntegersOnly","quantity","Math","round","propName","SupercededById","VisualizerModuleType","ServiceGroupCustomerModel","RecurringJobsService","GetJobForSite","year","GetJobForEquipment","GetJobForServiceGroup","serviceGroupId","GetMinMaxYear","moduleType","itemId","shouldReload","GetServiceJobTypes","SaveTempVisualizerData","usedOn","searchedId","visualizerData","goToJobs","jobs_r7","toggleTooltip","month_r3","ServicingVisualiserComponent","datePipe","recurringJobsService","tooltipVisible","Months","prev","now","toISOString","lastServiceType","lastServiceDate","nextServiceType","nextServiceDate","isTempData","isCompletelyEmpty","servicingVisualiserModel","month","jobTypesQuantity","servicingData","saveTempData","main","getElementById","jobTypeItems","cachedGenericId","serviceGroupData","ServiceGroups","Equipments","usedOnComponent","ServiceGroup","tearDownSubscriptions","getDataForYear","isNextYear","disableButton","tempServicingData","handleBoxesBackgroundAndDates","innerIndex","getMinAndMaxYear","initializeTooltips","nextAndLastData","nextService","tsd","NextDue","lastService","LastService","JobTypeID","DefaultJobType","currentYear","prevYear","nextYear","currentMonthIndex","SetLastServiceDate","SetNextServiceDate","visualizerBoxes","lastDone","LastServices","SingleBoxData","toDate","nextDue","PlannedDates","outerIndex","monthJobList","jobList","DisablePlannedDates","disabledDates","DisableLastServices","dates","disableDates","newDate","maxDateValue","setDate","momentDates","startDate","clone","endDate","dayOfYear","nowDate","buttonDisabled","minYear","maxYear","visualizerModuleType","MinDate","MaxDate","jobIds","jobNumber","toggleVisibility","actualDates","selectedDate","convertedDate","handleDateFormat","day","foundJob","StripeCardFormComponent","billingAddress","amount","userId","clientSecret","ngAfterViewInit","stripe","Stripe","PublicKey","stripeAccount","elements","card","base","color","fontFamily","fontSize","padding","hidePostalCode","mount","showError","MakePayment","confirmCardPayment","payment_method","billing_details","getBilling","paymentSuccessful","createPaymentMethod","processPayment","Nonce","Amount","PaymentMethodId","paymentMethod","VerificationToken","PaymentIntentId","CardAction","handleCardAction","PaymentIntentClientSecret","paymentIntent","ba","AddressLine1","address","city","City","country","Country","line1","line2","AddressLine2","postal_code","PostCode","State","email","Email","FirstName","LastName","WizardStepComponent","progress","steps","currentStep","BypassSecurityTrustResourceUrlPipe","CustomerStatus","CustomerStatusPipe","PROSPECT","ACTIVE","MANAGING_AGENT","CLOSED","Closed","colour","colours","InspectionStatusValuePipe","SurveyQuestionType","QuestionTypePipe","TextArea","Smiles","Rating","Thumbs","questionTypes","SystemSalesOpportunityStatus","SalesOpportunityStatusPipe","Canncelled","SharedPipesModule","imports","LOCALE_ID","LocaleFactory","CustomerSelectInfo","customer_r1","CustomersSelectBoxComponent","targetElementId","class","dataFieldName","searchExpr","valueExpr","includeSites","includeProspects","isValid","customerSelectInfo","managingAgentsEnabled","calculateDropdownWidth","customerActiveStatuses","statuses","CustomerManagingAgents","ChangeCustomer","customerChanged","OpenSelectBox","IsSite","currentElement","targetElement","currentBoundingClientRect","getBoundingClientRect","targetBoundingClientRect","left","right","width","GetCustomerInformation","CreditHold","OnHold","ExceededLimit","ServicesightSharedModule","registerPalette","simpleSet","indicatingSet","gradientSet","ngModule","providers","LocaleFactoryProvider","useClass","DxProgressBarModule","HttpClientModule","RouterModule","DxTreeViewModule","DxSelectBoxModule","DxDropDownButtonModule","DxDateBoxModule","RecaptchaModule","RecaptchaFormsModule","DxReportViewerModule","DxPopoverModule","DxDropDownBoxModule","DxTooltipModule","DxCalendarModule","DxCheckBoxModule","DxSwitchModule","DxNumberBoxModule","DxButtonGroupModule","DxScrollViewModule","ContactService","GetAllContactsDataSource","GetContactsDataSource","GetContactsDataStore","ToasterService","popMessage","bread","interpolateParams","time","translated","notify","displayTime","closeOnClick","minWidth","position","at","my","offset","animation","from","popParams","AccountingService","GetAccountsInfo","IsUsaTaxSystem","LabourService","LabourChanged","labourChanged","CountryService","GetAllCountriesStore","GetRegions","countryId","Attributes","Servicing","ServicingItem","CustomerContact","CustomerModel","CustomerContactDetails","IsCustomer","InvoiceID","TransactionItem","RefrigerantTransaction","CustomerEquipmentSystemModel","RefrigerantTypeModel","ViewModel","Data","Proxy","changed","ModelChanged","ViewModelComponent","onChanges","CollectionProxy","setPrototypeOf","isObject","getProperty","func","property","species","Symbol","CollectionViewModel","Changed","EngineerType","JobGroupModel","EquipmentConditionModel","ToastType","CreditElementTypeEnum","CreditTypeEnum","StoreType","AccountType","HttpLoaderFactory","TranslateHttpLoader","CanDeactivateGuard","leavingFormMessageService","canDeactivate","Ng1ReminderService","$Injector","$injector","reminderService","CreateQuoteReminder","salesQuotationId","salesOpportunityId","CreateJobReminder","CreateEquipmentReminder","equipName","CreateContractReminder","contractId","CreateStockPartReminder","partNo","CreatePurchaseOrderReminder","purchaseOrderNumber","CreateGoodsReceivedNoteReminder","goodsReceivedNumber","CreateStockAdjustmentReminder","adjustmentId","CreateSupplierReminder","CreateCreditNotesReminder","creditId","CreateSalesOrderReminder","salesId","CreateDespatchNotesReminder","despatchId","CreateSalesOpportunityReminder","salesOppId","CreateReturnsNoteReminder","returnsNoteNumber","CreateCylinderReminder","cylinderNo","CreateFGasLogReminder","transactionReference","CreatePurchaseNoteReminder","purchaseNoteId","reference","MessageService","editDraft","NewMessage","GetReplyForMessageId","messageId","GetReplyAllForMessageId","SendMessage","files","formData","FormData","append","SaveDraft","Forward","GetDraftMessageId","DeleteMessage","GetConversationList","GetConversationDetail","GetMessagesNavigation","Archive","GetRecipientListPhotoFaces","GetRecipientsCollection","GetRefMessageForTypeAndID","entityTypeAndId","HttpParams","file","SetNewMessageParameters","newMessageParameters","GetNewMessageParameters","MessageDocTypeIds","MessageTypes","CreditNotesFormData","CreditNotesGridForJobComponent","customiseValue","IsSelected","selectedInvoiceItems","CreditElementType","PricePerItem","SalesValue","creditNotesDataForm","customerCurrencySymbol","CurrencySymbol","showTotalCreditInCustomerCurrrency","baseCurrencySymbol","editRow","isCostEditable","IsReversedRow","isQtyEditable","isMultiplierEditable","isRateEditable","isUnitsEditable","isChargeEditable","isUnitPriceVisible","cancelEditData","setTimeout","handleSelectionChange","handleTotalCredit","handleCheckboxes","handleDataChange","rowUpdated","Rate","Multiplier","Units","makeFormDirty","selectedRows","totalCredit","totalCreditInCustomerCurrrency","ExchangeRate","DocumentId","CreditNotesGridForMaintenanceComponent","CreditNotesService","GetCreditNoteElementsForJobOD","GetCreditNoteElementsForMaintenanceOD","GetCreditNoteFormData","EditCreditNotesData","editingData","DeleteCreditNote","CreditCreditNote","IsFullyCredited","AddCreditNote","GetCreditNoteEmailData","SendCreditNoteEmail","emailData","QueuedEmailType","AuthService","cacheManager","clear","GateKeeperUrl","TokenUrl","clearToken","IsAuthenticatedSubject","Username","AuthorizationData","userName","CompanyId","defaultcompanyid","IsSupportLogin","decoded","JwtDecode","Protean_IsSupportLogin","AUTH_DATA_KEY","setItem","UniqueUserId","uid","EmployeeId","decodedToken","Protean_EmployeeId","IsExpired","TrackUser","deployHotJar","exp","floor","refreshToken","XeroSignIn","verificationCode","access_token","refresh_token","useRefreshTokens","multi_company","multicompanyUser","defaultcompanyname","getVersionInfo","PROTEAN_API_SITE_URL","currentToken","tokenPromise","t","getRefresh","locks","innerToken","CallRefresh","tokenSubject","isRefreshToken","throwError","EmailService","quotesBaseUrl","substr","GetEmailData","inspectionId","SendEmail","EmailType","SenderEmployeeId","GetQuoteEmailData","templateId","SendQuoteEmail","GetGeneralEmailData","entityId","SendGeneralEmail","IncludeQuoteFiles","GetInvoiceEmailData","SendInvoiceEmail","SendInvoiceWithJobDocumentsEmail","AccordionDataService","getCustomerData","getSupplierData","getContactData","getInspectionData","getQuoteDetailsData","getQuoteRevisionsData","getEmployeeName","getWarningNotes","getSupplierWarningNotes","getCustomerJobDetailsData","getCancelReasonName","cancelReasonId","getCategoryTypeSubtypeByMakeModel","getEquipmentMeterReading","getEquipmentSystem","getCustomerLocationViewModel","getSupplierLocationViewModel","getJobDetail","JobCancelledChanged","jobCancelledChanged","getJobsByPartId","partId","getSalesOrdersByPartId","GetStockPurchases","getCreditNoteData","getCreditRaisedData","invoiceNoteIds","GetEquipmentPurchasingDetails","GetEquipmentSalesDetails","GetPurchaseOrderDetails","purchaseOrderId","GetPurchaseOrderReceipts","GetSalesOpportunityDetails","GetReturnsDetail","returnsId","GetOpenPurchaseOrders","GetStoreDetails","GetEngineerDetails","GetRemindersByDocument","documentId","GetReminderStatuses","EmailComponent","includeFilesDisabled","EmailData","IncludeFiles","InspectionsAttachments","attachInspectionPhotos","showMarkAsSentCheckBox","MarkAsSent","closeDialog","cancel","send","AttachInspectionPhotos","sendEmail","IsFilesIncluded","includeFiles","CustomerAccordionItemComponent","emailService","getCustomerInformation","openEmailDialog","To","EmailGeneral","showErrorSendMessage","showTemplateDialog","goToCustomer","OnStop","HelpAccordionItemComponent","fullUri","helpSite","helpUri","ConfirmationDialogueComponent","Ok","confirmed","callbackFunction","visibleNo","No","AccordionCreditNoteDataModel","CreditNotesAccordionItemComponent","currencySymbol","CreditNotesAccordionData","goToInvoice","goToJob","goToContract","goToSalesOrder","goToDespatch","CreditRaisedAccordionItemComponent","noteIds","CreditRaisedAccordionData","raisedCreditsExists","goToCreditNote","creditNoteId","RemindersAccordionItemComponent","accordionDataService","shortDateFormat","getCustomShortDateTimeFormat","statusesDictionary","showEye","showReminders","Due","getLocaleDate","accordionItems","sortReminders","reminders","statusDiff","timezoneOffset","CreditNotesFormComponent","customerODataService","creditFormData","creditNotesFormData","sitesDataSource","selectedCustomer","CreditedDate","CreditNotesDetailComponent","creditNotesService","messageService","ng1reminderService","allowCredit","CreditTypeId","CheckIsAnyRowSelected","TotalText","Elements","toFixed","dataForm","isAnyRowSelected","handleCreditedStatus","creditNoteElementsForJob","creditNoteElementsForMaintenance","accordionComponent","collapseItem","expandItem","creditNoteElements","assignProperObject","creditNoteData","creditNoteFormData","JobCreditNoteElements","MaintenanceCreditNoteElements","CreditButtonClicked","CreditId","fullyCredited","showCreditDialogue","Credit","ViewCreditButtonClicked","creditPrintOutUrl","onExistingRaisedCredits","areItemsExists","showCreditRaisedEye","refreshGridAndMakeFormDirty","CreateNewReminder","CreateNewMessage","startEditing","isCredited","creditNoteJobChild","creditNoteMaintenanceChild","calculateSelectedRow","summaryProcess","totalValue","isRowSelected","CreditNotesLayoutComponent","hostUrl","ServiceSightReports","creditNoteUrl","CallPrint","OpenEmailDialog","OpenDialog","showSuccessSendMessage","CloseDialog","routes","path","redirectTo","pathMatch","CreditNotesRoutingModule","Routes","GetDespatchNotesForSalesOrder","salesOrderId","Create","Update","Despatch","GetDespatchEmailData","SendDespatchEmailData","OkToInvoiceDespatch","PrepareForSale","InstallationDelivery","DespatchNotePreviewComponent","despatchNoteService","lastIndexOf","CallDownload","GoBack","back","ODataService","timeout","method","GetCustomers","EnquiryName","Rows","CustomerName","replaceAll","GetCustomerCurrency","GetCustomerLocation","CustomerLocation","GetCustomerTaxCodesStore","GetDoesAccountNumberAvailable","alpha","updateStatusAndAccountNumber","countryCode","StoreTypesEnum","DespatchNoteInvoice","DespatchNote","DefaultStoreId","JobUploadModel","createNew","DocumentType","NotificationsService","setInterval","GetNotifications","currentData","newNotifications","Notifications","TaskID","CacheNotifications","FullDescription","NotificationSeen","newNotificationRecieved","totalCount","localNotifications","LocalNotification","category","toastType","JobDocumentDataService","notificationService","mergeMap","downloadUrl","getUploadUrl","contentType","subDocId","activityId","visibleToCustomer","visibleToEngineer","UploadJobDocuments","File","VisibleToCustomer","VisibleToEngineer","uploadUrl","UpdateDocument","DeleteDocument","DocTypeID","SetFileAsPrimary","GetPrimaryImage","PrimaryImageService","jobDocumentService","GetStockPrimaryImage","image","fileReader","FileReader","onloadend","readAsDataURL","JobFileUploadDialogueComponent","ngZone","run","counter","dropZoneActive","dataTransfer","showPopup","showPopupDialog","IsVisibleToCustomer","Quote","Reminder","SaveButtonDisabled","fileEdited","dragEnterEvent","dragLeaveEvent","dragOverEvent","dropEvent","formmessages","fileSelected","SubmitFileForm","validExtensions","UpdateFileData","UploadFile","filesUploaded","Dismiss","selectedId","close","JobFilesComponent","primaryImageService","equipService","GetActivityDescription","FileUploadDisabled","IsAllowedAddAttachment","IsPrimaryAvailable","PrimaryImageModules","showEquipColumn","equipmentModuleEnabled","FileGuid","FileGUID","documents","IsPrimary","primaryImageChanged","isVisibleToEngineer","isActivityVisible","descriptionDictionary","removeLinkedDocuments","OpenUploadFileModal","showUploadFileDialogue","jobCompleted","loadDocuments","OpenFileUploadModal","FormSaveEnabled","jobForm","SubmitFormData","children","AttachmentID","onSelectionChanged","deselectRowKeys","keyOf","ShowEditFileDialog","attachmentId","editedFile","MapToJobUploadModel","DisplayName","OnUploadClosed","AttachmentId","displayName","downloadLink","createElement","URL","createObjectURL","setAttribute","appendChild","click","ViewDocument","mimeType","getMimeType","fileURL","newTab","onload","DeleteSelectedFiles","selectedDocumentIds","DeleteFiles","confirm","isDropZoneActive","lowestId","min","local","fileModel","AttachedDate","AttachmentTypeID","DocID","FileSize","size","UploadedDate","initDataSource","fileItems","GetFileSize","IsViewButtonVisible","fileFormatsForViewing","SetEquipmentFilter","uploadModel","newActivities","filesToDelete","ArrayStore","navigateToTabObserver","GetSiteDataStore","RecalculateLineIds","Place","GetCancelReasonById","GetSalesOrderDespatchNotes","NavigateToTab","GetPrice","GetSalesOrderEmailData","saleOrderId","SendSalesOrderEmailData","Recall","GetSalesOrderMiscPurchaseOrders","GetSalesOrderEquipmentPurchaseOrders","GetSalesOrderPartsPurchaseOrders","UpdateSalesOrderCustomer","material","storeBaseUrl","Delete","MaterialTypeService","GetMaterialTypeStore","SupplierService","GetSupplier","GetSupplierStore","GetSupplierDataSource","GetSupplierHistory","GetSupplierCurrency","Upsert","supplier","GetStockHeaders","GetStoresStore","GetStockHistory","GetStockPartsForStore","GetBinLocations","GetPartIdsForAutoFill","GetActiveStoreIds","GetStockStorePartsStore","GetStockStorePartsDataSource","GetStockPartsStore","GetStockPart","MapFromPartWithStores","GetNewStockPart","StockTypeId","SaveStockPart","replaceMainStore","MapToPartWithStores","concatMap","modelWithStores","GetStockSerialItems","UpdateSellingPrice","stockId","sellingPrice","SellingPrice","UpdateBuyingPrice","BuyingPrice","SupplierId","GetEstimatedCost","GetPastCost","GetSupplierPrice","UpdateServiceParts","GetReplacementPart","StoreLines","mainStoreStock","line","BinLocation","InStock","Demand","Available","Valuation","UnitValue","OnPO","OnPo","Min","Max","mainStoreIndex","AdditionalStoresEnabled","additionalStoresEnabledValue","BasePopSopDetailComponent","documentTypePipe","materialType","contactService","makeModelSharedService","supplierService","lg","md","sm","xs","onLinkTypeSelectionChanged","partsDataSource","stockHeaderDataStore","supplierStore","materialTypeStore","customersStore","contactStore","linkTypes","activeLinkType","linkNumberVisible","TotalCostFormatter","formatCurrency","GetDocumentLink","ChildContactType","ContactStatus","SupplierStatus","ChildContactsService","GetUrl","contact","GetCreateUrl","urlPart","MoneyComponent","renderer","internalId","externalId","internalValue","parseFloat","setDisabledState","isDisabled","setProperty","money","onKeydown","isNumeric","isNavigationKey","keyCode","isFinite","DespatchNoteGeneralComponent","childContactsService","customerCurrencyService","isForeignCustomer","IsForeignCustomer","showInForeignCurrency","DespatchDisabled","despatch","foreignCurrencyValue","Carriage","supplierContactsDataStore","sitesDataStore","customerDataSource","supplierDataSource","supplierContactsDataSource","additionalStoresEnabled","stockStoreDataStore","toggleCurrency","onCustomerChanged","ExchangeRateSales","siteSelectBoxComponent","getDataSource","DeliveryId","onSupplierChanged","supplierContactSelectBoxComponent","CarrierContactId","OnStoreChanged","showStoreWarning","oldStoreId","ConfirmChangeStore","Allocate","DespatchNoteSummaryComponent","foreignCurrencySymbol","despatchDespatched","despatchInvoiced","partsCount","itemCount","equipmentCount","materialsCount","partsQtyAllocated","partsAllocated","partsQty","partsPercentAllocated","equipmentQtyAllocated","equipmentAllocated","equipmentQty","equipmentPercentAllocated","materialsQtyAllocated","materialsAllocated","materialsQty","materialsPercentAllocated","totalPercentAllocated","totalQty","partsDespatched","equipmentDespatched","materialsDespatched","totalDespatched","ReadyToDespatch","totalAllocated","partsOutstanding","equipmentOutstanding","materialsOutstanding","materialOutstanding","totalOutstanding","reverseChargeVatEnabled","currencyFormat","prepareCurrencyValue","EquipmentService","GetAssignedEquipmentJobDataSource","GetMakesDataSource","GetLocationsDataSource","equipmentUrl","GetDefaultContactId","CreateNewLocation","GetSerialNoDuplicates","serialNo","EquipDuplicated","GetAssignableEquipment","EquipmentAttributeInUse","GetEquipments","GetNewEquipment","GetEquipmentHistory","CloneEquipment","UnAssignServiceGroup","InfoMessageComponent","showPopupChange","DespatchNoteEquipmentComponent","Deallocate","equipmentDataStore","GetMakeModelEquipmentsDetails","RemoveSelectedEquipment","selectedSalesLineIds","SalesLineId","SetFormDirty","makeModelFilter","allocatedSalesLineId","SalesId","VisibleAllocate","PrepareJobRequest","NavigateToJobs","isProcessing","AllocateEquipment","GetDetailsForEquipIds","allocatedIndex","equipmentGrid","EnableOrDisableJobButtons","CancelAllocate","AllocateSearchTextChanged","allocateSearchText","GetMakeModelDisplayValue","OnContentReady","EnableOrDisableJobButtonsFromGrid","UserRef1EquipId","GetUserRef1DsiplayValue","userRef","UserReferenceListItemID","UserReferenceListItem","ShowInstallationWarning","PreparationJobTypeId","PreparationJobId","showInstallationDialog","ConfirmInstallation","SetCssClass","info","AllocatedDocumentType","AllocatedDocumentId","AllocatedSubDocumentId","make","equipments","equipmentListDataSource","fromPreparationJob","selectedLines","mm","allocatedEquipments","m1","m2","jobsCount","InstallationJobTypeId","installationJobEnabled","InstallationJobId","preparationJobEnabled","StockSerailItemsService","GetPartSerailItems","GetAllPartSerialItems","PartSerialNumberDialogueComponent","stockSerialItemService","correctNumberAllocated","selectedSerialIds","required","allocationChanged","allocatedSerialIds","selection","unavailableSerialNumbers","onRowPrepared","unavailable","addClass","onGridContentReady","quantityRequired","assignedSerialNumbers","reservedSerialNumbers","partNumber","uniqueId","getPartSerialItems","serialNumbers","partSerialNumbers","SerialId","serialNumber","allocatedToAnotherStockItem","onSave","OnUpdate","serialIds","onCancel","sn","getStatus","linkToStock","DespatchNotePartsComponent","OnDeallocatePart","CanDeallocate","stockDataSource","sstockDataSource","AllocateDisabled","partsMissingSerialNumbers","selectedPartFullyAllocated","despatchDisabled","setupPartListDataSource","newParts","lastPartIndex","stock","OnRemoveSelectedParts","OnCreatePickingNote","OnAllocateParts","GetStock","RefreshGrid","foundPart","RefreshPartsRequiringSerialNumbers","RefreshSelectedPartFullyAllocated","OnSelectSerialNumbers","GetPartForLine","reserved","despatchPart","SerialIds","serialNumberDialogue","PartNumber","OnSerialNumberUpdate","partToUpdate","IsSerialNumbered","SerialNumbered","SerialNumbersOutstanding","canDeallocate","salesLineId","partsListDataSource","despatchNotePartsGrid","DespatchNoteMaterialsComponent","formDisabled","disableRemove","selectedMaterialIds","miscTypeStore","DeleteSelectedMaterials","RefreshMisc","MaterialsGrid","MiscTypeSortValue","MaterialTypeId","DxDataGridComponent","DespatchNoteInvoicingDialogueComponent","despatchService","DespatchDate","TaxPoint","invoicing","Discard","EmployeeService","GetEmployeeDataStore","GetEmployeesListDataSource","GetEmployeeById","GetEmployeeBySession","GetEmployeeLocationData","momentDate","DespatchNotesAccordionDetailComponent","dp","InvoiceNo","DespatchNoteAccordionComponent","employeeService","employee","DespatchNoteComponent","isNew","DespatchNoteDisabled","DespatchButtonHidden","partsEnabled","LoadDespatchNote","CallDespatch","showDespatchWarning","ConfirmDespatch","reclaculateDatesOnSave","CancelDespatch","ViewDespatch","NewReminder","showInvoiceDialogue","OnCloseInvoiceDialogue","noteId","PreviewInvoice","Preview","recalculateDatesOnLoad","GetCurrency","DespatchDateUI","EstimatedDeliveryDate","EstimatedDeliveryDateUI","DespatchNotesRoutingModule","EquipmentReorderingService","ItemId","fromDate","FromDate","ToDate","max","demand","forecast","Forecast","StockManufacturerService","serviceSightODataBaseUrl","serviceSightBaseUrl","StockManufacturerStore","StockManufacturerDataSource","manufacturerId","manufacturer","StockTypesService","stockODataBaseUrl","ODataTaxCodeService","CreateUpdate","IsInUse","GetLinks","StockReorderingService","StockSupplierService","GetStockSupplierDataSource","GetStockSuppliersStore","ReorderItemType","ReorderingReason","ReorderItem","ReorderOptions","BulkPurchaseOrderService","RaisePartsPO","RaiseEquipmentPO","RaiseMaterialPO","RaiseCombinedPO","SupplierMakeModelPriceService","SupplierPartPriceService","StockState","BulkOrderPopupComponent","supplierPartPriceService","makeModelPriceService","bulkPurchaseOrderService","SetSupplier","disableRaisePurchaseOrders","orderItems","saveEnabled","supplierDataStore","storeDataStore","StoresEnabled","getActiveSuppliers","Open","reorderItems","linkNumber","linkType","ItemType","Type","Quantity","LinkItemQuantity","EstimatedDate","SubDocId","ItemDescription","Item","UnitPrice","MinOrderQty","loadingCount","ri","partsArray","temporary","slice","buildFilter","supplierPartPriceDataSource","LeadTime","calcEstimatedDate","showWarningMessage","eqArray","supplierMakeModelPriceDataSource","newData","currentRowData","getSupplierPrice","warningIsShowing","RaisePO","LinkNumber","LinkType","Lines","SupplierSortValue","itemType","daysToAdd","getDay","ReorderingComponent","stockReorderingService","equipmentReorderingService","stockTypesService","stockSupplierService","stockManufacturerService","customizeTotal","calculateTotal","Options","setFullYear","EndOfToday","setUTCHours","showTypeColumn","CreateReasonsAndFields","stockEnabled","loadDataSubscription","loadDataEvent","InternalLoadData","LoadData","allowRaisingPurchaseOrder","valid","hasChanges","pristine","OnDiscard","reset","DatesChanged","RaisePurchaseOrder","gridDataSource","filterExpr","filteredData","selectedParts","newPartListModel","poPopup","CreateDataSource","stockData","ManufacturerId","ReasonId","UnitCost","equipmentData","CreateFilterFields","fields","caption","demandValue","reasons","DeviceService","HasAnyDevice","deviceLatestODataUrl","GetDeviceDataSource","deviceSerial","deviceODataUrl","DeviceComponent","deviceService","temperatureData","Temperature","EntryDateTime","humidityData","Humidity","DevicesListComponent","DeviceSerial","orderDevice","alert","CustomerLocationModel","GetCustomerEquipmentSystems","DataStore","CustomerEquipmentSystemCounts","SaveCustomerEquipmentSystem","DeleteCustomerEquipmentSystem","SaveDataInEquipmentSystem","CylinderStatus","CylinderService","GetCylinders","GetCylinderHistory","CylinderId","TransferToDepot","CloneCylinder","GetNew","JobMaterialDataService","GetMaterialMetadata","GetMaterialItem","miscItemId","miscTypeId","cost","UpdateMaterialItem","JobRefrigerantService","CreateLogEntry","AddJobRefrigerant","GetJobRefrigerants","UpdatePrice","DeletePendingJobRefrigerant","jobRefrigerantLineId","GetLogEntriesForJob","JobVisitHide","jobVisitHide","getJobVisit","sessionId","updateJobVisit","visit","deleteJobVisits","visitIds","completeVisit","uncompleteVisit","notifyVisitEngineer","reSyncVisitEngineer","getAllEngineers","addFurtherWorkToJob","furtherWorks","addFurtherWorkToNewQuote","furtherWorkNoActionRequired","JobVisitStatus","JobCylinderLogModel","LicenseService","GetCompanyHasAccessToModule","moduleId","GetCompanyHasAccessToModules","GetCompanyCountryId","RequestContactMe","companyId","ModuleId","UserName","JobCylinderLogDialogComponent","jobMaterialService","cylinderService","jobRefrigerantService","licenseService","jobVisitService","Orientation","CylinderStyle","CylinderIdentificationStyle","refrigerantTypeLeak","fromEquipment","fromSystem","DestinationTypeId","PopulateJobVisits","DestinationId","SystemSetupAndLeakTest","customerEquipmentSystemsDataSource","statusId","cylinderDataSource","activeCylindersFilter","LoadPrimaryImage","ClearCylindersFilters","overrideEquipmentWithSystemId","LogEntryTypeId","Weight","EngineerId","EmployeeID","VisitDate","added","FilterEquipmentByJobAndShow","GetCylinderImage","SetRefrigerant","GetLeakCylinderImage","OnSelectEquipment","ChangeEntryType","FilterCylinders","ResetSelectedCylinderIfMixedType","primaryImage","bypassSecurityTrustUrl","GetEquipmentDisplayValue","SerialNo","Refrigerant","GetCylinderDisplayValue","CylinderNo","SerialNumber","CylinderType","GetVisitDisplayValue","Employee","UpdateNotes","notes","selectedCylinder","AllowMixedRefrigerants","SetDefaultRefrigerant","subFilter","addLogEntryTypeId","removalLogEntryTypeId","refrigerant","Colour1","Colour2","Colour3","AutoLeakDetectionSystem","Visits","JstranslateService","cookies","Locale","GetBrowserLanguage","Translate","InitTranslation","SetupTranslation","addLangs","setDefaultLang","browserLang","getBrowserCultureLang","lang","match","use","SetCookies","MakeModelService","getSampleUpload","getImportProgress","uploadRows","rows","GetServiceLevel","GetOption","optionId","OptionAttributesOverlap","optionIds","attributeIds","OptionIds","AttributeIds","MaterialId","MakeModelDuplicated","GetCategoriesDataSource","GetTypesDataSource","GetSubTypesDataSource","GetMakeModelOptionDataSource","Ng1ContactService","openContactModal","Ng1CustomerService","openCustomerModal","JobService","GetNewJobMetadata","GetRecentJobsAccordion","RecentJobs","GetJobTypes","JobTypes","ChangeJobType","jobTypeId","ChangeJobSite","changeCustomer","changePriority","ChangeJobCustomer","ChangeJobContact","AreCustomerAndSiteAssociated","SaveJob","GetVisits","DeleteJobVisits","GetMaterials","DeleteMaterialItems","miscItemIds","GetJobInvoiceDetails","OkToInvoiceImmediate","InvoicePreview","InvoiceImmediate","GetJob","CancelJob","CompleteJob","AcceptJob","UncompleteJob","PlaceJob","UpdateJob","GetCancelationReasons","GetEquipmentAccordion","entityid","GetJobSheetEmailData","withInspections","SendJobSheetEmail","GetJobWorkRequired","GetJobMiscPurchaseOrders","CheckFixedPrices","GetPrintingNoteEmailData","SendPrintingNoteEmail","GetOpenJobsForSite","UpdateWhatThreeWords","GetJobTypeTabs","CanRemoveTab","jobTab","CheckPendingMaterials","ServiceGroupsService","GetCustomerSvcGroupList","GroupId","GetEquipmentsAddedToSvcGroup","GetEquipmentsInSvcGroups","SaveServiceGroup","DeleteServiceGroup","SaveDataInServiceGroup","SaveEquipmentsInServiceGroup","GetServiceGroupName","GetServiceGroupAssignedToEquipment","GetServicingDataInServiceGroup","groupId","PreviousRouteService","currentUrl","events","NavigationEnd","previousUrl","PreviousUrlContains","fragment","GetPreviousUrl","EquipmentContractService","GetContracts","EquipmentPurchasingAccordionItemComponent","EquipmentSalesAccordionItemComponent","ContactAccordionItemComponent","ContactID","goToContact","TextInputDialogueComponent","EquipmentDetailsItemComponent","MakeModelLink","MakeModelName","CategoryName","TypeName","SubTypeName","DateRead","SystemName","showEquipmentSystem","goToEquipmentSystem","go","MapAccordionItemComponent","latitude","longitude","markers","Latitude","Longitude","RecordNavButtonsComponent","Previous","navigatePrevious","Next","navigateNext","DiscussionService","CreateItem","DiscussionComponent","discussionService","controlDisabled","moduleEnabled","newMessage","GetDiscussionsDataSource","employees","employeesData","createItem","ReloadDiscussion","GetAuthor","authorId","GetAuthorPhoto","PhotoFace","GetEdmLiteral","TemplateListItem","JobCat","ServicingService","serviceSightUrl","templateUrl","oDataBaseUrl","serviceContractsUrl","ODataMakeModelServiceLevels","GetAllJobTypesForCategory","jobCat","GetAllTemplate","Metadata","GetCustomerActiveContract","ServicingComponent","serviceGroups","used","onReorder","intervalText","priceText","handleJobTypeName","overrideOnValueChanged","calculateSfg20IntervalCellValue","removeButtonDisabled","selectedServicingsIds","visualiserGenericId","AssignedServiceGroup","visualiserDisplayedOn","displayedOn","isEquipmentOnServiceGroup","loadInspections","loadMetadata","loadJobTypes","loadDefaultScheduleFromDueDate","loadDefaultServiceIntervalUnits","loadDefaultServiceIntervalValue","servicingsSource","handleServicingSourceQuantity","backgroundJobTypeColors","backgroundColors","loadServiceGroupSettings","hasAccessToContracts","areServiceGroupsEnabled","serviceGroupLoadingData","AreServiceGroupsEnabled","AreServiceGroupAssigned","AreServiceGroupsLoaded","loadContractData","EquipmentsInSvcGroupsDataStore","serviceGroupsDataSource","displaySfg","getSfg20ScheduleIntervals","handleDataGridClassName","handleSelectionMode","isEquipment","loadServiceGroup","sfg20ScheduleId","dataGridClass","MakeModelSettings","visibleRows","getVisibleRows","getIntervalUnitStatus","intervalUnits","durationItems","DurationID","DurationName","getIndex","selectedServiceLevelId","jobTypeName","newSfg20ScheduleInterval","getSelectedServiceSfgInterval","servicingsSourceChanged","handleServicingBackgrounds","defaultValueChangeHandler","$this","DeleteServicing","AddServicing","selectedJobdatatypesIds","availableColors","IntervalUnits","defaultServiceIntervalUnits","Interval","defaultServiceIntervalValue","NextDueCalcTypeId","defaultScheduleFromDueDate","IsNew","startOf","BackgroundColor","colorNotFound","ComponentUsedOn","showJobSelectScheduleDialog","ClosedJobTypeDialog","OpenJobTypeDialog","getSelectedJobTypes","jobdatatypes","getSelectedServicing","servicingsGrid","OnCopyFromMakeModel","showAttributeCopyMessage","ConfirmAction","setAllColorsAvailable","serviceLevels","OnSfg20ScheduleIdChange","toDateString","InspectTemplateId","LabourBudgetHours","getUpdatedServiceParts","updateSfg20Interval","sfg20Interval","onEditFormSaving","selectedSfgInterval","assignToServiceGroup","isServiceGroupModalOpened","serviceGroupsGrid","resetInterval","sfg20ScheduleIdChange","closeModal","selectedServiceGroup","addToServiceGroup","AddEquipmentsInSvcGroup","ServiceGroupId","RemoveEquipmentsInSvcGroup","selectionChangeHandler","unAssignServiceGroup","isServiceGroupAssigned","goToServiceGroups","lastOpenedModal","getLastEditorColumnSpan","colSpan","getBudgetHoursGroupColumnCount","showContractBar","contractData","nullTemplateListItem","Durations","calculationItems","Calculation","jobTypes","ValueNumber","isUsed","serviceGroup","SpecialKeyCodes","NumbersKeyCodes","SPECIAL_KEY_NAMES","ARROW_LEFT","ARROW_UP","ARROW_DOWN","ARROW_RIGHT","BACKSPACE","DELETE","DOT","AlternativeCode","NUMBERS_KEY","KEY0","NUMPAD0","KEY1","NUMPAD1","KEY2","NUMPAD2","KEY3","NUMPAD3","KEY4","NUMPAD4","KEY5","NUMPAD5","KEY6","NUMPAD6","KEY7","NUMPAD7","KEY8","NUMPAD8","KEY9","NUMPAD9","OnlyIntegerDirective","RegExp","onKeyDown","PreventCharacters","onBlur","curr","removeCharacters","onPaste","onlyNumbers","clipboardData","onDrop","data2insert","getData","formattedNumber","execCommand","IsNumberKeyPressed","k","ctrlKey","regex","SiteService","GetSites","GetSiteDataSource","TaskStatus","TaskStatusPipe","GoodsReceivedStatus","GoodsReceivedStatusPipe","DetailsRequired","PiMatchedBu","equipmentStatus","PurchaseOrderStatus","PurchaseOrderStatusPipe","AuthorisationReq","PartReceived","ReturnsNoteStatusEnum","ReturnsNoteStatusPipe","PcMatchedBu","returnsNoteStatus","EquipHistoryComponent","siteService","ID","history","historyFilterTypes","filterTypes","OnSearchChanged","selectedFilters","EquipmentDetailComponent","changeDetector","equipmentDataService","equipmentContractService","ng1CustomerService","ng1ContactService","jobService","previousRouteService","equipmentConditionService","statusArray","GetEquipmentStatus","EquipModel","createFromJob","SelectedSiteId","jobSourceTab","equipmentConditions","Label","Colour","initComplete","detectChanges","ShowValue","ShowStore","hasDeletePermission","isAllowedServicing","salesOrdersEnabled","areServiceGroupsAssigned","contactsDataSource","makesDataSource","makeModelsDataSource","userReferencesDataSource","storeDataSource","stringId","equipmentid","contracts","StatusCode","newEquipment","defaultCondition","preSelectedSite","updateConditionColour","LoadDataSources","Cfts","details","accordionSalesDetails","IsRecordNavigationEnabled","GetCo2Equivalency","OnStatusChanged","OnSelectSite","pendingSiteId","showServiceGroupsWarning","SiteChanged","OnSelectMake","FilterMakeModels","selectedMake","CylinderLogDialog","NewSite","ContactId","NewContact","NewLocation","JobTypeId","Reference","ToDo","WhatThreeWords","SalesOpportunityID","CloseNewLocationDialogue","SaveLocation","Location","SelectLocation","SubmitForm","showEquipmentJobScheduleRemovalWarning","ConfirmEquipmentJobScheduleRemoval","SalesWarrantyStart","warrantyStartUI","RestrictInvalidCharacters","ValidateWarrantyLength","SalesWarrantyLength","maxSalesWarrantyLength","setErrors","outOfRange","start","end","ValidateSerialNo","duplicates","duplicatedMessage","showDuplicatedPopup","ValidateEquip","duplicated","duplicatedEquipmentNo","OnSelectMakeModel","showMakeModelCopyMessage","SalesWarrantyLengthMeterUnits","titleConfirmationDialogue","messageConfirmationDialogue","WorkDescription","finalize","updateCurrentCharge","equipmentRefrigerant","ConditionColour","SelectContact","accordionPurchasingDetails","userRefEquipment1","userRefEquipment1Label","userRefEquipment2","userRefEquipment2Label","userRefEquipment3","userRefEquipment3Label","FilterContacts","SelectMakeModel","selectedMakeModel","locationsDataSource","handleJobTypesBackground","ConfirmDeleteServiceGroup","handleServiceGroups","ServiceGroupServicing","assignedServiceGroupData","isChanged","trustedImage","OpenCloningWindow","isVisibleCopyEquipment","noOfCopies","OpenCloseCloneEquipmentBox","CloneEquipmentProcess","NumberOfCopies","copyEquipmentMessageSuccess","no","copiedEquipmentIds","copyEquipSuccessWindowMessage","ShowClonedEquipmentList","UpdateEquipmentCftsData","CanNavigatePrevious","CanNavigateNext","NavigateNext","nextId","NavigatePrevious","previousId","MarketingTemplateComponent","toaster","makeSafeUrl","videoId","contactMe","EquipmentMarketingComponent","price1","price2","price3","ready","deepEquals","y","ImporterComponent","current","TotalRows","NumberOfInvalidRows","NumberOfValidRows","warnings","Empty","mappingKey","importTitle","bkBtnText","wizzard","nxBtnText","nxBtnEnabled","fileInvalid","importData","noMatch","Summary","finished","customMap","preDefinedMaps","newFileSelected","clientValidationSummary","mapAndValidate","saveCustomMapping","total","validCount","invalidCount","setSummary","upload","uploadError","errorCount","emptyFile","uploader","showHideMapping","mappingIsCollapsed","getSample","downloadSample","spreadSheetSelected","ev","reader","_files","XLSX","raw","cellDates","outputData","Sheets","SheetNames","header","getColumns","template","checkDefinedMaps","mappedTemplateText","mappingIsKnown","mapColumns","rawColumns","fileHeaders","readAsArrayBuffer","resetErrors","isArray","columnsStr","col","resetMap","len","realName","prop","defaultMapper","call","fromFile","mapItem","out","mappedRow","isCollapsed","RowNumber","validationObj","columnDisplayName","defaultMap","valueConverter","converterObj","addtionalRowValidator","isCustom","customMapping","EquipmentServiceUploadService","GetSample","GetRemainingCount","GetSummary","Upload","EquipmentServiceUploadComponent","equipmentServiceUploadService","toasterService","EquipNo","CalculationType","LastDone","SvcPrice","InspectionType","BudgetHours","EquipmentNo","EquipmentNumber","equipno","equipmentno","equipnumber","equipmentnumber","jobType","jobtype","intervalunits","calculationType","calculationtype","nextdue","due","lastdone","done","svcPrice","svcprice","price","inspectionType","inspectiontype","Inspection","inspection","budgetHours","budgethours","Budget","budget","isInteger","validDate","parseDate","rowValidator","getRemainingCount","poll","clearTimeout","equipmentMap","equipmentNoMap","blob","hidden","removeChild","revokeObjectURL","remainingRows","getSummary","FailedRows","importer","EquipmentCategoriesService","baseUrl","serviceUrl","categories","EquipmentStockListComponent","equipmentCategoriesService","GetLocation","calculateMakeModelFilter","toArray","StoreName","locations","categoryDataOptions","makeModelDisplayValue","UploadButtonItemClick","OnExportItemClick","CategoryFilterChanged","categoryId","getEquipmentAtStock","filterStore","GetStoreFilter","categoryFilter","equipmentStockDataSource","EquipmentUploadService","fgasEnabled","EquipmentUploadComponent","equipmentUploadService","Category","SubType","SecondHand","SiteAlpha","SiteEquipID","matcher","statusLookup","SalesWarrantyStartDate","timeZoneAdjustment","UserRef1Equip","UserRef2Equip","UserRef3Equip","ContactTitle","ContactFirstName","ContactLastName","ContactPhone","ContactEmail","WarningNotes","Cat","equipcategory","cat","EquipCat","equipcat","equiptype","Sub","equipsubtype","subtype","sub","st","Serial","SN","serialno","serial","secondhand","Alpha","sitealpha","SiteEquipId","siteequipid","equipid","SalesWarranty","Warranty","saleswarranty","warranty","WarrantyLength","saleswarrantylength","warrantylength","contacttitle","Title","contactfirstname","firstname","contactlastname","lastname","Phone","Tel","ContactTel","contactphone","phone","tel","contacttel","contactemail","Warning","warningnotes","warning","isDuplicateMakeModel","has","isDuplicateEquipNo","fGasPropertiesValid","isAnyFgasPropertyFilled","equipRefrigerant","obj2","RefrigerantType","hasAccessToFgas","changeToMapsWithFgas","storesEnabled","addStore","getMatchReadyString","defaultMaps","refrigeranttype","RefType","reftype","designcapacity","currentcharge","Charge","charge","AutoLeakDetectionSystemFitted","autoleakdetectionsystemfitted","autoleakdetectionsystem","AutoLeakDetection","autoleakdetection","AutoLeak","autoleak","preDefinedFgasMaps","preDefinedMapsWithFgas","predefined","predefinedMap","columnValidations","Store","Warehouse","warehouse","preDefinedStoreMaps","preDefinedMapsWithStore","preDefinedMap","storePreDefinedMap","storeIdx","EquipmentRoutingModule","ReturnsService","returnsNote","returnsNoteCancel","GetByGoodsReceived","goodsReceivedId","BookOut","supplierName","SendGoodsReceivedEmail","GetGoodsReceivedEmailData","ReturnCylinder","Matched","invoiceDate","invoiceReference","CylinderTypesService","fgasODataBaseUrl","ODataCylinderTypeServiceLevels","CylinderTypeId","GetMixedTypes","GetNominalAccounts","RefrigerantTypeDefaults","GetPriceRegrigerant","prefSupplier","weight","CylinderDetailCopyComponent","isVisibleCopyCylinder","OpenCloseCloneCylinderBox","copyCylinderMessageSuccess","copiedCylinderIds","copyCylinderSuccessWindowMessage","ShowClonedCylindersList","cylindersIds","CylindersFilesTabComponent","CylinderHistoryTabComponent","historyDataSource","SearchByText","CylinderStatusPipe","cylinderStatus","CylinderDetailComponent","cylinderTypeService","returnsService","GetCylinderStatus","editRefrigerantTypeEnabled","allowEditRefrigerantType","storedCylinderWeight","cylinderTypeDataSource","mixedRefrigerantTypeDataSource","purchasingEnabled","PurchaseDateUI","setHours","ReturnDateUI","setCylinderModel","SetStoredCylinderWeight","saveCylinder","PurchaseDate","ReturnDate","success","userRefCylinder1Label","userRefCylinder2Label","CurrentWeight","UpdateRefrigenrantType","UpdateStore","copy","Transfer","returnNoteId","navigateReturnDetails","CylinderUploadService","CylindersUploadComponent","cylinderUploadService","Supplier","CylinderRef1","CylinderRef2","CylinderNumber","cylinderno","cylindernumber","TankNo","TankNumber","tankno","tanknumber","serialnumber","cylindertype","CylType","cyltype","TankType","tanktype","currentweight","Vendor","vendor","purchasedate","returndate","cylinderref1","CylinderReference1","cylinderreference1","cylinderref2","CylinderReference2","cylinderreference2","TankRef1","tankref1","TankReference1","tankreference1","TankRef2","tankref2","TankReference2","tankreference2","isDuplicateCylinder","cylinderMap","fileLanguage","Reset","ConfirmationMessageComponent","actionYes","yes","actionNo","actionClose","RefrigerantLogService","AddCorrection","AddDecant","SourceCylinderId","DestinationCylinderId","TransferWeight","GetLogEmailData","emailUrl","SendLogEmailData","DecantComponent","refrigerantTransactionService","newSourceWeight","sourceCylinder","toFiveDecimalPlacesNumber","decant","newDestinationWeight","destinationCylinder","notEnoughInSource","willOverfillDestination","weightIsValid","tickInterval","ceil","cylinderDestinationDataSource","canEditSource","Back","ValidateAndSave","validationMessages","validationMessage","SourceChanged","cylinder","DestinationChanged","customizeText","FGasLogDetailComponent","logService","insertRow","addRow","NewWeight","TransactionModel","getTransactionReference","zip","corrections","getTransactionReferencePrefix","transactionType","getLogDate","dateStr","FGasLogPreviewComponent","refrigerantLogService","Send","DataFilter","WtnType","WasteTransferNotesService","GetWasteTransfer","wtnNumber","wasteTransferNotesId","GetWasteTransferNotesEmailData","SendWasteTransferNotesEmailData","WasteTransferNotesListComponent","wasteTransferNotesService","calculateDateDisplayValue","hasProModule","getSettingsData","getDetails","wasteTransferId","filterSelected","WasteTranferNoteTypeToEdmLiteral","wasteTransferNotesDataSource","useAdditionalStoresSetting","WtnContactTargetType","SourceAccordionItemComponent","CylindersAccordionItemComponent","WtnContactType","WasteTransferContactAccordionItemComponent","setContact","contactTarget","setSourceContact","setDestinationContact","createdFromMobile","setEngineerContact","setCustomerContact","setStoreCustomerContact","setSupplierContact","contactType","setContactModel","engineerModel","setEngineerModel","storeName","engineer","Engineer","VanNumber","CertificateNo","AccountNumber","Address","WasteTransferNotesPreviewComponent","wasteTransfer","CylindersListComponent","calculateReturnDateDisplayValue","calculatePurchaseDateDisplayValue","navigation","cylindersFilter","hasPurchaseOrdersModule","storesArray","StoreListDataStore","supplierIdFilter","cylinderIdsToHide","StatusFilterChanged","SupplierFilterChanged","isDateRed","today","theDate","cylindersDataSource","FGasRoutingModule","SupplierPriceService","supplierPriceOdataBaseUrl","AddMakeModelDialogueComponent","alreadyAdded","alreadyAddedFilter","makeModelList","makeModelAdded","MakeModelOptionAddTo","QuoteService","GetQuote","RecalculateDatesOnLoad","DeleteQuote","UpdateSummary","quote","SaveQuote","RecalculateDatesOnSave","QuoteSalesOrder","SetMiscIds","CreateQuoteFromReminder","UpdateQuote","RejectQuote","CancelQuote","SalesQuotationID","RevisionID","GetJobMisc","UpdateJobMisc","jobMisc","SaveJobMisc","SetDefaultJobType","CreateRevision","revsionInfo","GetRevisionsList","GetAllMiscTypes","GetCancellationReason","DeleteMiscItem","miscId","GetDefaultJobType","GetQuoteUserReference1","GetUICustomisation","AcceptAndCreateContract","AcceptQuoteAndCreateJob","quotationId","AcceptAndCreateSalesOrder","AcceptQuote","SetStatusQuoted","GetMiscPrice","CloneQuote","GetSalesTotal","QuoteMiscId","EquipsList","StartDateUI","StartDate","InvoiceFromUI","InvoiceFrom","EndDate","EndDateUI","SitesList","JobMiscDialogComponent","quoteService","Selected","MiscTypeID","MiscType","AddTo","IsQuoteLostOrWon","currentAddTo","miscForm","tempMiscTypeID","ShowEdit","miscResult","miscTypes","MiscID","onCancelClick","onHide","onSaveClick","descritpionControl","miscTypeControl","costControl","chargeControl","onValueChangedJobMiscType","OnCostChanged","UntypedFormGroup","includeCharge","formMiscDescription","Validators","formMiscType","formMiscCharge","formMiscCost","miscs","chargeDisabled","SetUpValue","SelectedActivityChanged","GoodsReceivedDetailGridType","GoodsReceivedSerialNosComponent","outstandingNo","serialNos","adjustmentNumber","addedCount","validateSerialNumber","setupDataSource","openDialog","originalSerialNos","formDirty","saveEditData","startingAdd","removeSerialNo","onToolbarPreparing","toolbarOptions","showText","onInserting","GoodsReceived","GoodsReceivedService","GetByPurchaseOrder","grnId","goodsReceived","BookIn","AreAllLinesReturned","AdviceNoteLineId","misc","SupplierAccordionItemComponent","WarningNotesAccordionItemComponent","NoInformationProvided","warningNoteText","warningNotes","warningNotesExist","CustomerPopUpNotes","SitePopUpNotes","ReceiptDetailsAccordionItemComponent","CancelComponent","selectedCancellationReason","CancelReasonID","selectedCancelDate","cancelData","CancelDate","collection","cancelReasons","SetLabel","ActionSave","salesQuote","isReasonSelectedValid","isSelectedDateValid","ActionDiscard","discard","DocumentLinkSelectComponent","salesOrderDataSource","HideJobSelection","isFirstChange","LineNumber","LoadJobMaterials","onLinkTypeValueChanged","RaiseEvent","onLinkNumberValueChanged","onLineNumberValueChanged","LineDisplayExpr","DocumentLinkSelected","jobLines","PurchaseInvoicePopupComponent","Commit","validationGroup","validate","commit","GoodsReceivedStatusBarPipe","GoodsReceivedDetailComponent","goodsReceivedService","supplierPriceService","EquipValidation","GetWarrantyDisplayValue","TotalPartsCost","onPartsRowUpdating","onRowEditingStart","onEquipRowUpdating","onCylinderRowUpdating","calculateCustomSummary","OnEquipDocumentLinkSelected","OnPartsDocumentLinkSelected","OnMaterialDocumentLinkSelected","onEditingStart","showCreateSupplier","gn","ExpenseSupplierName","isFromPurchaseOrder","cylindersCount","Cylinders","IncludeCylinders","partsQuantity","QtyRequired","equipmentQuantity","materialsQuantity","cylindersQuantity","totalQuantity","partsCost","Received","equipmentCost","materialsCost","cylindersCost","TotalCost","totalCost","partsReceived","equipmentReceived","materialsReceived","cylindersReceived","totalReceived","cylindersOutstanding","carriage","HasAccessToPro","HasAccessToStock","HasAccessToEquipment","HasAccessToPurchaseOrders","HasAccessToFGas","grn","PurchaseOrderId","showSupplierPartNumberEnabled","refrigerantTypeStore","supplierPriceDataSource","supplierPriceStore","piAllowManualMatchingEnabled","baseRowUpdating","PartsGrid","checkForDuplicatedEquipmentNumber","ValidateSerialNumber","EquipmentGrid","onMaterialRowUpdating","gridType","rawUnitCost","oldData","rawCost","isUnitCost","Boolean","qtyRequired","qtyReceived","outstanding","InternalSave","BookInWithChecks","hasOutstandingCylinderSerialNo","unspecifiedCylinderSerialNumbers","ConfirmBookInWithMissingSerialNumbers","ShowPurchaseInvoicePopup","isPurchaseInvoicePopupVisible","MarkAsPurchaseInvoiceMatched","GoodsReceivedNumber","gnMatched","gnBooked","CreateReturnsNote","allReturned","showAllLinesAlreadyReturned","DiscardChanges","discardMessage","InternalNotesChanged","internalNotes","InternalNotes","InstructionsChanged","instructions","Instructions","CancelReceipt","showCancelDialog","SaveCancelDialog","CancelReasonId","CloseCancelDialog","AddPart","openSerialNo","selectedPartSerialNos","SerialNumbers","serialNoPopup","currentPart","openCylinderSerialNo","selectedCylinderSerialNos","cylinderSerialNoPopup","currentCylinder","hasOutstandingSerialNo","updatePartSerialNos","updateCylinderSerialNos","currentMaterialTypeId","arguments","DeleteSelectedParts","selectedPartIds","AddMakeModelDialog","DeleteSelectedEquipment","OnMakeModelIdsAdded","PurchaseId","PurchaseLineId","AddMaterial","AddMaterialDialog","DeleteSelectedCylinders","selectedCylinderIds","AddMisc","LinkLine","RefreshEquipment","RefreshCylinders","CylindersGrid","RefreshParts","RefreshAllGrids","ViewOrder","CreateReminder","CreateMessage","getSupplierPartNumber","supplierPartNumberLookup","onWarningNotes","showWarningNotesEye","GetWarranty","WarrantyMonth","months","meters","WarrantyMeter","editedAdviceNoteLineId","CarrierChanged","carrierContactSelectBoxComponent","cur","StoreChanged","DeliverToId","GetCustomerDisplayExpr","exists","HideAllLinesReturnedMessage","CanCreateReturnsNote","CheckIfSerialNoDuplicatedForExistingEquipment","CheckIfSerialNoDuplicatedWithinCurrentGRNLines","showExistingEquipmentDuplicatedPopup","showCurrentGRNLinesDuplicatedPopup","GoodsReceivedListComponent","goodReceivedService","hasPermission","ViewDetails","GoodsReceivedPreviewComponent","GoodsReceivedRoutingModule","InspectionSummaryService","GetByJob","AddInspectionToJob","templateIds","InspectionTitleService","GetStatusCode","statusCode","InspectionAccordionItemComponent","CertificateIssueReasonsService","GetReasons","certificateIssueReasons","GetReasonById","reasonId","CftsAccordionItemComponent","certificateIssueReasonsService","certificateIssueReason","PassOverrideReason","InspectionsReportViewerComponent","titleService","inspectionSummaryService","inspectionDataService","jobDocumentDataService","Emails","isCftsModuleEnabled","parseInt","inspectionTemplate","TemplateName","authBodyId","AuthBodyId","isPassed","Pass","InspectionPhotosAttachments","disableEmailButtons","showSuccessMessage","goBack","isCftsAccordionVisible","InspectionsRoutingModule","NoteOutputType","InvoiceStatusAccordionItemComponent","sales","goDocument","DocumentID","docTypeTitle","docTypeLookup","InvoiceDetailComponent","hasAccessToPro","invoice","NoteOutputTypeID","isPreview","invoiceUrl","showPaidUnpaidToggleButton","isAccountingSystemConnected","isAllowedMarkAsPaid","showAddCreditButton","showViewInLedgerSystemButton","ShowDeepLinkingUrl","isDocumentTypeJob","isMarkedPaid","alertMessage","alertText","errorText","successText","errorMessage","onLoad","isRecordNavigationEnabled","GetMetadata","canNavigatePrevious","canNavigateNext","AddCredit","addCreditResult","areCreditsRaised","TogglePaidUnpaid","HandlePaidUnpaidResponse","showMarkAsPrintedConfirmation","Download","OnConfirmMarkPrinted","ViewInExternalSystem","AccountUrl","PrepareEmailWithJobSheet","includeJobDocuments","sendMethod","OpenEmailDialogue","PrepareEmail","showEmailDialogue","CloseEmailDialogue","invoiceEmail","translatedInvoice","Attachments","NoteNo","JobSheetIds","invoiceMetadata","invoiceDocuments","BatchInvoiceStatus","ServiceContractService","contractCustomerChanged","contractCustomerChanged$","ContractCustomerChanged","ContractInvCycleChanged","invCycleId","contractInvCycleChanged","contractsUrl","CancelContract","StartContract","TerminateContract","GetNoteIdsForContract","GetSiteArrayStore","sites","GetContractTypesDataSource","GetContractTypesDataStore","ContractId","GetContractEmailData","SendContractEmail","InvoiceContract","OkToInvoiceContract","ContractInvoiceCycleEnum","InvoiceGrouping","InvoiceGroupingPipe","enum","BatchInvoiceService","serviceContractStatusPipe","invoiceGroupinPipe","contractService","GetBatchInvoiceDataSource","GetJobFields","InvoiceGroupingLookup","filterOperations","GetJobColumns","alignment","sortOrder","calculateSortValue","InvoiceGroupingId","calculateFilterExpression","endOf","GetContractFields","contractStatusLookup","GetContractColumns","contractEndInformation","CalculateContractEndInformation","noOfCycles","Total","allowSorting","EnumToArray","GetDespatchFields","GetDespatchColumns","InvoiceFromDate","invoiceUpToDate","cycleUnit","invoiceCycleToUnit","InvoiceCycle","upToDate","str","arr","cycle","RaiseInvoices","noteRunId","EmailInvoices","BatchInvoiceStatusPipe","printDate","BatchInvoiceListComponent","batchInvoiceService","calculateDocumentTypeFilter","noteRun","createStatusFilter","batchInvoiceStatus","createDocumentTypeFilter","documentTypeEnum","InvoicesRoutingModule","JobCreateModel","BoolToStringPipe","CreditControlAccordionItemComponent","creditData","creditControl","CreditLimit","CurrentBalance","creditHold","IsLimited","RecentJobsAccordionComponent","getCustomerDetails","copySelectedJob","copyJob","hideAllRecentJobDetails","jobCount","recentJobs","StatusID","JobCreateComponent","hasManagingAgentOptionEnabled","customerid","prefillValues","siteid","contactid","isNewFromPlanner","onSelectCustomer","customersDataSource","isLoaded","CheckSelectedCustomer","onSelectSite","showInactiveCustomerPopup","selectedSite","filterAndReloadContacts","showInactiveSitePopup","newCustomer","newSite","newContact","editContact","finally","mousedDownSaveAndPlan","saveAndPlan","onKeypress","pressedKeyCode","charCode","busy","showCreditHoldPopup","onCreditControl","showCreditControlEye","onRecentJobs","showRecentJobsEye","onCopyJob","SiteID","onCloseInactiveCustomer","onCloseInactiveSite","onCloseCreditHold","DefaultJobTypeID","ManagingAgentID","confirmCredit","creditHoldConfirmationDialog","onCreditLimit","customerBalance","IsCustomerOverCreditLimit","LayoutType","LayoutTemplateService","templateDesignerBaseUrl","TemplateDesigner","ODataLayoutTemplates","GetLayoutTemplates","layoutTemplate","GetTemplateName","TemplateTypes","GetLayouts","layoutType","GetContacts","GetContact","WalkthroughPosition","WelcomeStatus","WalkthoughService","ElementId","Intro","Position","baseIntroJsOptions","nextLabel","prevLabel","skipLabel","doneLabel","exitOnEsc","exitOnOverlayClick","hidePrev","hideNext","tooltipClass","showButtons","showBullets","showProgress","scrollTo","overlayOpacity","ShowWelcome","WelcomeIsShowing","UpdateWelcomeStatus","NextJobStep","canStart","jobWalkThroughStarted","walkthrough","nextStep","JobWalkthoughEnabled","StartIntro","jobSteps","onexit","onbeforechange","setOption","_currentStep","onafterchange","dialogTop","css","scrollTop","oncomplete","JobWalkthroughCompleted","walkthoughSteps","intro","introJs","setOptions","addSteps","GoToJobEquipService","NavigateToJob","caller","JobPartDataService","jobPartBaseUrl","GetJobParts","UpdateJobPart","AddJobParts","jobParts","RemoveJobParts","partIds","IssueJobParts","UpdateJobPartSerialNos","AddJobPartsAndIssue","JobInvoiceDialogueComponent","walkthoughService","OnShown","JobInvoicingComponent","jobPartService","accountingService","layoutTemplateService","showEditButton","canChangeTaxCode","hasJobChangeTaxCodePermission","isUSCompany","stockModuleEnabled","fgasModuleEnabled","UpdateEquipmentFlatChargeTotal","customerTaxCodesStore","layouts","loadJobInvoiceData","SetFlatRate","OnFlatRateChanged","totalSum","labourCharge","materialCharge","partsCharge","refrigerantsCharges","equipmentFlatChargeTotal","recalculateProfit","SetEquip","InvEquipCategory","InvEquipGroup","InvEquipList","OnExchangeRateChanged","showCustomerCurrency","currentRate","OnSummarisePartsChanged","ShowBaseCurrency","isEditableFlatCharge","IsEditableFlatCharge","ChangeInvCombineLabourRates","InvCombineLabourRates","InvSummariseLabour","InvCombineTravel","VisitSummaryChanged","InvSessionSummary","InvShowSessionText","TemplateId","PreviewInvoiceWithDefaultLayout","invoicingBlocked","GoToInvoice","InvoiceImmediateWithDefaultLayout","immediateInvoiceTemplateId","CreateImmediateInvoice","doInvoice","UpdateHeaderDetail","headerDetail","InvHeaderText","invoiceDetails","partDetails","refrigerants","sum","EstimatedCost","partsOnOrder","CostOnOrder","refrigerantsCharge","fgas","refrigerantCost","setValues","FlatRate","LabourCharge","refrigerantsCosts","MaterialCharge","showCreditColumn","IsInvoiceCredited","totals","Hours","CostHours","Labour","LabourCosts","Refrigerants","Misc","MaterialCosts","Credits","CreditCosts","isBaseCurrency","ShowAsPercentage","ShowAsTotal","AllowEdit","ChargeHours","CreditCharges","MaterialCostsOnOrder","totalCreditedCost","totalCreditedCharge","calculatePercentage","backgroundColor","isEditing","JobDetail","InspectionTemplateService","excludeJobId","GetAllByJobTypeId","GetAllAutoComplete","isImport","DeleteById","CloneTemplate","GetLayoutTemplateDataSource","InspectionPermissionsService","HasSkipPermission","MarkAsSkipped","HasOutstandingPermission","MarkAsOutstanding","HasAddPermission","AddInspection","HasDeletePermission","DeleteInspection","HasAddPermissionReasonNotDone","Add","InspectionsService","inspectionUrl","AddToJobSession","equipmentItemId","IssueCertificate","JobVisitService","GetInspectionAvailable","InspectionTypePipe","InspectionAutocomplete","InspectionAutocompletePipe","InspectionTemplateDialogComponent","showTemplateDialogChange","selectedTemplateIds","AddInspections","inspectionsAdded","OnSearchValueChange","templategrid","IssueCertificatePopupComponent","reasonsService","Confirm","selectedCertificateIssueReason","InspectionsJobListComponent","inspectionService","inspectionTemplateService","hasSkipPermission","hasOutstandingPermission","loadedJobId","loadList","cftsModuleEnabled","recentlyDeletedId","inspections","getSelectedInspections","markAsSkippedPromise","markAsOutstandingPromise","deletePromise","OpenVisitDialog","selectedInspectionDisplay","showVisitDialog","assignableVisits","OpenEquipmentDialog","showEquipmentDialog","assignableEquipments","AddToSession","jobSessionId","selectedVisitIds","addToSessionPromise","AddToEquipment","addToEquipmentPromise","CloseVisitDialog","CloseEquipmentDialog","OpenInspectionDialog","addableTemplates","CloseInspectionDialog","AddInspecitons","GoToVisit","visitId","onInspectionSelectionChanged","addToEquipDisabled","addToVisitDisabled","showIssueCertificateDialog","selectedInspectionId","isIssueCertificateDialogVisible","isIssueCertificateButtonVisible","issueCertificate","JobDetailsAcoordionModel","JobDetailsAccordionItemComponent","goQuote","SalesQuotationRevisionId","goInvoice","NoteId","SurveyService","Consumers","surveyId","survey","inviteEmail","SurveyDialogComponent","surveyService","sendSurveyClick","surveys","SurveyId","SurveysAccordionItemComponent","JobTabsPopupComponent","GetTabName","DisplayText","SelectionChangedHandler","addedTabs","Hide","tabsAdded","ODataPriorities","GetPriority","priorityId","priorityUrl","DeletePriority","CreatePriority","UpdatePriority","GetPriorityUsageCount","PriorityIconComponent","SetIconDetails","iconDetails","InputWithButtonComponent","useImgLabel","labelImgSrc","addControl","controlId","inputControl","ClickButton","mode","WebAction","EmailAction","CloseEmailDialog","showEmailDialog","SalesOpportunityService","SetIds","GetCompetitorsStore","SalesOpportunityOData","GetBarriersStore","StatusDataSource","GetSalesOpportunityHistory","opportunityId","Competitors","CompetitorId","Barriers","BarrierId","SalesOpportunitySelectBoxComponent","salesOpportunityService","hasAccess","salesOppEnabled","salesOppDataSource","ApplyFilter","OnModelChanged","PrioritySelectBoxComponent","prioritiesStore","PriorityChanged","JobDetailWarning","JobDetailComponent","OpenWhatThreeWords","WhatThreeWordsActive","isComplete","isInvoiced","userRef1DataSource","canCreateCustomer","newCustomerVisible","canCreateSite","canCreateContact","IsAllowedChangeCustomer","ValidateInactiveCustomer","oldCustomerId","ValidateChangeCustomer","ChangeCustomerInDatabase","setupWarningPopup","SelectedManagingAgent","SelectedCustomer","showWarningPopup","confirmAction","onConirmChangeCustomer","Timestamp","ChangeSite","IsAllowedChangeSite","ValidateInactiveSite","Priority","PriorityId","oldSiteId","ValidateSiteChange","areAssociated","selectedSitePriorityId","SelectedSitePriority","confirmChangePriorityCustomerNotChanged","ChangeSiteInDatabase","SelectedSite","onConfirmChangeSite","IsAllowedChangeJobType","tabsChanged","ChangeContact","ChangeContactInDatabase","contactChanged","onCloseInactive","onConfirmSave","isConfirmed","confirmChangePriorityCustomerChanged","confirmChangePriorityAndCustomer","onConirmChangeCustomerNoJob","UpdateDueDate","Ref1ValueChanged","UpdateInternalNotes","salesOpportunityValueChanged","changeSite","messageToDisplay","warningTitle","warningMessage","warningOkText","warningCancelText","warningVisibleNo","selectedSitePriorityName","currentSitePriorityName","currentSitePriority","newSitePriority","LabourTypes","JobVisitModel","JobVisitChargeModel","EngineerSkillService","ODataEngineerSkills","GetEngineerSkills","skillId","engineerSkill","EngineerSkillsCheckForJob","EngineerSkillsCheckForCustomer","DurationComponent","hours","minutes","hoursElement","minutesElement","onMouseWheel","delta","wheelDelta","detail","input","srcElement","calculate","calculateDuration","isHours","changedValue","parsedValue","keyHours","hourStep","keyMinutes","minuteStep","utc","setUTCFullYear","setUTCMonth","setUTCDate","setUTCMinutes","setUTCSeconds","setUTCMilliseconds","JobFurtherWorkComponent","partsDataStore","furtherWorkDataSource","jobFurtherWork","GetFurtherWorkPartsDataSource","furtherWork","partsDataSourceLookup","FurtherWorkID","AddFurtherWorkToCurrentJob","FurtherWorkDocumentID","FurtherWorkDocTypeID","ShowFurtherWorkJobSelectionDialog","showJobSelectDialog","OnSelectedJob","AddFurtherWorkToOtherJob","AddFurtherWorkToNewJob","CloseAndNavigateTo","AddFurtheWorkToNewQuote","addFurtheWorkToNewQuoteDisbaled","FurtherWorkNoActionRequired","ViewFurtherWorkJob","ViewReminder","ViewFurtherWorkQuote","FurtherWorkSubDocID","GoToEquipment","EquipID","ToggleShow","showMenu","disabledKeys","FurtherWorkInitiated","fw","TotalChargeFormatter","callback","selectedIds","JobActivityService","GetJobActivities","DeleteJobActivity","jobActivityId","DeleteJobActivities","jobActivityIds","GetJobActivity","UpdateJobActivity","jobActivity","LabourAnalysisChartComponent","labourService","customizeLegend","labourSub","loadVisit","ActivityTypes","jobActivities","visitTimeMinutes","isJobSessionSet","getDatesDifferenceInMinutes","TimeOn","TimeOff","prepareChartData","activity","chartDataSource","seriesName","timetoDisplay","prepareTimeToDisplay","Time","activityTimePercent","calculateActivityPercent","activitiesTime","isActivityCompleted","StartTime","EndTime","activityName","getActivityName","ActivityTypeId","activityNameInDataSource","addOnSiteLabour","firstDate","secondDate","firstTime","secondTime","onSiteTime","h","activityTime","JobActivityModel","JobActivityDialogueComponent","formMessagesService","jobActivityService","timesInvalid","GetActivityTypeDisplayValue","activityType","ValidateTimes","JobSessionId","EndTimeHasValidStartTime","WithinLabourHours","activityStartTime","activityEndTime","visitTimeOn","visitTimeOff","isSameOrAfter","isSameOrBefore","timeDifference","resultInMinutes","isTheSameDate","JobActivityComponent","HoursTotalText","ControlsEnabled","activitySub","LoadActivities","CalculateHoursAndMinutes","hour","padStart","UpsertActivity","openActivityDialogue","OnSaveActivity","showJobActivityDialogue","OnCancelActivity","RemoveActivites","selectJobVisitComponent","OnJobVisitSelected","activityDialogueTitle","DurationFromDatePipe","JobVisitStatusPipe","Unallocated","Unalloc","NotificationRequired","NotificationSent","WaitingAcceptance","Alloc","EnRoute","OnSite","Visited","NeedsChecking","DetailsReq","LabourTypePipe","JobVisitStatusBarPipe","JobVisitDialogueComponent","engineerSkillService","ChangeEngineer","hasJobLevelActivities","access","HasJobActivityTypes","overrideTimesheetRestrictions","jobID","jobVisitLabourTypes","reloadJob","loadFormData","sessionID","ReSyncVisit","NotifyVisitEngineer","updateVisit","CompleteJobVisit","UncompleteJobVisit","commitSave","reloadVisitsList","RecalculateCharges","currentDataContextAction","SaveCharges","OnConfirmChangeEngineer","EmployeeIdOld","setMinimumDate","showEngineerWarningPopup","engineerChanged","engineerSkillsCallbackFunction","dataToConfirm","skillCheckWarningMessage","showSkillCheckWarningMessage","onConfirmEngineerSkills","AddNewCharge","newCharge","initialChargeUpdate","Charges","SelectionChanged","DeleteSelectedCharges","IsDeleted","recalcTotalOfAll","ChangeChargeType","UnitsUI","RecalcTotalCharges","validateChargeTypes","SelectAllCharges","allSelected","anySelected","RecalcTimeWorked","TimeOn1","TimeOff1","needToAsk","difference","TimeWorked1","setTimeWorked1Validity","showRecalculateCharges","OnMileageChanged","oldMileage","OnChangeTravelTime","OnTitleRendered","testId","itemElement","showStoreWarningPopup","OnConfirmChangeStore","oldValue","convertChargesDateTimes","ch","hasDuplicateError","chargeTypeExist","setValidity","totalCharges","dataContextAction","doNotCloseDialog","bindedDataContextAction","fieldName","validity","workedTimeError","resp","MileageActual","FieldsDisabled","isTravelToLoaded","isTravelFromLoaded","activeTab","attachWatches","watchValueChange","valueChanges","workTimeEditDisabled","minDate","LastSubmitDate","JobLabourComponent","AddVisitDisabled","IsAllowedAddSession","loadVisits","DeleteSelectedVisits","doDeleteVisits","OpenNewVisit","currentVisitId","showJobVisitDialogue","onCancelJobVisit","onSaveJobVisit","OnRowDoubleClick","lastSubmitDate","VisitStatusClass","EngineerSortValue","GetTime","recentDeletedIds","expandAll","BulkPartOrderPopupComponent","orderParts","QuantityOutstanding","PartId","PartDescription","unitPrice","minOrderQty","BulkPartOrderListModel","StockPermissionsService","HasAddStockTypePermission","AddStockType","HasEditStockTypePermission","EditStockType","HasDeleteStockTypePermission","DeleteStockType","HasAddPriceListPermission","AddPriceList","HasEditPriceListPermission","EditPriceList","HasDeletePriceListPermission","DeletePriceList","HasAddAdjustmentReasonPermission","AddAdjustmentReason","HasEditAdjustmentReasonPermission","EditAdjustmentReason","HasDeleteAdjustmentReasonPermission","DeleteAdjustmentReason","HasAddStockRecordPermission","AddStockRecord","HasEditStockRecordPermission","EditStockRecord","HasAddStockAdjustmentPermission","AddStockAdjustment","HasEditStockAdjustmentPermission","EditStockAdjustment","HasProcessStockAdjustmentPermission","ProcessStockAdjustment","HasAlterPartPricesPermission","AlterPartsPrices","HasAddManufacturerPermission","AddManufacturer","HasEditManufacturerPermission","EditManufacturer","HasDeleteManufacturerPermission","DeleteManufacturer","StockListComponent","SetStockTypes","SetUserRef1Stock","SetUserRef2Stock","SetManufacturers","SetSuppliers","stockAdjustmentViewPermission","Uploads","externalPartsDataSource","firstChange","supersededById","alreadyAddedPartsFilter","PurchaseOrdersFilterChanged","showUserRef1","isJobPartList","isSalesOrderPartList","isMakeModelOptionPartList","showUserRef2","showStoreSelector","ClosePopup","popupClose","userRefStock1Label","userRefStock2Label","userRefStock3Label","StockManfacturers","Suppliers","AddPartDialogueComponent","HandlePopupTitle","stockList","SetTitle","partsAdded","popupTitle","JobPartSerialNumberDialogueComponent","jobPart","allocatedSerialNumbers","allocatedToAnotherJob","QtyOutStanding","JobPartListModel","JobPurchaseOrderService","GetPartsByJob","VisitDetailsPipe","DaysUntilNowPipe","startDay","JobPartComponent","jobPurchaseOrderService","RemovePartsDisabled","JobStatusPreventsChanges","NoPartsSelected","AddPartsDisabled","IssuePartsDisabled","noPartsToIssue","RaisePoDisabled","noPartsOutstanding","CanEditParts","partGrid","LoadParts","hasViewCostsPermission","showRaisePo","hasAlterPartsPricesPermission","OnAddParts","addPartDialog","OnPartsAdded","addPartModels","OnPartUpdated","partToSave","currrentEditingNoteText","visitLookup","currrentEditingNoteTextHasChanged","OnIssueParts","partsToAdd","qtyFreeForIssue","stockAvailable","stockAllocated","QtyAllocated","oldQty","OnCellPrepared","serialNumberDisabled","quantityOutstanding","serialNumbered","OnRowPrepared","purchaseOrderParts","StockId","expandItems","firstChild","OnEditorPreparing","QtyBookedOut","QtyReturned","storeInGrid","currentStoreId","previousStoreId","showChangingStoreDialog","ConfirmChangingStoreDialog","ValidateQuantity","RaisePo","partsToPurchase","partDescription","GetPurchaseOrderParts","purchaseOrderPartsDataSourceStorage","dataSourceInstance","ViewPickingNote","GoToPrintingNote","showWarningPopupPickingNote","onConfirmSavePrintingNote","ExpandAllPurchaseOrders","currentEditingPart","onSaved","onEditCanceled","onCurrrentEditingNoteTextChanged","observed","partsOnJob","jobVisits","showIssue","partModel","stockPart","quantityOnOrder","QtyOutstanding","BulkMaterialOrderPopupComponent","missingSuppliers","materials","PreferredSupplierID","ordersRaised","order","MaterialSortValue","MaterialListModel","JobMaterialListModel","JobMaterialDialogueComponent","costingsEnabled","OnChangeMaterialType","loadedMaterialTypeId","OnChangeCost","MiscTypes","JobMaterialsComponent","suppliersService","AddMaterialDisabled","IsAllowedAddMiscItem","loadMaterials","purchaseOrderMiscs","suppliersDataStore","onConfirmSaveAndDelete","doDeleteMaterials","selectedMateralIds","onConfirmSaveAndOpenMaterial","openMaterialDialogue","selectedMaterial","UpsertMaterial","OnSaveMaterial","showJobMaterialDialogue","OnCancelMaterial","materialsToOrder","raisePO","GetPurchaseOrderMisc","purchaseOrderMaterialsDataSourceStorage","CheckSalesOrderRaised","searchedPurchaseOrder","JobMiscId","HandleRows","setCssClass","handleHidingArrows","CheckSalesOrderExist","materialDialogueTitle","selectedMaterialId","materialIds","JobCancellationDialogueComponent","accordionService","cancelDate","OnReasonChanged","JobEquipmentAccordionComponent","loadData","totalEquips","osEquips","doneEquips","ServiceContractEquipmentModel","JobContractAccordionComponent","equipmentSubscription","loadJobEquipment","MaintContractID","contract","GetEquipNo","jobEquipments","equips","contractEquipment","ContractEquipmentList","contractSite","Sites","JobEquipmentMarketingComponent","JobPartsMarketingComponent","JobRefrigerantComponent","addLogEntryDisabled","logEntryEnabled","LoadLogEntryEnabled","LoadRefrigerants","jobRefrigerants","logs","FGasLogId","command","isSelectable","selectAllCheckBox","isSelectAll","selectAll","checkBoxUpdating","isRemoveEnabled","RemoveLogEntries","logEntryGrid","RefrigerantLineId","deleted","arrayIndex","selectableItems","JobComponent","fromPlanerboardService","JobTab","Enabled","Order","switchToEquipment","onTabDragStart","onTabDrop","onContentReady","showDiscussion","isFormDirty","NavigateForward","tabPanelWidth","clientWidth","tabs","querySelectorAll","innerHTML","makeRight","InitTabs","allTabs","parameterId","parameterTabId","IsWizardSkipped","hasAccessToEquipment","hasAccessToServiceContracts","hasAccessToStock","hasAccessToSurvey","HandleJobTabs","IsEditableToDo","IsAllowedDue","IsEditableUserRef2JobID","IsEditableUserRef1JobID","invoiceid","Tabs","loadTabsForJobType","ngAfterViewChecked","tabPanel","getIndexOfTab","GoJobSheet","NavigateToJobSheet","GoJobSheetWithDefaultLayout","showCancelDialogue","OnCancelJobClosed","bypassPendingPo","CheckQuoteFixPrice","po","pendingPoMessage","showAllowPendingPo","FixedPriceQuote","SetTabsOrder","allowVariation","showAllowVariation","CompleteOnServer","ConfirmAllowVariation","SkipCheckFixedPrices","ConfirmAllowPendingPo","discussionComponent","UserRef1JobID","UserRef2JobID","IsInvoiceable","IsAllowedToAcceptJob","OnDeleteJobVisits","tabsLoaded","GetSelectedTabFromParameter","OpenVisit","selectedVisitId","showVisitDialogue","OnCancelJobVisit","OnSaveJobVisit","OpenInspections","JobEquipmentCollectionChange","jobInvoicingComponent","OpenFiles","filesComponent","OpenSendSurveyDialog","showSurveyDialog","trackedContactId","contactEmail","UpdateTabsOrderAndVisibility","fromData","addSectionIdx","visibleJobTabs","toData","didTabsChanged","ShowRemoveButton","tab","RemoveButtonHandler","removedItem","canRemove","hiddenJobTabs","ManageAddSectionsTabVisibility","tabName","jobTabsNamesDictionary","removeTabInformationText","showInformation","OnTabsAdd","showTabsPopup","TitleRendered","addSectionClick","addSectionMouseDown","MapTabs","CheckTabsAvailability","SetVisibleTabs","SetHiddenTabs","templatesDictionary","available","IsAllowedInspection","idx","JobSheetComponent","modulesService","parameterid","jobSheetUrl","HasProEnabled","SetPrintFunc","printFunc","showMarkAsPrinted","BackToJob","sendEmailWithInspections","translatedJobSheet","JobTypeService","GetAllCategories","RecurringJobService","daysAhead","RecurringJobOData","SaveRule","ruleModel","GetRule","Run","RecurringJobsComponent","recurringJobService","jobTypeService","customizeCount","SetupDataSource","isEquipmentEnabled","isServiceContractEnabled","rule","ParseFilter","DaysAhead","customerRef1Label","customerRef2Label","customerRef1DataStore","customerRef2DataStore","dispose","RuleData","allowRun","SaveCriteria","showConfirmationMessage","ShowViewProgressConfirmationMessage","showViewProgressConfirmationMessage","RuleId","RuleName","PlannedJobsReport","DaysAheadChanged","recurringJobsOdata","customerDataStore","customerValue","dateSerializationFormat","serviceLevelTypes","dateArray","JobRoutingModule","MessageListComponent","ClearDataForm","getConversationList","StartEdit","MessageID","handleColor","MessagesActionType","WarningModalService","setWarningModalObservable","confirmLeave","allowChangingUrl","getWarningModalObservable","RecipientsPickerComponent","initRecipientList","SelectAll","RecipientCollection","AllSelected","SaveRecipients","choosedRecipients","PickedRecipients","NewMessagesComponent","warningModalService","MessageId","MessageParams","LoadMessage","ShowWarningModal","canDeactivateCallback","first","handleRecipients","OpenPicker","ShowRecipientsModal","OpenAttachFileModal","ShowAttachmentsModal","SaveAttachments","TempAttachments","HandlePopup","HandleRecipients","RecipientArray","recipientList","Source","RecipientList","ChooseAction","actionType","validateRecipients","saveDraft","sendMail","ToggleTooltip","RecipientVisible","OpenDoc","SupDocID","RemoveAttachment","attachmentIndex","isExisting","LeaveSite","StayOnSite","CancelUploading","GetDocumentLabel","documentLabel","Document","DocumentName","Recipients","recipientsRequired","SaveEnabled","NewMessageForm","handleReloading","navigateByUrl","skipLocationChange","disableForm","selectedMultipleRecipients","recipient","saveRecipient","MessagesTooltipType","HtmlBodyComponent","safeHtml","bypassSecurityTrustHtml","MessagesNavigationComponent","Navigation","SubjectShortened","GoMessage","ActiveMessageId","MessagesComponent","bypassSecurityTrust","index2","AuthorVisible","ViewAttachment","DownloadAttachment","ShowNewMessage","ConversationData","MessageType","MessageIndex","getDocumentLabelFromDocumentType","MessageSubject","handleAttachements","initRecipientVisible","messageParameters","conversationDetails","AttachmentCount","AttachmentsArray","splitted","isViewButtonVisible","FileFormatsForViewing","IsViewable","Body","RecepientsArray","Recepients","parseRecipients","arrayLength","runGuardsAndResolvers","MessagesRoutingModule","AccountService","GetChangePasswordCode","ChangePassword","FieldsMatchDirective","formGroup","FieldsMatch","appMatchPassword","controlName","matchingControlName","matchingControl","mustMatch","notmatch","NG_VALIDATORS","ChangePasswordComponent","accountService","Password","ConfirmPassword","newPassword","code","LayoutOptionsComponent","ToggleCompactLists","compactListsEnabled","removeItem","OutlookIntegrationComponent","IsLinked","Linked","SetupLink","GetLinkStatus","RemoveLink","Link","appId","SidebarMenuComponent","MySettingsComponent","Icon","betaOutlook","SupportCodeService","GetSupportCode","GenerateSupportCode","RevokeSupportAccess","SupportCodeModel","SupportCodeComponent","supportCodeService","supportCodeModel","SupportCode","ExpiryDate","TwoFactorAuthenticationService","GoogleAuthenticatorEnabled","GoogleAuthenticatorSetup","GoogleAuthenticatorCompleteSetup","twoFactorCode","TwoFactorCode","GoogleAuthenticatorDisable","TwoFactorAuthenticationComponent","twoFactorAuthenticationService","qrImage","setupCode","QrCodeSetupImageUrl","twoFactorEnabled","Setup","setupVisible","CompleteSetup","MySettingsRoutingModule","Ng1Ng2UrlHandlingStrategy","shouldProcessUrl","urlString","startsWith","extract","merge","MapPins","homeMarker","standardPin","ActivityTypeService","GetActivityTypes","EngineerService","GetEngineers","GetActivities","GetJobSessions","GetEmployeeIdsHavingEngineerSkillsRequiredForJob","AppointmentType","EngineerCardMode","PlannerView","JobCategoryPipe","EmployeeActivityStatus","PlannerLayout","PlannerService","jobCategoryPipe","GetAppointmentsDataSource","odataStore","newParams","payload","loadOptions","currentLoading","inProgressTransactionCount","dataClone","currentTrackedData","processPendingTransaction","ReloadAppointments","updating","HasMultipleUpdates","adding","deleting","GetPublicHolidays","HolidayDate","GetMapLocationData","GetEngineerVisits","GetTimeZoneInfo","GetCalendarStartTime","GetSettingDateHour","GetCalendarEndTime","SetTopDownCalendarMode","TopDownCalendarMode","SetPlannerLayoutOption","SetSelectedEngineers","engineerIds","SelectedEngineers","SetPlannerRefreshInterval","SelectedRefreshInterval","GetJobsGridLayout","plannerLayout","JobsGridLayout","GetPlannerLayout","fromLocalStorage","lsLayout","currentPlannerLoad","shareReplay","take","ReloadPlannerLayout","PersistCurrentLayout","AssignJob","appointment","jobSession","JobSession","AssignJobStarted","EnsureValidOrNoEndDate","initialAppointmentDurationHours","CreateAppointmentFromActivity","Activity","CreateAppointmentFromJobSession","SiteName","isBefore","CreatePlannerEventFromEditorActivity","OldEmployeeID","LineID","CreatePlannerEventFromJobSession","JobCatID","JobCatId","Logged","GetUnassignedJobs","j","DueDate","EquipCount","EquipmentCount","EquipmentOoa","LoggedDate","SiteAddress","SitePostCode","SitePhotoFace","UserRef1Job","UserRef2Job","JobCategory","EquipMakeModels","EquipCategories","EquipTypes","PriorityName","PriorityColour","PriorityIcon","UpdateAppointment","TryUpdateEvent","TryAssigningJob","TrySaveActivity","RemoveAssignment","RemoveAssignmentStarted","SaveActivity","engineerActivity","CrateEngineerActivityFromEditorActivity","SaveActivityStarted","plannerEvent","CreateActivity","CreateAppointmentFromEditorActivity","ValueDate","GetJobVisitDefaultDuration","SetPlannerDate","GetPlannerDate","lsPlannerSelectedDate","u","CreateEvent","AssignJobSucceeded","AssignJobFailed","SaveActivitySucceeded","SaveActivityFailed","DefaultImageDataUrl","PlannerEngineerComponent","iconUrl","getIconUrl","onlineStatus","onlineStatusText","getStatusText","HandleCalendarButtonClicked","calendarButtonClicked","HandleLocationButtonClicked","locationButtonClicked","PositionTime","PlannerCardService","get$","UpdateLayout","JobProperties","JobPropertyPipe","jobVisitStatus","PlannerAppointmentCardComponent","plannerService","goToJobEquipService","plannerCardService","sanatizer","Header1","Header2","Header3","Body1","Body2","Body3","Body4","LogoEnabled","Loaded","JobPropertyClick","evt","Appointment","HandleDeleteClick","DeleteClicked","HandleMapClick","MapItemSelected","HandleCloseClick","CloseTooltipClicked","SetupJobCard","logoUrl","isPastEvent","visitStatus","isJobVisitComplete","isJobVisitStarted","ColourCodingClass","ColourCodingOverride","GetRGBFromWin32","BackColour","win32Color","PlannerCalendarComponent","engineerService","activityTypeService","transalteService","viewJob","beginGroup","HandleJobDropped","HandleAppointmentRemove","AddAppointment","UpdateFormSite","AddCalendarAppointment","StartDayHour","showWorkingHoursOnly","startDayHour","EndDayHour","endDayHour","getHoursClass","schedulerClass","CollapseEngineers","disableViewSwitching","engineerToggleIcon","engineerToggleDisabled","CurrentView","currentView","topDownCalendarMode","getHeight","allEngineers","SetEngineersDataSource","repaintSubscription","mapItemSubscription","engineerChangeSubscription","plannerSubscription","topDownCalendarModeSubscription","publicHolidays","TimesheetCannotChangeAfterSubmit","hasCreateJobPermission","JobAdd","HandleJobAssignmentFailed","HandleRemoveAssignementStarted","RemoveAssignmentFailed","HandleRemoveAssignementFailed","HandleSaveActivityStarted","HandleSaveActivityFailed","HandleTopDownCalendarMode","MustRepaintCalendar","calender","selectedJobName","selectedJobCenter","lat","lng","selectedJobMarkers","iconSrc","isShown","selectedJobPopupVisible","rxjsFilter","NavigationStart","useLocalStorage","navigationTrigger","ShowWorkingHoursOnly","SelectedCalendarView","plannerDate","CurrentDate","selectedEngineers","enginner","engineerContextMenus","addEngineer","AppointmentDataSource","Planner","defaultJobVisitDuration","toggleEngineerCard","appointmentData","FormatDayViewDate","FormatWeekViewDate","currentDate","FormatTopDownWeekViewDate","clickEvent","addAppointment","createActivity","showCustomFormFields","getStartEndDates","showAppointmentPopup","groups","createJob","formDurationTime","selectedCells","NewJob","MustExitFullscreen","selectedInRange","cell","showWorkingHoursOnlyChanged","onOptionChanged","onAppointmentUpdating","IsAddOrEditDisabled","skillCheckConfirmationDialogue","onAppointmentContextMenu","contextTarget","contextDisabled","contextDataSource","GetActivityContextMenuItems","GetJobContextMenuItems","onContextMenuItemClick","onAppointmentFormOpening","popup","formStartDate","prepareJobForm","prepareNewJobForm","prepareActivityForm","durationChanged","updateData","calculateAndSetEndDate","formDateTimeDueChanged","formStartDateChanged","formSiteChanged","checkIsOrderNumberRequired","itemOption","setCustomerContacts","contacts","getEditor","onAppointmentDeleting","validateEndDate","onCellContextMenu","menuItems","contextMenuEvent","showAppointment","deleteAppointment","onContextMenuHiding","onContextMenuInitalized","oldOptions","_getOverlayOptions","container","onContextMenuRendered","closest","ScrollView","height","HandleDateCellClick","EditorActivity","ShowActivityPopup","HandleDeleteAppointmentClicked","CloseCalendarTooltip","hideAppointmentTooltip","HandleEditActivityCancelled","addJobDisabled","setMinutes","RemoveAppointment","Appointments","isOutOfHours","isHoliday","setFormColCount","OrderNo","editorType","searchEnabled","validationRules","BackColorWeb","reevaluate","validationCallback","newEndTime","newEndDate","eventArgs","appointmentToAdd","jobContextMenuItems","engineerList","activityContextMenuItems","PlannerMapComponent","selectedMarkerJobId","autoAdjust","center","mapZoom","isActivity","visitToAppointment","hideActionButtons","viewContainerRef","hostView","CustomMarker","EngineerWithJobs","isEngineerActive","engineerId","showScheduler","enginnerId","Address1","Address3","Address4","CustomerPhotoFace","ViewContainerRef","PlannerRoutingModule","EngineerTypeService","typeId","engineerType","PlannerViewBarComponent","engineerTypeService","view","calculateSkillsDisplay","fullscreenIcon","isFullscreen","clearInterval","userReferenceDataStore","engineerSkillsDataStore","engineerTypeDataStore","ModulesAccess","SetAutoRefreshTime","skills","engineerSkills","topDownCalendarModeChanged","RefreshItemClick","toggleFullscreen","FilterEngineersBySkills","engineerSelectionChanged","Skills","SkillID","calculateSkillsFilter","RefreshClick","MustReloadUnallocated","refreshItems","refreshEnabled","plannerViewsItemClick","trueDocument","fullscreenElement","exitFullscreen","mozCancelFullScreen","msExitFullscreen","requestFullscreen","mozRequestFullScreen","msRequestFullscreen","TypeSortValue","PlannerJobsBase","onInit","HandleJobAssignmentStarted","DataLoaded","AddUnassignedJob","FocusedRowId","PlannerJobPanelComponent","jobCatPipe","userReferenceService","ViewJobWorkRequired","hasLoadedAtleastOnce","HandleAppointmentDropped","handleInboundAppointment","dataLoadedSubscription","jobsGrid","reloadDataSubscription","labelJobRef1","labelJobRef2","categoryLookup","removeAssignSubscription","app","SetModulesPermissions","loadState","gridLayout","gridConfigLoaded","inMemoryLayout","addJob","localApp","PlannerJobCardListComponent","FilteredDataSource","onListDragStart","onItemDragStart","onItemDragEnd","PlannerJobWorkRequiredComponent","PlannerShellComponent","toggleIcon","showViewBar","jobHeightInterval","calculateViewHeight","tryBindNavResize","jobsPanelHeight","jobsSection","offsetHeight","displayJobsAsList","DisplayJobsAsList","topHeight","TopHeight","bottomHeight","BottomHeight","onresize","dragProgress$","resizeTimeout","sizes","toggleViewBar","displayJobsAsListChanged","windowHeight","innerHeight","navHeight","viewHeight","PortalService","ResetPassword","SendInvite","GetActivityListFromLastDays","days","GetActivityStats","PortalContactsTabComponent","portalService","disableResetButton","disableReSendButton","consumerUserRolesModel","updateEmail","addEmail","updateLoginSwitch","allowLogin","switchLoginAccess","setStartDate","setSelected","setRoleSelected","roleSelected","resetPassword","resetPasswordEvent","resendInvite","showConfirmationModal","resetPasswordConfirmationMessage","PortalRoutingModule","powerBiReportGroups","groupName","DashboardService","getReports","controllerName","getDashboards","getReportsAndDashboards","getReport","reportId","getDashboard","dashboardId","ngCurrentUserHasPermission","PowerBiDashboardComponent","dashboardService","toastService","pbi","embedReport","reports","rpt","toLocaleLowerCase","unsubscriptions","reportResponse","replaceLoadingLogo","currentReport","selectedReportId","toogleFavorite","Group","favouritesGroup","ActualGroup","grp","setUserPreference","GroupName","capitalize","setupReportDataSource","reportFavoriteStatus","getGroupIcon","getGroupName","embedConfig","buildEmbedConfig","powerbi","pbiContainerElement","visibility","reportContainerElement","embed","off","reportGroupDataSource","ReportType","tokenType","accessToken","EmbedToken","embedUrl","EmbedUrl","filterPaneEnabled","navContentPaneEnabled","reportsWithGroup","summaryReport","ReportName","defaultReport","isGroupExist","userPreference","getUserPreference","reportName","ReportDisplayName","reportGroup","miscellaneousGroup","preference","reportStorageKey","existingFavoriteReports","newFavoriteReports","popInterval","charAt","PowerBiRoutingModule","PurchaseMarketingComponent","PurchaseOrderDetailsAccordionItemComponent","orderDetails","RefrigerantTypeViewService","refrigerantTypeViewOdataBaseUrl","AddCylinderDialogComponent","refrigerantTypeViewService","CellPrepared","useRefrigerantViewItemsChange","useRefrigerantViewItems","RefrigerantViewItemsDataSource","displaySupplierPrices","shouldHideRefrigerantDetails","columnIndex","filterByNoFilter","AddCylinders","cylindersAdded","cylinderObjectsAdded","selectedFilterValue","displayAllRefrigerantTypesForPurchaseOrder","displayAllRefrigerantTypes","noFilterSelected","noFilterselected","showRefrigerantDetails","noFiltersSelected","ErrorMessagesComponent","ShowSuccessMessages","ShowWarningMessages","ShowErrorMessages","AddMessagesComponent","componentFactoryResolver","jstranslate","CheckForm","alerts","elRef","htmlEl","elName","dataset","invalidEmail","ShowMessages","ShowAlertMessages","ShowErrorsMessages","componentFactory","messagesHost","createComponent","changeDetectorRef","DOCUMENT","BankersRoundService","bankersRound","noOfDecimals","sign","abs","pow","numberToRound","moveDecimalPlace","rounded","decimal","noOfPlaces","PurchaseOrder","PurchaseOrderService","purchaseOrder","MiscId","CancelOS","Copy","GetQtyPo","GetPurchaseOrderEmailData","SendPurchaseOrderEmailData","PurchaseOrderReceiptsAccordionItemComponent","orderReceipts","PurchaseOrderPendingOrdersAccordionItemComponent","orders","openOrders","PurchaseOrderStatusBarPipe","PurchaseOrderDetailComponent","purchaseOrderService","bankersRoundService","CostFC","UnitCostFC","LateFeeFC","LateFee","OnMakeModelDocumentLinkSelected","CarriageFC","partsCostFC","TotalCostFC","equipmentCostFC","materialsCostFC","cylindersCostFC","totalCostFC","addedPartIds","cancelOSButtonEnabled","orderCompleted","canBeCancelled","HasActiveGoodsReceived","userRefStore","supplierContacts","setDefaultDate","setShowVATOption","GetPurchaseOrder","valueFC","PlaceOrder","PurchaseOrderNumber","ReloadComments","RecallOrder","submitButton","CancelOrder","OnCancelOS","cancelOSMessage","orderDetailsAccordionItem","CopyOrder","pushState","GetSupplierDisplayExpr","AddPartDialog","ShowMissingSupplierDialogue","MoveToGeneralTab","OnPartIdsAdded","partData","GetPartSupplierRequiredQuantity","unitPriceFC","totalPrice","totalPriceFC","UpdateCost","RefreshMaterials","unitCostInForeignCurrency","alertMessages","addMessagesComponent","buyingPrice","WarrantyPeriod","AddCylinder","AddCylinderDialog","SetCylindersFilter","AddCylinderWithNoSupplierPrice","cylinderPrice","AddCylinderWithSupplierPrice","orderDate","OrderDate","Discount","ReturnBy","SupplierPartNumber","supplierCylinderPrice","dueDate","returnBy","ReturnIn","unitCost","unitCostFC","costFC","exchangeRateChanged","UpdateFCsOnExchangeRateChange","SupplierChanged","GetCurrencyInformation","contactSelectBoxComponent","contactFilter","GetContactFilter","AccountsContactId","partSupplier","suppliedChanged","rawUnitCostFc","costFc","OnOpenOrders","showPendingOrdersEye","onEquipmentCellPrepared","ShowVAT","CalculateCylinderTotalCost","CalculateCylinderOutstanding","PurchaseOrderPreviewComponent","PurchaseOrdersListComponent","queryFilter","PurchaseOrdersRoutingModule","QuoteSummaryType","QuoteTab","JobTypesService","GetJobTypesList","jobTypesUrl","GetJobType","UpdateJobType","DeleteJobType","QuotePercentPipe","AdvancedQuotesEquipmentOptionViewModel","Parent","PartsTab","TotalCostOnlyOptionParts","MaterialsTab","TotalCostOnlyOptionMaterials","TotalPrice","TotalPriceOnlyOptionParts","TotalChargeOnlyOptionMaterials","DiscountType","AdvancedQuotesGeneralViewModel","quoteEquipment","SelectedCurrencySymbol","ShowInCustomerCurrency","CustomerCurrencySymbol","BaseCurrencySymbol","UseCustomerCurrency","CustomerExchangeRate","GetCost","GetRecommendedUnitPrice","UnitPriceOverride","TotalCharge","GetCharge","SetDefaults","WarrantyLengthMonths","WarrantyLengthMeters","PreparationJobTypeSelected","InstallationDeliverJobTypeSelected","isPreparationJobTypeMissing","isInstallationDeliverJobTypeMissing","AdvancedQuotesMaterialViewModel","TotalChargeNoOptionMaterials","OptionId","getTotalCharge","TotalCostNoOptionMaterials","getTotalCost","SelectedExchangeRate","getMultiplier","addTo","AdvancedQuotesPartsViewModel","ModuleAccess","TotalPriceNoOptionParts","getTotalPrice","TotalCostNoOptionParts","TotalProfit","QuoteHasCustomerId","AdvancedQuotesEquipmentViewModel","GeneralTab","unitPriceOverride","getEquipmentCharge","DiscountToggleComponent","IsPercentageDiscount","SelectedDiscountType","ToggleDiscountType","SelectedDiscountTypeChange","CurrencyComponent","amountValue","amountChanged","CurrencyAmount","CurrencyFormat","updated","exchangeRate","AdvancedQuotesGeneralTabComponent","JobTypeDataSource","UpdateOnChange","RecommendedUnitPrice","SetCost","UpdateRecommendedUnitPriceOverride","QuoteJobActivityToActivityModelConverter","quoteActivity","QuoteActivityId","QuotesService","EquipmentOptionsChanged","equipmentOptionsChanged","Quotes2","SetInstalls","GetQuoteJobActivities","SetQuoteStatusToQuoted","GetMakeModelPrice","SetEquipIds","SetLabourIds","SetRefrigerantIds","SetMakeModelInstallIds","QuoteLabourId","LabourCharges","QuoteRefrigerantId","MakeModelInstalls","SalesQuotationJobMakeModelInstallId","JobInstalls","inst","QtyToInstall","GetLabourStore","AdvancedQuotesMaterialTabComponent","materialTypeService","quotesService","sortByAddTo","EditableRow","RemovingDisabled","setupListDataSource","optionChangeSubscription","AddToOptions","ShowAddMaterialsDialogue","newMaterialId","OpenMaterialDialogue","materialsDataSource","IsQuoteQuoted","GetTotalCost","multiplier","GetTotalPrice","deselectedRowKeys","AdvancedQuotesOptionsDialogComponent","AlreadyAdded","OptionsGrid","AddOption","OptionsAdded","optionType","OptionFilterChanged","AdvancedQuotesOptionsTabComponent","ShowAddOption","makeModelOptionDataSource","dialog","RemoveOption","selectedOptionIds","QuotePartId","OnOptionUpdated","CheckAttributesCollision","addedOptionIds","collide","showAttributeWarning","ConfirmAttributesOverride","overrideAttributes","getOptionsObservables","OptionType","QuoteSalesOrderEquipId","MiscTypeId","attributes","p1","p2","a1","a2","existing","QuoteJobPartsService","GetQuoteJobParts","quoteJobPartBaseUrl","UpdateQuoteJobPart","AddQuoteJobParts","stockHeaderIds","RemoveQuoteJobParts","HttpHeaders","AdvancedQuotesPartsTabComponent","quotePartService","OnPartEditing","CalculatePrice","AddingDisabled","SelectedParts","EditingEnabled","IsPriceEditable","SetupListDataSource","PartsDataStore","PartsDataSource","ShowCustomerRequiredMessage","stockIds","getPartObservables","preferredSupplier","PreferredSupplierId","newQuotePartId","OnSaving","PartsListDataSource","editRowKey","CalculateCharge","AdvancedQuotesDrawerComponent","animationType","duration","animationDuration","startPosition","to","targetPosition","isDrawerOpen","OnClose","OnSave","HandleChanged","generalTab","SwitchCurrency","FormMessageComponent","QuoteInvoiceCyclePipe","invoiceCycle","QuoteEquipmentComponent","equipmentStore","ShowEditWorkRequiredDialog","ActivityCustomizedText","selectedEquipmentItemIds","QuoteEditButtonVisible","GetLocationData","EquipSitesDataSource","equipSiteLookup","MakeModelDataSource","makeModelLookup","RemoveEquipment","OnEquipmentUpdated","UiStartDate","UiEndDate","processed","newEquipmentId","minDateValue","editedItemId","OnActivitySelectedEvent","activitySelected","Activities","GetEquipmentCharge","getMinEndDate","minEndDateValue","OnEditingStart","dataCopy","DeepCopy","drawer","makeModeTitle","dataModel","dataIndex","ActivitiesUpdated","SetActivities","quoteEquipmentGrid","Situation","DeleteLinkedEquipment","equipmentToDelete","ed","locationDataSource","uiItem","sourceJson","QuoteJobInstallComponent","OnUpdateInstall","jobInstall","installGrid","QuoteInstallId","newInstallId","CloseMakeModelDialog","makeModelDisplayExpr","OnDeleteInstalls","selectedInstallIds","DeleteLinkedInstalls","installToDelete","ld","LabourRateService","GetLabourRate","GetAllLabourRates","GetCompleteLabourRates","GetAllLabourProfiles","GetDefaultCostLabourRate","LabourRateComponent","labourRateService","ShowAssignedRate","rate","assignedLabourRateId","LabourRateId","SelectedRates","SelectedIds","ShowCosts","ShowCharges","rates","AvailableRates","SelectedRatesChange","IsAssignedRate","labourRate","LabourID","LabourRateGrid","LabourRateDialogComponent","DialogOpen","SelectButtonDisabled","SaveSelection","OnSaveSelection","OnDismiss","QuoteJobLabourViewModel","DisplayTotal","convertAndRound","QuoteJobLabourComponent","TotalCurrencyFormatter","CalculateTotal","IsSelectedLabourRate","selectedRates","LabourListDataStore","OnRemoveSelectedRates","ShowRateSelectionDialog","labourRateDialog","OnLabourRateAdded","labourComponent","labour","newLabourId","StdHours","OnRatesUpdated","labourData","labourToUpdate","IsCost","DisplayTotalLabour","Repaint","labourGrid","DeleteLinkedLabour","labourToDelete","LabourListDataSource","QuoteMaterialsComponent","OnEditMaterialJob","OnEditMaterial","OnAddMaterials","addMaterialDialog","MiscTypeDataSource","miscTypeLookup","miscType","materialData","TypeEnabled","AddMaterials","newMisc","miscToUpdateIndex","newMiscId","OnUpdateMaterial","OnDeleteMaterials","quoteMaterialsGrid","DeleteLinkedMaterials","materialsToDelete","QuotePartsViewModel","TotalDisplayPrice","situation","PartsEnabledForSituation","IsBaseCurrency","QuoteHasCustomers","SelectedCurrencyCode","BaseCurrencyCode","CurrentTab","QuoteForContract","QuoteForJob","QuoteForSalesOrder","QuotePartsComponent","getMilliseconds","OnHideCustomerRequiredMessage","DeleteLinkedParts","partsToDelete","pd","QuoteRefrigerantViewModel","Profit","CostsVisible","AllowUpdating","QuoteRefrigerantComponent","quotePercentPipe","RefrigerantsProfitPercentage","SetupEquipmentListDataSource","EquipmentModelUpdated","alreadyAddedRefrigerants","OnRemoveSelectedRefrigerants","selectedRefrigerantIds","AddRefrigerant","addCylinderDialog","OnRefrigerantUpdated","OnRefrigerantsAdded","objs","UnitCostPrice","newQuoteRefrigerantId","OnHideMessage","EquipmentListItem","loadMode","refrigerantsDataSource","QuoteEquipmentViewModel","GetEquipmentChargeBase","getEquipmentChargeBase","EquipmentEnabledForSituation","QuoteJobEquipmentViewModel","QuoteMaterialsViewModel","CurrentSymbol","MaterialsEnabledForSituation","FormatPercentage","profit","QuoteJobMaterialsViewModel","ProfitPercentage","QuoteJobActivitiesViewModel","QuoteJobInstallViewModel","QuoteJobInstall","tempIndex","mmInstall","eqInstall","QuoteJobViewModel","LabourTotal","eqInstalls","makeModelInstalls","jobInstalls","TotalLabour","DisplayFlatCharge","ProfitLabour","FlatChargeInForeignCurrency","QuoteJobActivityDialogueComponent","activityForm","activityTypes","formDescription","formActivityType","QuoteJobActivitiesComponent","OnEditActivity","OnAddActivity","addActivityDialog","AddActivities","indexToUpdate","activityToUpdate","newActivityId","OnUpdateActivity","OnDeleteActivities","activityDeleteConfirmationMessage","selectedActivityIds","showActivityDeleteDialog","OnConfirmDeleteActivities","QuoteJobTabComponent","jobTypesService","TotalProfitPercentage","JobSituation","OnEquipmentModelChanged","quoteRefrigerantList","OnActivityModelChanged","equipmentList","materialsList","partsList","labourCosts","labourCharges","OnCurrencyChanged","labourList","OnInstallModelChanged","jobTypesCollection","castedJobTypes","AutoAllocate","CategoryJobCat","CreatesInvoice","ExampleViewModel","stuff","QuoteContractEquipmentViewModel","QuoteContractSitesViewModel","SalesQuotationContractId","RemoveSitesButtonDisabled","AddSitesButtonDisabled","QuoteContractViewModel","ContractCharge","ContractTypeId","EquipWorkRequired","SitesWorkRequired","ContractChargeInForeignCurrency","QuoteSalesOrderEquipmentViewModel","QuoteSalesOrderMaterialsViewModel","QuoteSalesOrderViewModel","QuoteSalesOrderId","CarriageInForeignCurrency","PartsVisible","QuoteDetailLevel","QuoteSummaryViewModel","Detail","QuoteTerms","QuoteSummary","level","isCustomerCurrency","JobEnabled","getSummaryItem","JobDisplayTotal","SalesOrderTotal","SalesOrderDisplayTotal","ContractEnabled","ContractTotal","ContractDisplayTotal","QuoteTotal","QuoteDisplayTotal","IsExchangeRateOkToChange","QuoteViewModel","SalesQuotationSummary","defaultSummaryItems","CurrencyCode","Example","ShowCurrencySwitch","flatCharge","discount","AccordionCancelReasonModel","QuoteDetailsAccordionItemComponent","reloadData","recipients","splitSentTo","SentTo","CreatedById","createdBy","cancelReason","sentTo","IsQuoteStatusWon","QuoteRevisionsAccordionItemComponent","quotes","clickRevisionLink","clickRevision","AccountNumberValidator","accountNumberResponse","AccountNumberComponent","formBuilder","accountNumberValidator","initialCustomerAccountNumberForm","customerFormControls","customerFormGroup","cancelAccountNumber","ok","okAccountNumber","accountNumber","okBtnStatus","popupHiding","validators","asyncValidators","accountNumberAvailabilityAsyncValidator","QuoteDetailsTabComponent","references","filterCustomers","NewCustomer","OnCustomerChanged","OnSiteChanged","QuoteComment","CustomerChanged","ManagingAgentId","CurrencyService","getExchangeRate","currencyCodeBase","QuoteSummaryComponent","currencyService","getRate","CurrencyChanged","QuoteSalesTabComponent","SalesOrderSituation","EquipmentContractModel","QuoteContractInvoiceTypeService","CycleType","GetInvoiceCycles","AddSiteDialogueComponent","existingSiteId","currentFilter","newFilter","AddSite","SitesAdded","NewSiteSearchTextChanged","newSiteSearchText","QuoteContractSiteComponent","onRemoveItemButtonClicked","SelectedSiteIds","SalesQuotationContractSiteId","onAddItemButtonClicked","newSiteId","alreadyAddedSites","onRowUpdated","sitesContractOData","QuoteContractsTabComponent","contractTypeService","invoiceCycleService","ContractSituation","contractTypes","invoiceCycleTypeList","selectedContractType","onContractTypeChanged","QuoteCommentTabComponent","QuoteDetailComponent","quotesDataService","customersService","sharedCustomerService","revision","rev","quoteModel","SetQuoteCollections","replaceState","SetCustomerCurrency","ShowCancelDialog","ChangeRevision","selectedRevision","CreateNewRevision","WonConfirmationDialog","populateMessagesMap","OrderNoRequired","accountNumberPopupVisible","wonConfirmationMessage","ChangeStatusOnCancel","ChangeStatusOnOk","WinQuote","observeables","messagesMap","ViewQuote","GoToQuotePreview","ViewQuoteWithDefaultLayout","SalesOpportunityId","CopyQuote","QuoteId","revisions","Revisions","accessRightsCache","currenTabCached","QuotePreviewComponent","markAsQuotedVisible","setQuoteStatus","DocumentReadyAction","isPreviewLoaded","multiPageToggle","openPrintDialog","printConfirmationMessage","changeStatus","markAsQuoted","openDownloadDialog","downloadConfirmationMessage","emailConfirmationMessage","q","Quotes2RoutingModule","ReturnsNoteStatusBarPipe","ReturnsListComponent","returnService","ReturnsNoteId","CalculateType","priorityWeight","IncludeEquip","IncludeMisc","employeesDataStore","ReturnsNoteCancel","ReturnsNote","ReturnsDetailsAccordionItemComponent","GRNNo","GRNDate","ReturnedBy","returnsDetails","ReturnsFilesTabComponent","ReturnsNoteMaterialsComponent","ReturnsNoteLineId","ReturnsNoteEquipmentComponent","TotalPriceFormatter","OnEquipRowUpdating","ReturnsNotePartsComponent","readonly","ReloadGoodReceivedNote","ValidateLessOrEqualThanQuantityReturned","OnPartUpdating","setFormDirty","OpenSerialNo","partRow","GetReturnsNotePart","PartUpdated","LandedCost","OnPartValidating","goodReceivedPart","GoodReceivedNoteLineId","GoodsReceivedNoteLineId","goodReceivedQuantity","ReturnsNoteSummaryComponent","goodsReceviedService","goodsRecevied","partsReturned","partsFlaggedForReturn","equipmentReturned","equipmentFlaggedForReturn","ToBeReplaced","materialsReturned","materialsFlaggedForReturn","refrigerantsReceived","refrigerantsReturned","refrigerantsCost","refrigerantsFlaggedForReturn","totalReturned","totalFlaggedForReturn","gr","ReturnsNoteAddCylinderDialogueComponent","cylindersList","ReturnsNoteRefrigerantsComponent","cylinderTypesService","CurrentWeightTotal","cylinderDataStore","cylinderTypesDataStore","refrigerantTypesDataStore","alreadyAddedCylinderIds","OnCylinderIdsAdded","GoodReceivedNoteId","WasteTransferNoteRequired","cylinderTypeIdRecovery","cylinderTypeIdWaste","CylinderUpdated","ReturnsNoteDetailsComponent","returnsNoteService","moduleAccess","rn","ReturnsNoteNumber","ToggleCurrency","CancelReturn","supplierSelectBox","rtc","DeliverReplacementsToId","ViewReturn","ReturnsNotePreviewComponent","ReturnsNoteRoutingModule","SalesCampaignsListComponent","hasQuotesEnabled","SalesCampaignsRoutingModule","SalesOpportunityStatusColourEnum","ReminderService","reminderId","SalesOpportunityBusiness","canBeChangedToSystemStatus","isCreated","hasLostToSelected","LostTo","lostToCopmetitor","hasReasonLostSelected","ReasonLost","reasonLostToBarriers","SalesOpportunityLostDialogComponent","resetModel","competitors","barriers","salesOpportunityLostDetail","resetForm","CloseDate","lostToCompetitor","so","reasonLostBarriers","lostBarriersIds","CreateFromSalesOpportunity","SalesOpportunityDetailsAccordionItemComponent","salesOpportunity","SalesOpportunityGeneralComponent","siteDataSource","contactDataSource","employeeDataStore","hasManagingAgentEnabled","customerFilter","customerContactSelectBoxComponent","SalesOpportunityAdditionalComponent","ValidateCompetitor","ValidateBarrier","ValidateExistingSupplier","ValidateLostTo","MarkDirty","barriersStore","competitorsStore","OnInitNewBarrier","OnInitNewCompetitor","ExistingSupplier","isNewRow","deleteRow","OnRowInserted","SalesOpportunityFilesComponent","SalesOpportunityHistoryComponent","SalesOpportunityDetailComponent","CreatedForId","ForecastCloseDate","SalesValueEst","StatusBarSize","StatusColour","StatusName","ProfitValueEst","UserRef1Id","UserRef2","reminder","CreatedForID","TaskDescription","Details","FromReminderId","ConfirmLost","SalesOpportunityLostDialog","CreateQuote","SaveQuoteAndNavigate","lostModel","SalesOpportunityListComponent","SetupFilters","SalesOpportunityNumber","nonSystemStatuses","IsSystem","activeOpportunitiesFilters","myOpportunities","SalesOpportunityRoutingModule","SalesMarketingComponent","SalesOrderPreviewComponent","salesOrder","SalesOrderViewModel","SalesOrderGeneralComponent","SalesOrderDisabled","salesorder","OrderNumberDisabled","connectedDespatchNoteInvoiced","userRefDataSource","hasManagingAgentSettingEnabled","calculateEquipmentCarriageSum","selectUserRef1","depatchNotes","InvGroupingId","InvGroupingID","changeCustomerInDatabase","currencyChange","onSiteChanged","equipmentCarriageSum","showEquipmentCarriage","cached","BulkEquipmentOrderPopupComponent","SalesOrderEquipmentComponent","TotalMarginFormatter","onInitialize","showJobTypes","ShowPreparationAndInstallationJobTypes","colCountByScreen","notesColspan","salesOrderDisabled","formClass","totalMargin","TotalSellingPrice","raisePOButtonDisabled","OnPurchaseOrder","jobTypeDataSource","purchaseOrderEquipments","SetOnPOValue","ExpandAllRowsWithChild","CheckPurchaseOrderExist","expandRow","GetPurchaseOrderEquipment","purchaseOrderEquipmentsDataSourceStorage","Margin","RefreshEquipmentAfterAdd","handled","MakeModelSortValue","RepaintGrid","onRaisePO","makeModelsToOrder","getSelectedMakeModels","mapSalesOrderEquipmentToBulkEquipment","salesOrderEquipment","MakeModelLineId","calculateDueDate","leadTime","sale","GetPurchaseOrderOutstandingQuantity","ar","outstandingTotal","MaterialTypesService","GetMaterialTypesList","miscTypesUrl","GetMiscType","GetNewMiscType","DeleteItem","UpdateItem","SalesOrderMaterialsComponent","materialTypesService","onMiscRowUpdating","materialTypes","saveBeforeRaisePurchaseOrder","selectedMaterials","getSelectedMaterials","showSaveMessage","mapSalesOrderMaterialToMaterialList","CheckPurchaseOrderRaised","salesOrderMaterial","SalesOrderSummaryComponent","orderPending","partsPrice","equipmentPrice","materialsPrice","totalCarriage","InstructionsDisabled","salesOrderViewModel","parentForm","SalesOrderPartModel","SalesOrderPartsComponent","CalculateRowMargin","CalculateTotalMargin","RaisePurchaseOrderDisabled","addedParts","costAndPrice","Picked","nextLineNumber","SelectedLineIds","OnRaisePurchaseOrder","poPartsPopup","CannotSelectPart","CalculateTotalSellingPrice","CalculateMargin","margin","ToCurrency","GetQuantityOutstanding","SalesOrderFileComponent","SalesOrderAccordionDetailComponent","employeee","quoteTotal","SalesOrderAccordionDespatchComponent","SalesOrdersAccordionComponent","ShowWarningNotes","isWarningNoteEyeVisible","ShowCreditWarning","isCreditWarning","WarningNotesEye","CancelledBy","cancelledBy","SalesOrderComponent","placeOrderEnabled","despatchButtonDisabled","hasUndespatchedDespatchNote","salesOpportunitiesEnabled","navigateToTab","LoadSalesOrder","DueDateUI","OrderDateUI","showCompleteWarning","ConfirmCancel","customCallback","setSalesOrder","outstandingDespatchNotes","checkForUndespatchedDespatchNotes","salesOrderPrintOutUrl","timestamp","dns","dn","SalesOrdersRoutingModule","ContractHeaderUploadService","contractUploadBaseUrl","ContractHeaderUploadComponent","contractHeaderUploadService","accountsLinkService","ContractNo","CustomerAlpha","ContractType","RenewalDate","UserRef1","Start","Contractno","contractNo","contractno","Customeralpha","customerAlpha","customeralpha","CustomerAccNo","CustomeraccNo","CustomerAccno","customerAccNo","customeraccNo","customerAccno","customeraccno","AccountCode","Accountcode","accountCode","accountcode","Contracttype","contractType","contracttype","Orderno","orderNo","orderno","Renewaldate","renewalDate","renewaldate","Invoicecycle","invoicecycle","Contractcharge","contractCharge","contractcharge","Userref1","userRef1","userref1","Userref2","userRef2","userref2","startContactValue","isDuplicateContract","contractMap","fileName","ContractMarketingComponent","ContractSiteUploadService","ContractSiteUploadComponent","contractSiteUploadService","SiteAccNo","siteaccno","AccNo","accno","startdate","enddate","invoiceFrom","invoicefrom","invoicefromdate","From","contractSiteMap","InvCycle","ServiceContractModel","ContractAccordionItemComponent","equipStartDate","sitesStartDate","equipEndDate","sitesEndDate","siteCharge","equipmentCharge","period","InvCycleId","ContractDetailComponent","ContractFixed","saleOppEnabled","contractTypesDataSource","UpdateInvoiceGroupingId","OnConirmChangeCustomer","InvCyclePipe","ContractEquipmentComponent","invCyclePipe","calculateSummary","calculateEquipNumber","calculateMakeModel","calculateSite","calculateLocation","isCustomerSelected","customerSubscription","selectedEquipIds","invCycleSubscription","calculateCaption","loadDataSources","EquipDataLookup","EquipDataSource","RemoveLabel","RemoveCount","ShowAddEquipmentDialogue","lastElement","FormMarkDirty","selectedContractEquipIds","CloseAddEquipmentDialogue","DialogOpened","newEquipmentDataGrid","filterActive","filterInactive","newEquipmentFilterSelected","ValidateEndDate","equipLookup","allEquipmentDataStore","chargePeriod","newCaption","started","notFinished","notStarted","sitesRows","sitesFilter","isRefreshing","onChanged","sitesLoaded","ServiceContractInvoice","ContractInvoicingDialogueComponent","invoiceFromDate","validEquips","equipInvoiceFrom","validSites","sitesInvoiceFrom","CycleCount","DefaultInvoiceFrequency","CalculateUpToDate","setMonth","ContractInvoicingComponent","invCycleArray","GetContractInvCycle","invoicingDisabled","equipInvoiced","sitesInvoiced","setReverseChargeVAT","loadCurrency","reverseChargeVATEnabled","onDefaultInvoiceFrequencyValueChanged","foreignCurrencyCustomer","contractCurrencySymbol","OnInvCycleChange","showInvoicingDialogue","checkOrderNoAndShowDialogue","ReverseChargeVAT","ServiceContractSite","ContractSitesComponent","serviceContractService","selectedSites","siteIds","rowsValues","InitialiseFromLastElement","sitesChanged","getLastElement","AccNoSortValue","SiteSortValue","ContractCancellationDialogueComponent","ContractComponent","loadSitesDataSource","contractid","OnCancelContractClosed","ViewContract","noteIdsRelatedToContract","ContractEquipmentUploadService","ImportContractEquipmentComponent","contractEquipUploadService","Contract","equipNo","Equipno","Startdate","Enddate","End","InvoicefromDate","InvoiceFromdate","Invoicefromdate","invoicefromDate","invoiceFromdate","Invoicefrom","ServiceContractPreviewComponent","contractStatus","contractUrl","ServiceContractsRoutingModule","EmptyComponentComponent","PickingNoteComponent","pickingNoteUrl","StockAdjustmentStatus","StockAdjustmentService","GetAdjustment","SaveAdjustment","CancelAdjustment","Process","GetStockAdjustmentEmailData","GetStockTakeEmailData","SendStockAdjustmentEmail","GetStockAdjustmentDataSource","GetStockAdjustmentReasonsDataStore","StockAdjustmentStatusPipe","StockAdjustmentStatusBarPipe","StockAdjustmentListComponent","stockAdjustmentsService","AdjustmentNo","stockAdjustmentsDataSource","adjustmentReasonDataStore","AdjustmentReasonService","ODataAdjustmentReasons","AdjustmentReasonsDataSource","adjustmentReasonId","adjustmentReason","GetDefaultAccount","StockAdjustmentSerialNoStatus","StockAdjustmentAutofillOptionsComponent","BinLocationFrom","BinLocationTo","UserRef2Id","IncludeBlankBinLocation","StockTypesDataSource","stockTypeLinks","ManufacturerDataSource","UserRef1DataSource","UserRef2DataSource","BinLocationsFromDataSource","BinLocationsToDataSource","ShowDialog","Fill","FillRequested","HandleSelectedStockTypeChanged","FilterManufacturers","FilterBinLocationFrom","FilterBinLocationTo","HandleSelectedManufacturerChanged","HandleSelectedBinLocationFromChanged","matches","BinLocationPredicate","StockAdjustmentSerialNoStatusPipe","StockAdjustmentSerailNoComponent","stockSerailItemsService","removedCount","serialItems","isAdding","isAllocated","serialId","newSerialNo","StockTransferSerialNumberDialogueComponent","serialNoAdjustments","serialItem","StoresDifferDirective","StoresDiffer","appStores","store1ControlName","store2ControlName","store1Control","store2Control","sameStores","StockAdjustmentComponent","stockAdjustmentService","adjustmentReasonService","SrcStoreId","PartAdjustments","unitValue","IsCostOnlyValueSelected","NewBalance","adjustment","orderedPartAdjustmentsIds","getCostOnlyValueReasonId","IsStockTakeSelected","getStockTakeReasonId","IsTransferSelected","getTransferReasonId","DestStoreId","stockStorePartsDataSource","calculateUnitValue","hasCalculatedUnitValue","customizeQtyToMoveTotal","alreadyAddedParts","adjustmentFinished","newAdjsutment","isAdjustmentCancelled","serialNumbersOutstanding","TotalRowClass","TotalCostClass","TotalCostText","noParts","groupByBinLocation","hasProcessPermission","reasonDataSource","openAddPart","partsPopup","SerialNoAdjustments","partAdjustment","newReminder","onConfirmCancel","showCancelWarning","cancelAdjustment","process","resetPartsWithCalculatedUnitValue","SaveForm","selectedPartAdjustment","selectedSerialNos","selectedAdjustmentNo","transferSerialNoPopup","updateSerialNos","nos","calculateDifference","calculateTotalCost","removed","handleUnitValueChanged","handleSelectedReasonChanged","allowReasonChange","previousReasonId","showReasonChangeMessage","handleSelectedStoreChanged","changeStoreMessage","_this4","CostBalance","costOnlyValueReason","AdjustmentReasonId","stockTakeReason","transferReason","AutoFillParts","autoFillOptionsPopup","OpenCountSheet","HandleFillRequested","handleQtyToMoveValueChanged","newBalance","ResetParts","_this5","ResetStore","ResetReason","disableAddParts","PreferredSupplierAccordionItemComponent","suppliers","StockPurchasesAccordionItemComponent","purchases","DemandAccordionItemComponent","jobs$","sales$","jobs","salesOrderParts","isEmptyTab","StockGeneralComponent","hasPurchaseOrders","userRef2DataSource","precision","StoreIconComponent","StoreClasses","MainStoreId","StockLevelsComponent","SortStoreName","SortType","stores","storeLookup","openSerialNos","OnSaved","mainStoreId","columnOptions","SortMinColumn","SortMaxColumn","MinLessThanMax","MaxGreaterThanMin","locale","FilterStoreLines","storeIds","StockGeneralStoresComponent","ShowActiveStores","activeStoreIds","MarkAsDirty","HandleCurrentSwitchChanged","OpenSerialNos","showCurrentStores","stockLevels","StockHistoryComponent","StoreListDataSource","StoreFilterChanged","StockFilesComponent","StockSerialNosComponent","CalculateAllocatedTo","PriceListSource","StockStoreDataStore","initFilter","serialNumberStoreFilter","SetStoreFilter","SortStoreNameColumn","DespatchId","StockSuppliersAddComponent","FilterByAddress","GetAddress","BoundGetAddress","AddSupliers","stockSuppliers","SupplierRrp","UseBaseCurrency","selectedSuppliers","userReference1DataStore","userReference2DataStore","StockSuppliersComponent","focusStateEnabled","hoverStateEnabled","RemoveSupplier","AddSupplier","addSuppliersComponent","OnSuppliersSelected","CalculateBuyingPrice","CalculateRRP","StockEquivalencesComponent","formMesssageService","equivalences","SupercededBy","isSuperseded","hideCurrentPartFromDialogue","IsRecurringJobsEnabled","OnPartAdded","ManfId","Manufacturer","ManufacturerName","ManufacturerPartNo","replacementPart","replacementPartNo","showReplaceMessage","ConfirmUpdateServiceParts","ReplaceMessage","Replacement","Original","currentPartId","StockDetailComponent","UseSerialNo","CanSerialNoStateBeChanged","UserRef3","UserRef4","Equivalences","stockTypesDataSource","numericId","secondaryActionsDisabled","serialNosTabIndex","generalTabVisible","PrimaryImageChanged","markAsUntouched","stockDetailAccordion","SwitchChanged","StockMarketingComponent","StockPartUploadService","obs","chunk","StockPartUploadComponent","stockPartUploadService","StockType","ManufacturersPartNo","partno","PN","pn","Part","Desc","stocktype","InventoryType","inventorytype","qty","QtyInStock","qtyinstock","instock","QtyOnHand","qtyonhand","OnHand","onhand","valuation","sellingprice","Selling","selling","binlocation","Bin","bin","manufacturerspartno","ManufacturersNo","manufacturersno","isDuplicatePartNo","partNoMap","minMaxInvalid","isManufacturerInvalid","changeToMapsWithStore","StockPreviewComponent","adjustmentUrl","adjustmentStatus","StockSupplierPricesUploadService","StockSupplierPricesUploadComponent","stockSupplierPricesUploadService","SupplierAccNo","SupplierPartNo","supplierAccNo","supplieraccno","VendorAccNo","vendorAccNo","vendoraccno","supplierPartNo","supplierpartno","VendorPartNo","vendorPartNo","vendorpartno","SupplierRRP","supplierRRP","supplierrrp","VendorRRP","vendorRRP","vendorrrp","RRP","rrp","buyingprice","leadtime","minorderqty","preferred","stockSupplierPricesMap","isUScompany","StockTakePreviewComponent","StockRoutingModule","SupplierStatusPipe","statusMapping","SupplierStatusBarPipe","ChildSitesListComponent","GoTo","entityType","ContactStatusPipe","Inactive","ContactStatusBarPipe","ChildContactsListComponent","childContractsService","childStore","shouldReloadChange","NewChildContactComponent","showNewContactDialog","showNewContactDialogChange","newContactAdded","SupplierHistoryComponent","SupplierDetailsComponent","SupplierLogo","logo","Logo","defaultLogo","isUnitedStates","CountryID","supplierOnHold","userRef1Store","userRef2Store","contactsStore","contactListType","countryDataStore","regionDataStore","poOutputTypeDataSource","poEmailFormatDataSource","currencySource","isAllowedContactView","isAllowedContactAdd","LoadSupplierData","contactSource","saveForm","mainFormName","FileValueChanged","uploadedItem","that","allowedImageTypes","ClearSelectedFile","ShowValidationAlert","arrayBuffer","base64String","RemoveLogo","NewContactAdded","contactListShouldReload","NewSupplier","newSupplier","showNewSupplierPopup","DismissNewSupplier","CreateNewSupplier","sitesList","supportedTypes","fileUploader","ImportSummary","summary","importSummary","RowErrors","rowError","SupplierUploadService","SupplierUploadComponent","supplierUploadService","SupplierName","Address2","TownCity","County","Fax","Website","ContactMobileNo","ContactPhoneNo","AccountNo","accountNo","accountno","CompanyName","companyName","companyname","Companyname","suppliername","Suppliername","address1","Street1","street1","address2","Street2","street2","townCity","Towncity","towncity","Town","town","county","Postcode","postCode","postcode","ZipCode","zipCode","Zipcode","zipcode","Zip","PhoneNo","Phoneno","phoneNo","phoneno","PhoneNumber","phoneNumber","Phonenumber","phonenumber","fax","website","webSite","WebSite","Web","web","ContactFirstname","ContactfirstName","Contactfirstname","contactFirstName","contactFirstname","contactfirstName","ContactLastname","ContactlastName","Contactlastname","contactLastName","contactLastname","contactlastName","contactsurname","ContactMobileno","ContactmobileNo","Contactmobileno","contactMobileNo","contactMobileno","contactmobileNo","contactmobileno","ContactMobileNumber","ContactMobilenumber","ContactmobileNumber","Contactmobilenumber","contactMobileNumber","contactMobilenumber","contactmobileNumber","contactmobilenumber","ContactMobile","Contactmobile","contactMobile","contactmobile","ContactCellPhoneNo","ContactCellPhoneno","ContactCellphoneNo","ContactCellphoneno","ContactcellPhoneNo","ContactcellPhoneno","ContactcellphoneNo","Contactcellphoneno","contactCellPhoneNo","contactCellPhoneno","contactCellphoneNo","contactCellphoneno","contactcellPhoneNo","contactcellPhoneno","contactcellphoneNo","contactcellphoneno","ContactCellPhoneNumber","ContactCellPhonenumber","ContactCellphoneNumber","ContactCellphonenumber","ContactcellPhoneNumber","ContactcellPhonenumber","ContactcellphoneNumber","Contactcellphonenumber","contactCellPhoneNumber","contactCellPhonenumber","contactCellphoneNumber","contactCellphonenumber","contactcellPhoneNumber","contactcellPhonenumber","contactcellphoneNumber","contactcellphonenumber","ContactCellPhone","ContactCellphone","ContactcellPhone","Contactcellphone","contactCellPhone","contactCellphone","contactcellPhone","contactcellphone","ContactPhoneno","ContactphoneNo","Contactphoneno","contactPhoneNo","contactPhoneno","contactphoneNo","contactphoneno","ContactPhoneNumber","ContactPhonenumber","ContactphoneNumber","Contactphonenumber","contactPhoneNumber","contactPhonenumber","contactphoneNumber","contactphonenumber","Contactphone","contactPhone","ContactTelephoneNo","ContactTelephoneno","ContacttelephoneNo","Contacttelephoneno","contactTelephoneNo","contactTelephoneno","contacttelephoneNo","contacttelephoneno","ContactTelephoneNumber","ContactTelephonenumber","ContacttelephoneNumber","Contacttelephonenumber","contactTelephoneNumber","contactTelephonenumber","contacttelephoneNumber","contacttelephonenumber","ContactTelephone","Contacttelephone","contactTelephone","contacttelephone","Contactemail","isDuplicateSupplier","supplierMap","SuppliersListComponent","SuppliersRoutingModule","SurveyDataService","ConsumersOData","SurveyListComponent","SendSurvey","InviteId","SurveysRoutingModule","PurchaseNoteTextVariant","PurchaseNoteStatus","PurchaseNoteType","CurrencyModel","PurchaseNote","PurchaseNoteService","PurchaseNoteNumberDuplicated","purchaseNote","PurchaseNoteNo","PurchaseNoteTypeId","GetPurchaseNoteMatchingItemsDataSource","SetPurchaseNoteFormTextVariant","purchaseNoteType","Header","InvoiceDate","PurchaseNoteAccordionItemComponent","Net","netValue","getSafeNumericValue","exchangeRateApplied","Tax","taxValue","Gross","supplierCurrency","CommittedById","committedBy","foreignSupplierButCustomerCurrencySelected","LedgerSystem","TaxCodesService","getVatCodes","taxCodes","taxCode","VatCode","VATCODE","VatRate","VATRATE","EffectiveDate","MaxEffectiveDate","getTaxCodes","PurchaseNoteLineType","PurchaseNoteLineItemType","PurchaseNoteMatchingModalComponent","purchaseNoteService","expanded","CalculateSearchFilterForDocumentId","CalculateSearchFilterForOSCost","SetFilterDataSource","AddItems","itemsToAdd","PurchaseNoteLineId","LineType","LineItemType","OSCost","CurrentOSCost","MatchedCost","Variance","ProductTaxCodeId","itemsAdded","selectedFilter","connectedToSage","OpenItemDetails","GetFormattedOsCost","osCost","currencyModel","ShowInForeignCurrency","ShouldApplyAdditionalFormatting","itemsToMatchDataSource","filterTypesDataSource","PurchaseNoteMatchingComponent","taxCodesService","GetVatRate","OnLineRowUpdating","CalculateSelectedRow","CustomiseUnmatchedNetText","CustomiseUnmatchedTaxText","RemoveLinesDisabled","noteIsCommited","PurchaseNoteId","isUsaTaxSystem","LedgerSystemId","vatCodes","MatchingGrid","bottomSummaryColumns","verticalAlign","topSummaryColumns","unmatchedTaxSummaryColumnIndex","unmatchedNetSummaryColumnIndex","sumOfTax","PrepareCurrencyValue","sumOfMatchedCost","calculatedTotalNet","totalNet","calculatedTotaltax","totalTax","AddLine","purchaseNoteMatchingModal","RemoveSelectedLines","CustomiseUnmatchedText","OnItemsAdded","newItems","taxModel","CustomerTaxCodeId","SupplierTaxCodeId","vatCode","ExchangeRateComponent","foreignCurrency","GetRate","OnExchangeRateChange","exchangeRateChange","PurchaseNoteGeneralComponent","purchaseNoteDisabled","isForeignSupplier","calculatedGrossValue","exhangeRateDifference","SupplierContactId","ReverseChargeVat","calculateTax","setSupplierCurrency","supplierChange","IsForeignSupplier","SetExchangeRate","MarkTaxValueUpdated","TaxUpdated","ValidateDueDate","InvoiceDateUI","dueDateBeforeInvoiceDate","OnChangeNet","getVatRate","setGeneratedTax","PurchaseNotesStatusPipe","Queried","Committed","purchaseNoteStatus","PurchaseNotesStatusColourPipe","purchaseNoteStatusColour","PurchaseNoteComponent","hasUnmatchedValue","taxTotal","netTotal","unmatchedTax","unmatchedNet","canDelete","canCommit","commitBtnTooltip","isQueryButtonDisabled","SetPurchaseNote","setPurchaseNoteFormTextVariant","PurchaseNoteDelete","hasQueryPermission","PurchaseNoteQuery","hasCommitPermission","PurchaseNoteCommit","CheckConcurrencyAfterSave","before","after","lBefore","LineItemId","PerformSave","recalculateDatesOnSave","matchedOnOther","contactResponse","contactSuffix","getPurchaseNoteTypeText","showDeleteConfirmation","ConfirmedDelete","Query","showQueryConfirmation","OnQueryConfirmed","queryConfirmed","showMatchedOnOtherPopup","PerformCommit","ConfirmedMatchedOnOther","duplicatedPurchaseNoteNo","currencyChanged","supplierChanged","_supplierId","suplierTaxCodeId","CommittedDate","CommittedDateUI","purchaseNoteTextVariant","PurchaseNoteTypePipe","PurchaseNotesListComponent","GetPurchaseNoteTypeDisplayValue","purchaseNoteTypeDisplayValue","CalculateSearchFilterForStatus","CalculateSearchFilterForPurchaseNoteType","hasCreatePermission","purchaseNotesStatuses","purchaseNotesTypes","purchaseNoteCustomCellFunction","ColumnVisible","NewPurchaseNote","SetLookupsDataSources","purchaseNotesDataSource","PurchaseNotesRoutingModule","DashboardComponent","TicketComponent","TicketsComponent","overdue","future","HelpdeskRoutingModule","ExternalSignInComponent","provider","AppRoutingModule","UrlHandlingStrategy","useHash","onSameUrlNavigation","WelcomeViews","WelcomeComponent","showWelcomeDialog","nextButtonText","removeClass","SkipWelcome","jobIsReadyToComplete","handleVideoStates","closingForCompleteJob","hasCompleted","showSyncMessage","Prev","skipped","loginVideo","signOffVideo","AppComponent","anyWindow","identify","page","page_location","hj","deploy","hotjarDeployed","hotjar","getElementsByTagName","CustomerContactsSelectBoxComponent","ngCustomerService","ngContactService","CustomerIdHasChanged","ContactIdHasChanged","CustomerHasChanged","ContactHasChanged","updateCustomer","updateContact","CustomerHistoryComponent","DropdownButtonWithHelpComponent","openHelpWindow","DropdownComponent","FilePickerComponent","multiple","filePicker","acceptedTypes","placeholder","openFilePicker","selectFiles","anyFileSelected","filesSelected","fileListToString","InfoButtonComponent","LoginComponent","versionInfo","login","NewChildSiteComponent","NotificationsComponent","notificationsService","bellIcon","notifications","notificationsCount","notification","SettingsEditComponent","domSanitizer","EditSetting","ClearErrorMessage","currentSetting","Binary","binary","ValueText","fileToBase64","Url","isDisable","OnSuccess","FilesSelected","ConvertSelectedFileToBase64","logReportLogoSupportedImageTypes","SetErrorMessage","UploadFileInTheDatabase","Base64String","refreshGrid","errorLevel","SettingsComponent","settingsDataSource","isRowExpanded","collapseRow","expandedRows","isExpanded","ToggleAllRows","collapseAll","settingsEdit","RefeshDataGrid","SteppedNumberInputComponent","Updated","DecreaseValue","IncreaseValue","StripeConnectButtonComponent","clientId","ClientId","userEmail","fullUrl","redirect","origin","isConnected","disconnect","AddSkillDialogueComponent","skillsGrid","AddSkills","skillsAdded","SwitchComponent","switchValue","OnlyNumbersDirective","SharedDirectivesModule","AppConfigWrapper","jsonFile","Settings","AppConfigProvider","AppConfigFactory","PipesModule","DatePipe","CurrencyToggleComponent","AlternateCurrencySymbol","SelectedCurrencySymbolChange","What3wordsComponent","WhatThreeWordsChanged","WhatThreeWordsInfoText","FaIconButtonComponent","prettyIconName","iconName","SharedComponentsModule","DxAccordionModule","MatDialogModule","MatButtonModule","DxMapModule","DxFileUploaderModule","DxHtmlEditorModule","DxListModule","ServicesightComponentsModule","loader","TranslateLoader","HttpClient","DxoSeriesTemplateModule","DxoLabelModule","DxoCommonAxisSettingsModule","DxoCommonSeriesSettingsModule","DxoFontModule","DxoSizeModule","DxoGridModule","DxoTickModule","DxoLegendModule","DxoAdaptiveLayoutModule","DxValidatorModule","DxFormModule","DxFilterBuilderModule","ContactsModule","DxTabPanelModule","DxLoadPanelModule","AssignEquipmentSystemComponent","makeModelsDataStore","updateDataSources","discardChanges","goBackToCustomerEquipmentSystems","openModal","availableEquipmentPopup","availableEquipmentGrid","newEquipmentIds","removeEquipment","removedEquipmentIds","addEquipment","systemName","initialLoad","updateSystemEquipmentDataSource","updateAvailableEquipmentDataSource","systemEquipmentDataSource","removedEquipmentFilter","availableEquipmentDataSource","CustomerAttributesService","attributesSubject","OnCustomerSave","SaveAttributes","GetCftsMemberNumber","CustomerAttributeComponent","$rootScope","$broadcast","saveSubscription","saveSubscribe","customerAttributes","customerType","cftsMemberNumber","UpdateCftsMemberNumber","CustomerEquipmentSystemsComponent","customerEquipmentSystemCountsDataStore","isEditModalOpened","SystemDescription","openEditModal","DeleteSystem","selectedKeys","currentEditItem","saveCustomerEquipmentSystem","assignEquipment","markFormAsDirty","handlePopupTitle","CustomerFileComponent","CustomerJobAlertsService","jobAlertsSubject","SaveJobAlerts","customerJobAlertsModel","GetJobAlerts","CustomerJobAlertsComponent","customerJobAlertsService","controlsDisabled","serviceContactId","getSubscription","contactSubscription","hasServiceContact","FormSimulator","JobCompleteOptionChanged","JobCompleted","JobCompletedIncludeInspections","JobCompletedIncludeJobSheet","CustomerListComponent","customerModalService","customerStatusPipe","ManagingAgentsEnabled","CustomerManagingAgentsEnabled","customerOptions","UseEORINumbersEnabled","customerMetaData","CustomersMetaData","IsAllowedAddProspect","IsAllowedImport","newCustomerText","getUserReferences","TriggerModal","IsCreditHold","CustomersDataSource","CustomerSkillsService","skillsSubject","SaveSkills","GetSkills","CustomerSkillsComponent","customerSkillService","RemoveSkill","SkillId","OpenAddSkill","skillsAddDialogDataSource","skillsPopup","OnSkillIdsAdded","skillsGridDataSource","ServiceGroupEquipmentsComponent","equipmentSystemsService","SetupServiceGroupsData","equipmentsPopup","removeEquipments","selectedEquipments","equipmentsToRemove","equipmentsToAdd","equipmentsToAddChange","equipmentsToRemoveChange","filterUsedEquipments","addEquipments","selectedNewEquipments","listFilter","getEquipmentListFilter","availableEquipmentsFilter","getavailableEquipmentsAddFilter","equipmentsInServiceGroups","availableEquipments","equipmentToAddFilter","equipmentToRemoveFilter","ServiceGroupsTabModel","ServiceGroupsItemsAssignationComponent","serviceGroupServicing","selectedTab","openOnTab","serviceGroupName","equipmentsToAddChanged","equipmentsToRemoveChanged","saveEquipmentsAndServicingItems","ServiceGroupModel","ServiceGroupsComponent","EquipmentQuantity","groupIdsWithEquipments","openServiceGroupModal","saveServiceGroup","goToTab","Schedule","AttributeSettingsComponent","GetAttributeByName","GetCategoriesListByDocumentTypeId","CreateCategory","IsOptionItemInUse","ListId","DocType","AttributeInUse","documentTypeId","ODataTypes","ODataCategories","ODataAttributes","UpdateAttributeSortOrder","AttributesCaptionPipe","captions","AttributesSubheadingPipe","AttributesComponent","AttributeTypeID","AttributeTypeName","OnAttributeReordered","AttributeCategoryName","GetDataCollection","categoriesDataSource","AttributeCat","resetFilter","categoryFilterIndex","filterCategory","typeFilterIndex","typeFilterOptions","OnResetButtonClicked","DocTypeId","FromIndex","SortOrder","ToIndex","attributesDataSource","CreateNewAttribute","CategoryTypesComponent","categoriesService","allCollapsed","Categories","IsCollapsed","LoadCategories","newType","EmptyType","newCategory","EmptyCategory","SubTypes","EmptySubtype","Types","AddType","DeleteType","AddSubtype","DeleteSubtype","saveTimeout","DuplicatedItemsValidation","Collapse","OnFilterChanged","IsHidden","SetNextCategoryId","SetNextTypeId","SetNextSubtypeId","inputKeys","ClearValidationHighlight","FindDuplicatedCategories","categoryNames","FindDuplicatedTypes","duplicatedCategories","FindDuplicates","MarkCategoriesAsInvalid","typeNames","FindDuplicatedSubTypes","duplicatedTypes","MarkTypesAsInvalid","subtypeNames","duplicatedSubTypes","MarkSubTypesAsInvalid","formControls","TempId","duplicatedType","subtypes","duplicatedSubType","nextCategoryId","nextTypeId","nextSubTypeId","NewCategoryId","NewTypeId","NewSubtypeId","AttributeListTypeComponent","AddNewItemList","listTypesCollection","FormName","OnListChanged","CheckDuplicates","exist","msg","DeleteItemFromList","itemToDelete","removedItemIndex","confirmationMessage","OnDeleteAttributeOption","attributeListType","NewAttributeComponent","AddNewCategory","equipmentAttributeForm","CheckAnyListOptionEmpty","equipmentTypeField","attributeCollection","SaveAttribute","messageComponent","Attribute","attributeName","selectedAttributeType","AttribCatId","SelectOptions","PrintAttribute","scopeFlag","originalAttributeType","equipmentAttributeInUse","EquipmentInUse","MakeModelInUse","updateEquipmentAttributeConfirmationMessage","makeModelCount","equipmentUpdateconfirmationMessage","UpdateAttribute","CreateAttribute","OnUpdateAttribute","attrib","AttribId","LoadAttribute","attributeDocType","deleteEquipmentAttributeConfirmationMessage","equipmentconfirmationMessage","OnCancelAttribute","GoToList","OnDeleteAttribute","CreateNewCategory","addCategoryComponent","CheckAttributeName","internalType","publicType","scopeCollection","inUse","MapAttributeMembers","IsLoading","AttributeListChanged","MakeModelUploadComponent","isDuplicate","makeModelMap","progressMessage","AttributeSettingsModule","DxTemplateModule","DxRadioGroupModule","CustomerUploadService","GetUploadMetaData","CustomerUploadComponent","customerUploadService","InvoiceAlpha","isUS","IsProspect","ContactPhoneExtension","GeneralNotes","SiteNotes","InvoiceEmailAddress","PaymentTerms","PaymentTermDays","TaxCode","Company","Contact","ContactName","InvoiceAccountCode","InvoiceAccountNumber","ManagedByAccountCode","ManagedByAlpha","EmailAddress","MainPhone","Telephone","Mobile","MobileNumber","FaxPhone","FaxNumber","Street","PostalCode","PoPostalCode","PoAddress1","PoAddressLine1","PoAddress2","PoAddressLine2","PoCity","PoRegion","Countryname","PoCountry","MobilePhone","Person1FirstName","Person1LastName","Person1SecondName","Person1Phone","Person1Email","ProspectYN","ContactPhoneExt","InvConsolidation","ManagingAlpha","customerMap","IsUs","isPro","IsPro","addManagingAgents","addPro","IsManagingAgent","isManagingAgentEnabled","muk","mie","mus","CustomerAccountsComponent","duedatePlusDaysDisabled","InvDueDateID","duedatePlusMonthDisabled","IsInvoiceConsolidationEnabled","features","InvoiceConsolidation","invoiceGroupingLookup","setInvDueDate","sortedTaxCodes","CustomerTaxCodeList","setDirty","normalizeDuedate","SettleDays1","dueDatePlusDays","dueDatePlusMonth","CustomerLayoutService","layoutSubject","GetCustomerLayouts","SaveLayouts","GetTemplateTypeName","templateTypeId","CustomerLayoutsComponent","customerLayoutService","getLayoutsSubscription","tableKey","usedLayouts","LayoutId","LayoutName","IsArchived","LayoutTypeDescription","usedTemplateTypes","LayoutTypeId","customerLayouts","templateTypes","removeLayouts","filtered","addLayout","layoutSelectPlaceholder","getLayoutsOfType","layoutTypeId","layoutSubscription","onInitNewRow","onRowInserted","onCustomerLayoutUpdated","layoutUpdated","onSetLayoutType","onSetLayout","onRowValidating","cl","PostcodeValidator","regexes","GB","UK","JE","GG","IM","US","USA","CA","DE","JP","FR","AU","IT","CH","AT","ES","NL","BE","DK","SE","NO","BR","PT","FI","AX","KR","CN","TW","SG","DZ","AD","AR","AM","AZ","BH","BD","BB","BY","BM","BA","IO","BN","BG","KH","CV","CL","CR","HR","CY","CZ","DO","EC","EG","EE","FO","GE","GR","GL","GT","HT","HN","HU","IE","IS","IN","IL","JO","KZ","KE","KW","LA","LV","LB","LI","LT","LU","MK","MY","MV","MT","MU","MX","MD","MC","MA","NP","NZ","NI","NG","OM","PK","PY","PH","PL","PR","RO","RU","SM","SA","SK","SI","ZA","LK","TJ","TH","TN","TR","TM","UA","UY","UZ","VA","VE","ZM","AS","CC","CK","RS","ME","CS","YU","CX","ET","FK","NF","FM","GF","GN","GP","GS","GU","GW","HM","IQ","KG","LR","LS","MG","MH","MN","MP","MQ","NC","NE","VI","PF","PG","PM","PW","RE","SH","SJ","SO","SZ","TC","WF","XK","YT","NewCustomerModalComponent","countryService","IsUSCountry","accountNameMaxLength","contactInputRequired","SetAccountTypeName","HasFailed","customerCreated","CountryChanged","DataValue","regions","ValidatePhoneNumber","isValidNumber","isValidPhoneNumber","AsYouType","invalidPhoneNumber","ValidatePostCode","invalidPostcode","W3Wchanged","W3Wupdated","accountTypeName","CustomerSitesComponent","isAllowedAdd","hasAddSitePermission","newSiteModal","OnSiteCreated","customerSites","CustomersModule","DashboardModule","DxPieChartModule","DxFunnelModule","DxTileViewModule","LoggingService","appeandMessageToTitle","logger","getLogger","logMessage","severity","simpleStringify","object","simpleObject","Elmahio","apiKey","logId","application","user","lastErrorMessage","ElmahIoErrorHandler","loggingService","initernalLoggingService","handleError","FGasModule","DxLinearGaugeModule","InspectionsModule","BatchInvoiceComponent","customizeNet","calculateContractSummary","noRowsSelected","currentFilterData","contractDS","allDataSources","countColumn","totalColumn","totalColumnName","totalShowInColumn","totalColumnType","contractEnabled","despatchDS","despatchEnabled","jobDS","allowRaisingBatch","GroupingType","CustomerRef","Ids","InvoiceToDate","showInfo","ShowRaiseInvoicesWarning","showInvoiceWarning","ConfirmRaiseInvoices","OnCloseInfo","InvoiceUpToChanged","InvoicesModule","DxValidationSummaryModule","ServiceContractsModule","EquipmentModule","JobsModule","DxSortableModule","MessagesModule","MySettingsModule","PlannerModule","BrowserModule","DxSchedulerModule","DxToolbarModule","DxContextMenuModule","DxDraggableModule","AngularSplitModule","PortalModule","DxTabsModule","DxResponsiveBoxModule","PowerBiModule","ReminderCustomerComponent","ReminderFilesComponent","ReminderListComponent","SetUpFilters","ActiveTasksForEmployee","tasksDataSource","TaskId","PrioritySortValue","ReminderRoutingModule","RemindersModule","AlertService","ODataAlerts","GetMessageRecipientsCollection","GetEmailRecipientsCollection","alertId","UpdateReady","active","RunAlerts","alertIds","GetColumns","alertViewId","GetViews","GetData","AlertListComponent","alertService","AllowAddNew","alertDataSource","onlySystemAlertsSelected","DeleteButtonEnabled","ChangeAlertActivation","AlertId","changeValid","Ready","OnDelete","showDeleteWarning","OnConfirmDelete","AlertModel","AlertInterval","AlertFormat","AlertOutputType","TaskTypeService","GetTaskTypes","AlertRecipientItemType","AlertRecipientsPickerComponent","EngineerSelected","EmployeeSelected","CustomerSelected","UpdateAvailable","RecipientItemType","RecipientsChosen","AutoAddCustomers","IncludeFutureCustomers","AutoAddEngineer","IncludeFutureEngineers","AutoAddEmployee","IncludeFutureEmployees","AlertRecipientsComponent","VisibleRecipients","SelectedRecipientArray","NumberOfRecipientsToDisplay","NumberOfAdditionalRecipients","selectedRecipient","isEmployee","itemToSelect","IsEmployee","AlertColumnPickerModalComponent","columnDataSource","selectedColumns","OnSelectButtonClicked","AlertTextAreaComponent","enableButton","allowColumnSelection","allowWrapText","applySelectedColumns","ColumnName","cursorPosition","textArea","selectionStart","focus","AlertDetailComponent","taskTypeService","IsDetailEditable","AllowColumnSelection","AllowAdvancedEdit","LoadLookups","LoadEnumValues","CanChangeFormat","UpdateRecipients","UpdateMinStartDate","HandleEmailRecipients","AutoAddCustomersToEmail","AutoAddEmployeeToEmail","AutoAddEngineerToEmail","EmailRecipientArray","HandleMessageRecipients","AutoAddEmployeeToMessage","AutoAddEngineerToMessage","MessageRecipientArray","HandleReminderSelected","EmitChanged","EmailRecipientCollection","MessageRecipientCollection","ReminderRecipientCollection","ErrorRecipientCollection","TaskTypes","AlertIntervals","FormatTypeList","raiseChanged","allRecipients","ReminderRecipientGroupId","AllRecipients","minStartDate","MinStartDate","getSeconds","DetailsValueChanged","eventData","DisplayDetail","HeaderValueChanged","AlertHeader","AlertDataEditorComponent","viewDataSource","groupedViewsDataSource","selectedViewIds","AlertViewId","PopulateColumnsFilterAndData","FilterValue","UserSelectedColumns","viewListSelectionChanged","removedItems","addedItems","columnListSelectionChanged","selectedColumnIds","IsColumnVisible","alertViewColumnId","AreArraysDifferent","GetCellTemplate","alertDataType","GetColumnMinWidth","GetBooleanDisplayValue","booleanValue","CreateTimeFromMinutes","numberOfMinutes","changingView","columnIds","ParseArray","resultsCustomStore","AlertViewColumnId","Caption","GetDataType","DataType","AlertDataType","filterFields","CanFilterDataType","falseText","trueText","itemDataType","firstArray","secondArray","AlertSettingsComponent","AlertComponent","AllowEditNameAndDescription","EnableDataEditor","isAlertViewUserSelectable","deferTabRendering","viewDataStore","OnCopy","alertForm","PerformCopyAndGoToNewAlert","newId","OnSaveAlert","NavigateToList","scheduleAlertMessage","OnConfirmDiscard","showDiscardWarning","ScheduleAlert","SetIsAlertViewUserSelectable","CreateNewAlert","alertView","IsUserSelectable","AlertUnits","AlertIntervalUnits","IncludeSaturday","IncludeSunday","ReNotifyInterval","ReNotifyUnits","TaskTypeId","ErrorRecipientGroupId","NextRun","CustomEmail","AlertDetail","OutputColumns","Format","AlertParameter","AlertSettingsModule","EngineerSkillListComponent","engineerSkillDataSource","EngineerSkillSettingsComponent","EngineerSkillModel","EngineerSkillTypeEnum","EngineerSkillComponent","isNewRecord","isReadOnly","OnSaveEngineerSkill","OnDeleteEngineerSkill","OnConfirmDeletion","SkillType","EngineerSkillSettingsModule","LayoutTemplateModel","CreateLayoutTemplateComponent","AvailableTemplates","templateKeyParts","TemplateKey","LayoutTemplateListComponent","deleteTemplate","openTemplate","layoutTemplateDataSource","hasPermissiion","HasCreatePermission","templateIdToDelete","templateNameToDelete","showDeleteConfirm","LayoutTemplateSettingsComponent","LayoutTemplateComponent","host","templateName","ExitDesigner","hideAction","actionId","LayoutTemplateSettingsModule","DxReportDesignerModule","ContractTypeService","baseApiUrl","baseODataUrl","contractTypeUrl","jobTypeUrl","contractTypeModel","MaintContractTypeId","SaveAssociation","association","GetJobTypesByContractTypeId","DeleteAssociations","GetNominalCodes","ContractTypeListComponent","contractTypeDataSource","addPermission","JobTypeModel","NewContractTypeModel","NewContractTypeComponent","GetJobCategory","IsModified","getRootUrl","isUsCompany","IncludeSalesTax","observables","LoadLabourRates","LoadDefaultJobTypes","LoadNLCodes","LoadContractType","jobCategories","defaultJobTypes","MapJobTypesToModel","labourRates","LoadJobTypes","accountingInfo","isAccountLinked","LinkStatus","IsConnected","codes","nominalSalesAccount","AccountCodes","nominalSalesDepartment","DepartmentCodes","IsDefaultCode","modifiedJobTypes","defaultJobType","jt","mfjt","DefaultTypeID","OnFormSubmit","rootUrl","OnViewLabourRate","LabourProfileId","listPath","OnRowUpdating","dxDataGridEdited","ChargeMisc","ChargeParts","ChargeLabour","OnCancel","djt","CategoryID","newObjectId","SaveJobTypes","models","newJobType","contractTypeId","ServiceContractsSettingsModule","StockSettingsComponent","StockTypesComponent","isUsaCompany","taxCodeDataSource","StockTypeModel","NewStockTypeComponent","productTaxCodes","IsUsaCompany","stockTypeModel","DisplayValue","JobProductTaxCodeId","SaveStockType","OnDiscardStockType","StockAdjustmentReasonListComponent","adjustmentReasonDataSource","AccountClass","AdjustmentReasonModel","NominalAccountService","accountClass","StockAdjustmentReasonComponent","nominalAccountService","accountDataSource","OnSaveAdjustmentReason","AdjustmentReasonID","OnDeleteAdjustmentReason","acc","reason","StockManufacturersListComponent","manufacturerService","manufacturerDataSource","StockManufacturerComponent","OnSaveManufacturer","OnDeleteManufacturer","StoreComponent","SetRootUrl","GetCustomerDataSource","storeModel","storeAddress","OnVanChanged","checked","OnConsignmentStoreChanged","OnSaveStore","OnDeleteStore","storeListPath","OnDiscardStore","GetSiteAddress","StoreListComponent","SortNameColumn","CountryName","SetLogo","storeColour","storeType","SortLocationColumn","StockSettingsModule","SettingsModule","DragDropModule","DxTagBoxModule","DxColorBoxModule","DxDrawerModule","Ng1AuthInterceptorService","authInterceptorService","ShowLogin","showLogin","TokenInterceptor","ng1AuthInterceptor","intercept","showSpinner","partMatchAnyUrl","startStopSpinner","skipAuthHandling","excludedUrls","handle","getTokenAndCall","tokenAccessor","withHeader","setHeaders","strings","RouterLinkService","serviceContractsBaseLink","ShowCustomerNameService","StockModule","AppModule","angular7Router","bootstrap","CookieService","HTTP_INTERCEPTORS","APP_INITIALIZER","initializeApp","DecimalPipe","PercentPipe","ErrorHandler","useHttpCacheLocalStorage","BrowserAnimationsModule","UpgradeModule","HttpCacheInterceptorModule","ttl","strategy","ContactListComponent","customerColumnLabel","suppliersEnabled","mailchimpServer","GetParentType","SortStatus","ContactParentType","ContactUploadService","ContactUploadComponent","contactUploadService","Initials","PhoneExtension","ContactType","Surname","JobDescription","MobilePhoneNumber","Cell","CellNo","CellNumber","CellPhone","CellPhoneNo","CellPhoneNumber","TelephoneNumber","TelephoneNo","TelNo","TelNumber","Extension","Ext","PhoneExt","TelephoneExt","TelephoneExtension","UserReference1","UserReference2","contacttype","titles","contactTypes","rePhoneNumber","reEmail","duplicateContact","existingRows","existingRow","Month","ActualLabourHoursVServiceBudgetHoursComponent","actualLabourHoursVServiceHours","legendPosition","smallHeight","AveragePurchaseOrderLeadTimeComponent","AverageSalesOrderLeadTimeComponent","EquipmentStatusComponent","equipmentStatuses","FieldTechnicianJobForMonthEngineerComponent","chartLoader","onButtonClick","changeChart","FieldTechnicianJobForMonthComponent","pointClickHandler","argument","FieldTechnicianProductivityComponent","FieldTechnicianUtilisationByDateComponent","_arg","FieldTechnicianUtilisationComponent","onClick","FirstTimeFixRateByPeriodComponent","FirstTimeFixRateComponent","JobProfitablityComponent","MeanTimeToRepairForPeriodJobTypeFirstTechnicianComponent","correctedHight","MeanTimeToRepairByTechnicianForPeriodJobTypeComponent","firstTechnician","MeanTimeToRepairByJobTypeForPeriodComponent","MeanTimeToRepairComponent","OrderType","OpenPurchaseOrdersComponent","customizeLabel","purchaseOrderQuantity","PurchaseOrdersQuantity","purchaseOrderTotalValue","PurchaseOrdersValue","convertToChartModel","PurchaseOrderTypes","argumentText","valueText","getValueByOrderType","orderType","getTranslation","OpenSalesOrdersComponent","salesOrderQuantity","SalesOrdersQuantity","salesOrderTotalValue","SalesOrdersValue","SalesOrderTypes","AllocatedJobsForJobTypeStatusComponent","JobsByStatusForJobTypeComponent","customizeTooltip","percentText","OutstandingJobsByJobTypeComponent","SalesFunnelComponent","customizeLabelText","customizeTooltipText","quanitity","heightOfSmallChart","ServiceContractRevenueComponent","ServiceRevenueForFieldTechnicalPeriodJobTypeComponent","ServiceRevenueForFieldTechnicianPeriodComponent","technician","ServiceRevenueForFieldTechnicianComponent","ServiceRevenuePerFieldTechnicianComponent","StockOutsModel","StockOutsComponent","AllActiveJobs","JobsWithOutstandingParts","jobsOutstandingPercentage","TotalServiceRevenueForPeriodComponent","TotalServiceRevenueComponent","Year","ValueOfInvoicesRaisedComponent","ChartLoaderComponent","isRecurringJob","isPurchaseOrderEnabled","isSalesOrderEnabled","chartHeight","loadComponent","chartName","WidgetType","BaseWidgetComponent","WidgetService","GetJobStatuses","GetEngineerCarouselList","EngineerCarouselComponent","widgetService","loaded","TilesComponent","jobStatuses","NewButtonsComponent","joinedResult","buttonsPermissions","openJob","openReminder","createCustomer","StartHereComponent","getMobileApp","WidgetLoaderService","GetNewButtonsWidgetComponent","GetTilesWidgetComponent","GetEngineerCarouselWidgetComponent","GetStartHereWidgetComponent","WidgetLoaderComponent","widgetLoader","LoadComponent","widgetType","ChangeWidget","changeWidget","DynamicLocaleService","decimalPipe","percentPipe","applicationRef","i18nPipes","setLocale","_locale","tick","SettingsPortalActivityComponent","CustomersList","CustomersStats","AccountsCommunicatorService","GetExistingLinkSettings","GenerateLinkSettings","AccountsCommunicatorSetupComponent","accountsCommunicatorService","SecretKey","Generate","InvoiceOptionsEnum","AccountsCreateInvoicesComponent","invoiceOptionsChange","invEquipCategoryOut","invEquipGroupOut","invEquipListOut","summariseParts","invSummariseParts","invSummarisePartsOut","ngAfterContentChecked","invEquipCategory","EquipmentInformationAppearsOnInvoice","invEquipGroup","invEquipList","AuditType","AuditLogService","GetAuditLogDataSource","GetAuditArchiveDataSource","GetDatabaseTableDataStore","AuditLogComponent","auditLogService","AuditLogDataSource","AuditArchiveDataSource","AuditTypeDataStore","subscriptions","UpdateGridSearch","GetChangeDetails","logEntry","changeDetailsStorage","GetChangeDetailsForLogEntry","HandleSearchValueChange","downloadFile","CreateChangeDetails","keySource","originalData","auditType","CreateChangeDetailsFromArray","CreateChangeDetailsFromObjects","checkDifference","originalChange","newChange","Field","LogId","NewValue","OriginalValue","originalValue","newVaule","GetChangeDetailsForCreate","GetChangeDetailsForDelete","OriginalData","NewData","GetChangeDetailsForUpdateOrUnknown","BillingService","GetHistory","SetupAccount","billingAccount","CreateSubscription","UpdateSubscription","subscriptionId","SubscriptionId","BillingAmountPipe","showFreeLabel","HistoryComponent","billingService","invoices","LicenceViewerService","GetLicenceData","CardDetailsComponent","setupSubscription","stripeForm","ManageSubscriptionComponent","licenceViewerService","BillingEmail","StateCounty","CountryId","TaxNumber","showSetupPage","isStripeLinkConfigured","showCardDetailsPage","showSubscriptionPage","paymentSecret","allowedToCheckout","assignedWebLicenses","selectedWebLicenses","assignedMobileLicenses","selectedMobileLicenses","SelectedUpTo","setupAccount","IsStripeLinkConfigured","ActiveSubscription","hasExistingSubscription","activeSubscriptionId","activeSub","Tiers","UpTo","SubscriptionItemId","countries","CountryList","TotalWebAssigned","TotalMobileAssigned","createAccount","GetSteps","GetTotal","Subtotal","BillingScheme","UnitAmount","tier","FlatAmount","SetupSubscription","PriceId","ClientSecret","CompetitorService","competitorBaseUrl","competitor","CompetitorDetailComponent","competitorService","competitorId","OnSaveCompetitor","competitorModel","OnDeleteCompetitor","competitorlistPath","OnDiscardCompetitor","CompetitorsListComponent","DirtyFormService","JobTitlesService","JobTitlesComponent","jobTitlesService","dirtyFormService","IsAllowedEdit","IsAllowedAdd","IsAllowedDelete","availableId","findAvailableId","ListItem","Permissions","canNavigate","OnDeleteJobTitle","deleteIndex","OnDiscardJobTitles","OnSaveJobTitles","SetToEditMode","IsEdited","ListItemID","ReminderTypesService","GetTaskTypeById","taskTypeId","DeleteTaskType","UpdateTaskType","taskType","ReminderTypesDetailComponent","reminderTypeService","reminderTypeId","reminderType","IncludeOnSalesTask","OnSaveReminderType","OnDeleteReminderType","OnDiscardReminderType","showCancelMessage","CheckboxChanged","ConfirmCancelAction","ReminderTypesListComponent","reminderTypes","SalesBarrierService","salesBarrierBaseUrl","salesBarrier","SalesBarrierDetailComponent","salesBarrierService","salesBarrierId","OnSaveSalesBarrier","barrierModel","OnDeleteSalesBarrier","salesBarrierlistPath","OnDiscardSalesBarrier","SalesBarrierListComponent","salesBarrierOData","SalesOpportunityStatusService","salesOpportunityStatusODataBaseUrl","salesOpportunityStatusBaseUrl","salesOpportunityStatusData","UpdateStatusSortOrder","GetPriceListsDataSource","SalesOpportunityStatus","SalesOpportunityStatusDetailComponent","salesOpportunityStatusService","getStatusColors","salesOpportunityStatusModel","statusData","salesOpportunityStatusListPath","onValueChange","Probability","ColourName","SalesOpportunityStatusListComponent","OnStatusReordered","salesOpportunityStatusesOData","systemItemIndexes","statusItems","handleDraggableItems","getRowElement","EmployeeEngineerSkillsComponent","skillsDataStore","skillsDataSource","employeeSkillsDataSource","selectedKey","maxLineIds","selectedSkillData","nextLineId","newSkill","Skill","ConvertDate","LicenseNo","CalculateExpired","tomorrow","GetDisplayDate","SetStartDate","SetEndDate","GetMinEndDate","areStartDatesValid","areEndDatesValid","startdatevalid","enddatevalid","EmployeeLimitsComponent","EngineerLocationComponent","getLocationData","dateChanged","showLocations","depot1CustomerId","customerLocation","showDepot1Location","showDefaultLocation","locationZoomLevel","sortedLocations","RecordedTime","RecordLabel","showNoLocationMessage","depot1Location","defaultLongitude","defaultLatitude","defaultZoomLevel","EngineerTypeListComponent","engineerTypeDataSource","EngineerTypeComponent","EquipmentConditionListComponent","OnConditionReordered","equipmentConditionsDataSource","EquipmentConditionComponent","conditionLabel","usageCount","serviceSightGreen","equipmentConditionIdToUseAsOutOfAction","MakeModelSkillsComponent","MakeModelItem","MakeModelOptionType","MakeModelOptionsViewModel","SelectedSupplier","selectedStockSupplier","SupplierCurrencySymbol","SupplierExchangeRate","OptionCurrencySymbol","OptionPayment","ShowCurrencyToggle","PricingProductTaxCode","MakeModelPricingComponent","isUkTaxSystem","taxCodeDataStore","salesOrderEnabled","Rrp","OnItemClick","OnTaxSystemClick","MakeModelOptionPartsViewModel","Option","MakeModelOptionMaterialViewModel","MakeModelOptionViewModel","BuyingPriceInSupplierCurrency","RRPInSupplierCurrency","RecommendedRetailPrice","UseSupplierCurrency","MakeModelOptionDetailComponent","OptionTypeID","optionForm","MakeModelOptionPartsComponent","newPartId","PreferredSupplierCurrencySymbol","sortByTotalCost","MakeModelOptionMaterialsComponent","OpenMaterialAddDialogue","onDeleteSelectedClick","AddOrUpdateMisc","meterialsDataSource","MakeModelOptionComponent","Opened","onDiscard","onDelete","MakeModelOptionsDrawerComponent","onVisibleChange","mmo","onClose","MakeModelOptionsComponent","DisableRemoveOption","SelectedOptionIds","RefreshOptionList","OnAdd","newOption","newOptionId","ShowDrawer","OnEdit","OnRemove","MarkFormAsDirty","HideDrawer","OptionsDataSource","Form","MakeModelComponent","purchaseOrderEnabled","advancedQuotesEnabled","makemodelid","CreateNewMakeModelStore","makeModelOptions","typesDataSource","subtypesDataSource","onConfirmDeletion","OnSelectCategory","FilterTypes","CategoryId","OnSelectType","FilterSubTypes","SubTypeId","ValidateMakeModel","duplicatedMakeModel","SetWarningMessage","OnSupplierChange","selectedSupplier","userRefModelMake1","userRefModelMake1Label","userRefModelMake2","userRefModelMake2Label","SelectSubType","selectedsubType","SelectType","selectedType","MakeModelServiceUploadService","recurringJobsUrl","GetServiceScheduleSampleUpload","ServiceScheduleUploadComponent","serviceUploadService","FeedbackSurveyListComponent","templates","filteredTemplates","GoToTemplateDesigner","CylinderTypesComponent","cylinderTypesDataSource","CylinderTypeModel","NewCylinderTypeComponent","cylinderTypeModel","hasEditPermission","SaveCylinderType","DeleteCylinderType","OnDiscardCylinderType","switchValueChanged","RefrigerantTypePurchasingComponent","CalculateLateFee","suppliersPrices","RemoveSupplierPrice","SupplierPriceId","OnSuppliersPriceSelected","selectedSuppliersPrice","AddSupplierPrice","RefrigerantTypeAccountsModel","RefrigerantTypeAccountsComponent","RefrigerantTypeDetailComponent","SaleAccount","DefaultSaleAccount","CostAccount","DefaultCostAccount","ValuationAccount","DefaultValuationAccount","FGasProductTaxCodeId","SaveRefrigerantType","RemoveTemporaryGUIDs","DeleteRefrigerantType","SetStyle","RefrigerantTypeListComponent","refrigerantTypes","InspectionReasonsNotDoneServiceService","reasonsNotDoneUrl","reasonsNotDone","InspectionReasonNotDoneComponent","reasonsNotDoneService","ReasonNotDone","reasonNotDone","GoToReasonsNotDoneList","highestTemplateId","findHighestId","InspectionReasonsNotDoneListComponent","reasonNotDonePermisssion","hasAddPermissionReasonNotDone","InspectionTemplateListComponent","templateService","AllowImport","allowImport","isSupportLogin","Import","onchange","readAsText","readerEvent","OverrideReportId","NoteType","BulkOptions","other","answer","InspectionsDesignerComponent","emptyCategory","AllowMultiple","SubReport","AutoComplete","cloneObject","emptyTemplate","storageKey","inspectionAutoComplete","internalModel","localVersion","allowExport","layoutTemplateDatasource","modelChanged","futureStack","historyStack","localSave","duplicatedItemsValidation","Export","json","linkElement","isDeleted","Undo","last","Redo","Clone","cloneId","IsCurrentEditable","sectionId","questionId","currentEditable","FocusIn","FocusOut","focusOutTimeout","hasFocus","currentCategory","emptyItem","DuplicateItem","duplicate","newItemId","BulkItems","bulkInsert","example","addMessages","totalNumber","optionTexts","emptyOption","splitAndAdd","matchAll","updatePreview","preview","DeleteOption","SetNoteType","noteType","itemCopy","dropOption","moveItemInArray","previousIndex","currentIndex","dropCategory","dropItem","categoryDragHandle","collapseItems","categoryDragHandleUp","categoryDragEnded","optionTextChanged","DefaultAnswer","removeDefault","lId","newCatId","Mandatory","Fail","NotesRequired","PhotoRequired","exec","rnd","random","resultsArray","templateItems","clearValidationHighlight","resultNames","duplicatedResults","findDuplicates","markCategoriesAsInvalid","markResultsAsInvalid","InvalidAccountsComponent","CloseInvalidAccounts","ActivityTypesService","GetActivityTypesList","activityTypesUrl","GetActivityTypeItem","IsOnPlanner","IsOnJob","ActivityTypeItemModel","ActivityTypesDetailComponent","activityTypesService","activityTypeId","isActivityTypeInUse","loadActivityTypeData","OnDeleteActivityType","ShowDeleteWarning","OnCancelActivityType","ShowDiscardWarning","OnSaveActivityType","ActivityTypeItemData","activityTypeListPath","setDefaultValues","WorkRelated","ActivityTypesListComponent","ActivityTypesListData","JobTypeDetailModel","JobTypesDetailService","CreateInvoiceChanged","createInvoice$","JobTypeTemplateItem","JobtypeInspectionsListComponent","SelectBoxTextExpression","GridUpdated","jobtypeid","IsIncluded","EmitData","ShowAddTemplateDialog","InspectionPerVisit","RemoveSelected","templatesToRemove","templateslist","JobTypesDetailGeneralComponent","jobTypeDetailService","isUSTax","InvEquipCategoryOutChanged","InvEquipGroupOutChanged","InvEquipListOutChanged","InvSummarisePartsOutChanged","InvSummariseParts","CreateInvoiceChecked","IncludeLabourInTaxCalculations","InvShowHeaderText","ShowCombinedLabourChanged","JobTypesDetailChargesComponent","createInvoice","setCheckboxValues","ChargeTravel","ChargeMileage","JobTypesDetailNominalAccountComponent","onLabourAccountSelected","isLabourNominalAccountDropDownBoxOpened","LabourChargeCreditAccount","nominalAccountValueChanged","onPartsAccountSelected","isPartsNominalAccountDropDownBoxOpened","PartsChargeCreditAccount","onLabourExpenseAccountSelected","isLabourNominalExpenseAccountDropDownBoxOpened","LabourCostDebitAccount","onPartsExpenseAccountSelected","isPartsNominalExpenseAccountDropDownBoxOpened","PartsCostDebitAccount","JobTypesDetailMaterialsComponent","jobTypesDetailService","RemoveDisabled","UpdateMaterialsCharge","materialTypeList","JobTypesDetailTabsComponent","OnGridReordered","isfGasEnabled","jobActivityTypes","jobActivityTypeExists","jobTypeTabs","createsInvoice","fromTabDataSource","toTabDataSource","fromTab","toTab","fromTabOrder","ChangeVisible","GetName","jobTabEnum","GetDescription","ShowTab","GetEnabled","CanChangeVisible","JobTypesDetailComponent","jobTypeDetailsService","OnSaveJobType","UpdateTemplates","Templates","UpdateMaterialTypes","UpdateJobTabs","OnDeleteJobType","jobTypeListPath","JobTypesListComponent","JobGroupsService","GetJobGroupsList","jobGroupsUrl","GetJobGroup","JobGroupsListComponent","jobGroupsService","JobGroupsDetailComponent","jobGroupListPath","MaterialTypeModel","MaterialTypesDetailComponent","isPurchaseOrdersEnabled","saleNominalAccountCode","NominalAccountCodes","SaleAcc","SaleDepartmentRequired","NominalCodeRequiresDepartment","costNominalAccountCode","NominalExpenseAccountCodes","CostOfSaleAcc","CostDepartmentRequired","OnDeleteMaterialType","OnCancelMaterialType","OnSaveMaterialType","materialTypeListPath","onSaleAccountSelected","isSaleAccountDropDownBoxOpened","newSaleAccount","nominalAccountCode","enableDepartment","saleDeptCodes","onCostAccountSelected","isCostAccountDropDownBoxOpened","newCostAccount","nominalExpenseAccount","costOfSaleDeptCodes","nominalCodeModel","deptAnalysis","onCostAccountDropDownValueChanged","selectedCostAccounts","MaterialTypeListModel","MaterialTypesListComponent","MailchimpService","Sync","MailChimpLinkComponent","mailchimpService","loading","accountLinked","connected","mailchimp","RedirectUri","completed","PlannedJobsReportComponent","customizeNotesText","successfulMessage","cellInfo","PlannerCardComponent","userRefernceService","ref1","ref2","PriceCalcType","PriceCalcTypePipe","PriceList","PriceCalcTypeMiscId","PriceCalcTypePartId","PriceCalcTypeRefrigerantTypeId","PriceListService","GetCalcTypesDataStore","GetPriceListMiscDataSource","GetNominalListMiscDataSource","GetNominalListMiscDataStore","GetPriceListItem","DeletePriceListItem","SavePriceListItem","priceList","PriceListMaterialsComponent","priceListService","alreadyAddedNominalMiscs","calcTypeDataSource","nominalMiscListDataSource","allnominalMiscListDataSource","nominalMiscListDataStore","priceCalcTypes","ClosedMiscTypeDialog","showNominalMiscSelectDialog","AddMaterialType","selectedNominalMiscIds","PriceListId","PriceListID","Percentage","Method","OpenMaterialTypeDialog","selectedMaterialExceptions","SelectStockTypeDialogueComponent","stockTypes","stockTypesAdded","StockTypeCalcSortValue","StockTypeName","PriceListDetailPartsTabComponent","alreadyAddedStockTypes","StockTypes","currentCalcTypeId","PriceCalcTypeId","getCost","partCosts","addPercent","subtractPercent","percenatge","allowEditing","OnStockTypeIdsAdded","allStockTypesDataSource","ShowAddPartDialogue","ShowAddStockTypeDialogue","stockTypesPopup","RemovePart","selectedPartPriceIds","RemoveStockType","selectedStockTypeIds","StockTypeSortValue","StockHeaderSortValue","stockTypesDataStore","costLookup","percent","PriceListCustomerService","PriceListCustomersComponent","priceListCustomerService","priceListSource","DeleteCustomer","selectedCustomerIds","customersSource","gridCustomer","OpenCustomerDialog","showCustomerSelectScheduleDialog","ClosedCustomerDialog","AddCustomerToPriceList","resultItems","getImageVisible","LogoUrl","PriceListDetailRefrigerantsTabComponent","refrigerantCosts","OnRefrigerantIdsAdded","ShowAddRefrigerantDialogue","refrigerantsPopup","RemoveRefrigerant","selectedRefrigerantPriceIds","RefrigerantTypeSortValue","getBaseValue","priceCalcTypeId","refrigerantTypesDataSource","PriceListEquipmentTabComponent","makeModelListDataStore","ClosedEquipmentDialog","OpenMakeModelDialog","selectedEquipmentExceptions","customDisplayExpr","PriceListDetailComponent","locationCommon","priceCalcTypePipe","loadModules","allPriceCalcTypes","getCalcTypes","priceCalcTypesEquipment","IsUsedOnCustomers","showDeleteInfo","onReadConfirm","onDiscardConfirm","pristineFormData","canBeDeleted","PriceListComponent","createNewPriceList","SecurityRoleService","securityRoleUrl","GetRolesAsync","GetSecurityRoleItem","roleTypeId","SecurityRolesDetailComponent","securityRoleService","TreeViewContentReady","securityRoleId","securityRoleTypeId","roleId","loadSecurityRolesData","OnSaveSecurityRole","handlePermissionChanges","securityRoleUpdate","securityRoleUpdateObject","permissionsChanged","updatedEmployees","OnDeleteSecurityRole","OnDiscardSecurityRole","TreeViewSelectionChanged","syncSelection","AllBusinessEntities","isCopied","securityRolesListPath","CloseCopyPermissionPopup","ShowCopyPermissionsPopup","CopySecurityRole","SelectedSecurityRoleId","createTreeList","_refresh","OpenCopyPermissionModal","SecurityRolesList","handleEmployeeClick","IsInRole","handleEmployeeAssigned","foundElement","markEmployeeAsModified","EmployeeName","IsInRoleSorting","selectedSecurityRoles","getSelectedNodes","node","SelectedSecurityRoles","processTreeData","selectedState","systemCode","treeId","systemType","TreeID","SystemType","IsRemoved","permissionsSet","securityRolesItems","parent","permissionSetItem","RoleType","SecurityRoleData","RoleID","treeConfigObject","check_callback","worker","themes","responsive","initially_open","plugins","checkbox","three_state","whole_node","tie_selection","AllPermissionChanges","Allsystemsselected","sourceroleid","treeConfig","treeData","UpdatedEmployees","compareArray","otherArray","permissionsChangedItem","permissionsRemoved","permissionsAdded","RoleTypePipe","SecurityRolesListComponent","nameTranslationKey","SecurityRolesItems","ModulesPipe","PhotoEditing","Billing","LayoutDesigner","LicenceViewerComponent","LicenceViewerData","PaymentsService","Connect","providerId","SurveyDesignerComponent","questionTypePipe","Pages","QuestionTypeText","Survey","portalUrl","ValueUrl","Questions","SurveyPageId","Heading","SubHeading","SurveyQuestionId","Question","UserReferenceOptionsListComponent","userRefId","refreshCounter","stylingMode","elementAttr","Ng2HttpClientService","webRequest","HttpResponse","responseHeaders","HttpErrorResponse","Ng2TranslateDowngradeService","TranslateInstant","EmployeesListComponent","ProjectTypeService","ODataProjectTypes","GetProjectType","projectTypeId","projectTypesUrl","GetNewProjectType","DeleteProjectType","CreateProjectType","UpdateProjectType","ProjectTypesListComponent","projectTypeService","projectListDataSource","ProjectTypeModel","NominalCodeService","ProjectTypeDetailComponent","projectTypesService","nominalCodeService","ConnectedToAccountSystem","NominalSalesAccounts","NominalSalesDepartments","ProjectStatusService","ODataProjectStatuses","GetProjectStatus","projectStatusId","projectStatusUrl","GetNewProjectStatus","DeleteProjectStatus","CreateProjectStatus","UpdateProjectStatus","ProjectStatusesListComponent","projectStatusService","SortId","ProjectStatusModel","ProjectStatusDetailComponent","onColourChange","ProjectStatusId","PriorityListComponent","OnPriorityReordered","PriorityModel","PriorityDetailComponent","icons","SetIcon","newIcon","environment","enableProdMode","registerLocaleData","localeEnGb","localeEnGbExtra","localePl","angular","appFinishedLoading","module","setAngularJSGlobal","directive","downgradeComponent","inputs","outputs","downgradeInjectable","__NgCli_bootstrap_1","bootstrapModule","platformRef","strictDi","exports","PLACEHOLDER_ELEMENT","IntroJs","_targetElement","_originalTargetElement","_introItems","_options","tooltipPosition","highlightClass","showStepNumbers","keyboardNavigation","scrollPadding","positionPrecedence","disableInteraction","helperElementPadding","hintPosition","hintButtonLabel","hintAnimation","buttonClass","_introForElement","targetElm","allIntroSteps","introItems","_forEach","step","currentItem","_cloneObject","hasElement","defineProperty","_el","floatingElementQuery","targetSelector","getAttribute","display","tempIntroItems","z","_addOverlayLayer","_nextStep","DOMEvent","_onKeyDown","_onResize","which","_previousStep","_introCompleteCallback","_exitIntro","returnValue","nodeType","temp","jQuery","_goToStep","_goToStepNumber","_currentStepNumber","_direction","continueStep","targetEl","_introBeforeChangeCallback","_showElement","_setHelperLayerPosition","oldHelperNumberLayer","oldArrowLayer","oldtooltipContainer","_placeTooltip","_reAlignHints","force","continueExit","_introBeforeExitCallback","overlayLayers","overlayLayer","opacity","parentNode","helperLayer","referenceLayer","disableInteractionLayer","floatingElement","_removeShowElement","_removeClass","_introExitCallback","tooltipLayer","arrowLayer","helperNumberLayer","hintMode","currentStepObj","tooltipOffset","targetOffset","windowSize","currentTooltipPosition","top","bottom","marginLeft","marginTop","_determineAutoPosition","_getOffset","_getWinSize","_addClass","tooltipLayerStyleRight","_checkLeft","tooltipLayerStyleLeftRight","_checkRight","tooltipLayerStyleLeft","desiredTooltipPosition","possiblePositions","tooltipHeight","tooltipWidth","targetElementRect","calculatedPosition","_removeEntry","pos","hyphenIndex","desiredAlignment","_determineAutoAlignment","offsetLeft","halfTooltipWidth","winWidth","screen","possibleAlignments","stringArray","stringToRemove","elementPosition","widthHeightPadding","_isFixed","cssText","_disableInteraction","_setAnchorAsButton","anchor","tabIndex","_introChangeCallback","nextTooltipButton","prevTooltipButton","skipTooltipButton","scrollParent","oldHelperLayer","oldReferenceLayer","oldtooltipLayer","lastIntroItem","_getScrollParent","_scrollParentToElement","_lastShowElementTimer","_getProgress","_scrollTo","tooltipTextLayer","bulletsLayer","progressLayer","buttonsLayer","ulContainer","anchorClick","goToStep","innerLi","anchorLink","onclick","progressBar","_introSkipCallback","_setShowElement","parentElm","SVGElement","tagName","currentElementPosition","_getPropValue","zIndex","_introAfterChangeCallback","rect","_elementInViewport","winHeight","clientHeight","scrollBy","elm","forEachFnc","completeFnc","_stamp","events_key","_id","listener","useCapture","handler","attachEvent","detachEvent","pre","cls","classNameRegex","propValue","currentStyle","defaultView","getComputedStyle","getPropertyValue","nodeName","D","documentElement","styleText","_removeHintTooltip","_populateHints","hints","hint","_addHints","_alignHintPosition","_hintQuerySelectorAll","hintsWrapper","_hideHint","stepId","_hintCloseCallback","_hideHints","_showHints","_showHint","_removeHints","_removeHint","_showHintDialog","getHintClick","hintDot","hintPulse","_hintsAddedCallback","iconWidth","iconHeight","hintElement","_hintClickCallback","removedStep","tooltipWrapper","closeButton","docEl","pageYOffset","scrollLeft","pageXOffset","excludeStaticParent","overflowRegex","parentElement","overflowY","overflowX","offsetTop","instances","_mergeOptions","obj1","attrname","obj3","addStep","goToStepNumber","previousStep","exit","providedCallback","onhintsadded","onhintclick","onhintclose","onskip","onbeforeexit","addHints","hideHint","hideHints","showHint","showHints","removeHints","removeHint","showHintDialog","warn","webpackContext"],"sourceRoot":"webpack:///","sources":["./src/app/shared/extensions/string.extensions.ts","./projects/servicesight-shared/src/lib/models/app-config.model.ts","./projects/servicesight-shared/src/lib/services/activity.service.ts","./projects/servicesight-shared/src/lib/components/activities-select-box/activities-select-box.component.html","./projects/servicesight-shared/src/lib/components/activities-select-box/activities-select-box.component.ts","./projects/servicesight-shared/src/lib/enums/phrase-book-type.enum.ts","./projects/servicesight-shared/src/lib/enums/equip-job-list-source.enum.ts","./projects/servicesight-shared/src/lib/enums/equipment-status.enum.ts","./projects/servicesight-shared/src/lib/enums/job-tab.enum.ts","./projects/servicesight-shared/src/lib/enums/module.enum.ts","./projects/servicesight-shared/src/lib/enums/setting-id.enum.ts","./projects/servicesight-shared/src/lib/models/new-quote-equipment.model.ts","./projects/servicesight-shared/src/lib/services/pageable-datastore.service.ts","./projects/servicesight-shared/src/lib/services/equipment/equipment-data.service.ts","./projects/servicesight-shared/src/lib/services/job-data.service.ts","./projects/servicesight-shared/src/lib/services/module/module.service.ts","./projects/servicesight-shared/src/lib/services/setting/settings.service.ts","./projects/servicesight-shared/src/lib/services/odata.service.ts","./projects/servicesight-shared/src/lib/services/store.service.ts","./projects/servicesight-shared/src/lib/components/form-messages/models/form-messages.model.ts","./projects/servicesight-shared/src/lib/enums/response-type.enum.ts","./projects/servicesight-shared/src/lib/components/form-messages/form-messsage.service.ts","./projects/servicesight-shared/src/lib/components/phrase-book/services/phrase-book.service.ts","./projects/servicesight-shared/src/lib/components/phrase-book/phrase-book-list/phrase-book-list.component.html","./projects/servicesight-shared/src/lib/components/phrase-book/phrase-book-list/phrase-book-list.component.ts","./projects/servicesight-shared/src/lib/components/phrase-book/phrase-book-modal/phrase-book-modal.component.ts","./projects/servicesight-shared/src/lib/components/phrase-book/phrase-book-modal/phrase-book-modal.component.html","./projects/servicesight-shared/src/lib/components/phrase-book/phrase-book-textarea/phrase-book-textarea.component.html","./projects/servicesight-shared/src/lib/components/phrase-book/phrase-book-textarea/phrase-book-textarea.component.ts","./projects/servicesight-shared/src/lib/components/work-required/work-required.component.html","./projects/servicesight-shared/src/lib/components/work-required/work-required.component.ts","./projects/servicesight-shared/src/lib/directives/form/on-change-debounced.directive.ts","./projects/servicesight-shared/src/lib/pipes/equipment-status.pipe.ts","./projects/servicesight-shared/src/lib/components/add-equipment/add-equipment.component.html","./projects/servicesight-shared/src/lib/components/add-equipment/add-equipment.component.ts","./projects/servicesight-shared/src/lib/enums/attribute-type.enum.ts","./projects/servicesight-shared/src/lib/enums/help-item-tag.enum.ts","./projects/servicesight-shared/src/lib/services/help/help.service.ts","./projects/servicesight-shared/src/lib/components/button-with-help/button-with-help.component.ts","./projects/servicesight-shared/src/lib/components/button-with-help/button-with-help.component.html","./projects/servicesight-shared/src/lib/services/chart-loader.service.ts","./projects/servicesight-shared/src/lib/components/charts/chart-loader/base-chart.component.ts","./projects/servicesight-shared/src/lib/components/charts/equipment-up-time/equipment-up-time.component.ts","./projects/servicesight-shared/src/lib/components/charts/equipment-up-time/equipment-up-time.component.html","./projects/servicesight-shared/src/lib/services/equipment/equipment.chart.service.ts","./projects/servicesight-shared/src/lib/components/charts/empty-chart/empty-chart.component.html","./projects/servicesight-shared/src/lib/components/charts/empty-chart/empty-chart.component.ts","./projects/servicesight-shared/src/lib/components/charts/equipment-watch-list/equipment-watch-list.component.html","./projects/servicesight-shared/src/lib/components/charts/equipment-watch-list/equipment-watch-list.component.ts","./projects/servicesight-shared/src/lib/components/charts/onsite-response-times/onsite-response-times.component.ts","./projects/servicesight-shared/src/lib/components/charts/onsite-response-times/onsite-response-times.component.html","./projects/servicesight-shared/src/lib/components/charts/charts.module.ts","./projects/servicesight-shared/src/lib/components/colour-dropdown/colour-dropdown.component.html","./projects/servicesight-shared/src/lib/components/colour-dropdown/colour-dropdown.component.ts","./projects/servicesight-shared/src/lib/enums/credit-note-status.enum.ts","./projects/servicesight-shared/src/lib/enums/grid-kind.enum.ts","./projects/servicesight-shared/src/lib/services/credit-note.service.ts","./projects/servicesight-shared/src/lib/services/grid.service.ts","./projects/servicesight-shared/src/lib/pipes/custom-date.pipe.ts","./projects/servicesight-shared/src/lib/pipes/currency.pipe.ts","./projects/servicesight-shared/src/lib/pipes/enums/credit-note-status.pipe.ts","./projects/servicesight-shared/src/lib/pipes/credit-note-status-bar.pipe.ts","./projects/servicesight-shared/src/lib/components/credit-notes-list/credit-notes-list.component.html","./projects/servicesight-shared/src/lib/components/credit-notes-list/credit-notes-list.component.ts","./projects/servicesight-shared/src/lib/enums/depatch-note-status.enum.ts","./projects/servicesight-shared/src/lib/enums/sales-orders-type.enum.ts","./projects/servicesight-shared/src/lib/services/despatch-notes.service.ts","./projects/servicesight-shared/src/lib/services/grid-export.service.ts","./projects/servicesight-shared/src/lib/services/permissions-service.service.ts","./projects/servicesight-shared/src/lib/pipes/despatch-note-status-bar.pipe.ts","./projects/servicesight-shared/src/lib/pipes/despatch-note-status.pipe.ts","./projects/servicesight-shared/src/lib/components/despatch-notes-list/despatch-notes-list.component.html","./projects/servicesight-shared/src/lib/components/despatch-notes-list/despatch-notes-list.component.ts","./projects/servicesight-shared/src/lib/services/engineers/engineers.service.ts","./projects/servicesight-shared/src/lib/components/engineer-selector/engineer-selector.component.html","./projects/servicesight-shared/src/lib/components/engineer-selector/engineer-selector.component.ts","./projects/servicesight-shared/src/lib/enums/ui-customisation.enum.ts","./projects/servicesight-shared/src/lib/enums/user-ref-type.enum.ts","./projects/servicesight-shared/src/lib/filters/equipment.filter.ts","./projects/servicesight-shared/src/lib/services/customer.service.ts","./projects/servicesight-shared/src/lib/services/user-reference.service.ts","./projects/servicesight-shared/src/lib/components/equipment-list/equipment-list.component.html","./projects/servicesight-shared/src/lib/components/equipment-list/equipment-list.component.ts","./projects/servicesight-shared/src/lib/models/refrigerant/refrigerant-data.model.ts","./projects/servicesight-shared/src/lib/services/equipment/customer-equipment-system.service.ts","./projects/servicesight-shared/src/lib/services/fgas/refrigerant-type.service.ts","./projects/servicesight-shared/src/lib/enums/customer-account-type.enum.ts","./projects/servicesight-shared/src/lib/enums/log-preview-type.enum.ts","./projects/servicesight-shared/src/lib/pipes/enums/refrigerant-transaction-type.enum.ts","./projects/servicesight-shared/src/lib/pipes/refrigerant-transaction-type.pipe.ts","./projects/servicesight-shared/src/lib/services/fgas/refrigerant-transaction-service.ts","./projects/servicesight-shared/src/lib/components/f-gas-log/f-gas-log.component.html","./projects/servicesight-shared/src/lib/components/f-gas-log/f-gas-log.component.ts","./projects/servicesight-shared/src/lib/components/equipment-refrigerant/equipment-refrigerant.component.html","./projects/servicesight-shared/src/lib/components/equipment-refrigerant/equipment-refrigerant.component.ts","./projects/servicesight-shared/src/lib/components/equipment/equipment-job-list/add-visit/add-visit.component.ts","./projects/servicesight-shared/src/lib/components/equipment/equipment-job-list/add-visit/add-visit.component.html","./projects/servicesight-shared/src/lib/enums/job-status.enum.ts","./projects/servicesight-shared/src/lib/services/inspection.service.ts","./projects/servicesight-shared/src/lib/components/equipment/equipment-job-list/move-to-job-dialog/move-to-job-dialog.component.ts","./projects/servicesight-shared/src/lib/components/equipment/equipment-job-list/move-to-job-dialog/move-to-job-dialog.component.html","./projects/servicesight-shared/src/lib/enums/job-equipment-status.ts","./projects/servicesight-shared/src/lib/services/equipment/equipment-condition.service.ts","./projects/servicesight-shared/src/lib/services/inspection-data.service.ts","./projects/servicesight-shared/src/lib/enums/install-line-type.enum.ts","./projects/servicesight-shared/src/lib/services/make-model.service.ts","./projects/servicesight-shared/src/lib/services/sfg20.service.ts","./projects/servicesight-shared/src/lib/components/equipment/sfg20-schedule-select-box/sfg20-schedule-select-box.component.html","./projects/servicesight-shared/src/lib/components/equipment/sfg20-schedule-select-box/sfg20-schedule-select-box.component.ts","./projects/servicesight-shared/src/lib/models/module-access.model.ts","./projects/servicesight-shared/src/lib/services/equipment/equipment-permissions.service.ts","./projects/servicesight-shared/src/lib/components/make-model-list/make-model-list.component.html","./projects/servicesight-shared/src/lib/components/make-model-list/make-model-list.component.ts","./projects/servicesight-shared/src/lib/components/equipment/sfg20-schedule-interval-select-box/sfg20-schedule-interval-select-box.component.html","./projects/servicesight-shared/src/lib/components/equipment/sfg20-schedule-interval-select-box/sfg20-schedule-interval-select-box.component.ts","./projects/servicesight-shared/src/lib/pipes/job-equipment.pipe.ts","./projects/servicesight-shared/src/lib/components/equipment/equipment-job-list/equipment-job-list.component.html","./projects/servicesight-shared/src/lib/components/equipment/equipment-job-list/equipment-job-list.component.ts","./projects/servicesight-shared/src/lib/pipes/error-message.pipe.ts","./projects/servicesight-shared/src/lib/components/form-messages/form-messages.component.html","./projects/servicesight-shared/src/lib/components/form-messages/form-messages.component.ts","./projects/servicesight-shared/src/lib/enums/document-type-enum.ts","./projects/servicesight-shared/src/lib/services/attributes.service.ts","./projects/servicesight-shared/src/lib/services/date-only.service.ts","./projects/servicesight-shared/src/lib/pipes/selected-type.pipe.ts","./projects/servicesight-shared/src/lib/components/generic-attributes/generic-attributes.component.html","./projects/servicesight-shared/src/lib/components/generic-attributes/generic-attributes.component.ts","./projects/servicesight-shared/src/lib/components/video-modal/video-modal.component.ts","./projects/servicesight-shared/src/lib/components/video-modal/video-modal.component.html","./projects/servicesight-shared/src/lib/components/help-modal/help-modal.component.html","./projects/servicesight-shared/src/lib/components/help-modal/help-modal.component.ts","./projects/servicesight-shared/src/lib/enums/inspection-status.enum.ts","./projects/servicesight-shared/src/lib/pipes/enums/inspection-status.pipe.ts","./projects/servicesight-shared/src/lib/components/inspections-list/inspections-list.component.html","./projects/servicesight-shared/src/lib/components/inspections-list/inspections-list.component.ts","./projects/servicesight-shared/src/lib/enums/invoice-export-option.enum.ts","./projects/servicesight-shared/src/lib/pipes/enums/protean-system.enum.ts","./projects/servicesight-shared/src/lib/services/invoice-data.service.ts","./projects/servicesight-shared/src/lib/pipes/document-type.pipe.ts","./projects/servicesight-shared/src/lib/components/invoice-list/invoice-list.component.html","./projects/servicesight-shared/src/lib/components/invoice-list/invoice-list.component.ts","./projects/servicesight-shared/src/lib/enums/job-order-status.enum.ts","./projects/servicesight-shared/src/lib/pipes/enums/job-status.pipe.ts","./projects/servicesight-shared/src/lib/services/priority.service.ts","./projects/servicesight-shared/src/lib/services/purchase-order-data.service.ts","./projects/servicesight-shared/src/lib/services/recurring-jobs/planned-jobs-report.service.ts","./projects/servicesight-shared/src/lib/pipes/job-status-bar.pipe.ts","./projects/servicesight-shared/src/lib/pipes/job-status-bar-portal.pipe.ts","./projects/servicesight-shared/src/lib/components/jobs-list/jobs-list.component.html","./projects/servicesight-shared/src/lib/components/jobs-list/jobs-list.component.ts","./projects/servicesight-shared/src/lib/services/leaving-form-message.service.ts","./projects/servicesight-shared/src/lib/components/leaving-form-message/leaving-form-message.component.ts","./projects/servicesight-shared/src/lib/components/leaving-form-message/leaving-form-message.component.html","./projects/servicesight-shared/src/lib/components/multiple-selection/multiple-selection.component.html","./projects/servicesight-shared/src/lib/components/multiple-selection/multiple-selection.component.ts","./projects/servicesight-shared/src/lib/components/phrase-book/phrase-book.module.ts","./projects/servicesight-shared/src/lib/enums/sales-quote-status.enum.ts","./projects/servicesight-shared/src/lib/services/quote-data.service.ts","./projects/servicesight-shared/src/lib/pipes/quote-status-bar.pipe.ts","./projects/servicesight-shared/src/lib/pipes/enums/quote-status.pipe.ts","./projects/servicesight-shared/src/lib/components/quotes-list/quotes-list.component.html","./projects/servicesight-shared/src/lib/components/quotes-list/quotes-list.component.ts","./projects/servicesight-shared/src/lib/components/report-viewer/report-viewer.component.ts","./projects/servicesight-shared/src/lib/components/report-viewer/report-viewer.component.html","./projects/servicesight-shared/src/lib/enums/sales-order-status.enum.ts","./projects/servicesight-shared/src/lib/services/sales-order.service.ts","./projects/servicesight-shared/src/lib/pipes/sales-order-status-bar.pipe.ts","./projects/servicesight-shared/src/lib/pipes/sales-order-status.pipe.ts","./projects/servicesight-shared/src/lib/components/sales-orders-list/sales-orders-list.component.html","./projects/servicesight-shared/src/lib/components/sales-orders-list/sales-orders-list.component.ts","./projects/servicesight-shared/src/lib/components/second-level-navigation/second-level-navigation.component.html","./projects/servicesight-shared/src/lib/components/second-level-navigation/second-level-navigation.component.ts","./projects/servicesight-shared/src/lib/services/job-visit-data.service.ts","./projects/servicesight-shared/src/lib/components/select-job-visit/select-job-visit.component.ts","./projects/servicesight-shared/src/lib/components/select-job-visit/select-job-visit.component.html","./projects/servicesight-shared/src/lib/enums/service-contract-status.enum.ts","./projects/servicesight-shared/src/lib/pipes/enums/service-contract-status.pipe.ts","./projects/servicesight-shared/src/lib/services/service-contract-persmission.service.ts","./projects/servicesight-shared/src/lib/services/service-contracts.service.ts","./projects/servicesight-shared/src/lib/pipes/service-contract-status-color.pipe.ts","./projects/servicesight-shared/src/lib/components/service-contracts-list/service-contracts-list.component.html","./projects/servicesight-shared/src/lib/components/service-contracts-list/service-contracts-list.component.ts","./projects/servicesight-shared/src/lib/enums/service-parts-sorting.enum.ts","./projects/servicesight-shared/src/lib/enums/servicing-component-usage.enum.ts","./projects/servicesight-shared/src/lib/services/stock.service.ts","./projects/servicesight-shared/src/lib/enums/obsolete-option.enum.ts","./projects/servicesight-shared/src/lib/components/service-parts/add-parts-base.component.ts","./projects/servicesight-shared/src/lib/components/service-parts/service-parts.component.html","./projects/servicesight-shared/src/lib/components/service-parts/service-parts.component.ts","./projects/servicesight-shared/src/lib/enums/visualizer-module-type.enum.ts","./projects/servicesight-shared/src/lib/models/service-group-customer-model.ts","./projects/servicesight-shared/src/lib/services/recurring-jobs.service.ts","./projects/servicesight-shared/src/lib/components/servicing-visualiser/servicing-visualiser.component.html","./projects/servicesight-shared/src/lib/components/servicing-visualiser/servicing-visualiser.component.ts","./projects/servicesight-shared/src/lib/components/stripe-card-form/stripe-card-form.component.ts","./projects/servicesight-shared/src/lib/components/stripe-card-form/stripe-card-form.component.html","./projects/servicesight-shared/src/lib/components/wizard-step/wizard-step.component.html","./projects/servicesight-shared/src/lib/components/wizard-step/wizard-step.component.ts","./projects/servicesight-shared/src/lib/pipes/bypass-security-trust-resource-url.pipe.ts","./projects/servicesight-shared/src/lib/enums/customer-status.enum.ts","./projects/servicesight-shared/src/lib/pipes/enums/customer-status-pipe.ts","./projects/servicesight-shared/src/lib/pipes/enums/inspection-status-value.pipe.ts","./projects/servicesight-shared/src/lib/enums/survey-question-type.enum.ts","./projects/servicesight-shared/src/lib/pipes/enums/question-type.pipe.ts","./projects/servicesight-shared/src/lib/enums/system-sales-opportunity-status.enum.ts","./projects/servicesight-shared/src/lib/pipes/sales-opportunity-status.pipe.ts","./projects/servicesight-shared/src/lib/pipes/pipes.module.ts","./projects/servicesight-shared/src/lib/providers/locale.provider.ts","./projects/servicesight-shared/src/lib/enums/customer-select-info.enum.ts","./projects/servicesight-shared/src/lib/components/customers-select-box/customers-select-box.component.html","./projects/servicesight-shared/src/lib/components/customers-select-box/customers-select-box.component.ts","./projects/servicesight-shared/src/lib/servicesight-shared.module.ts","./projects/servicesight-shared/src/lib/services/contact.service.ts","./projects/servicesight-shared/src/lib/services/toaster.service.ts","./projects/servicesight-shared/src/lib/services/accounting.service.ts","./projects/servicesight-shared/src/lib/services/labour.service.ts","./projects/servicesight-shared/src/lib/services/country.service.ts","./projects/servicesight-shared/src/lib/models/equipment/models/equipment.ts","./projects/servicesight-shared/src/lib/models/servicing-item.model.ts","./projects/servicesight-shared/src/lib/models/customer-contact.model.ts","./projects/servicesight-shared/src/lib/models/customer.model.ts","./projects/servicesight-shared/src/lib/models/transaction-item.ts","./projects/servicesight-shared/src/lib/models/refrigerant/refrigerant-transaction.model.ts","./projects/servicesight-shared/src/lib/models/equipment/models/customer-equipment-system.model.ts","./projects/servicesight-shared/src/lib/models/refrigerant/refrigerant-type.model.ts","./projects/servicesight-shared/src/lib/models/view-model/view-model.class.ts","./projects/servicesight-shared/src/lib/models/view-model/view-model-component.class.ts","./projects/servicesight-shared/src/lib/models/view-model/collection-proxy.class.ts","./projects/servicesight-shared/src/lib/models/view-model/collection-view-model.class.ts","./projects/servicesight-shared/src/lib/models/engineer-type.model.ts","./projects/servicesight-shared/src/lib/models/job-group.model.ts","./projects/servicesight-shared/src/lib/models/equipment/equipment-condition.model.ts","./projects/servicesight-shared/src/lib/enums/toast-type.enum.ts","./projects/servicesight-shared/src/lib/enums/credit-element-type.enum.ts","./projects/servicesight-shared/src/lib/enums/credit-type.enum.ts","./projects/servicesight-shared/src/lib/enums/store-type.enum.ts","./projects/servicesight-shared/src/lib/enums/account-type.enum.ts","./projects/servicesight-shared/src/lib/factories/http-loader.factory.ts","./projects/servicesight-shared/src/lib/guards/can-deactivate-guard.ts","./src/app/shared/services/ng1-reminder.service.ts","./src/app/messages/services/message/message.service.ts","./src/app/shared/enums/messages/message-doc-type-ids.enum.ts","./src/app/shared/enums/messages/message-types.enum.ts","./src/app/shared/models/credit-notes-form-data.ts","./src/app/credit-notes/credit-notes-grid-for-job/credit-notes-grid-for-job.component.html","./src/app/credit-notes/credit-notes-grid-for-job/credit-notes-grid-for-job.component.ts","./src/app/credit-notes/credit-notes-grid-for-maintenance/credit-notes-grid-for-maintenance.component.html","./src/app/credit-notes/credit-notes-grid-for-maintenance/credit-notes-grid-for-maintenance.component.ts","./src/app/credit-notes/credit-notes.service.ts","./src/app/shared/models/email.model.ts","./src/app/shared/enums/queued-email-type.enum.ts","./src/app/shared/services/auth/auth.service.ts","./src/app/shared/services/email/email.service.ts","./src/app/shared/components/accordion/accordion-data.service.ts","./src/app/shared/components/email/email.component.html","./src/app/shared/components/email/email.component.ts","./src/app/shared/components/accordion/customer-accordion-item/customer-accordion-item.component.html","./src/app/shared/components/accordion/customer-accordion-item/customer-accordion-item.component.ts","./src/app/shared/components/accordion/help-accordion-item/help-accordion-item.component.ts","./src/app/shared/components/confirmation-dialogue/confirmation-dialogue.component.html","./src/app/shared/components/accordion/help-accordion-item/help-accordion-item.component.html","./src/app/shared/components/confirmation-dialogue/confirmation-dialogue.component.ts","./src/app/shared/components/accordion/models/accordion-credit-note-data.model.ts","./src/app/shared/components/accordion/credit-notes-accordion-item/credit-notes-accordion-item.component.html","./src/app/shared/components/accordion/credit-notes-accordion-item/credit-notes-accordion-item.component.ts","./src/app/shared/components/accordion/credit-raised-accordion-item/credit-raised-accordion-item.component.html","./src/app/shared/components/accordion/credit-raised-accordion-item/credit-raised-accordion-item.component.ts","./src/app/shared/components/accordion/reminders-accordion-item/reminders-accordion-item.component.html","./src/app/shared/components/accordion/reminders-accordion-item/reminders-accordion-item.component.ts","./src/app/credit-notes/credit-notes-form/credit-notes-form.component.ts","./src/app/credit-notes/credit-notes-form/credit-notes-form.component.html","./src/app/credit-notes/credit-notes-detail/credit-notes-detail.component.html","./src/app/credit-notes/credit-notes-detail/credit-notes-detail.component.ts","./src/app/credit-notes/credit-notes-layout/credit-notes-layout.component.html","./src/app/credit-notes/credit-notes-layout/credit-notes-layout.component.ts","./src/app/credit-notes/credit-notes-routing.module.ts","./src/app/despatch-notes/services/despatch-notes.service.ts","./src/app/despatch-notes/despatch-note-preview/despatch-note-preview.component.html","./src/app/despatch-notes/despatch-note-preview/despatch-note-preview.component.ts","./src/app/shared/services/odata/odata.service.ts","./src/app/shared/services/customer/customer.service.ts","./src/app/shared/enums/store-types.enum.ts","./src/app/despatch-notes/models/despatch-note-invoice.model.ts","./src/app/despatch-notes/models/despatch-note.model.ts","./src/app/jobs/models/job-upload.ts","./src/app/shared/services/notifications/notifications.service.ts","./src/app/jobs/services/job-document-data.service.ts","./src/app/stock/services/primary-image.service.ts","./src/app/shared/components/job-file-upload-dialogue/job-file-upload-dialogue.component.html","./src/app/shared/components/job-file-upload-dialogue/job-file-upload-dialogue.component.ts","./src/app/shared/components/job-files/job-files.component.html","./src/app/shared/components/job-files/job-files.component.ts","./src/app/sales-orders/services/sales-order.service.ts","./src/app/settings/services/store.service.ts","./src/app/shared/services/material-type/material-type.service.ts","./src/app/shared/services/supplier/supplier.service.ts","./src/app/stock/services/stock.service.ts","./src/app/shared-pop-sop/components/base-pop-sop-detail/base-pop-sop-detail.component.ts","./src/app/shared/components/child-contacts-list/child-contact-type.enum.ts","./src/app/shared/enums/contact-status.eum.ts","./src/app/shared/pipes/enums/supplier-status.enum.ts","./src/app/shared/services/child-contacts/child-contracts.service.ts","./src/app/shared/components/money/money.component.ts","./src/app/shared/components/money/money.component.html","./src/app/despatch-notes/despatch-note-general/despatch-note-general.component.html","./src/app/despatch-notes/despatch-note-general/despatch-note-general.component.ts","./src/app/despatch-notes/despatch-note-summary/despatch-note-summary.component.html","./src/app/despatch-notes/despatch-note-summary/despatch-note-summary.component.ts","./src/app/equipment/services/equipment.service.ts","./src/app/shared/components/info-message/info-message.component.ts","./src/app/shared/components/info-message/info-message.component.html","./src/app/despatch-notes/despatch-note-equipment/despatch-note-equipment.component.html","./src/app/despatch-notes/despatch-note-equipment/despatch-note-equipment.component.ts","./src/app/stock/services/stock-serail-items.service.ts","./src/app/shared/components/part-serial-number-dialogue/part-serial-number-dialogue.component.html","./src/app/shared/components/part-serial-number-dialogue/part-serial-number-dialogue.component.ts","./src/app/despatch-notes/despatch-note-parts/despatch-note-parts.component.html","./src/app/despatch-notes/despatch-note-parts/despatch-note-parts.component.ts","./src/app/despatch-notes/despatch-note-materials/despatch-note-materials.component.html","./src/app/despatch-notes/despatch-note-materials/despatch-note-materials.component.ts","./src/app/despatch-notes/despatch-note-invoicing-dialogue/despatch-note-invoicing-dialogue.component.ts","./src/app/despatch-notes/despatch-note-invoicing-dialogue/despatch-note-invoicing-dialogue.component.html","./src/app/shared/services/employee/employee.service.ts","./src/app/despatch-notes/despatch-note-accordion/despatch-notes-accordion-detail/despatch-notes-accordion-detail.component.html","./src/app/despatch-notes/despatch-note-accordion/despatch-notes-accordion-detail/despatch-notes-accordion-detail.component.ts","./src/app/despatch-notes/despatch-note-accordion/despatch-note-accordion.component.html","./src/app/despatch-notes/despatch-note-accordion/despatch-note-accordion.component.ts","./src/app/despatch-notes/despatch-note/despatch-note.component.html","./src/app/despatch-notes/despatch-note/despatch-note.component.ts","./src/app/despatch-notes/despatch-notes-routing.module.ts","./src/app/equipment/services/equipment-reordering.service.ts","./src/app/settings/services/stock-manufacturer.service.ts","./src/app/settings/services/stock-types.service.ts","./src/app/stock/services/stock-reordering.service.ts","./src/app/stock/services/stock-supplier.service.ts","./src/app/shared/enums/reorder-item-type.enum.ts","./src/app/shared/enums/reordering-reason.enum.ts","./src/app/shared/models/reorder-item.model.ts","./src/app/shared/models/reorder-options.model.ts","./src/app/shared/services/bulk-purchase-order/bulk-purchase-order.service.ts","./src/app/shared/services/supplier-makemodel-price/supplier-makemodel-price.service.ts","./src/app/shared/services/supplier-part-price/supplier-part-price.service.ts","./src/app/stock/models/enums/stock-state.enum.ts","./src/app/shared/components/bulk-order-popup/bulk-order-popup.component.html","./src/app/shared/components/bulk-order-popup/bulk-order-popup.component.ts","./src/app/shared/components/reordering/reordering.component.html","./src/app/shared/components/reordering/reordering.component.ts","./src/app/equipment/services/device.service.ts","./src/app/equipment/device/device.component.html","./src/app/equipment/device/device.component.ts","./src/app/equipment/devices-list/devices-list.component.ts","./src/app/equipment/devices-list/devices-list.component.html","./src/app/jobs/models/customer-location.ts","./src/app/customers/services/customer-equipment-systems.service.ts","./src/app/f-gas/enums/cylinder-status.enum.ts","./src/app/f-gas/services/cylinder.service.ts","./src/app/jobs/services/job-material-data.service.ts","./src/app/jobs/services/job-refrigerant.service.ts","./src/app/jobs/services/job-visit-data.service.ts","./src/app/shared/enums/JobVisitStatus.ts","./src/app/shared/models/job-cylinder-log.model.ts","./src/app/shared/services/licence/license.service.ts","./src/app/shared/components/job-cylinder-log-dialog/job-cylinder-log-dialog.component.html","./src/app/shared/components/job-cylinder-log-dialog/job-cylinder-log-dialog.component.ts","./src/app/shared/services/jstranslate/jstranslate.service.ts","./src/app/shared/services/make-model/make-model.service.ts","./src/app/shared/services/ng1-contact.service.ts","./src/app/shared/services/ng1-customer.service.ts","./src/app/jobs/services/job.service.ts","./src/app/customers/services/service-groups.service.ts","./src/app/shared/services/previous-route.service.ts","./src/app/equipment/services/equipment-contract.service.ts","./src/app/shared/components/accordion/equipment-purchasing-accordion-item/equipment-purchasing-accordion-item.component.html","./src/app/shared/components/accordion/equipment-purchasing-accordion-item/equipment-purchasing-accordion-item.component.ts","./src/app/shared/components/accordion/equipment-sales-accordion-item/equipment-sales-accordion-item.component.html","./src/app/shared/components/accordion/equipment-sales-accordion-item/equipment-sales-accordion-item.component.ts","./src/app/shared/components/accordion/contact-accordion-item/contact-accordion-item.component.html","./src/app/shared/components/accordion/contact-accordion-item/contact-accordion-item.component.ts","./src/app/shared/components/text-input-dialogue/text-input-dialogue.component.ts","./src/app/shared/components/accordion/equipment-details-item/equipment-details-item.component.html","./src/app/shared/components/text-input-dialogue/text-input-dialogue.component.html","./src/app/shared/components/accordion/equipment-details-item/equipment-details-item.component.ts","./src/app/shared/components/accordion/map-accordion-item/map-accordion-item.component.html","./src/app/shared/components/accordion/map-accordion-item/map-accordion-item.component.ts","./src/app/shared/components/record-nav-buttons/record-nav-buttons.component.ts","./src/app/shared/components/record-nav-buttons/record-nav-buttons.component.html","./src/app/shared/services/discussion/discussion.service.ts","./src/app/shared/components/discussion/discussion.component.html","./src/app/shared/components/discussion/discussion.component.ts","./src/app/shared/models/inspection-template.model.ts","./src/app/inspections/models/inspection-template-list-item.ts","./src/app/shared/enums/job-cat.enum.ts","./src/app/settings/attribute-settings/services/servicing.service.ts","./src/app/settings/equipment-settings/servicing/servicing.component.html","./src/app/settings/equipment-settings/servicing/servicing.component.ts","./src/app/shared/enums/key-code.enums.ts","./src/app/shared/directives/only-numbers/only-integer.directive.ts","./src/app/shared/services/site/site.service.ts","./src/app/shared/pipes/enums/task-status.enum.ts","./src/app/shared/pipes/task-status.pipe.ts","./src/app/goods-received/enums/goods-received-status.enum.ts","./src/app/shared/pipes/goods-received-status.pipe.ts","./src/app/purchase-orders/enums/purchase-order-status.enum.ts","./src/app/shared/pipes/purchase-order-status.pipe.ts","./src/app/returns-note/enums/returns-note-status.enum.ts","./src/app/shared/pipes/returns-note.status.pipe.ts","./src/app/equipment/equipment-detail/equip-history/equip-history.component.html","./src/app/equipment/equipment-detail/equip-history/equip-history.component.ts","./src/app/equipment/pipes/enums/equipment-status-pipe.ts","./src/app/equipment/equipment-detail/equipment-detail.component.html","./src/app/equipment/equipment-detail/equipment-detail.component.ts","./src/app/shared/components/marketing-template/marketing-template.component.ts","./src/app/shared/components/marketing-template/marketing-template.component.html","./src/app/equipment/equipment-marketing/equipment-marketing.component.html","./src/app/equipment/equipment-marketing/equipment-marketing.component.ts","./src/app/shared/components/importer/helpers/deep-equals.function.ts","./src/app/shared/components/importer/importer.component.html","./src/app/shared/components/importer/importer.component.ts","./src/app/equipment/services/equipment-service-upload.service.ts","./src/app/equipment/equipment-service-upload/equipment-service-upload.component.ts","./src/app/equipment/equipment-service-upload/equipment-service-upload.component.html","./src/app/settings/services/equipment-categories.service.ts","./src/app/equipment/equipment-stock-list/equipment-stock-list.component.html","./src/app/equipment/equipment-stock-list/equipment-stock-list.component.ts","./src/app/equipment/services/equipment-upload.service.ts","./src/app/equipment/equipment-upload/equipment-upload.component.ts","./src/app/equipment/equipment-upload/equipment-upload.component.html","./src/app/equipment/equipment-routing.module.ts","./src/app/returns-note/returns.service.ts","./src/app/settings/services/cylinder-types.service.ts","./src/app/settings/services/refrigerant-type.service.ts","./src/app/f-gas/cylinder-detail-copy/cylinder-detail-copy.component.html","./src/app/f-gas/cylinder-detail-copy/cylinder-detail-copy.component.ts","./src/app/f-gas/models/cylinder.model.ts","./src/app/f-gas/cylinders-files-tab/cylinders-files-tab.component.ts","./src/app/f-gas/cylinders-files-tab/cylinders-files-tab.component.html","./src/app/f-gas/cylinder-history-tab/cylinder-history-tab.component.html","./src/app/f-gas/cylinder-history-tab/cylinder-history-tab.component.ts","./src/app/f-gas/pipes/cylinder-status.enum.ts","./src/app/f-gas/cylinder-detail/cylinder-detail.component.html","./src/app/f-gas/cylinder-detail/cylinder-detail.component.ts","./src/app/f-gas/services/cylinder-upload.service.ts","./src/app/f-gas/cylinders-upload/cylinders-upload.component.ts","./src/app/shared/components/confirmation-message/confirmation-message.component.html","./src/app/f-gas/cylinders-upload/cylinders-upload.component.html","./src/app/shared/components/confirmation-message/confirmation-message.component.ts","./src/app/f-gas/services/refrigerant-log.service.ts","./src/app/f-gas/decant/decant.component.html","./src/app/f-gas/decant/decant.component.ts","./src/app/shared/pipes/custom-date.pipe.ts","./src/app/f-gas/f-gas-log-detail/f-gas-log-detail.component.html","./src/app/f-gas/f-gas-log-detail/f-gas-log-detail.component.ts","./src/app/f-gas/f-gas-log-preview/f-gas-log-preview.component.html","./src/app/f-gas/f-gas-log-preview/f-gas-log-preview.component.ts","./src/app/f-gas/enums/wtn-type.enums.ts","./src/app/f-gas/services/waste-transfer-notes.service.ts","./src/app/f-gas/waste-transfer-notes-list/waste-transfer-notes-list.component.html","./src/app/f-gas/waste-transfer-notes-list/waste-transfer-notes-list.component.ts","./src/app/f-gas/enums/wtn-contact-target-type.enums.ts","./src/app/f-gas/waste-transfer-notes-accordion/source-accordion-item/source-accordion-item.component.html","./src/app/f-gas/waste-transfer-notes-accordion/source-accordion-item/source-accordion-item.component.ts","./src/app/f-gas/waste-transfer-notes-accordion/cylinders-accordion/cylinders-accordion-item.component.html","./src/app/f-gas/waste-transfer-notes-accordion/cylinders-accordion/cylinders-accordion-item.component.ts","./src/app/f-gas/enums/wtn-contact-type.enum.ts","./src/app/f-gas/waste-transfer-notes-accordion/waste-transfer-contact-accordion/waste-transfer-contact-accordion-item.component.html","./src/app/f-gas/waste-transfer-notes-accordion/waste-transfer-contact-accordion/waste-transfer-contact-accordion-item.component.ts","./src/app/f-gas/waste-transfer-notes-preview/waste-transfer-notes-preview.component.html","./src/app/f-gas/waste-transfer-notes-preview/waste-transfer-notes-preview.component.ts","./src/app/shared/services/cylinder/cylinder.service.ts","./src/app/shared/components/cylinders-list/cylinders-list.component.html","./src/app/shared/components/cylinders-list/cylinders-list.component.ts","./src/app/f-gas/f-gas-routing.module.ts","./src/app/f-gas/services/supplier-price.service.ts","./src/app/jobs/services/supplier-part-price.service.ts","./src/app/shared/components/add-make-model-dialogue/add-make-model-dialogue.component.ts","./src/app/shared/components/add-make-model-dialogue/add-make-model-dialogue.component.html","./src/app/settings/equipment-settings/enum/make-model-option-add-to.enum.ts","./src/app/quotes/services/quote.service.ts","./src/app/shared/components/job-misc-dialog/job-misc-dialog.component.html","./src/app/shared/components/job-misc-dialog/job-misc-dialog.component.ts","./src/app/goods-received/enums/goods-received-detail-grid-type.enum.ts","./src/app/goods-received/goods-received-serial-nos/goods-received-serial-nos.component.ts","./src/app/goods-received/goods-received-serial-nos/goods-received-serial-nos.component.html","./src/app/goods-received/models/goods-received.model.ts","./src/app/goods-received/services/goods-received.service.ts","./src/app/shared/components/accordion/supplier-accordion-item/supplier-accordion-item.component.html","./src/app/shared/components/accordion/supplier-accordion-item/supplier-accordion-item.component.ts","./src/app/shared/components/accordion/warning-notes-accordion-item/warning-notes-accordion-item.component.html","./src/app/shared/components/accordion/warning-notes-accordion-item/warning-notes-accordion-item.component.ts","./src/app/shared/components/accordion/receipt-details-accordion-item/receipt-details-accordion-item.component.ts","./src/app/shared/components/cancel/cancel.component.html","./src/app/shared/components/accordion/receipt-details-accordion-item/receipt-details-accordion-item.component.html","./src/app/shared/components/cancel/cancel.component.ts","./src/app/shared/components/document-link-select/document-link-select.component.html","./src/app/shared/components/document-link-select/document-link-select.component.ts","./src/app/shared/components/purchase-invoice-popup/purchase-invoice-popup.component.ts","./src/app/shared/components/purchase-invoice-popup/purchase-invoice-popup.component.html","./src/app/goods-received/pipes/goods-received-status-bar.pipe.ts","./src/app/goods-received/goods-received-detail/goods-received-detail.component.html","./src/app/goods-received/goods-received-detail/goods-received-detail.component.ts","./src/app/goods-received/goods-received-list/goods-received-list.component.html","./src/app/goods-received/goods-received-list/goods-received-list.component.ts","./src/app/goods-received/goods-received-preview/goods-received-preview.component.html","./src/app/goods-received/goods-received-preview/goods-received-preview.component.ts","./src/app/goods-received/goods-received-routing.module.ts","./src/app/inspections/inspections-list/inspections-list.component.ts","./src/app/inspections/inspections-list/inspections-list.component.html","./src/app/inspections/services/email.service.ts","./src/app/inspections/services/inspection-summary.service.ts","./src/app/inspections/services/inspection-title.service.ts","./src/app/shared/components/accordion/inspection-accordion-item/inspection-accordion-item.component.html","./src/app/shared/components/accordion/inspection-accordion-item/inspection-accordion-item.component.ts","./src/app/inspections/services/certificate-issue-reasons.service.ts","./src/app/shared/components/accordion/cfts-accordion-item/cfts-accordion-item.component.html","./src/app/shared/components/accordion/cfts-accordion-item/cfts-accordion-item.component.ts","./src/app/inspections/inspections-report-viewer/inspections-report-viewer.component.html","./src/app/inspections/inspections-report-viewer/inspections-report-viewer.component.ts","./src/app/inspections/inspections-routing.module.ts","./src/app/invoices/enums/note-output-type.enum.ts","./src/app/shared/components/accordion/invoice-status-accordion-item/invoice-status-accordion-item.component.html","./src/app/shared/components/accordion/invoice-status-accordion-item/invoice-status-accordion-item.component.ts","./src/app/invoices/invoice-detail/invoice-detail.component.html","./src/app/invoices/invoice-detail/invoice-detail.component.ts","./src/app/invoices/enums/batch-invoice-status.enum.ts","./src/app/service-contracts/services/service-contract.service.ts","./src/app/shared/enums/contract-invoice-cycle.enum.ts","./src/app/invoices/enums/invoice-grouping.enum.ts","./src/app/invoices/pipes/invoice-grouping.pipe.ts","./src/app/invoices/services/batch-invoices.service.ts","./src/app/invoices/pipes/batch-invoice-status-pipe.ts","./src/app/invoices/batch-invoice-list/batch-invoice-list.component.html","./src/app/invoices/batch-invoice-list/batch-invoice-list.component.ts","./src/app/invoices/invoices-routing.module.ts","./src/app/jobs/models/job-create.ts","./src/app/shared/pipes/bool-to-string.pipe.ts","./src/app/shared/components/accordion/credit-control-accordion-item/credit-control-accordion-item.component.html","./src/app/shared/components/accordion/credit-control-accordion-item/credit-control-accordion-item.component.ts","./src/app/jobs/recent-jobs-accordion/recent-jobs-accordion.component.html","./src/app/jobs/recent-jobs-accordion/recent-jobs-accordion.component.ts","./src/app/jobs/job-create/job-create.component.html","./src/app/jobs/job-create/job-create.component.ts","./src/app/settings/enums/layout-type.enum.ts","./src/app/settings/services/layout-template.service.ts","./src/app/shared/services/contact/contact.service.ts","./src/app/shared/services/walkthough/walkthrough.models.ts","./src/app/shared/pipes/enums/welcome-status-enum.ts","./src/app/shared/services/walkthough/walkthough.service.ts","./src/app/shared/services/go-to-job-equip/go-to-job-equip.service.ts","./src/app/jobs/services/job-part-data.service.ts","./src/app/jobs/job-invoice-dialogue/job-invoice-dialogue.component.ts","./src/app/jobs/job-invoice-dialogue/job-invoice-dialogue.component.html","./src/app/jobs/job-invoicing/job-invoicing.component.html","./src/app/jobs/job-invoicing/job-invoicing.component.ts","./src/app/jobs/models/job-detail.ts","./src/app/settings/services/inspection-template.service.ts","./src/app/inspections/services/inspection-permissions.service.ts","./src/app/inspections/services/inspections.service.ts","./src/app/inspections/services/job-visit.service.ts","./src/app/shared/pipes/enums/inspection-type.pipe.ts","./src/app/shared/pipes/enums/inspection-autocomplete.pipe.ts","./src/app/shared/components/inspection-template-dialog/inspection-template-dialog.component.html","./src/app/shared/components/inspection-template-dialog/inspection-template-dialog.component.ts","./src/app/inspections/issue-certificate-popup/issue-certificate-popup.component.ts","./src/app/inspections/issue-certificate-popup/issue-certificate-popup.component.html","./src/app/inspections/inspections-job-list/inspections-job-list.component.html","./src/app/inspections/inspections-job-list/inspections-job-list.component.ts","./src/app/shared/components/accordion/models/job-details-accordion-model.ts","./src/app/shared/components/accordion/job-details-accordion-item/job-details-accordion-item.component.html","./src/app/shared/components/accordion/job-details-accordion-item/job-details-accordion-item.component.ts","./src/app/settings/services/survey.service.ts","./src/app/shared/components/survey-dialog/survey-dialog.component.ts","./src/app/shared/components/survey-dialog/survey-dialog.component.html","./src/app/shared/components/accordion/surveys-accordion-item/surveys-accordion-item.component.ts","./src/app/shared/components/accordion/surveys-accordion-item/surveys-accordion-item.component.html","./src/app/shared/components/job-tabs-popup/job-tabs-popup.component.ts","./src/app/shared/components/job-tabs-popup/job-tabs-popup.component.html","./src/app/settings/job-settings/services/priority.service.ts","./src/app/shared/components/priority-icon/priority-icon.component.html","./src/app/shared/components/priority-icon/priority-icon.component.ts","./src/app/shared/components/input-with-button/input-with-button.component.html","./src/app/shared/components/input-with-button/input-with-button.component.ts","./src/app/sales-opportunity/services/sales-opportunity.service.ts","./src/app/shared/components/sales-opportunity-select-box/sales-opportunity-select-box.component.html","./src/app/shared/components/sales-opportunity-select-box/sales-opportunity-select-box.component.ts","./src/app/shared/components/priority-select-box/priority-select-box.component.html","./src/app/shared/components/priority-select-box/priority-select-box.component.ts","./src/app/jobs/job-detail/job-detail.component.html","./src/app/jobs/job-detail/job-detail.component.ts","./src/app/jobs/enums/labour-type.enum.ts","./src/app/jobs/models/job-visit.ts","./src/app/jobs/models/job-visit-charge.ts","./src/app/settings/services/engineer-skill.service.ts","./src/app/shared/components/duration/duration.component.ts","./src/app/shared/components/duration/duration.component.html","./src/app/jobs/job-further-work/job-further-work.component.html","./src/app/jobs/job-further-work/job-further-work.component.ts","./src/app/jobs/services/job-activity.service.ts","./src/app/shared/components/labour-analysis-chart/labour-analysis-chart.component.html","./src/app/shared/components/labour-analysis-chart/labour-analysis-chart.component.ts","./src/app/jobs/models/job-activity.model.ts","./src/app/jobs/job-activity-dialogue/job-activity-dialogue.component.html","./src/app/jobs/job-activity-dialogue/job-activity-dialogue.component.ts","./src/app/jobs/job-activity/job-activity.component.html","./src/app/jobs/job-activity/job-activity.component.ts","./src/app/shared/pipes/duration-from-date.pipe.ts","./src/app/shared/pipes/job-visit-status.pipe.ts","./src/app/jobs/pipes/labour-type.pipe.ts","./src/app/jobs/pipes/job-visit-status-bar.pipe.ts","./src/app/jobs/job-visit-dialogue/job-visit-dialogue.component.html","./src/app/jobs/job-visit-dialogue/job-visit-dialogue.component.ts","./src/app/jobs/job-labour/job-labour.component.html","./src/app/jobs/job-labour/job-labour.component.ts","./src/app/shared/components/bulk-part-order-popup/bulk-part-order-popup.component.html","./src/app/shared/components/bulk-part-order-popup/bulk-part-order-popup.component.ts","./src/app/shared/models/bulk-part-order-list-model.ts","./src/app/stock/services/stock-permissions.service.ts","./src/app/shared/components/stock-list/stock-list.component.html","./src/app/shared/components/stock-list/stock-list.component.ts","./src/app/shared/components/add-part-dialogue/add-part-dialogue.component.ts","./src/app/jobs/job-parts-serial-number-dialogue/job-parts-serial-number-dialogue.component.html","./src/app/shared/components/add-part-dialogue/add-part-dialogue.component.html","./src/app/jobs/job-parts-serial-number-dialogue/job-parts-serial-number-dialogue.component.ts","./src/app/jobs/models/job-part-list.ts","./src/app/jobs/services/job-purchase-order.service.ts","./src/app/shared/pipes/visit-details-pipe.ts","./src/app/jobs/pipes/days-until-now.pipe.ts","./src/app/jobs/job-parts/job-parts.component.html","./src/app/jobs/job-parts/job-parts.component.ts","./src/app/shared/components/bulk-material-order-popup/bulk-material-order-popup.component.html","./src/app/shared/components/bulk-material-order-popup/bulk-material-order-popup.component.ts","./src/app/jobs/models/material-list.model.ts","./src/app/jobs/models/job-material-list.ts","./src/app/jobs/job-material-dialogue/job-material-dialogue.component.html","./src/app/jobs/job-material-dialogue/job-material-dialogue.component.ts","./src/app/jobs/job-materials/job-materials.component.html","./src/app/jobs/job-materials/job-materials.component.ts","./src/app/jobs/job-cancellation-dialogue/job-cancellation-dialogue.component.html","./src/app/jobs/job-cancellation-dialogue/job-cancellation-dialogue.component.ts","./src/app/jobs/job-equipment-accordion/job-equipment-accordion.component.html","./src/app/jobs/job-equipment-accordion/job-equipment-accordion.component.ts","./src/app/service-contracts/models/service-contract-equipment.model.ts","./src/app/jobs/job-contract-accordion/job-contract-accordion.component.html","./src/app/jobs/job-contract-accordion/job-contract-accordion.component.ts","./src/app/jobs/job-equipment-marketing/job-equipment-marketing.component.html","./src/app/jobs/job-equipment-marketing/job-equipment-marketing.component.ts","./src/app/jobs/job-parts-marketing/job-parts-marketing.component.html","./src/app/jobs/job-parts-marketing/job-parts-marketing.component.ts","./src/app/jobs/job-refrigerant/job-refrigerant.component.html","./src/app/jobs/job-refrigerant/job-refrigerant.component.ts","./src/app/jobs/job/job.component.html","./src/app/jobs/job/job.component.ts","./src/app/jobs/jobsheet/jobsheet.component.html","./src/app/jobs/jobsheet/jobsheet.component.ts","./src/app/shared/services/job-type/job-type.service.ts","./src/app/jobs/services/recurring-job.service.ts","./src/app/jobs/recurring-jobs/recurring-jobs.component.html","./src/app/jobs/recurring-jobs/recurring-jobs.component.ts","./src/app/jobs/job-routing.module.ts","./src/app/shared/enums/messages/messages.enum.ts","./src/app/messages/components/message-list/message-list.component.html","./src/app/messages/components/message-list/message-list.component.ts","./src/app/shared/enums/messages/messages-action-type.enum.ts","./src/app/messages/services/warning-modal/warning-modal.service.ts","./src/app/messages/components/recipients-picker/recipients-picker.component.html","./src/app/messages/components/recipients-picker/recipients-picker.component.ts","./src/app/messages/components/new-messages/new-messages.component.html","./src/app/messages/components/new-messages/new-messages.component.ts","./src/app/shared/enums/messages/messages-tooltip-type.enum.ts","./src/app/shared/components/html-body/html-body.component.ts","./src/app/messages/components/messages-navigation/messages-navigation.component.html","./src/app/shared/components/html-body/html-body.component.html","./src/app/messages/components/messages-navigation/messages-navigation.component.ts","./src/app/messages/components/messages/messages.component.html","./src/app/messages/components/messages/messages.component.ts","./src/app/messages/messages-routing.module.ts","./src/app/shared/services/account/account.service.ts","./src/app/shared/directives/form/fields-match.directive.ts","./src/app/my-settings/components/change-password/change-password.component.html","./src/app/my-settings/components/change-password/change-password.component.ts","./src/app/my-settings/components/layout-options/layout-options.component.html","./src/app/my-settings/components/layout-options/layout-options.component.ts","./src/app/my-settings/components/outlook-integration/outlook-integration.component.html","./src/app/my-settings/components/outlook-integration/outlook-integration.component.ts","./src/app/shared/components/sidebar-menu/sidebar-menu.component.html","./src/app/shared/components/sidebar-menu/sidebar-menu.component.ts","./src/app/my-settings/my-settings.component.ts","./src/app/my-settings/my-settings.component.html","./src/app/settings/services/support-code.service.ts","./src/app/settings/models/support-code-model.ts","./src/app/settings/support-code/support-code.component.html","./src/app/settings/support-code/support-code.component.ts","./src/app/settings/services/two-factor-authentication.service.ts","./src/app/settings/two-factor-authentication/two-factor-authentication.component.html","./src/app/settings/two-factor-authentication/two-factor-authentication.component.ts","./src/app/my-settings/my-settings.routing.module.ts","./src/app/ng1-ng2-url-handling-strategy.ts","./src/app/shared/constants/map-pins.constants.ts","./src/app/shared/services/ativity-type/activity-type.service.ts","./src/app/shared/services/engineer/engineer.service.ts","./src/app/planner/enums/appointment-type.enum.ts","./src/app/planner/enums/engineer-card-mode.enum.ts","./src/app/planner/enums/planner-view.enum.ts","./src/app/shared/pipes/job-category.pipe.ts","./src/app/shared/enums/employee-activity-status.enum.ts","./src/app/planner/models/planner-layout.model.ts","./src/app/planner/services/planner.service.ts","./src/app/shared/enums/default-image-data-url.enum.ts","./src/app/planner/planner-engineer/planner-engineer.component.html","./src/app/planner/planner-engineer/planner-engineer.component.ts","./src/app/shared/services/planner-card.service.ts","./src/app/planner/enums/job-properties.enum.ts","./src/app/shared/pipes/job-property.pipe.ts","./src/app/planner/planner-appointment-card/planner-appointment-card.component.html","./src/app/planner/planner-appointment-card/planner-appointment-card.component.ts","./src/app/planner/planner-calendar/planner-calendar.component.html","./src/app/planner/planner-calendar/planner-calendar.component.ts","./src/app/planner/planner-map/planner-map.component.html","./src/app/planner/planner-map/planner-map.component.ts","./src/app/planner/planner-routing.module.ts","./src/app/settings/services/engineer-type.service.ts","./src/app/shared/models/module-access.model.ts","./src/app/planner/planner-view-bar/planner-view-bar.component.html","./src/app/planner/planner-view-bar/planner-view-bar.component.ts","./src/app/planner/planner-job-panel/planner-jobs.base.ts","./src/app/planner/planner-job-panel/planner-job-panel.component.html","./src/app/planner/planner-job-panel/planner-job-panel.component.ts","./src/app/planner/planner-job-card-list/planner-job-card-list.component.html","./src/app/planner/planner-job-card-list/planner-job-card-list.component.ts","./src/app/planner/planner-job-work-required/planner-job-work-required.component.html","./src/app/planner/planner-job-work-required/planner-job-work-required.component.ts","./src/app/planner/planner-shell/planner-shell.component.html","./src/app/planner/planner-shell/planner-shell.component.ts","./src/app/portal/services/portal.service.ts","./src/app/portal/portal-contacts-tab/portal-contacts-tab.component.ts","./src/app/portal/portal-contacts-tab/portal-contacts-tab.component.html","./src/app/portal/portal-routing.module.ts","./src/app/power-bi/models/power-bi-report-groups-data.ts","./src/app/power-bi/services/dashboard.service.ts","./src/app/power-bi/components/power-bi-dashboard/power-bi-dashboard.component.html","./src/app/power-bi/components/power-bi-dashboard/power-bi-dashboard.component.ts","./src/app/power-bi/power-bi-routing.module.ts","./src/app/purchase-orders/purchase-marketing/purchase-marketing.component.html","./src/app/purchase-orders/purchase-marketing/purchase-marketing.component.ts","./src/app/shared/components/accordion/purchase-order-details-accordion-item/purchase-order-details-accordion-item.component.html","./src/app/shared/components/accordion/purchase-order-details-accordion-item/purchase-order-details-accordion-item.component.ts","./src/app/f-gas/services/refrigerant-type-view.service.ts","./src/app/shared/components/add-cylinder-dialog/add-cylinder-dialog.component.html","./src/app/shared/components/add-cylinder-dialog/add-cylinder-dialog.component.ts","./src/app/shared/components/error-messages/error-messages.component.ts","./src/app/shared/components/error-messages/add-messages.component.ts","./src/app/shared/services/bankers-round.service.ts","./src/app/purchase-orders/models/purchase-order.model.ts","./src/app/purchase-orders/services/purchase-order.service.ts","./src/app/shared/components/accordion/purchase-order-receipts-accordion-item/purchase-order-receipts-accordion-item.component.html","./src/app/shared/components/accordion/purchase-order-receipts-accordion-item/purchase-order-receipts-accordion-item.component.ts","./src/app/shared/components/accordion/purchase-order-pending-orders-accordion-item/purchase-order-pending-orders-accordion-item.component.html","./src/app/shared/components/accordion/purchase-order-pending-orders-accordion-item/purchase-order-pending-orders-accordion-item.component.ts","./src/app/purchase-orders/pipes/purchase-order-status-bar.pipe.ts","./src/app/purchase-orders/purchase-order-detail/purchase-order-detail.component.html","./src/app/purchase-orders/purchase-order-detail/purchase-order-detail.component.ts","./src/app/purchase-orders/purchase-order-preview/purchase-order-preview.component.html","./src/app/purchase-orders/purchase-order-preview/purchase-order-preview.component.ts","./src/app/purchase-orders/purchase-orders-list/purchase-orders-list.component.html","./src/app/purchase-orders/purchase-orders-list/purchase-orders-list.component.ts","./src/app/purchase-orders/purchase-orders-routing.module.ts","./src/app/quotes2/enums/quote-summary-type.enum.ts","./src/app/quotes2/enums/quote-tab.enum.ts","./src/app/settings/job-settings/services/job-types.service.ts","./src/app/quotes2/pipes/quote-percent.pipe.ts","./src/app/quotes2/view-models/advanced-quotes-equipment-option.viewmodel.ts","./src/app/shared/enums/discount-type.enum.ts","./src/app/quotes2/view-models/advanced-quotes-general.viewmodel.ts","./src/app/quotes2/view-models/advanced-quotes-materials.viewmodel.ts","./src/app/quotes2/view-models/advanced-quotes-parts.viewmodel.ts","./src/app/quotes2/view-models/advanced-quotes-equipment.viewmodel.ts","./src/app/quotes2/view-model-component.class.ts","./src/app/shared/components/discount-toggle/discount-toggle.component.ts","./src/app/shared/components/currency/currency.component.html","./src/app/shared/components/discount-toggle/discount-toggle.component.html","./src/app/shared/components/currency/currency.component.ts","./src/app/quotes2/advanced-quotes/advanced-quotes-general-tab/advanced-quotes-general-tab.component.html","./src/app/quotes2/advanced-quotes/advanced-quotes-general-tab/advanced-quotes-general-tab.component.ts","./src/app/quotes2/models/quote-job-activity.model.ts","./src/app/quotes2/services/quotes.service.ts","./src/app/quotes2/advanced-quotes/advanced-quotes-material-tab/advanced-quotes-material-tab.component.html","./src/app/quotes2/advanced-quotes/advanced-quotes-material-tab/advanced-quotes-material-tab.component.ts","./src/app/quotes2/advanced-quotes/advanced-quotes-options-dialog/advanced-quotes-options-dialog.component.html","./src/app/quotes2/advanced-quotes/advanced-quotes-options-dialog/advanced-quotes-options-dialog.component.ts","./src/app/quotes2/advanced-quotes/advanced-quotes-options-tab/advanced-quotes-options-tab.component.html","./src/app/quotes2/advanced-quotes/advanced-quotes-options-tab/advanced-quotes-options-tab.component.ts","./src/app/quotes/services/quote-job-parts-service.service.ts","./src/app/quotes2/advanced-quotes/advanced-quotes-parts-tab/advanced-quotes-parts-tab.component.html","./src/app/quotes2/advanced-quotes/advanced-quotes-parts-tab/advanced-quotes-parts-tab.component.ts","./src/app/quotes2/advanced-quotes/advanced-quotes-drawer/advanced-quotes-drawer.component.html","./src/app/quotes2/advanced-quotes/advanced-quotes-drawer/advanced-quotes-drawer.component.ts","./src/app/quotes2/pipes/quote-invoice-cycle.pipe.ts","./src/app/quotes2/quote-equipment/quote-equipment.component.html","./src/app/quotes2/quote-equipment/quote-equipment.component.ts","./src/app/quotes2/quote-job-install/quote-job-install.component.html","./src/app/quotes2/quote-job-install/quote-job-install.component.ts","./src/app/shared/services/labour-rate/labour-rate.service.ts","./src/app/shared/components/labour-rate/labour-rate.component.html","./src/app/shared/components/labour-rate/labour-rate.component.ts","./src/app/shared/components/labour-rate-dialog/labour-rate-dialog.component.ts","./src/app/shared/components/labour-rate-dialog/labour-rate-dialog.component.html","./src/app/quotes2/collection-view-model-component.class.ts","./src/app/quotes2/view-models/quote-job-labour.viewmodel.ts","./src/app/quotes2/quote-job-labour/quote-job-labour.component.html","./src/app/quotes2/quote-job-labour/quote-job-labour.component.ts","./src/app/quotes2/quote-materials/quote-materials.component.html","./src/app/quotes2/quote-materials/quote-materials.component.ts","./src/app/quotes2/view-models/quote-parts.viewmodel.ts","./src/app/quotes2/quote-parts/quote-parts.component.html","./src/app/quotes2/quote-parts/quote-parts.component.ts","./src/app/quotes2/view-models/quote-refrigerant.viewmodel.ts","./src/app/quotes2/quote-refrigerant/quote-refrigerant.component.html","./src/app/quotes2/quote-refrigerant/quote-refrigerant.component.ts","./src/app/quotes2/view-models/equipment/quote-equipment.viewmodel.ts","./src/app/quotes2/view-models/equipment/quote-job-equipment.viewmodel.ts","./src/app/quotes2/view-models/materials/quote-materials.viewmodel.ts","./src/app/quotes2/view-models/materials/quote-job-materials.viewmodel.ts","./src/app/quotes2/view-models/quote-job-activities.viewmodel.ts","./src/app/quotes2/view-models/quote-job-install.viewmodel.ts","./src/app/quotes2/models/quote-job-install.model.ts","./src/app/quotes2/view-models/quote-job.viewmodel.ts","./src/app/quotes2/quote-job-activity-dialogue/quote-job-activity-dialogue.component.html","./src/app/quotes2/quote-job-activity-dialogue/quote-job-activity-dialogue.component.ts","./src/app/quotes2/quote-job-activities/quote-job-activities.component.html","./src/app/quotes2/quote-job-activities/quote-job-activities.component.ts","./src/app/quotes2/quote-job-tab/quote-job-tab.component.html","./src/app/quotes2/quote-job-tab/quote-job-tab.component.ts","./src/app/quotes2/view-models/example.viewmodel.ts","./src/app/quotes2/view-models/equipment/quote-contract-equipment.viewmodel.ts","./src/app/quotes2/view-models/quote-contract-sites.viewmodel.ts","./src/app/quotes2/view-models/quote-contract.viewmodel.ts","./src/app/quotes2/view-models/equipment/quote-sales-order-equipment.viewmodel.ts","./src/app/quotes2/view-models/materials/quote-sales-order-materials.viewmodel.ts","./src/app/quotes2/view-models/quote-salesorder.viewmodel.ts","./src/app/quotes2/enums/quote-detail-level.enum.ts","./src/app/quotes2/view-models/quote-summary.viewmodel.ts","./src/app/quotes2/view-models/quote.viewmodel.ts","./src/app/shared/components/accordion/models/cancel-reason-model.ts","./src/app/shared/components/accordion/quote-details-accordion-item/quote-details-accordion-item.component.html","./src/app/shared/components/accordion/quote-details-accordion-item/quote-details-accordion-item.component.ts","./src/app/shared/components/accordion/quote-revisions-accordion-item/quote-revisions-accordion-item.component.html","./src/app/shared/components/accordion/quote-revisions-accordion-item/quote-revisions-accordion-item.component.ts","./src/app/shared/validators/account-number.validator.ts","./src/app/shared/components/account-number/account-number.component.html","./src/app/shared/components/account-number/account-number.component.ts","./src/app/quotes2/quote-details-tab/quote-details-tab.component.html","./src/app/quotes2/quote-details-tab/quote-details-tab.component.ts","./src/app/shared/services/currency.service.ts","./src/app/quotes2/quote-summary/quote-summary.component.html","./src/app/quotes2/quote-summary/quote-summary.component.ts","./src/app/quotes2/quote-sales-tab/quote-sales-tab.component.html","./src/app/quotes2/quote-sales-tab/quote-sales-tab.component.ts","./src/app/quotes2/models/equipment-contract.model.ts","./src/app/quotes2/services/quote-contract-invoice-type.service.ts","./src/app/shared/components/add-site-dialogue/add-site-dialogue.component.ts","./src/app/shared/components/add-site-dialogue/add-site-dialogue.component.html","./src/app/quotes2/quote-contract-site/quote-contract-site.component.html","./src/app/quotes2/quote-contract-site/quote-contract-site.component.ts","./src/app/quotes2/quote-contracts-tab/quote-contracts-tab.component.html","./src/app/quotes2/quote-contracts-tab/quote-contracts-tab.component.ts","./src/app/quotes2/quote-comment-tab/quote-comment-tab.component.ts","./src/app/quotes2/quote-comment-tab/quote-comment-tab.component.html","./src/app/shared/pipes/enums/quote-status.pipe.ts","./src/app/shared/pipes/quote-status-bar.pipe.ts","./src/app/quotes2/quote-detail/quote-detail.component.html","./src/app/quotes2/quote-detail/quote-detail.component.ts","./src/app/quotes2/quote-preview/quote-preview.component.html","./src/app/quotes2/quote-preview/quote-preview.component.ts","./src/app/quotes2/quotes2-routing.module.ts","./src/app/returns-note/pipes/returns-note-status-bar.pipe.ts","./src/app/returns-note/returns-list/returns-list.component.html","./src/app/returns-note/returns-list/returns-list.component.ts","./src/app/returns-note/models/returns-note-cancel.model.ts","./src/app/returns-note/models/returns-note.model.ts","./src/app/shared/components/accordion/returns-details-accordion-item/returns-details-accordion-item.component.html","./src/app/shared/components/accordion/returns-details-accordion-item/returns-details-accordion-item.component.ts","./src/app/returns-note/returns-files-tab/returns-files-tab.component.ts","./src/app/returns-note/returns-note-materials/returns-note-materials.component.html","./src/app/returns-note/returns-files-tab/returns-files-tab.component.html","./src/app/returns-note/returns-note-materials/returns-note-materials.component.ts","./src/app/returns-note/returns-note-equipment/returns-note-equipment.component.html","./src/app/returns-note/returns-note-equipment/returns-note-equipment.component.ts","./src/app/returns-note/returns-note-parts/returns-note-parts.component.html","./src/app/returns-note/returns-note-parts/returns-note-parts.component.ts","./src/app/returns-note/returns-note-summary/returns-note-summary.component.html","./src/app/returns-note/returns-note-summary/returns-note-summary.component.ts","./src/app/returns-note/returns-note-add-cylinder-dialogue/returns-note-add-cylinder-dialogue.component.ts","./src/app/returns-note/returns-note-refrigerants/returns-note-refrigerants.component.html","./src/app/returns-note/returns-note-add-cylinder-dialogue/returns-note-add-cylinder-dialogue.component.html","./src/app/returns-note/returns-note-refrigerants/returns-note-refrigerants.component.ts","./src/app/returns-note/returns-note-details/returns-note-details.component.html","./src/app/returns-note/returns-note-details/returns-note-details.component.ts","./src/app/returns-note/returns-note-preview/returns-note-preview.component.html","./src/app/returns-note/returns-note-preview/returns-note-preview.component.ts","./src/app/returns-note/returns-note-routing.module.ts","./src/app/sales-campaigns/sales-campaigns-list/sales-campaigns-list.component.ts","./src/app/sales-campaigns/sales-campaigns-list/sales-campaigns-list.component.html","./src/app/sales-campaigns/sales-campaigns-routing.module.ts","./src/app/settings/enums/sales-opportunity-status-colour.enum.ts","./src/app/shared/services/reminders/reminder.service.ts","./src/app/sales-opportunity/models/sales-opportunity-business.model.ts","./src/app/sales-opportunity/sales-opportunity-lost-dialog/sales-opportunity-lost-dialog.component.html","./src/app/sales-opportunity/sales-opportunity-lost-dialog/sales-opportunity-lost-dialog.component.ts","./src/app/sales-opportunity/services/quote.service.ts","./src/app/shared/components/accordion/sales-opportunity-details-accordion-item/sales-opportunity-details-accordion-item.component.html","./src/app/shared/components/accordion/sales-opportunity-details-accordion-item/sales-opportunity-details-accordion-item.component.ts","./src/app/sales-opportunity/sales-opportunity-general/sales-opportunity-general.component.ts","./src/app/sales-opportunity/sales-opportunity-general/sales-opportunity-general.component.html","./src/app/sales-opportunity/sales-opportunity-additional/sales-opportunity-additional.component.ts","./src/app/sales-opportunity/sales-opportunity-additional/sales-opportunity-additional.component.html","./src/app/sales-opportunity/sales-opportunity-files/sales-opportunity-files.component.ts","./src/app/sales-opportunity/sales-opportunity-files/sales-opportunity-files.component.html","./src/app/sales-opportunity/sales-opportunity-history/sales-opportunity-history.component.html","./src/app/sales-opportunity/sales-opportunity-history/sales-opportunity-history.component.ts","./src/app/sales-opportunity/sales-opportunity-detail/sales-opportunity-detail.component.html","./src/app/sales-opportunity/sales-opportunity-detail/sales-opportunity-detail.component.ts","./src/app/sales-opportunity/sales-opportunity-list/sales-opportunity-list.component.html","./src/app/sales-opportunity/sales-opportunity-list/sales-opportunity-list.component.ts","./src/app/sales-opportunity/sales-opportunity-routing.module.ts","./src/app/sales-orders/sales-marketing/sales-marketing.component.html","./src/app/sales-orders/sales-marketing/sales-marketing.component.ts","./src/app/sales-orders/models/sales-order.model.ts","./src/app/sales-orders/sales-order-preview/sales-order-preview.component.html","./src/app/sales-orders/sales-order-preview/sales-order-preview.component.ts","./src/app/sales-orders/models/sales-order.view-model.ts","./src/app/sales-orders/sales-order-general/sales-order-general.component.html","./src/app/sales-orders/sales-order-general/sales-order-general.component.ts","./src/app/shared/components/bulk-equipment-order-popup/bulk-equipment-order-popup.component.html","./src/app/shared/components/bulk-equipment-order-popup/bulk-equipment-order-popup.component.ts","./src/app/sales-orders/sales-order-equipment/sales-order-equipment.component.html","./src/app/sales-orders/sales-order-equipment/sales-order-equipment.component.ts","./src/app/settings/job-settings/services/material-types.service.ts","./src/app/sales-orders/sales-order-materials/sales-order-materials.component.html","./src/app/sales-orders/sales-order-materials/sales-order-materials.component.ts","./src/app/sales-orders/sales-order-summary/sales-order-summary.component.html","./src/app/sales-orders/sales-order-summary/sales-order-summary.component.ts","./src/app/sales-orders/models/sales-order-part.model.ts","./src/app/sales-orders/sales-order-parts/sales-order-parts.component.html","./src/app/sales-orders/sales-order-parts/sales-order-parts.component.ts","./src/app/sales-orders/sales-order-file/sales-order-file.component.ts","./src/app/sales-orders/sales-orders-accordion/sales-order-accordion-detail/sales-order-accordion-detail.component.html","./src/app/sales-orders/sales-order-file/sales-order-file.component.html","./src/app/sales-orders/sales-orders-accordion/sales-order-accordion-detail/sales-order-accordion-detail.component.ts","./src/app/sales-orders/sales-orders-accordion/sales-order-accordion-despatch/sales-order-accordion-despatch.component.html","./src/app/sales-orders/sales-orders-accordion/sales-order-accordion-despatch/sales-order-accordion-despatch.component.ts","./src/app/sales-orders/sales-orders-accordion/sales-orders-accordion.component.html","./src/app/sales-orders/sales-orders-accordion/sales-orders-accordion.component.ts","./src/app/sales-orders/sales-order/sales-order.component.html","./src/app/sales-orders/sales-order/sales-order.component.ts","./src/app/sales-orders/sales-orders-routing.module.ts","./src/app/service-contracts/services/contract-header-upload.service.ts","./src/app/service-contracts/contract-header-upload/contract-header-upload.component.ts","./src/app/service-contracts/contract-header-upload/contract-header-upload.component.html","./src/app/service-contracts/contract-marketing/contract-marketing.component.html","./src/app/service-contracts/contract-marketing/contract-marketing.component.ts","./src/app/service-contracts/services/contract-site-upload.service.ts","./src/app/service-contracts/contract-site-upload/contract-site-upload.component.ts","./src/app/service-contracts/contract-site-upload/contract-site-upload.component.html","./src/app/service-contracts/enums/inv-cycle.enum.ts","./src/app/service-contracts/models/service-contract.model.ts","./src/app/shared/components/accordion/contract-accordion-item/contract-accordion-item.component.html","./src/app/shared/components/accordion/contract-accordion-item/contract-accordion-item.component.ts","./src/app/service-contracts/contract-detail/contract-detail.component.html","./src/app/service-contracts/contract-detail/contract-detail.component.ts","./src/app/service-contracts/pipes/inv-cycle.pipe.ts","./src/app/service-contracts/contract-equipment/contract-equipment.component.html","./src/app/service-contracts/contract-equipment/contract-equipment.component.ts","./src/app/service-contracts/models/service-contract-invoice.model.ts","./src/app/service-contracts/contract-invoicing-dialogue/contract-invoicing-dialogue.component.ts","./src/app/service-contracts/contract-invoicing-dialogue/contract-invoicing-dialogue.component.html","./src/app/service-contracts/contract-invoicing/contract-invoicing.component.html","./src/app/service-contracts/contract-invoicing/contract-invoicing.component.ts","./src/app/service-contracts/models/service-contract-site.model.ts","./src/app/service-contracts/contract-sites/contract-sites.component.html","./src/app/service-contracts/contract-sites/contract-sites.component.ts","./src/app/service-contracts/contract-cancellation-dialogue/contract-cancellation-dialogue.component.html","./src/app/service-contracts/contract-cancellation-dialogue/contract-cancellation-dialogue.component.ts","./src/app/service-contracts/contract/contract.component.html","./src/app/service-contracts/contract/contract.component.ts","./src/app/service-contracts/services/contract-equipment-upload.service.ts","./src/app/service-contracts/import-contract-equipment/import-contract-equipment.component.ts","./src/app/service-contracts/import-contract-equipment/import-contract-equipment.component.html","./src/app/service-contracts/service-contract-preview/service-contract-preview.component.html","./src/app/service-contracts/service-contract-preview/service-contract-preview.component.ts","./src/app/service-contracts/service-contracts-routing.module.ts","./src/app/shared/empty-component/empty-component.component.ts","./src/app/stock/picking-note/picking-note.component.html","./src/app/stock/picking-note/picking-note.component.ts","./src/app/stock/enums/stock-adjustment-status.enum.ts","./src/app/stock/services/stock-adjustment.service.ts","./src/app/stock/pipes/stock-adjustment-status.pipe.ts","./src/app/stock/pipes/stock-adjustment-status-bar.pipe.ts","./src/app/stock/stock-adjustment-list/stock-adjustment-list.component.html","./src/app/stock/stock-adjustment-list/stock-adjustment-list.component.ts","./src/app/settings/services/adjustment-reason.service.ts","./src/app/stock/enums/stock-adjustment-serialno-status.enum.ts","./src/app/stock/stock-adjustment-autofill-options/stock-adjustment-autofill-options.component.ts","./src/app/stock/stock-adjustment-autofill-options/stock-adjustment-autofill-options.component.html","./src/app/stock/pipes/stock-adjustment-serial-no-status.pipe.ts","./src/app/stock/stock-adjustment-serail-no/stock-adjustment-serail-no.component.html","./src/app/stock/stock-adjustment-serail-no/stock-adjustment-serail-no.component.ts","./src/app/stock/stock-transfer-serial-number-dialogue/stock-transfer-serial-number-dialogue.component.html","./src/app/stock/stock-transfer-serial-number-dialogue/stock-transfer-serial-number-dialogue.component.ts","./src/app/shared/directives/form/stock/stores-differ.directive.ts","./src/app/stock/stock-adjustment/stock-adjustment.component.html","./src/app/stock/stock-adjustment/stock-adjustment.component.ts","./src/app/shared/components/accordion/preferred-supplier-accordion-item/preferred-supplier-accordion-item.component.html","./src/app/shared/components/accordion/preferred-supplier-accordion-item/preferred-supplier-accordion-item.component.ts","./src/app/shared/components/accordion/stock-purchases-accordion-item/stock-purchases-accordion-item.component.html","./src/app/shared/components/accordion/stock-purchases-accordion-item/stock-purchases-accordion-item.component.ts","./src/app/shared/components/accordion/demand-accordion-item/demand-accordion-item.component.html","./src/app/shared/components/accordion/demand-accordion-item/demand-accordion-item.component.ts","./src/app/stock/stock-general/stock-general.component.html","./src/app/stock/stock-general/stock-general.component.ts","./src/app/shared/components/store-icon/store-icon.component.ts","./src/app/shared/components/store-icon/store-icon.component.html","./src/app/shared/components/stock-levels/stock-levels.component.html","./src/app/shared/components/stock-levels/stock-levels.component.ts","./src/app/stock/stock-general-stores/stock-general-stores.component.html","./src/app/stock/stock-general-stores/stock-general-stores.component.ts","./src/app/stock/stock-history/stock-history.component.html","./src/app/stock/stock-history/stock-history.component.ts","./src/app/stock/stock-files/stock-files.component.ts","./src/app/stock/stock-files/stock-files.component.html","./src/app/stock/stock-serial-nos/stock-serial-nos.component.html","./src/app/stock/stock-serial-nos/stock-serial-nos.component.ts","./src/app/shared/components/stock-suppliers-add/stock-suppliers-add.component.ts","./src/app/shared/components/stock-suppliers-add/stock-suppliers-add.component.html","./src/app/stock/stock-suppliers/stock-suppliers.component.html","./src/app/stock/stock-suppliers/stock-suppliers.component.ts","./src/app/stock/stock-equivalences/stock-equivalences.component.html","./src/app/stock/stock-equivalences/stock-equivalences.component.ts","./src/app/stock/stock-detail/stock-detail.component.html","./src/app/stock/stock-detail/stock-detail.component.ts","./src/app/stock/stock-marketing/stock-marketing.component.html","./src/app/stock/stock-marketing/stock-marketing.component.ts","./src/app/stock/services/stock-part-upload.service.ts","./src/app/stock/stock-part-upload/stock-part-upload.component.ts","./src/app/stock/stock-part-upload/stock-part-upload.component.html","./src/app/stock/stock-preview/stock-preview.component.html","./src/app/stock/stock-preview/stock-preview.component.ts","./src/app/stock/services/stock-supplier-prices-upload.service.ts","./src/app/stock/stock-supplier-prices-upload/stock-supplier-prices-upload.component.ts","./src/app/stock/stock-supplier-prices-upload/stock-supplier-prices-upload.component.html","./src/app/stock/stock-take-preview/stock-take-preview.component.html","./src/app/stock/stock-take-preview/stock-take-preview.component.ts","./src/app/stock/stock-routing.module.ts","./src/app/shared/pipes/supplier-status.pipe.ts","./src/app/shared/pipes/supplier-status-bar.pipe.ts","./src/app/shared/components/child-sites-list/child-sites-list.component.html","./src/app/shared/components/child-sites-list/child-sites-list.component.ts","./src/app/suppliers/models/supplier.model.ts","./src/app/shared/pipes/contact-status.pipe.ts","./src/app/shared/pipes/contact-status-bar.pipe.ts","./src/app/shared/components/child-contacts-list/child-contacts-list.component.html","./src/app/shared/components/child-contacts-list/child-contacts-list.component.ts","./src/app/shared/models/new-contact.model.ts","./src/app/shared/components/new-child-contact/new-child-contact.component.ts","./src/app/shared/components/new-child-contact/new-child-contact.component.html","./src/app/suppliers/components/supplier-history/supplier-history.component.html","./src/app/suppliers/components/supplier-history/supplier-history.component.ts","./src/app/suppliers/components/supplier-details/supplier-details.component.html","./src/app/suppliers/components/supplier-details/supplier-details.component.ts","./src/app/shared/components/importer/models/import-summary.ts","./src/app/suppliers/services/supplier-upload.service.ts","./src/app/suppliers/components/supplier-upload/supplier-upload.component.ts","./src/app/suppliers/components/supplier-upload/supplier-upload.component.html","./src/app/suppliers/components/suppliers-list/suppliers-list.component.html","./src/app/suppliers/components/suppliers-list/suppliers-list.component.ts","./src/app/suppliers/suppliers-routing.module.ts","./src/app/surveys/services/survey-data.service.ts","./src/app/surveys/components/survey-list/survey-list.component.html","./src/app/surveys/components/survey-list/survey-list.component.ts","./src/app/surveys/surveys-routing.module.ts","./src/app/purchase-notes/models/purchase-note-text-variant.model.ts","./src/app/purchase-notes/enums/purchase-note-status.enum.ts","./src/app/purchase-notes/enums/purchase-note-type.enum.ts","./src/app/purchase-notes/models/currency.model.ts","./src/app/purchase-notes/models/purchase-note.model.ts","./src/app/purchase-notes/services/purchase-note.service.ts","./src/app/shared/components/accordion/purchase-note-accordion-item/purchase-note-accordion-item.component.html","./src/app/shared/components/accordion/purchase-note-accordion-item/purchase-note-accordion-item.component.ts","./projects/servicesight-shared/src/lib/pipes/enums/ledger-system.enum.ts","./src/app/shared/services/tax-codes.service.ts","./src/app/purchase-notes/enums/purchase-note-line-type.enum.ts","./src/app/purchase-notes/enums/purchase-note-line-item-type.enum.ts","./src/app/purchase-notes/purchase-note-matching-modal/purchase-note-matching-modal.component.html","./src/app/purchase-notes/purchase-note-matching-modal/purchase-note-matching-modal.component.ts","./src/app/purchase-notes/purchase-note-matching/purchase-note-matching.component.html","./src/app/purchase-notes/purchase-note-matching/purchase-note-matching.component.ts","./src/app/shared/components/exchange-rate/exchange-rate.component.html","./src/app/shared/components/exchange-rate/exchange-rate.component.ts","./src/app/purchase-notes/purchase-note-general/purchase-note-general.component.html","./src/app/purchase-notes/purchase-note-general/purchase-note-general.component.ts","./src/app/purchase-notes/pipes/purchase-notes-status.pipe.ts","./src/app/purchase-notes/pipes/purchase-notes-status-colour.pipe.ts","./src/app/purchase-notes/purchase-note/purchase-note.component.html","./src/app/purchase-notes/purchase-note/purchase-note.component.ts","./src/app/purchase-notes/pipes/purchase-note-type.pipe.ts","./src/app/purchase-notes/purchase-notes-list/purchase-notes-list.component.html","./src/app/purchase-notes/purchase-notes-list/purchase-notes-list.component.ts","./src/app/purchase-notes/purchase-notes-routing.module.ts","./src/app/helpdesk/components/dashboard/dashboard.component.ts","./src/app/helpdesk/components/dashboard/dashboard.component.html","./src/app/helpdesk/components/ticket/ticket.component.ts","./src/app/helpdesk/components/tickets/tickets.component.html","./src/app/helpdesk/components/ticket/ticket.component.html","./src/app/helpdesk/components/tickets/tickets.component.ts","./src/app/helpdesk/helpdesk-routing.module.ts","./src/app/external-sign-in/external-sign-in.component.ts","./src/app/external-sign-in/external-sign-in.component.html","./src/app/app-routing.module.ts","./src/app/shared/pipes/enums/welcome-views-enum.ts","./src/app/shared/components/welcome/welcome.component.html","./src/app/shared/components/welcome/welcome.component.ts","./src/app/app.component.ts","./src/app/app.component.html","./src/app/shared/components/customer-contacts-select-box/customer-contacts-select-box.component.ts","./src/app/shared/components/customer-contacts-select-box/customer-contacts-select-box.component.html","./src/app/shared/components/customer-history/customer-history.component.html","./src/app/shared/components/customer-history/customer-history.component.ts","./src/app/shared/components/dropdown-button-with-help/dropdown-button-with-help.component.html","./src/app/shared/components/dropdown-button-with-help/dropdown-button-with-help.component.ts","./src/app/shared/components/dropdown/dropdown.component.html","./src/app/shared/components/dropdown/dropdown.component.ts","./src/app/shared/components/file-picker/file-picker.component.html","./src/app/shared/components/file-picker/file-picker.component.ts","./src/app/shared/components/info-button/info-button.component.ts","./src/app/shared/components/login/login.component.html","./src/app/shared/components/info-button/info-button.component.html","./src/app/shared/components/login/login.component.ts","./src/app/shared/components/new-child-site/new-child-site.component.ts","./src/app/shared/components/new-child-site/new-child-site.component.html","./src/app/shared/components/notifications/notifications.component.ts","./src/app/shared/components/notifications/notifications.component.html","./src/app/shared/components/settings/settings-edit/settings-edit.component.html","./src/app/shared/components/settings/settings-edit/settings-edit.component.ts","./src/app/shared/components/settings/settings.component.html","./src/app/shared/components/settings/settings.component.ts","./src/app/shared/components/stepped-number-input/stepped-number-input.component.ts","./src/app/shared/components/stripe-connect-button/stripe-connect-button.component.html","./src/app/shared/components/stepped-number-input/stepped-number-input.component.html","./src/app/shared/components/stripe-connect-button/stripe-connect-button.component.ts","./src/app/shared/components/add-skill-dialogue/add-skill-dialogue.component.ts","./src/app/shared/components/add-skill-dialogue/add-skill-dialogue.component.html","./src/app/shared/components/switch/switch.component.ts","./src/app/shared/directives/only-numbers/only-numbers.directive.ts","./src/app/shared/directives/shared-directives.module.ts","./src/app/shared/app.config.ts","./src/app/shared/factory/http-loader.factory.ts","./src/app/shared/pipes/pipes.module.ts","./src/app/shared/components/currency-toggle/currency-toggle,component.ts","./src/app/shared/components/currency-toggle/currency-toggle.component.html","./src/app/shared/components/what3words/what3words.component.ts","./src/app/shared/components/what3words/what3words.component.html","./src/app/shared/components/fa-icon-button/fa-icon-button.component.ts","./src/app/shared/components/fa-icon-button/fa-icon-button.component.html","./src/app/shared/components/shared-components.module.ts","./src/app/contacts/contacts.module.ts","./src/app/customers/assign-equipment-system/assign-equipment-system.component.html","./src/app/customers/assign-equipment-system/assign-equipment-system.component.ts","./src/app/customers/services/customer-attributes.service.ts","./src/app/customers/customer-attribute/customer-attribute.component.ts","./src/app/customers/customer-attribute/customer-attribute.component.html","./src/app/customers/customer-equipment-systems/customer-equipment-systems.component.html","./src/app/customers/customer-equipment-systems/customer-equipment-systems.component.ts","./src/app/customers/customer-file/customer-file.component.ts","./src/app/customers/customer-file/customer-file.component.html","./src/app/customers/services/customer-job-alerts.service.ts","./src/app/customers/customer-job-alerts/customer-job-alerts.component.html","./src/app/customers/customer-job-alerts/customer-job-alerts.component.ts","./src/app/shared/pipes/enums/customer-status-pipe.ts","./src/app/customers/customer-list/customer-list.component.html","./src/app/customers/customer-list/customer-list.component.ts","./src/app/customers/services/customer-skills.service.ts","./src/app/customers/customer-skills/customer-skills.component.html","./src/app/customers/customer-skills/customer-skills.component.ts","./src/app/customers/service-group-equipments/service-group-equipments.component.html","./src/app/customers/service-group-equipments/service-group-equipments.component.ts","./src/app/shared/models/service-groups-tab.model.ts","./src/app/customers/service-groups-items-assignation/service-groups-items-assignation.component.html","./src/app/customers/service-groups-items-assignation/service-groups-items-assignation.component.ts","./src/app/customers/models/service-group.model.ts","./src/app/customers/service-groups/service-groups.component.html","./src/app/customers/service-groups/service-groups.component.ts","./src/app/settings/attribute-settings/attribute-settings.component.ts","./src/app/settings/attribute-settings/services/attributes.service.ts","./src/app/settings/attribute-settings/pipes/selected-type.pipe.ts","./src/app/settings/attribute-settings/pipes/attributes-caption.pipe.ts","./src/app/settings/attribute-settings/pipes/attributes-subheading.pipe.ts","./src/app/settings/attribute-settings/attributes/attributes.component.html","./src/app/settings/attribute-settings/attributes/attributes.component.ts","./src/app/settings/attribute-settings/category-types/category-types.component.html","./src/app/settings/attribute-settings/category-types/category-types.component.ts","./src/app/equipment/models/equipment-attribute-in-use.model.ts","./src/app/settings/attribute-settings/new-attribute/types-components/attribute-list-type.component.html","./src/app/settings/attribute-settings/new-attribute/types-components/attribute-list-type.component.ts","./src/app/settings/attribute-settings/new-attribute/new-attribute.component.html","./src/app/settings/attribute-settings/new-attribute/new-attribute.component.ts","./src/app/settings/equipment-settings/make-model-upload/make-model-upload.component.ts","./src/app/settings/equipment-settings/make-model-upload/make-model-upload.component.html","./src/app/settings/attribute-settings/attribute-settings.module.ts","./src/app/customers/services/customer-upload.service.ts","./src/app/customers/customer-upload/customer-upload.component.ts","./src/app/customers/customer-accounts/customer-accounts.component.html","./src/app/customers/customer-upload/customer-upload.component.html","./src/app/customers/customer-accounts/customer-accounts.component.ts","./src/app/customers/services/customer-layout.service.ts","./src/app/customers/customer-layouts/customer-layouts.component.html","./src/app/customers/customer-layouts/customer-layouts.component.ts","./src/app/shared/validators/postcode.validator.ts","./src/app/customers/new-customer-modal/new-customer-modal.component.html","./src/app/customers/new-customer-modal/new-customer-modal.component.ts","./src/app/customers/customer-sites/customer-sites.component.html","./src/app/customers/customer-sites/customer-sites.component.ts","./src/app/customers/customers.module.ts","./src/app/dashboard/dashboard.module.ts","./src/app/shared/services/logging.service.ts","./src/app/elmah-io-error.handler.ts","./src/app/f-gas/f-gas.module.ts","./src/app/inspections/inspections.module.ts","./src/app/invoices/batch-invoice/batch-invoice.component.html","./src/app/invoices/batch-invoice/batch-invoice.component.ts","./src/app/invoices/invoices.module.ts","./src/app/service-contracts/service-contracts.module.ts","./src/app/equipment/equipment.module.ts","./src/app/jobs/jobs.module.ts","./src/app/messages/messages.module.ts","./src/app/my-settings/my-settings.module.ts","./src/app/planner/planner.module.ts","./src/app/portal/portal.module.ts","./src/app/power-bi/power-bi.module.ts","./src/app/reminders/reminder-customer/reminder-customer.component.ts","./src/app/reminders/reminder-customer/reminder-customer.component.html","./src/app/reminders/reminder-files/reminder-files.component.ts","./src/app/reminders/reminder-files/reminder-files.component.html","./src/app/reminders/services/reminder.service.ts","./src/app/reminders/reminder-list/reminder-list.component.html","./src/app/reminders/reminder-list/reminder-list.component.ts","./src/app/reminders/reminders-routing.module.ts","./src/app/reminders/reminders.module.ts","./src/app/settings/alert-settings/services/alert.service.ts","./src/app/settings/alert-settings/alert-list/alert-list.component.html","./src/app/settings/alert-settings/alert-list/alert-list.component.ts","./src/app/settings/alert-settings/models/alert.ts","./src/app/settings/services/task-type.service.ts","./src/app/settings/alert-settings/models/alert-recipient-model.ts","./src/app/settings/alert-settings/alert-recipients-picker/alert-recipients-picker.component.html","./src/app/settings/alert-settings/alert-recipients-picker/alert-recipients-picker.component.ts","./src/app/settings/alert-settings/alert-recipients/alert-recipients.component.html","./src/app/settings/alert-settings/alert-recipients/alert-recipients.component.ts","./src/app/settings/alert-settings/alert-column-picker-modal/alert-column-picker-modal.component.ts","./src/app/settings/alert-settings/alert-column-picker-modal/alert-column-picker-modal.component.html","./src/app/settings/alert-settings/alert-textarea/alert-textarea.component.html","./src/app/settings/alert-settings/alert-textarea/alert-textarea.component.ts","./src/app/settings/alert-settings/alert-detail/alert-detail.component.html","./src/app/settings/alert-settings/alert-detail/alert-detail.component.ts","./src/app/settings/alert-settings/alert-data-editor/alert-data-editor.component.html","./src/app/settings/alert-settings/alert-data-editor/alert-data-editor.component.ts","./src/app/settings/alert-settings/alert-settings.component.ts","./src/app/settings/alert-settings/alert/alert.component.html","./src/app/settings/alert-settings/alert/alert.component.ts","./src/app/settings/alert-settings/alert-settings.module.ts","./src/app/settings/engineer-skill-settings/engineer-skill-list/engineer-skill-list.component.html","./src/app/settings/engineer-skill-settings/engineer-skill-list/engineer-skill-list.component.ts","./src/app/settings/engineer-skill-settings/engineer-skill-settings.component.ts","./src/app/settings/models/engineer-skill.ts","./src/app/settings/models/engineer-skill-type.enum.ts","./src/app/settings/engineer-skill-settings/engineer-skill/engineer-skill.component.html","./src/app/settings/engineer-skill-settings/engineer-skill/engineer-skill.component.ts","./src/app/settings/engineer-skill-settings/engineer-skill-settings.module.ts","./src/app/settings/models/layout-template.model.ts","./src/app/settings/layout-template-settings/create-layout-template/create-layout-template.component.html","./src/app/settings/layout-template-settings/create-layout-template/create-layout-template.component.ts","./src/app/settings/layout-template-settings/layout-template-list/layout-template-list.component.html","./src/app/settings/layout-template-settings/layout-template-list/layout-template-list.component.ts","./src/app/settings/layout-template-settings/layout-template-settings.component.ts","./src/app/settings/layout-template-settings/layout-template/layout-template.component.ts","./src/app/settings/layout-template-settings/layout-template/layout-template.component.html","./src/app/settings/layout-template-settings/layout-template-settings.module.ts","./src/app/settings/service-contracts-settings/services/contract-type.service.ts","./src/app/settings/service-contracts-settings/contract-type-list/contract-type-list.component.html","./src/app/settings/service-contracts-settings/contract-type-list/contract-type-list.component.ts","./src/app/settings/service-contracts-settings/models/job-type-model.ts","./src/app/settings/service-contracts-settings/models/new-contract-type.model.ts","./src/app/settings/service-contracts-settings/new-contract-type/new-contract-type.component.html","./src/app/settings/service-contracts-settings/new-contract-type/new-contract-type.component.ts","./src/app/settings/service-contracts-settings/service-contracts-settings.module.ts","./src/app/settings/stock-settings/stock-settings.component.ts","./src/app/settings/stock-settings/stock-types/stock-types.component.html","./src/app/settings/stock-settings/stock-types/stock-types.component.ts","./src/app/shared/models/stock-type.model.ts","./src/app/settings/stock-settings/new-stock-type/new-stock-type.component.html","./src/app/settings/stock-settings/new-stock-type/new-stock-type.component.ts","./src/app/settings/stock-settings/adjustment-reason-list/adjustment-reason-list.component.html","./src/app/settings/stock-settings/adjustment-reason-list/adjustment-reason-list.component.ts","./src/app/settings/enums/account-class.enum.ts","./src/app/settings/models/adjustment-reason.ts","./src/app/settings/services/nominal-account.service.ts","./src/app/settings/stock-settings/adjustment-reason/adjustment-reason.component.html","./src/app/settings/stock-settings/adjustment-reason/adjustment-reason.component.ts","./src/app/settings/stock-settings/manufacturers-list/manufacturers-list.component.html","./src/app/settings/stock-settings/manufacturers-list/manufacturers-list.component.ts","./src/app/settings/stock-settings/manufacturer/manufacturer.component.html","./src/app/settings/stock-settings/manufacturer/manufacturer.component.ts","./src/app/settings/stock-settings/store/store.component.html","./src/app/settings/stock-settings/store/store.component.ts","./src/app/settings/stock-settings/store-list/store-list.component.html","./src/app/settings/stock-settings/store-list/store-list.component.ts","./src/app/settings/stock-settings/stock-settings.module.ts","./src/app/settings/settings.module.ts","./src/app/shared/services/ng1-auth-interceptor.service.ts","./src/app/shared/interceptor/auth.inertceptor.ts","./src/app/shared/services/router-link/router-link.service.ts","./src/app/shared/services/show-customer-name.service.ts","./src/app/stock/stock.module.ts","./src/app/app.module.ts","./src/app/contacts/contact-list/contact-list.component.html","./src/app/contacts/contact-list/contact-list.component.ts","./src/app/contacts/services/contact-upload.service.ts","./src/app/contacts/contact-upload/contact-upload.component.ts","./src/app/contacts/contact-upload/contact-upload.component.html","./src/app/dashboard/charts/chart-loader/base-chart.component.ts","./src/app/dashboard/charts/actual-labour-hours-v-service-budget-hours/month.enum.ts","./src/app/dashboard/charts/actual-labour-hours-v-service-budget-hours/actual-labour-hours-v-service-budget-hours.component.ts","./src/app/dashboard/charts/actual-labour-hours-v-service-budget-hours/actual-labour-hours-v-service-budget-hours.component.html","./src/app/dashboard/charts/average-purchase-order-lead-time/average-purchase-order-lead-time.component.ts","./src/app/dashboard/charts/average-purchase-order-lead-time/average-purchase-order-lead-time.component.html","./src/app/dashboard/charts/average-sales-order-lead-time/average-sales-order-lead-time.component.ts","./src/app/dashboard/charts/equipment-status/equipment-status.component.html","./src/app/dashboard/charts/average-sales-order-lead-time/average-sales-order-lead-time.component.html","./src/app/dashboard/charts/equipment-status/equipment-status.component.ts","./src/app/dashboard/charts/field-technician-job-for-month-engineer/field-technician-job-for-month-engineer.component.ts","./src/app/dashboard/charts/field-technician-job-for-month-engineer/field-technician-job-for-month-engineer.component.html","./src/app/dashboard/charts/field-technician-job-for-month/field-technician-job-for-month.component.ts","./src/app/dashboard/charts/field-technician-job-for-month/field-technician-job-for-month.component.html","./src/app/dashboard/charts/field-technician-productivity/field-technician-productivity.component.ts","./src/app/dashboard/charts/field-technician-productivity/field-technician-productivity.component.html","./src/app/dashboard/charts/field-technician-utilisation-by-date/field-technician-utilisation-by-date.component.ts","./src/app/dashboard/charts/field-technician-utilisation-by-date/field-technician-utilisation-by-date.component.html","./src/app/dashboard/charts/field-technician-utilisation/field-technician-utilisation.component.ts","./src/app/dashboard/charts/field-technician-utilisation/field-technician-utilisation.component.html","./src/app/dashboard/charts/first-time-fix-rate-by-period/first-time-fix-rate-by-period.component.ts","./src/app/dashboard/charts/first-time-fix-rate-by-period/first-time-fix-rate-by-period.component.html","./src/app/dashboard/charts/first-time-fix-rate/first-time-fix-rate.component.ts","./src/app/dashboard/charts/job-profitablity/job-profitablity.component.html","./src/app/dashboard/charts/first-time-fix-rate/first-time-fix-rate.component.html","./src/app/dashboard/charts/job-profitablity/job-profitablity.component.ts","./src/app/dashboard/charts/mean-time-to-repair-for-period-job-type-first-technician/mean-time-to-repair-for-period-job-type-first-technician.component.ts","./src/app/dashboard/charts/mean-time-to-repair-for-period-job-type-first-technician/mean-time-to-repair-for-period-job-type-first-technician.component.html","./src/app/dashboard/charts/mean-time-to-repair-by-technician-for-period-job-type/mean-time-to-repair-by-technician-for-period-job-type.component.ts","./src/app/dashboard/charts/mean-time-to-repair-by-technician-for-period-job-type/mean-time-to-repair-by-technician-for-period-job-type.component.html","./src/app/dashboard/charts/mean-time-to-repair-by-job-type-for-period/mean-time-to-repair-by-job-type-for-period.component.ts","./src/app/dashboard/charts/mean-time-to-repair-by-job-type-for-period/mean-time-to-repair-by-job-type-for-period.component.html","./src/app/dashboard/charts/mean-time-to-repair/mean-time-to-repair.component.ts","./src/app/dashboard/charts/mean-time-to-repair/mean-time-to-repair.component.html","./src/app/dashboard/charts/open-sales-orders/order-type.enum.ts","./src/app/dashboard/charts/open-purchase-orders/open-purchase-orders.component.html","./src/app/dashboard/charts/open-purchase-orders/open-purchase-orders.component.ts","./src/app/dashboard/charts/open-sales-orders/open-sales-orders.component.html","./src/app/dashboard/charts/open-sales-orders/open-sales-orders.component.ts","./src/app/dashboard/charts/allocated-jobs-for-job-type-status/allocated-jobs-for-job-type-status.component.ts","./src/app/dashboard/charts/allocated-jobs-for-job-type-status/allocated-jobs-for-job-type-status.component.html","./src/app/dashboard/charts/jobs-by-status-for-job-type/jobs-by-status-for-job-type.component.ts","./src/app/dashboard/charts/jobs-by-status-for-job-type/jobs-by-status-for-job-type.component.html","./src/app/dashboard/charts/outstanding-jobs-by-job-type/outstanding-jobs-by-job-type.component.ts","./src/app/dashboard/charts/outstanding-jobs-by-job-type/outstanding-jobs-by-job-type.component.html","./src/app/dashboard/charts/sales-funnel/sales-funnel.component.html","./src/app/dashboard/charts/sales-funnel/sales-funnel.component.ts","./src/app/dashboard/charts/service-contract-revenue/service-contract-revenue.component.html","./src/app/dashboard/charts/service-contract-revenue/service-contract-revenue.component.ts","./src/app/dashboard/charts/service-revenue-for-field-technical-period-job-type/service-revenue-for-field-technical-period-job-type.component.ts","./src/app/dashboard/charts/service-revenue-for-field-technical-period-job-type/service-revenue-for-field-technical-period-job-type.component.html","./src/app/dashboard/charts/service-revenue-for-field-technician-period/service-revenue-for-field-technician-period.component.ts","./src/app/dashboard/charts/service-revenue-for-field-technician-period/service-revenue-for-field-technician-period.component.html","./src/app/dashboard/charts/service-revenue-for-field-technician/service-revenue-for-field-technician.component.ts","./src/app/dashboard/charts/service-revenue-for-field-technician/service-revenue-for-field-technician.component.html","./src/app/dashboard/charts/service-revenue-per-field-technician/service-revenue-per-field-technician.component.ts","./src/app/dashboard/charts/service-revenue-per-field-technician/service-revenue-per-field-technician.component.html","./src/app/dashboard/charts/stock-outs/stock-outs.model.ts","./src/app/dashboard/charts/stock-outs/stock-outs.component.html","./src/app/dashboard/charts/stock-outs/stock-outs.component.ts","./src/app/dashboard/charts/total-service-revenue-for-period/total-service-revenue-for-period.component.ts","./src/app/dashboard/charts/total-service-revenue/total-service-revenue.component.html","./src/app/dashboard/charts/total-service-revenue-for-period/total-service-revenue-for-period.component.html","./src/app/dashboard/charts/total-service-revenue/total-service-revenue.component.ts","./src/app/dashboard/charts/value-of-invoices-raised/value-of-invoices-raised.component.html","./src/app/dashboard/charts/value-of-invoices-raised/value-of-invoices-raised.component.ts","./src/app/dashboard/charts/chart-loader/chart-loader.component.ts","./src/app/dashboard/charts/chart-loader/chart-loader.component.html","./src/app/dashboard/enums/widget-type.enum.ts","./src/app/dashboard/widgets/widget-loader/base-widget.component.ts","./src/app/dashboard/services/widget.service.ts","./src/app/dashboard/widgets/engineer-carousel/engineer-carousel.component.html","./src/app/dashboard/widgets/engineer-carousel/engineer-carousel.component.ts","./src/app/dashboard/widgets/tiles/tiles.component.html","./src/app/dashboard/widgets/tiles/tiles.component.ts","./src/app/dashboard/widgets/new-buttons/new-buttons.component.html","./src/app/dashboard/widgets/new-buttons/new-buttons.component.ts","./src/app/dashboard/widgets/start-here/start-here.component.html","./src/app/dashboard/widgets/start-here/start-here.component.ts","./src/app/dashboard/services/widget-loader.service.ts","./src/app/dashboard/widgets/widget-loader/widget-loader.component.html","./src/app/dashboard/widgets/widget-loader/widget-loader.component.ts","./src/app/dynamic-locale.service.ts","./src/app/portal/settings-portal-activity/settings-portal-activity.component.html","./src/app/portal/settings-portal-activity/settings-portal-activity.component.ts","./src/app/settings/services/accounts-communicator.service.ts","./src/app/settings/accounts-communicator-setup/accounts-communicator-setup.component.ts","./src/app/settings/accounts-communicator-setup/accounts-communicator-setup.component.html","./src/app/settings/models/invoice-options.enum.ts","./src/app/settings/accounts-create-invoices/accounts-create-invoices.component.html","./src/app/settings/accounts-create-invoices/accounts-create-invoices.component.ts","./src/app/settings/enums/audit-type.enum.ts","./src/app/settings/services/audit-log.service.ts","./src/app/settings/audit-log/audit-log.component.html","./src/app/settings/audit-log/audit-log.component.ts","./src/app/settings/services/billing.service.ts","./src/app/shared/pipes/billing-amount.pipe.ts","./src/app/settings/billing/history/history.component.html","./src/app/settings/billing/history/history.component.ts","./src/app/settings/services/licence-viewer.service.ts","./src/app/settings/billing/card-details/card-details.component.ts","./src/app/settings/billing/manage-subscription/manage-subscription.component.html","./src/app/settings/billing/card-details/card-details.component.html","./src/app/settings/billing/manage-subscription/manage-subscription.component.ts","./src/app/settings/crm-settings/services/competitor.service.ts","./src/app/settings/crm-settings/competitor-detail/competitor-detail.component.html","./src/app/settings/crm-settings/competitor-detail/competitor-detail.component.ts","./src/app/settings/crm-settings/competitors-list/competitors-list.component.html","./src/app/settings/crm-settings/competitors-list/competitors-list.component.ts","./src/app/settings/services/dirty-form.service.ts","./src/app/settings/crm-settings/services/job-titles.service.ts","./src/app/settings/crm-settings/job-titles/job-titles.component.html","./src/app/settings/crm-settings/job-titles/job-titles.component.ts","./src/app/settings/crm-settings/services/reminder-types.service.ts","./src/app/settings/crm-settings/reminder-types-detail/reminder-types-detail.component.html","./src/app/settings/crm-settings/reminder-types-detail/reminder-types-detail.component.ts","./src/app/settings/crm-settings/reminder-types-list/reminder-types-list.component.html","./src/app/settings/crm-settings/reminder-types-list/reminder-types-list.component.ts","./src/app/settings/crm-settings/services/sales-barrier.service.ts","./src/app/settings/crm-settings/sales-barrier-detail/sales-barrier-detail.component.html","./src/app/settings/crm-settings/sales-barrier-detail/sales-barrier-detail.component.ts","./src/app/settings/crm-settings/sales-barrier-list/sales-barrier-list.component.html","./src/app/settings/crm-settings/sales-barrier-list/sales-barrier-list.component.ts","./src/app/settings/crm-settings/services/sales-opportunity-status.service.ts","./src/app/sales-opportunity/models/sales-opportunity-status.model.ts","./src/app/settings/crm-settings/sales-opportunity-status-detail/sales-opportunity-status-detail.component.html","./src/app/settings/crm-settings/sales-opportunity-status-detail/sales-opportunity-status-detail.component.ts","./src/app/settings/crm-settings/sales-opportunity-status-list/sales-opportunity-status-list.component.html","./src/app/settings/crm-settings/sales-opportunity-status-list/sales-opportunity-status-list.component.ts","./src/app/settings/employee-engineer-skills/employee-engineer-skills.component.html","./src/app/settings/employee-engineer-skills/employee-engineer-skills.component.ts","./src/app/settings/employee-limits/employee-limits.component.ts","./src/app/settings/engineer-location/engineer-location.component.html","./src/app/settings/employee-limits/employee-limits.component.html","./src/app/settings/engineer-location/engineer-location.component.ts","./src/app/settings/engineer-type-settings/engineer-type-list/engineer-type-list.component.html","./src/app/settings/engineer-type-settings/engineer-type-list/engineer-type-list.component.ts","./src/app/settings/engineer-type-settings/engineer-type/engineer-type.component.html","./src/app/settings/engineer-type-settings/engineer-type/engineer-type.component.ts","./src/app/settings/equipment-settings/equipment-condition-list/equipment-condition-list.component.html","./src/app/settings/equipment-settings/equipment-condition-list/equipment-condition-list.component.ts","./src/app/settings/equipment-settings/equipment-condition/equipment-condition.component.html","./src/app/settings/equipment-settings/equipment-condition/equipment-condition.component.ts","./src/app/settings/equipment-settings/make-model-skills/make-model-skills.component.html","./src/app/settings/equipment-settings/make-model-skills/make-model-skills.component.ts","./src/app/settings/models/makemodel.ts","./src/app/settings/equipment-settings/enum/make-model-option-type.enum.ts","./src/app/settings/equipment-settings/view-models/make-model-options.viewmodel.ts","./src/app/settings/equipment-settings/make-model-pricing/make-model-pricing.component.html","./src/app/settings/equipment-settings/make-model-pricing/make-model-pricing.component.ts","./src/app/settings/equipment-settings/view-models/make-model-option-parts.viewmodel.ts","./src/app/settings/equipment-settings/view-models/make-model-option-material.viewmodel.ts","./src/app/settings/equipment-settings/view-models/make-model-option.viewmodel.ts","./src/app/settings/equipment-settings/make-model-option-detail/make-model-option-detail.component.ts","./src/app/settings/equipment-settings/make-model-option-parts/make-model-option-parts.component.html","./src/app/settings/equipment-settings/make-model-option-detail/make-model-option-detail.component.html","./src/app/settings/equipment-settings/make-model-option-parts/make-model-option-parts.component.ts","./src/app/settings/equipment-settings/make-model-option-materials/make-model-option-materials.component.html","./src/app/settings/equipment-settings/make-model-option-materials/make-model-option-materials.component.ts","./src/app/settings/equipment-settings/make-model-option/make-model-option.component.html","./src/app/settings/equipment-settings/make-model-option/make-model-option.component.ts","./src/app/settings/equipment-settings/make-model-options-drawer/make-model-options-drawer.component.html","./src/app/settings/equipment-settings/make-model-options-drawer/make-model-options-drawer.component.ts","./src/app/settings/equipment-settings/make-model-options/make-model-options.component.html","./src/app/settings/equipment-settings/make-model-options/make-model-options.component.ts","./src/app/settings/equipment-settings/make-model/make-model.component.html","./src/app/settings/equipment-settings/make-model/make-model.component.ts","./src/app/settings/services/make-model-service-upload.service.ts","./src/app/settings/equipment-settings/service-schedule-upload/service-schedule-upload.component.ts","./src/app/settings/feedback-survey-list/feedback-survey-list.component.html","./src/app/settings/equipment-settings/service-schedule-upload/service-schedule-upload.component.html","./src/app/settings/feedback-survey-list/feedback-survey-list.component.ts","./src/app/settings/fgas-settings/cylinder-types/cylinder-types.component.html","./src/app/settings/fgas-settings/cylinder-types/cylinder-types.component.ts","./src/app/shared/models/cylinder-type.model.ts","./src/app/settings/fgas-settings/new-cylinder-type/new-cylinder-type.component.html","./src/app/settings/fgas-settings/new-cylinder-type/new-cylinder-type.component.ts","./src/app/settings/fgas-settings/refrigerant-type-purchasing/refrigerant-type-purchasing.component.html","./src/app/settings/fgas-settings/refrigerant-type-purchasing/refrigerant-type-purchasing.component.ts","./src/app/settings/models/refrigerant-type-accounts.ts","./src/app/settings/fgas-settings/refrigerant-type-accounts/refrigerant-type-accounts.component.html","./src/app/settings/fgas-settings/refrigerant-type-accounts/refrigerant-type-accounts.component.ts","./src/app/settings/fgas-settings/refrigerant-type-detail/refrigerant-type-detail.component.html","./src/app/settings/fgas-settings/refrigerant-type-detail/refrigerant-type-detail.component.ts","./src/app/settings/fgas-settings/refrigerant-type-list/refrigerant-type-list.component.html","./src/app/settings/fgas-settings/refrigerant-type-list/refrigerant-type-list.component.ts","./src/app/settings/services/inspection-reasons-not-done-service.service.ts","./src/app/settings/inspection-reason-not-done/inspection-reason-not-done.component.html","./src/app/settings/inspection-reason-not-done/inspection-reason-not-done.component.ts","./src/app/settings/inspection-reasons-not-done-list/inspection-reasons-not-done-list.component.html","./src/app/settings/inspection-reasons-not-done-list/inspection-reasons-not-done-list.component.ts","./src/app/settings/inspection-template-list/inspection-template-list.component.html","./src/app/settings/inspection-template-list/inspection-template-list.component.ts","./src/app/settings/enums/note-type.enum.ts","./src/app/settings/models/bulkoptions.ts","./src/app/settings/inspections-designer/inspections-designer.component.html","./src/app/settings/inspections-designer/inspections-designer.component.ts","./src/app/settings/invalid-accounts/invalid-accounts.component.html","./src/app/settings/invalid-accounts/invalid-accounts.component.ts","./src/app/settings/job-settings/services/activity-types.service.ts","./src/app/settings/job-settings/models/activity-type-item.model.ts","./src/app/settings/job-settings/activity-types-detail/activity-types-detail.component.html","./src/app/settings/job-settings/activity-types-detail/activity-types-detail.component.ts","./src/app/settings/job-settings/activity-types-list/activity-types-list.component.html","./src/app/settings/job-settings/activity-types-list/activity-types-list.component.ts","./src/app/settings/job-settings/models/job-type-detail.model.ts","./src/app/settings/job-settings/job-types-detail/job-types-detail.service.ts","./src/app/settings/models/jobtype-template-item.ts","./src/app/settings/jobtype-inspections-list/jobtype-inspections-list.component.html","./src/app/settings/jobtype-inspections-list/jobtype-inspections-list.component.ts","./src/app/settings/job-settings/job-types-detail/job-types-detail-general/job-types-detail-general.component.html","./src/app/settings/job-settings/job-types-detail/job-types-detail-general/job-types-detail-general.component.ts","./src/app/settings/job-settings/job-types-detail/job-types-detail-charges/job-types-detail-charges.component.html","./src/app/settings/job-settings/job-types-detail/job-types-detail-charges/job-types-detail-charges.component.ts","./src/app/settings/job-settings/job-types-detail/job-types-detail-nominal-account/job-types-detail-nominal-account.component.html","./src/app/settings/job-settings/job-types-detail/job-types-detail-nominal-account/job-types-detail-nominal-account.component.ts","./src/app/settings/job-settings/job-types-detail/job-types-detail-materials/job-types-detail-materials.component.html","./src/app/settings/job-settings/job-types-detail/job-types-detail-materials/job-types-detail-materials.component.ts","./src/app/settings/job-settings/job-types-detail/job-types-detail-sections/job-types-detail-sections.component.html","./src/app/settings/job-settings/job-types-detail/job-types-detail-sections/job-types-detail-sections.component.ts","./src/app/settings/job-settings/job-types-detail/job-types-detail.component.html","./src/app/settings/job-settings/job-types-detail/job-types-detail.component.ts","./src/app/settings/job-settings/job-types-list/job-types-list.component.html","./src/app/settings/job-settings/job-types-list/job-types-list.component.ts","./src/app/settings/job-settings/services/job-groups.service.ts","./src/app/settings/job-settings/job-groups-list/job-groups-list.component.html","./src/app/settings/job-settings/job-groups-list/job-groups-list.component.ts","./src/app/settings/job-settings/job-groups-detail/job-groups-detail.component.html","./src/app/settings/job-settings/job-groups-detail/job-groups-detail.component.ts","./src/app/settings/job-settings/models/material-type.model.ts","./src/app/settings/job-settings/material-types-detail/material-types-detail.component.html","./src/app/settings/job-settings/material-types-detail/material-types-detail.component.ts","./src/app/settings/job-settings/models/material-type-list.model.ts","./src/app/settings/job-settings/material-types-list/material-types-list.component.html","./src/app/settings/job-settings/material-types-list/material-types-list.component.ts","./src/app/settings/services/mailchimp.service.ts","./src/app/settings/mail-chimp-link/mail-chimp-link.component.html","./src/app/settings/mail-chimp-link/mail-chimp-link.component.ts","./src/app/settings/planned-jobs-report/planned-jobs-report.component.html","./src/app/settings/planned-jobs-report/planned-jobs-report.component.ts","./src/app/settings/planner-card/planner-card.component.html","./src/app/settings/planner-card/planner-card.component.ts","./src/app/shared/pipes/enums/price-calc-type-enum.ts","./src/app/shared/pipes/price-calc-type.pipe.ts","./src/app/settings/models/price-list.ts","./src/app/settings/services/price-list.service.ts","./src/app/settings/price-list/price-list-materials/price-list-materials.component.html","./src/app/settings/price-list/price-list-materials/price-list-materials.component.ts","./src/app/settings/price-list/select-stock-type-dialogue/select-stock-type-dialogue.component.html","./src/app/settings/price-list/select-stock-type-dialogue/select-stock-type-dialogue.component.ts","./src/app/settings/price-list/price-list-detail-parts-tab/price-list-detail-parts-tab.component.html","./src/app/settings/price-list/price-list-detail-parts-tab/price-list-detail-parts-tab.component.ts","./src/app/shared/services/price-list/price-list-customer.service.ts","./src/app/settings/price-list-customers/price-list-customers.component.html","./src/app/settings/price-list-customers/price-list-customers.component.ts","./src/app/settings/price-list/price-list-detail-refrigerants-tab/price-list-detail-refrigerants-tab.component.html","./src/app/settings/price-list/price-list-detail-refrigerants-tab/price-list-detail-refrigerants-tab.component.ts","./src/app/settings/price-list/price-list-equipment-tab/price-list-equipment-tab.component.html","./src/app/settings/price-list/price-list-equipment-tab/price-list-equipment-tab.component.ts","./src/app/settings/price-list/price-list-detail/price-list-detail.component.html","./src/app/settings/price-list/price-list-detail/price-list-detail.component.ts","./src/app/settings/price-list/price-list.component.html","./src/app/settings/price-list/price-list.component.ts","./src/app/settings/services/security-role.service.ts","./src/app/settings/security-settings/security-roles-detail/security-roles-detail.component.html","./src/app/settings/security-settings/security-roles-detail/security-roles-detail.component.ts","./src/app/settings/enums/role-type.enum.ts","./src/app/settings/pipes/role-type.pipe.ts","./src/app/settings/security-settings/security-roles-list/security-roles-list.component.html","./src/app/settings/security-settings/security-roles-list/security-roles-list.component.ts","./src/app/settings/pipes/modules.pipe.ts","./src/app/settings/security/licence-viewer/licence-viewer.component.html","./src/app/settings/security/licence-viewer/licence-viewer.component.ts","./src/app/settings/services/payments.service.ts","./src/app/settings/survey-designer/survey-designer.component.html","./src/app/settings/survey-designer/survey-designer.component.ts","./src/app/settings/user-reference-options-list/user-reference-options-list.component.ts","./src/app/settings/user-reference-options-list/user-reference-options-list.component.html","./src/app/shared/services/ng2-http-client.service.ts","./src/app/shared/services/ng2translate/ng2-translate-downgrade.service.ts","./src/app/settings/employees/employees-list/employees-list.component.html","./src/app/settings/employees/employees-list/employees-list.component.ts","./src/app/settings/project-settings/services/project-type.service.ts","./src/app/settings/project-settings/project-types-list/project-types-list.component.html","./src/app/settings/project-settings/project-types-list/project-types-list.component.ts","./src/app/settings/project-settings/models/project-type.ts","./src/app/shared/services/nominal-code.service.ts","./src/app/settings/project-settings/project-type-detail/project-type-detail.component.html","./src/app/settings/project-settings/project-type-detail/project-type-detail.component.ts","./src/app/settings/project-settings/services/project-status.service.ts","./src/app/settings/project-settings/project-statuses-list/project-statuses-list.component.html","./src/app/settings/project-settings/project-statuses-list/project-statuses-list.component.ts","./src/app/settings/project-settings/models/project-status.ts","./src/app/settings/project-settings/project-status-detail/project-status-detail.component.html","./src/app/settings/project-settings/project-status-detail/project-status-detail.component.ts","./src/app/settings/job-settings/priority-list/priority-list.component.html","./src/app/settings/job-settings/priority-list/priority-list.component.ts","./src/app/settings/job-settings/models/priority.model.ts","./src/app/settings/job-settings/priority-detail/priority-detail.component.html","./src/app/settings/job-settings/priority-detail/priority-detail.component.ts","./src/main.ts","./src/app/shared/services/walkthough/intro.js","./node_modules/moment/locale/ sync ^\\.\\/.*$"],"sourcesContent":["// eslint-disable-next-line id-blacklist\r\ninterface String {\r\n isEmpty();\r\n Equals(v);\r\n}\r\n\r\nString.prototype.isEmpty = function() {\r\n return !(!!this.trim().length);\r\n};\r\n\r\nString.prototype.Equals = function(v) {\r\n return this.toString() === v;\r\n};\r\n","import { InjectionToken } from \"@angular/core\";\r\n\r\nexport const APP_CONFIG = new InjectionToken(\"AppConfig\");\r\n\r\nexport interface IApiLocation {\r\n ServiceSight: string;\r\n ServiceSightReports: string;\r\n ServiceSightOData: string;\r\n Inspections: string;\r\n InspectionsOData: string;\r\n Quotes: string;\r\n Quotes2: string;\r\n QuotesOData: string;\r\n Consumers: string;\r\n ConsumersOData: string;\r\n Equipment: string;\r\n EquipmentOData: string;\r\n RecurringJob: string;\r\n RecurringJobOData: string;\r\n ServiceContracts: string;\r\n ServiceContractsOData: string;\r\n Stock: string;\r\n StockOData: string;\r\n PurchaseOrders: string;\r\n PurchaseOrdersOData: string;\r\n SalesOrders: string;\r\n SalesOrdersOData: string;\r\n SalesOpportunity: string;\r\n SalesOpportunityOData: string;\r\n FGas: string;\r\n FGasOData: string;\r\n TemplateDesigner: string;\r\n GateKeeper: string;\r\n};\r\n\r\nexport interface IAppConfig {\r\n version: string;\r\n apiLocations: IApiLocation;\r\n stripe: {\r\n PublicKey: string;\r\n };\r\n squareAppId?: string;\r\n helpSite: string;\r\n elmahio: {\r\n apiKey: string;\r\n logId: string;\r\n };\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { BehaviorSubject, Observable, of, Subject, switchMap } from \"rxjs\";\r\nimport { ActivityTypeModel } from \"../models/activity-type.model\";\r\nimport { ActivityModel } from \"../models/activity.model\";\r\nimport { IAppConfig, APP_CONFIG } from \"../models/app-config.model\";\r\n\r\ninterface ResponseModel {\r\n ModelCollection: ActivityTypeModel[];\r\n}\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class ActivityService {\r\n public activityChanged = new Subject();\r\n public activitiesDataSource = new BehaviorSubject([]);\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private config: IAppConfig) { }\r\n\r\n public ActivityChanged(): void {\r\n this.activityChanged.next(true);\r\n }\r\n\r\n public ActivitiesChanged(activities: ActivityModel[]): void {\r\n this.activitiesDataSource.next(activities);\r\n }\r\n\r\n public GetJobActivityTypes(): Observable {\r\n return this.http.get(`${ this.config.apiLocations.ServiceSight }ActivityType/GetAllJobActivitiesAsync`)\r\n .pipe(switchMap(d => of(d.ModelCollection)));\r\n }\r\n}\r\n","\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n {{ activity.ActivityId }}\r\n
\r\n
\r\n {{ typesDictionary[activity.ActivityType] }}\r\n
\r\n
\r\n {{ activity.Description }}\r\n
\r\n
\r\n
\r\n \r\n
\r\n","import { Component, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\r\nimport { ActivityModel } from \"../../models/activity.model\";\r\nimport { ActivityService } from \"../../services/activity.service\";\r\n\r\n@Component({\r\n selector: \"lib-activities-select-box\",\r\n templateUrl: \"./activities-select-box.component.html\",\r\n styleUrls: [\"./activities-select-box.component.scss\"]\r\n})\r\nexport class ActivitiesSelectBoxComponent implements OnInit {\r\n @Input() showTitle: boolean = true;\r\n @Input() inGrid: boolean = false;\r\n @Input() showActivities: boolean = false;\r\n @Input() selectedActivityId: number;\r\n @Output() activitySelectedEvent: EventEmitter = new EventEmitter();\r\n\r\n public typesDictionary: { [key: number]: string } = {};\r\n public activities: ActivityModel[] = [];\r\n\r\n constructor(private activityService: ActivityService) {\r\n this.GetText = this.GetText.bind(this);\r\n this.GetDropDownWidth = this.GetDropDownWidth.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.activityService.GetJobActivityTypes().subscribe(types => {\r\n this.typesDictionary = Object.assign({}, ...types.map((x) => ({[x.ActivityTypeID]: x.ActivityName})));\r\n });\r\n\r\n this.activityService.activitiesDataSource.subscribe(data => {\r\n this.activities = data;\r\n });\r\n }\r\n\r\n public Select(): void {\r\n this.activitySelectedEvent.emit(this.selectedActivityId);\r\n }\r\n\r\n public GetText(data): string {\r\n if (data) {\r\n return `${data.ActivityId} ${this.typesDictionary[data.ActivityType]} ${data.Description}`;\r\n }\r\n return \"\";\r\n }\r\n\r\n public GetDropDownWidth(): string {\r\n return this.inGrid ? \"400\" : \"auto\";\r\n }\r\n}\r\n","export enum PhraseBookType {\r\n Message = 1,\r\n JobVisitReport = 2,\r\n Inspection = 3,\r\n Activity = 4,\r\n SalesQuote = 5,\r\n FurtherWorkDescription = 6,\r\n JobNotes = 7,\r\n PurchaseOrders = 8,\r\n FGas = 9\r\n}\r\n","export enum EquipJobListSource {\r\n EquipmentTab = 0,\r\n InstallTab = 1\r\n}\r\n","export enum EquipmentStatus {\r\n Returned = 35,\r\n Stock = 200,\r\n ForHire = 400,\r\n OnHire = 600,\r\n Sold = 800,\r\n Rental = 850,\r\n CustomersOwn = 900,\r\n Retired = 950\r\n}\r\n","export enum JobTabEnum {\r\n AddSections = -1,\r\n Detail = 1,\r\n Equipment = 2,\r\n Install = 3,\r\n Labour = 4,\r\n Inspections = 5,\r\n Activities = 6,\r\n Parts = 7,\r\n Materials = 8,\r\n Refrigeration = 9,\r\n Attributes = 10,\r\n Invoicing = 11,\r\n Files = 12,\r\n Comments = 13\r\n}\r\n","export enum Module {\r\n Portal = 1,\r\n AccountsLink = 2,\r\n Equipment = 3,\r\n RecurringJobs = 4,\r\n ServiceContract = 5,\r\n Stock = 6,\r\n PurchaseOrders = 7,\r\n SalesOrders = 8,\r\n PowerBI = 9,\r\n Pro = 10,\r\n SalesOpportunity = 11,\r\n SalesCampaigns = 12,\r\n PhotoEditing = 13,\r\n Timesheets = 14,\r\n FGas = 15,\r\n Billing = 16,\r\n LayoutDesigner = 17,\r\n CustomerFeedback = 18,\r\n GasSafe = 19,\r\n AdvancedQuotes = 20,\r\n CFTS = 21,\r\n Sfg20 = 22,\r\n Projects = 23\r\n}\r\n","export enum SettingId {\r\n WorkingDayStartsAt = 48,\r\n WorkingDayEndsAt = 49,\r\n SvcScheduleFromDueDate = 79,\r\n JobVisitDefaultDuration = 184,\r\n PIAllowManualMatching = 216,\r\n ServicingUseServiceGroups = 320,\r\n ServicingConsolidateServiceJobs = 321,\r\n CustomerManagingAgents = 324,\r\n QuoteDefaultJobType = 527,\r\n PortalUrl = 531,\r\n ServicingOverrideAllowance = 539,\r\n ServicingDefaultServiceIntervalUnits = 540,\r\n ServicingDefaultServiceIntervalValue = 541,\r\n InspectionsTemplate = 564,\r\n JobCreationWizard = 585,\r\n MailchimpUserServer = 588,\r\n UseAdditionalStores = 590,\r\n AllowQuotedJobPriceVariation = 594,\r\n IncludeInspectionPhotosAsEmailAttachments = 595,\r\n ReverseChargeVat = 598,\r\n ShowSupplierPartNumberOnGrn = 600,\r\n MembershipNumber = 608,\r\n FGasRefrigerantUnits = 609,\r\n EquipmentSystems = 611,\r\n UseEORINumbers = 586,\r\n ShowVATOnPO = 614,\r\n ShowVATOnQuotes = 618,\r\n AllowInspectionImportExport = 624,\r\n QuotesVersion = 626,\r\n AllowChangeGasType = 629,\r\n DefaultEquipmentCondition = 635,\r\n DisplayEquipmentConditionsOnWebPortal = 638,\r\n EquipmentConditionToUseAsOutOfAction = 639,\r\n SfgCustomerId = 640,\r\n SfgCustomerSecret = 641\r\n}\r\n","export class NewQuoteEquipment {\r\n public SelectedEquipmentIds: number[];\r\n public WorkRequired: string;\r\n}\r\n","import DataSource from \"devextreme/data/data_source\";\r\n\r\nexport class PageableDatastoreService {\r\n private datasource: DataSource = null;\r\n private pageIndex: number = 0;\r\n private isLastPage: boolean = false;\r\n private itemIndex: number = 0;\r\n private hasLoaded: boolean = false;\r\n\r\n constructor(private readonly key: string) { }\r\n\r\n public GetDataSource(resetDatasource: boolean = false): DataSource {\r\n if (this.datasource === null || resetDatasource) {\r\n this.datasource = this.GetDataSourceObject();\r\n }\r\n\r\n return this.datasource;\r\n }\r\n\r\n public async SetCurrentItem(currentId: number): Promise {\r\n this.hasLoaded = false;\r\n const datasource = this.GetDataSource();\r\n this.pageIndex = datasource.pageIndex();\r\n\r\n let items = datasource.items();\r\n let index = items.findIndex(x => x[this.key].toString() === currentId.toString());\r\n\r\n let pageIndex = 0;\r\n while (index === -1) {\r\n this.pageIndex = pageIndex;\r\n datasource.pageIndex(pageIndex++);\r\n await datasource.load();\r\n items = datasource.items();\r\n index = items.findIndex(x => x[this.key].toString() === currentId.toString());\r\n }\r\n\r\n this.itemIndex = index;\r\n this.hasLoaded = true;\r\n this.isLastPage = datasource.isLastPage();\r\n }\r\n\r\n public IsPreviousAvailable(): boolean {\r\n this.validateCall();\r\n\r\n if (this.pageIndex > 0) {\r\n return true;\r\n }\r\n\r\n return this.itemIndex > 0;\r\n }\r\n\r\n public IsNextAvailable(): boolean {\r\n this.validateCall();\r\n\r\n if (!this.isLastPage) {\r\n return true;\r\n }\r\n\r\n const items = this.datasource.items();\r\n return this.itemIndex < items.length - 1;\r\n }\r\n\r\n public GetNextId(): Promise {\r\n return this.GetDirectionalId(\"up\");\r\n }\r\n\r\n public GetPreviousId(): Promise {\r\n return this.GetDirectionalId(\"down\");\r\n }\r\n\r\n private validateCall(): void {\r\n if (!this.hasLoaded) {\r\n throw new Error(\"You have to wait for setup to finish loading before calling\");\r\n }\r\n }\r\n\r\n private async GetDirectionalId(direction: string): Promise {\r\n this.validateCall();\r\n this.hasLoaded = false;\r\n\r\n let items = this.datasource.items();\r\n let index = this.itemIndex;\r\n\r\n const limit = direction === \"up\" ? items.length - 1 : 0;\r\n\r\n if (index === limit) {\r\n const pageChange = direction === \"up\" ? 1 : -1;\r\n this.datasource.pageIndex(this.datasource.pageIndex() + pageChange);\r\n await this.datasource.load();\r\n items = this.datasource.items();\r\n index = direction === \"up\" ? 0 : items.length - 1;\r\n } else {\r\n index = direction === \"up\" ? index + 1 : index - 1;\r\n }\r\n\r\n return items[index][this.key];\r\n }\r\n\r\n protected GetDataSourceObject(): DataSource {\r\n throw new Error(\"Not implemented\");\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable } from \"rxjs\";\r\nimport { map } from \"rxjs/operators\";\r\nimport { APP_CONFIG, IAppConfig } from \"../../models/app-config.model\";\r\nimport { Attributes } from \"../../models/attributes.model\";\r\nimport { ButtonCreatePermissions } from \"../../models/buttons.create.permission\";\r\nimport { CustomerLocatioModel } from \"../../models/customer-location.model\";\r\nimport { Equipment } from \"../../models/equipment/models/equipment\";\r\nimport { EquipmentMeterReading } from \"../../models/equipment/models/equipment-meter-reading\";\r\nimport { JobEquipmentFlatChargeModel } from \"../../models/equipment/models/job-equipment-flat-charge.model\";\r\nimport { JobEquipmentMoveToJobModel } from \"../../models/equipment/models/job-equipment-move-to-job.model\";\r\nimport { JobEquipmentStatusModel } from \"../../models/equipment/models/job-equipment-status.model\";\r\nimport { JobEquipmentVisitModel } from \"../../models/equipment/models/job-equipment-visit.model\";\r\nimport { JobMakeModelRemoveModel } from \"../../models/equipment/models/job-make-model-remove.model\";\r\nimport { JobMakeModelSaveModel } from \"../../models/equipment/models/job-make-model-save.model\";\r\nimport { JobMakeModelUpdateModel } from \"../../models/equipment/models/job-make-model-update.model\";\r\nimport { JobMakeModelWorkRequiredModel } from \"../../models/equipment/models/job-make-model-work-required.model\";\r\nimport { WorkRequiredModel } from \"../../models/equipment/models/work-required-model\";\r\nimport { EquipmentDetails } from \"../../models/equpiment-details.model\";\r\nimport { IProteanResponse } from \"../../models/iprotean-response.model\";\r\nimport { JobEquipmentUpdateModel } from \"../../models/job-equipment-update.model\";\r\nimport { JobVisitListItem } from \"../../models/job-visit\";\r\nimport { MakeModel } from \"../../models/make-model.model\";\r\nimport { NewEquipment } from \"../../models/new-equipment.model\";\r\nimport { NewJobEquipment } from \"../../models/new-job-equipment\";\r\nimport { NewQuoteEquipment } from \"../../models/new-quote-equipment.model\";\r\nimport { IODataService } from \"../interfaces/iodata.service\";\r\nimport { PageableDatastoreService } from \"../pageable-datastore.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class EquipmentDataService extends PageableDatastoreService {\r\n\r\n private static readonly odataKey = \"EquipId\";\r\n\r\n private readonly equipmentODataUrl = `${this.config.apiLocations.EquipmentOData}EquipmentOData`;\r\n\r\n constructor(\r\n protected http: HttpClient,\r\n @Inject(\"ODataService\") protected odataService: IODataService,\r\n @Inject(APP_CONFIG) protected config: IAppConfig) {\r\n super(EquipmentDataService.odataKey);\r\n }\r\n\r\n public GetJobListDataSource(customerId: number): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.ServiceSightOData}JobOD`,\r\n key: \"JobID\",\r\n keyType: \"String\",\r\n queryStringParams: {\r\n customerId\r\n }\r\n });\r\n }\r\n\r\n public GetEquipmentRefrigerantDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.EquipmentOData}EquipmentRefrigerantOData`,\r\n key: \"EquipId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public MoveEquipmentToJob(model: JobEquipmentMoveToJobModel): Observable {\r\n return this.http.put(`${this.config.apiLocations.ServiceSight}JobEquipment/MoveEquipmentToJob`, model);\r\n }\r\n\r\n public UpdateEquipmentStatus(model: JobEquipmentStatusModel): Observable {\r\n return this.http.put(`${this.config.apiLocations.ServiceSight}JobEquipment/UpdateEquipmentStatus`, model);\r\n }\r\n\r\n public RemoveJobEquipment(equipmentItemIds: number[]): Observable {\r\n return this.http.request(\"delete\", `${this.config.apiLocations.ServiceSight}JobEquipment/DeleteJobEquipmentItems`, { body: equipmentItemIds });\r\n }\r\n\r\n public RemoveJobMakeModel(model: JobMakeModelRemoveModel): Observable {\r\n return this.http.request(\"delete\", `${this.config.apiLocations.ServiceSight}JobEquipment/DeleteJobMakeModelItems`, { body: model });\r\n }\r\n\r\n public RemoveQuoteEquipment(quoteId: number, revisionId: number, equipmentItemIds: number[]): Observable {\r\n return this.http.request(\"delete\", `${this.config.apiLocations.Quotes}Equipment/${quoteId}/${revisionId}`, { body: equipmentItemIds });\r\n }\r\n\r\n public UpdateQuoteWorkRequired(model: WorkRequiredModel): Observable {\r\n return this.http.put(`${this.config.apiLocations.Quotes}Equipment/WorkRequired`, model);\r\n }\r\n\r\n public UpdateWorkRequired(model: WorkRequiredModel): Observable {\r\n return this.http.put(`${this.config.apiLocations.ServiceSight}JobEquipment/WorkRequired`, model);\r\n }\r\n\r\n public UpdateJobMakeModelWorkRequired(model: JobMakeModelWorkRequiredModel): Observable {\r\n return this.http.put(`${this.config.apiLocations.ServiceSight}JobEquipment/JobMakeModelWorkRequired`, model);\r\n }\r\n\r\n public UpdateFlatCharge(model: JobEquipmentFlatChargeModel): Observable {\r\n return this.http.put(`${this.config.apiLocations.ServiceSight}JobEquipment/FlatCharge`, model);\r\n }\r\n\r\n public UpdateJobEquipment(model: JobEquipmentUpdateModel): Observable {\r\n return this.http.put(`${this.config.apiLocations.ServiceSight}JobEquipment/JobEquipment`, model);\r\n }\r\n\r\n public UpdateMakeModelLine(model: JobMakeModelUpdateModel): Observable {\r\n return this.http.put(`${this.config.apiLocations.ServiceSight}JobEquipment/UpdateMakeModelLine`, model);\r\n }\r\n\r\n public UpdateWorkReport(model: WorkRequiredModel): Observable {\r\n return this.http.put(`${this.config.apiLocations.ServiceSight}JobEquipment/WorkReport`, model);\r\n }\r\n\r\n public GetJobEquipment(jobId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}JobEquipment/GetJobEquipmentByJobId?jobId=${jobId}`);\r\n }\r\n\r\n public GetEquipmentForJob(jobId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}JobEquipment/GetJobEquipmentByJobId?jobId=${jobId}`);\r\n }\r\n\r\n public GetInstalledEquipmentForJob(jobId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}JobEquipment/GetJobInstalledEquipmentByJobId?jobId=${jobId}`);\r\n }\r\n\r\n public GetJobMakeModelInstall(jobId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}JobEquipment/GetJobMakeModelInstall?jobId=${jobId}`);\r\n }\r\n\r\n public SaveJobMakeModel(jobId: number, model: JobMakeModelSaveModel[]): Observable {\r\n return this.http.post(`${this.config.apiLocations.ServiceSight}JobEquipment/SaveJobMakeModel`, {jobId, makeModels: model});\r\n }\r\n\r\n public GetQuotebEquipment(quoteId: number, revisionId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.Quotes}Equipment/${quoteId}/${revisionId}`);\r\n }\r\n\r\n public GetJobVisit(jobId: number): Observable {\r\n return this.http.get(this.config.apiLocations.ServiceSight + \"JobVisit/GetJobVisits?jobId=\" + jobId);\r\n }\r\n\r\n public GetMeterReading(equipmentId: number): Observable {\r\n return this.http.get(this.config.apiLocations.Equipment + \"Equipment/\" + equipmentId + \"/Meter\");\r\n }\r\n\r\n public GetEquipmentInStockDataSource(makeModelId: number): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.EquipmentOData}EquipmentInStockOData`,\r\n key: \"EquipId\",\r\n keyType: \"Int32\",\r\n queryStringParams: {\r\n makeModelId\r\n }\r\n });\r\n }\r\n\r\n protected GetDataSourceObject(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: this.equipmentODataUrl,\r\n key: EquipmentDataService.odataKey,\r\n keyType: \"Int32\",\r\n paging: true,\r\n pageSize: 50\r\n });\r\n }\r\n\r\n public GetEquipmentDataSource(enablePaging: boolean = false): DataSource {\r\n return this.odataService.GetDataSource({\r\n url : this.equipmentODataUrl,\r\n key: EquipmentDataService.odataKey,\r\n keyType: \"Int32\",\r\n paging: enablePaging,\r\n pageSize: enablePaging ? 50 : undefined\r\n });\r\n }\r\n\r\n public GetEquipmentDataStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: this.equipmentODataUrl,\r\n key: EquipmentDataService.odataKey,\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetJobDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url : this.config.apiLocations.ServiceSightOData + \"JobEquipmentOD\",\r\n key: \"JobEquipId\",\r\n keyType: \"Int32\",\r\n paging: true,\r\n pageSize: 50\r\n });\r\n }\r\n\r\n public GetEquipmentStockSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.EquipmentOData}EquipmentStockOData`,\r\n key: \"MakeModelId\",\r\n keyType: \"Int32\",\r\n paging: true,\r\n pageSize: 50\r\n });\r\n }\r\n\r\n public GetViewPermission(actionName: string): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Dashboard/GetWidgetViewPermission?securityActionName=${actionName}`)\r\n .pipe(map((res: any) => res.IsAllowedView));\r\n }\r\n\r\n\r\n public GetButtonsCreatePermissions(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Dashboard/GetButtonsCreatePermissions`);\r\n }\r\n\r\n public GetDetails(equipmentId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.Equipment}Equipment/${equipmentId}`);\r\n }\r\n\r\n public GetContactDetails(siteId: number, locationId: number, contactId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Customer/GetSiteDetails?siteId=${siteId}&locationId=${locationId}&contactId=${contactId}`);\r\n }\r\n\r\n public GetMakeModel(makeModelId: number) {\r\n return this.http.get(`${this.config.apiLocations.Equipment}MakeModel/${makeModelId}`);\r\n }\r\n\r\n public GetAttributes(equipmentId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.Equipment}Equipment/${equipmentId}/Attributes`);\r\n }\r\n\r\n public GetLocationsDataStore(customerId: number): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.config.apiLocations.ServiceSightOData}CustomerLocationOD`,\r\n key: \"LocationId\",\r\n keyType: \"Int32\",\r\n queryStringParams: {\r\n customerId\r\n }\r\n });\r\n }\r\n\r\n public GetCustomerLocationsDataStore(customerId: number): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.config.apiLocations.ServiceSightOData}LocationOD`,\r\n key: [\"LocationId\", \"CustomerID\"],\r\n keyType: {\r\n LocationId: \"Int32\",\r\n CustomerID: \"Int32\"\r\n },\r\n queryStringParams: {\r\n customerId\r\n }\r\n });\r\n }\r\n\r\n public AddEquipmentToJob(model: NewJobEquipment): Observable {\r\n return this.http.post(`${this.config.apiLocations.ServiceSight}Job/AddEquipmentToJob`, model);\r\n }\r\n\r\n public AddEquipmentToQuoteJob(quoteId: number, revisionId: number, model: NewQuoteEquipment): Observable {\r\n return this.http.put(`${this.config.apiLocations.Quotes}Equipment/${quoteId}/${revisionId}`, model);\r\n }\r\n\r\n public SaveEquipmentsToQuoteJob(quoteId: number, revisionId: number, model: NewEquipment[]): Observable {\r\n return this.http.post(`${this.config.apiLocations.Quotes}Equipment/${quoteId}/${revisionId}`, model);\r\n }\r\n\r\n public AddVisit(model: JobEquipmentVisitModel): Observable {\r\n return this.http.post(`${this.config.apiLocations.ServiceSight}JobEquipment/AddVisit`, model);\r\n }\r\n\r\n public AddMakeModelToVisit(model: JobEquipmentVisitModel): Observable {\r\n return this.http.post(`${this.config.apiLocations.ServiceSight}Job/AddMakeModelVisit`, model);\r\n }\r\n\r\n public CopyToNewJob(jobId: number, equipmentIds: number[], makeModelInstallIds: number [], isNewJob = true, selectedJobId: number = null): Observable {\r\n return this.http.post(`${this.config.apiLocations.ServiceSight}Job/AddEquipmentToNewJob`, { jobId, equipmentIds, makeModelInstallIds, isNewJob, selectedJobId });\r\n }\r\n\r\n public GetAllCustomerLocations(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Customer/GetAllCustomerLocations`);\r\n }\r\n\r\n public GetCustomerEquipmentSystemDataStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.config.apiLocations.EquipmentOData}CustomerEquipmentSystemOData`,\r\n key: \"EquipmentSystemId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public UpdateEquipmentCondition(equipmentId: number, conditionId: number): Observable {\r\n return this.http.put(`${this.config.apiLocations.Equipment}Equipment/EquipmentCondition`, { equipmentId, conditionId });\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { Observable, of, Subject } from \"rxjs\";\r\nimport { map, switchMap } from \"rxjs/operators\";\r\nimport { IAuthService } from \"./interfaces/iauth.service\";\r\nimport { IODataService } from \"./interfaces/iodata.service\";\r\nimport { PageableDatastoreService } from \"./pageable-datastore.service\";\r\nimport { DocumentTypeEnum } from \"../enums/document-type-enum\";\r\nimport { IAppConfig, APP_CONFIG } from \"../models/app-config.model\";\r\nimport { Attachment } from \"../models/attachment.model\";\r\nimport { BooleanResponse } from \"../models/boolean-response.model\";\r\nimport { DataSourceOptions } from \"../models/data-source-option.model\";\r\nimport { JobModel } from \"../models/job.model\";\r\nimport { ProteanResponse } from \"../models/protean-response.model\";\r\nimport { RequestJob } from \"../models/request-job.model\";\r\nimport { JobGroupModel } from \"../models/job-group.model\";\r\n\r\ninterface ResponseModel {\r\n ModelCollection: JobGroupModel[];\r\n}\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class JobDataService extends PageableDatastoreService {\r\n private static readonly odataKey: string = \"JobID\";\r\n\r\n constructor(\r\n protected http: HttpClient,\r\n @Inject(\"AuthService\") protected auth: IAuthService,\r\n @Inject(\"ODataService\") protected odataService: IODataService,\r\n @Inject(APP_CONFIG) protected config: IAppConfig) {\r\n super(JobDataService.odataKey);\r\n }\r\n\r\n private siteId: number;\r\n public get SiteId(): number {\r\n return this.siteId;\r\n }\r\n\r\n public set SiteId(value: number) {\r\n this.siteId = value;\r\n }\r\n\r\n private equipmentId: number;\r\n\r\n public get EquipmentId(): number {\r\n return this.equipmentId;\r\n }\r\n\r\n public set EquipmentId(value: number) {\r\n this.equipmentId = value;\r\n }\r\n\r\n public jobEquipmentChanged = new Subject();\r\n\r\n public JobEquipmentChanged() {\r\n this.jobEquipmentChanged.next(true);\r\n }\r\n\r\n /**\r\n * @returns Promise as to be compatable with AngularJS\r\n */\r\n public get(jobId: number): Promise {\r\n const url = `Job/Get?entityId=${jobId}`;\r\n return this.http.get(this.config.apiLocations.ServiceSight + url).toPromise();\r\n }\r\n\r\n public GetActiveEquipmentJobDataSource(equipId: number): DataSource {\r\n return this.odataService.GetDataSource(this.DataSourceOptions(equipId));\r\n }\r\n\r\n protected GetDataSourceObject(): DataSource {\r\n return this.odataService.GetDataSource(this.DataSourceOptions());\r\n }\r\n\r\n public GetJobStatus(jobId: number): Observable {\r\n return this.http.get(this.config.apiLocations.ServiceSight + \"Job/GetJobStatus?entityId=\" + jobId);\r\n }\r\n\r\n public GetDefaultContactID(siteId: number): Observable {\r\n return this.http.get(this.config.apiLocations.ServiceSight + \"Job/GetDefaultContactID?customerId=\" + siteId);\r\n }\r\n\r\n public GetDocuments(documentType: DocumentTypeEnum, jobId: number): Observable {\r\n return this.http.get(this.config.apiLocations.ServiceSight + \"Document/GetDocuments?documentType=\" + documentType + \"&entityId=\" + jobId);\r\n }\r\n\r\n public GetAllGroups(): Observable {\r\n return this.http.get(this.config.apiLocations.ServiceSight + \"JobGroup/GetAllJobGroups\")\r\n .pipe(switchMap(d => of(d.ModelCollection)));\r\n }\r\n\r\n public DownloadDocument(fileGuid: string): Observable {\r\n return this.http.get(\r\n this.config.apiLocations.ServiceSight + \"Document/DownloadDocumentAsync?file=\" + fileGuid,\r\n {\r\n observe: \"response\",\r\n responseType: \"blob\"\r\n });\r\n }\r\n\r\n public IsReadyToComplete(jobId: number): Observable {\r\n return this.http.get(this.config.apiLocations.ServiceSight + \"Job/IsReadyToComplete?jobId=\" + jobId);\r\n }\r\n\r\n public GetJobCreatePermission(): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Dashboard/GetButtonsCreatePermissions`;\r\n return this.http.get(url).pipe(map((res: { IsAllowedCreateJob: boolean}) => res.IsAllowedCreateJob));\r\n }\r\n\r\n public SaveRequestJob(job: RequestJob): Observable {\r\n return this.http.post(this.config.apiLocations.ServiceSight + \"Job/CreateRequest\", job);\r\n }\r\n\r\n private DataSourceOptions(equipmentId?: number): DataSourceOptions {\r\n const options: DataSourceOptions = {\r\n url: this.config.apiLocations.ServiceSightOData + \"JobOD\",\r\n key: JobDataService.odataKey,\r\n keyType: \"String\",\r\n paging: true,\r\n pageSize: 50,\r\n sortSelector: \"JobNumber\",\r\n sortDesc: true,\r\n beforeSend: (e) => {\r\n if (e.params.$orderby) {\r\n e.params.$orderby = e.params.$orderby.replace(\"JobID\", \"JobNumber\");\r\n }\r\n\r\n if (e.params.$filter) {\r\n const regex = /tolower\\((EquipmentDetails)\\)/gm;\r\n e.params.$filter = (e.params.$filter as string).replace(regex, (_, capture) => capture);\r\n }\r\n }\r\n };\r\n\r\n if (equipmentId) {\r\n options.queryStringParams = {\r\n equipmentId\r\n };\r\n }\r\n return options;\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { withCache } from \"@ngneat/cashew\";\r\nimport { Observable, of } from \"rxjs\";\r\nimport { catchError, map } from \"rxjs/operators\";\r\nimport { Module } from \"../../enums/module.enum\";\r\nimport { IAppConfig, APP_CONFIG } from \"../../models/app-config.model\";\r\nimport { BooleanResponse } from \"../../models/boolean-response.model\";\r\nimport { ModuleAccessModel } from \"../../models/module-access.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class ModuleService {\r\n private static readonly cacheKey: string = \"modules\";\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private config: IAppConfig) {\r\n }\r\n\r\n public GetEnabledModules(): Observable> {\r\n return this.getModulesFromServer();\r\n }\r\n\r\n public GetEnabledModulesAccess(): Observable {\r\n return this.GetEnabledModules().pipe(map(val => this.arrayToModuleAccess(val)));\r\n }\r\n\r\n public GetPortalIsEnabled(dbName: string): Observable {\r\n return this.http.get(this.config.apiLocations.GateKeeper + \"Company/PortalEnabled?databaseName=\" + dbName);\r\n }\r\n\r\n public CompanyExist(dbName: string): Observable {\r\n return this.http.get(this.config.apiLocations.GateKeeper + \"Company/CompanyExist?databaseName=\" + dbName);\r\n }\r\n\r\n private getModulesFromServer(): Observable> {\r\n return this.http.get>(\r\n `${this.config.apiLocations.GateKeeper}Company/EnabledModules`, {\r\n context: withCache({\r\n key: ModuleService.cacheKey\r\n })\r\n }).pipe(catchError(() => of([])));\r\n }\r\n\r\n private arrayToModuleAccess(modules: number[]): ModuleAccessModel {\r\n return {\r\n ConsumerPortalEnabled: modules.includes(Module.Portal),\r\n AccountsLinkEnabled: modules.includes(Module.AccountsLink),\r\n EquipmentEnabled: modules.includes(Module.Equipment),\r\n RecurringJobsEnabled: modules.includes(Module.RecurringJobs),\r\n ServiceContractsEnabled: modules.includes(Module.ServiceContract),\r\n StockEnabled: modules.includes(Module.Stock),\r\n PurchaseOrdersEnabled: modules.includes(Module.PurchaseOrders),\r\n ProEnabled: modules.includes(Module.Pro),\r\n SalesOrderEnabled: modules.includes(Module.SalesOrders),\r\n PowerBiEnabled: modules.includes(Module.PowerBI),\r\n SalesOpportunityEnabled: modules.includes(Module.SalesOpportunity),\r\n SalesCampaignsEnabled: modules.includes(Module.SalesCampaigns),\r\n FGasEnabled: modules.includes(Module.FGas),\r\n GasSafeEnabled: modules.includes(Module.GasSafe),\r\n CustomerFeedbackEnabled: modules.includes(Module.CustomerFeedback),\r\n TimesheetsEnabled: modules.includes(Module.Timesheets),\r\n AdvancedQuotesEnabled: modules.includes(Module.AdvancedQuotes),\r\n CFTSEnabled: modules.includes(Module.CFTS),\r\n Sfg20Enabled: modules.includes(Module.Sfg20),\r\n ProjectEnabled: modules.includes(Module.Projects)\r\n };\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { combineLatest, firstValueFrom, Observable, of, ReplaySubject, Subscription, timer } from \"rxjs\";\r\nimport { catchError, distinctUntilChanged, map, switchMap, takeWhile, tap } from \"rxjs/operators\";\r\nimport { SettingId } from \"../../enums/setting-id.enum\";\r\nimport { IAppConfig, APP_CONFIG } from \"../../models/app-config.model\";\r\nimport { SettingData } from \"../../models/setting-data.model\";\r\nimport { UploadFileModel } from \"../../models/upload-file.model\";\r\nimport { IAuthService } from \"../interfaces/iauth.service\";\r\nimport { IODataService } from \"../interfaces/iodata.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class SettingsService {\r\n private subscription: Subscription = null;\r\n private settingsSubject: ReplaySubject<{ [K in SettingId]?: SettingData; }> = new ReplaySubject<{ [K in SettingId]?: SettingData; }>(1);\r\n private cachedSettings: { [K in SettingId]?: SettingData; } = {};\r\n\r\n constructor(\r\n @Inject(\"ODataService\") protected odataService: IODataService,\r\n @Inject(\"AuthService\") private authService: IAuthService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig,\r\n private http: HttpClient) {\r\n this.Init();\r\n }\r\n\r\n public getLocale(): string {\r\n return JSON.parse(localStorage.getItem(\"ls.UserBrowserLocale\")) || navigator.language;\r\n }\r\n\r\n public Init(): void {\r\n if (this.subscription !== null) {\r\n this.subscription.unsubscribe();\r\n }\r\n\r\n let url = `${this.appConfig.apiLocations.ServiceSight}Setting/GetSettingsAsync?`;\r\n for (const settingId in SettingId) {\r\n if (SettingId.hasOwnProperty(settingId)) {\r\n const settingIdValue = SettingId[settingId];\r\n if (typeof settingIdValue === \"number\") {\r\n url += `settingIds=${settingIdValue}&`;\r\n }\r\n }\r\n }\r\n url = url.substring(0, url.length - 1);\r\n\r\n this.subscription = combineLatest([timer(100, 60000), this.authService.IsAuthenticated])\r\n .pipe(switchMap(value => {\r\n if (value[1]) {\r\n return this.http.get(url).pipe(catchError(() => of([] as SettingData[])));\r\n } else {\r\n return of([] as SettingData[]);\r\n }\r\n }))\r\n .pipe(tap(settings => {\r\n settings.forEach(setting => {\r\n this.cachedSettings[setting.SettingID] = setting;\r\n });\r\n }))\r\n .subscribe(() => this.settingsSubject.next(this.cachedSettings));\r\n }\r\n\r\n /**\r\n * Do not use, only for AngularJS\r\n */\r\n public getSettingPromise(settingId: SettingId, bypassCache: boolean = false): Promise {\r\n return firstValueFrom(this.getSetting(settingId, bypassCache));\r\n }\r\n\r\n public getSetting(settingId: SettingId, bypassCache: boolean = false): Observable {\r\n let observable: Observable;\r\n if (bypassCache) {\r\n observable = this.getSettingFromServer(settingId);\r\n }\r\n else {\r\n observable = this.settingsSubject\r\n .pipe(distinctUntilChanged())\r\n .pipe(takeWhile(settings => !!settings))\r\n .pipe(\r\n switchMap(settings => {\r\n const setting = settings[settingId];\r\n if (setting) {\r\n return of(setting);\r\n } else {\r\n return this.getSettingFromServer(settingId);\r\n }\r\n })\r\n );\r\n }\r\n\r\n // Disconnect the returned object from the one in the cache to block any allowing of the UI to update the value in the cache\r\n return observable.pipe(map(data => Object.assign({}, data)));\r\n }\r\n\r\n public SaveSetting(setting: SettingData) {\r\n return this.http.post(this.appConfig.apiLocations.ServiceSight + \"Setting/SaveSettingAsync\", setting)\r\n .pipe(tap(() => this.UpdateCacheValue(setting.SettingID)));\r\n }\r\n\r\n public UpdateFile(model: UploadFileModel) {\r\n return this.http.post(this.appConfig.apiLocations.ServiceSight + \"Setting/UploadFileAsync\", model);\r\n }\r\n\r\n public GetSettingsDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.appConfig.apiLocations.ServiceSightOData}SettingsOD`,\r\n key: \"SettingID\",\r\n keyType: \"String\"\r\n });\r\n }\r\n\r\n public UpdateCacheValue(setting: SettingId): void {\r\n this.getSettingFromServer(setting).subscribe();\r\n }\r\n\r\n private getSettingFromServer(setting: SettingId): Observable {\r\n return this.http.get(`${this.appConfig.apiLocations.ServiceSight}Setting/GetSettingForDisplay?settingId=${setting}`)\r\n .pipe(tap(settingFromServer => {\r\n this.cachedSettings[setting] = settingFromServer;\r\n this.settingsSubject.next(this.cachedSettings);\r\n }));\r\n }\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { IAuthService } from \"./interfaces/iauth.service\";\r\nimport { IODataService } from \"./interfaces/iodata.service\";\r\nimport { DataSourceOptions } from \"../models/data-source-option.model\";\r\nimport { LoadOptions } from \"devextreme/data\";\r\nimport CustomStore from \"devextreme/data/custom_store\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class OdataService implements IODataService {\r\n\r\n constructor(@Inject(\"AuthService\") public auth: IAuthService) { }\r\n\r\n public GetDataSource(options: DataSourceOptions): DataSource {\r\n return new DataSource(this.GetDataSourceObject(options));\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/ban-types\r\n public GetDataSourceObject(options: DataSourceOptions): object {\r\n return {\r\n store: this.GetStore(options),\r\n paginate: options.paging,\r\n pageSize: options.pageSize\r\n // Other DataSource options go here\r\n };\r\n }\r\n\r\n public GetStore(options: DataSourceOptions): ODataStore {\r\n const token = this.auth.Token;\r\n return new ODataStore({\r\n version: 4,\r\n url: options.url,\r\n key: options.key,\r\n keyType: options.keyType,\r\n deserializeDates: false,\r\n // eslint-disable-next-line prefer-arrow/prefer-arrow-functions\r\n beforeSend(e) {\r\n if (e.params) {\r\n Object.assign(e.params, options.queryStringParams);\r\n } else {\r\n e.params = options.queryStringParams;\r\n }\r\n\r\n e.headers = {\r\n Authorization: `Bearer ${token}`\r\n };\r\n\r\n if (options.beforeSend) {\r\n options.beforeSend(e);\r\n }\r\n }\r\n });\r\n }\r\n\r\n public GetDataSourceWithLookups(\r\n sourceData: T,\r\n sourceKey: string,\r\n lookupMapping: { store: ODataStore; dataKey: string; lookupKey: string; displayExprs: string[] | { original: string; target: string }[] }[]\r\n ): DataSource {\r\n const store = new CustomStore({\r\n key: sourceKey,\r\n update: (key: any, data: any) => this.HandleUpdateCustomStore(key, data, sourceData, sourceKey, lookupMapping),\r\n remove: (key: any) => this.HandleRemoveCustomStore(key, sourceData, sourceKey),\r\n insert: (data: any) => this.HandleInsertCustomStore(data, sourceData, lookupMapping),\r\n load: (options: LoadOptions): Promise => this.HandleLoadCustomStore(sourceData, options, lookupMapping)\r\n });\r\n\r\n return new DataSource({\r\n store,\r\n paginate: false\r\n });\r\n }\r\n\r\n private HandleUpdateCustomStore(\r\n key: any,\r\n data: any,\r\n sourceData: any,\r\n sourceKey: string,\r\n lookupMapping: { store: ODataStore; dataKey: string; lookupKey: string; displayExprs: string[] | { original: string; target: string }[] }[]\r\n ): Promise {\r\n let update: Promise;\r\n let index: number = 0;\r\n if (typeof (sourceData as ODataStore).update === \"function\") {\r\n const odata = sourceData as ODataStore;\r\n update = odata.update(key, data);\r\n } else {\r\n const array = sourceData as any[];\r\n index = array.findIndex(p => p[sourceKey] === key);\r\n const sourceItem = array[index];\r\n Object.assign(sourceItem, data);\r\n\r\n update = Promise.resolve(sourceItem);\r\n }\r\n\r\n return update.then(sourceItem => {\r\n const promises = lookupMapping.map(lookup => {\r\n return lookup.store.byKey(sourceItem[lookup.dataKey]).then(itemData => {\r\n lookup.displayExprs.forEach(displayExpr => {\r\n sourceItem[displayExpr] = itemData ? itemData[displayExpr] : null;\r\n });\r\n });\r\n });\r\n\r\n return Promise.all(promises).then(() => {\r\n if (typeof (sourceData as ODataStore).update !== \"function\") {\r\n const array = sourceData as any[];\r\n array[index] = sourceItem;\r\n }\r\n return sourceItem;\r\n });\r\n });\r\n }\r\n\r\n private HandleRemoveCustomStore(\r\n key: any,\r\n sourceData: any,\r\n sourceKey: string\r\n ): Promise {\r\n if (typeof (sourceData as ODataStore).remove === \"function\") {\r\n const odata = sourceData as ODataStore;\r\n return odata.remove(key);\r\n } else {\r\n const array = sourceData as any[];\r\n array.splice(array.findIndex(p => p[sourceKey] === key), 1);\r\n }\r\n return Promise.resolve();\r\n }\r\n\r\n private HandleInsertCustomStore(\r\n data: any,\r\n sourceData: any,\r\n lookupMapping: { store: ODataStore; dataKey: string; lookupKey: string; displayExprs: string[] | { original: string; target: string }[] }[]\r\n ): Promise {\r\n let insert: Promise;\r\n if (typeof (sourceData as ODataStore).insert === \"function\") {\r\n const odata = sourceData as ODataStore;\r\n insert = odata.insert(data);\r\n } else {\r\n insert = Promise.resolve(data);\r\n }\r\n\r\n return insert.then(insertedData => {\r\n const promises = lookupMapping.map(lookup => {\r\n return lookup.store.byKey(insertedData[lookup.dataKey]).then(itemData => {\r\n lookup.displayExprs.forEach(displayExpr => {\r\n insertedData[displayExpr] = itemData ? itemData[displayExpr] : null;\r\n });\r\n });\r\n });\r\n\r\n return Promise.all(promises).then(() => {\r\n if (typeof (sourceData as ODataStore).insert !== \"function\") {\r\n sourceData.push(insertedData);\r\n }\r\n\r\n return data;\r\n });\r\n });\r\n }\r\n\r\n private HandleLoadCustomStore(\r\n sourceData: any,\r\n options: LoadOptions,\r\n lookupMapping: { store: ODataStore; dataKey: string; lookupKey: string; displayExprs: string[] | { original: string; target: string }[] }[]\r\n ): Promise {\r\n if (typeof (sourceData as ODataStore).load === \"function\") {\r\n const odata = sourceData as ODataStore;\r\n return odata.load(options).then(data => {\r\n return this.loadLookup(data, lookupMapping);\r\n }, error => {\r\n return Promise.reject(error);\r\n });\r\n } else {\r\n return this.loadLookup(sourceData as any[], lookupMapping);\r\n }\r\n }\r\n\r\n private loadLookup(\r\n data: any[],\r\n lookupMapping: { store: ODataStore; dataKey: string; lookupKey: string; displayExprs: string[] | { original: string; target: string }[] }[]): Promise {\r\n if (data && data.length > 0) {\r\n const promises = lookupMapping.map(lookup => {\r\n const promiseArray: Promise[] = this.SetLookupPromiseArray(data, lookup);\r\n return Promise.all(promiseArray).then(lookupDataParts => {\r\n const lookupData = [].concat.apply([], lookupDataParts);\r\n data = this.SetLookupDataDisplayExpression(data, lookupData, lookup);\r\n });\r\n });\r\n\r\n return Promise.all(promises).then(() => {\r\n return data;\r\n });\r\n } else {\r\n return Promise.resolve([]);\r\n }\r\n }\r\n\r\n private SetLookupPromiseArray(\r\n data: any[],\r\n lookup: { store: ODataStore; dataKey: string; lookupKey: string; displayExprs: string[] | { original: string; target: string }[] }\r\n ): Promise[] {\r\n let allValues = new Set(data.map(x => x[lookup.dataKey]));\r\n const preFilter = [...allValues].map(x => [lookup.lookupKey, \"=\", x]);\r\n allValues = undefined;\r\n\r\n const promiseArray: Promise[] = [];\r\n let filter: any[] = [];\r\n\r\n for (let i = 0; i < preFilter.length; i++) {\r\n filter.push(preFilter[i]);\r\n filter.push(\"or\");\r\n\r\n if ((i !== 0 && i % 30 === 0) || i + 1 === preFilter.length) {\r\n filter.pop();\r\n const dataSource = new DataSource({\r\n store: lookup.store,\r\n filter: JSON.parse(JSON.stringify(filter)), // clone, not reference\r\n paginate: false\r\n });\r\n\r\n promiseArray.push(dataSource.load());\r\n filter = [];\r\n }\r\n }\r\n\r\n return promiseArray;\r\n }\r\n\r\n private SetLookupDataDisplayExpression(\r\n data: any[],\r\n lookupData: any,\r\n lookup: { store: ODataStore; dataKey: string; lookupKey: string; displayExprs: string[] | { original: string; target: string }[] }\r\n ): any[] {\r\n data.forEach(sourceDataItem => {\r\n lookup.displayExprs.forEach(displayExpr => {\r\n const lookupDataItem = lookupData.find(l => l[lookup.lookupKey] === sourceDataItem[lookup.dataKey]);\r\n\r\n if (typeof displayExpr === \"object\") {\r\n sourceDataItem[displayExpr.target] = lookupDataItem ? lookupDataItem[displayExpr.original] : null;\r\n } else {\r\n sourceDataItem[displayExpr] = lookupDataItem ? lookupDataItem[displayExpr] : null;\r\n }\r\n });\r\n });\r\n\r\n return data;\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";import DataSource from \"devextreme/data/data_source\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"../models/app-config.model\";\r\nimport { StoreModel } from \"../models/store.model\";\r\nimport { OdataService } from \"./odata.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class StoreService {\r\n private readonly storeODataBaseUrl: string;\r\n constructor(\r\n private odataService: OdataService,\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private config: IAppConfig) {\r\n this.storeODataBaseUrl = this.config.apiLocations.StockOData + \"StockStoreOData\";\r\n }\r\n\r\n public GetStores(): Observable> {\r\n return this.http.get>(`${this.config.apiLocations.Stock}StockStore`);\r\n }\r\n\r\n public GetDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.storeODataBaseUrl}`,\r\n key: \"StoreId\",\r\n keyType: \"Int32\",\r\n paging: true,\r\n pageSize: 50\r\n });\r\n }\r\n}\r\n","import { FormMessage } from \"./form-message.model\";\r\n\r\nexport class FormMessages {\r\n public Errors: Array = [];\r\n public Warnings: Array = [];\r\n public IsSuccess: boolean;\r\n}\r\n","export enum ResponseType {\r\n Success = 1,\r\n Failure = 2,\r\n ConcurrencyError = 3,\r\n ObjectNotFound = 4,\r\n LicenseType = 5,\r\n Unauthorised = 6,\r\n SuccessWithWarnings = 7\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { BehaviorSubject, Observable, Subject } from \"rxjs\";\r\nimport { FormMessages } from \"./models/form-messages.model\";\r\nimport { ResponseType } from \"../../enums/response-type.enum\";\r\nimport { IProteanResponse } from \"../../models/iprotean-response.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class FormMesssageService {\r\n\r\n public map: { [key: string]: FormMessages } = { };\r\n public responseMap: { [key: string]: BehaviorSubject } = { };\r\n\r\n constructor() {\r\n }\r\n\r\n public ClearForm(formName: string): void {\r\n this.map[formName] = new FormMessages();\r\n this.responseMap[formName].next(this.map[formName]);\r\n }\r\n\r\n /*\r\n Method to attach the service observable to the message component\r\n */\r\n public RegisterObservable(saveObservable: Observable, formName: string, replacement: Map = new Map()): Subject {\r\n const resultSubject = new Subject();\r\n saveObservable.subscribe(val => {\r\n if (this.IsProteanResponse(val) && (!val.IsSuccess || val.ResponseType === ResponseType.SuccessWithWarnings)) {\r\n this.HandleError(val, formName, replacement);\r\n resultSubject.error(val);\r\n } else {\r\n this.HandleSuccess(formName);\r\n resultSubject.next(val);\r\n }\r\n },\r\n response => {\r\n this.HandleError(response, formName, replacement);\r\n resultSubject.error(response);\r\n }, () => {\r\n // all done\r\n });\r\n return resultSubject;\r\n }\r\n\r\n /*\r\n Method to attach the service observable to the message component, with completion\r\n */\r\n public RegisterChainableObservable(saveObservable: Observable, formName: string, replacement: Map = new Map()): Subject {\r\n const resultSubject = new Subject();\r\n saveObservable.subscribe(val => {\r\n if (this.IsProteanResponse(val) && (!val.IsSuccess || val.ResponseType === ResponseType.SuccessWithWarnings)) {\r\n this.HandleError(val, formName, replacement);\r\n resultSubject.error(val);\r\n } else {\r\n this.HandleSuccess(formName);\r\n resultSubject.next(val);\r\n }\r\n },\r\n response => {\r\n this.HandleError(response, formName, replacement);\r\n resultSubject.error(response);\r\n }, () => {\r\n // all done\r\n resultSubject.complete();\r\n });\r\n return resultSubject;\r\n }\r\n\r\n public RegisterPromise(promise: Promise, formName: string, replacement: Map = new Map()): Promise {\r\n return promise\r\n .then((val) => {\r\n this.HandleSuccess(formName);\r\n return val;\r\n })\r\n .catch((response) => {\r\n this.HandleError(response, formName, replacement);\r\n return response;\r\n });\r\n }\r\n\r\n public RegisterComponent(formName: string, isNewlyCreated: boolean): BehaviorSubject {\r\n if (!this.map[formName] || !isNewlyCreated) {\r\n this.map[formName] = new FormMessages();\r\n this.responseMap[formName] = new BehaviorSubject(null);\r\n }\r\n return this.responseMap[formName];\r\n }\r\n\r\n public ShowWarning(message: string, formName: string): void {\r\n const messages = this.map[formName];\r\n messages.Warnings.push({ message, control: null});\r\n this.responseMap[formName].next(messages);\r\n }\r\n\r\n private IsProteanResponse(obj: any): obj is IProteanResponse {\r\n return obj && obj.hasOwnProperty(\"Messages\");\r\n }\r\n\r\n\r\n private HandleError(response: any, formName: string, replacement: Map): void {\r\n const messages = this.map[formName];\r\n const summaryErrors = [];\r\n messages.Errors.length = 0;\r\n messages.IsSuccess = false;\r\n if (response.errors) {\r\n Object.keys(response.errors).forEach(key => {\r\n const errors = response.errors[key];\r\n if (errors) {\r\n summaryErrors.push({ control: key, message: this.DoReplacements(errors.join(\"\\n\"), replacement)});\r\n }\r\n });\r\n } else if (response.error && response.error.errors) {\r\n Object.keys(response.error.errors).forEach(key => {\r\n const errors = response.error.errors[key];\r\n if (errors) {\r\n summaryErrors.push({ control: key, message: this.DoReplacements(errors.join(\"\\n\"), replacement)});\r\n }\r\n });\r\n } else if (response.Messages) {\r\n Object.keys(response.Messages).forEach(key => {\r\n const errors = response.Messages[key];\r\n if (errors) {\r\n summaryErrors.push({ control: key, message: this.DoReplacements(errors.Message, replacement) });\r\n }\r\n });\r\n } else if (response.error.Messages) {\r\n Object.keys(response.error.Messages).forEach(key => {\r\n const errors = response.error.Messages[key];\r\n if (errors) {\r\n summaryErrors.push({ control: key, message: this.DoReplacements(errors.Message, replacement) });\r\n }\r\n });\r\n } else {\r\n summaryErrors.push({ control: \"\", message: this.DoReplacements(response.error.Message, replacement)});\r\n }\r\n messages.Errors.push(...summaryErrors);\r\n this.responseMap[formName].next(messages);\r\n }\r\n\r\n private HandleSuccess(formName: string): void {\r\n const messages = this.map[formName];\r\n messages.IsSuccess = true;\r\n messages.Errors.length = 0;\r\n this.responseMap[formName].next(messages);\r\n }\r\n\r\n // Replace any [vars] in the error messages using the replacement map\r\n private DoReplacements(errors: string, replacement: Map): string {\r\n // full = [var], contents = var\r\n return errors.replace(/\\[(.+?)\\]/g, (full, contents) => {\r\n full = full; // don't actually use this var, this stops tslint complaining\r\n return replacement.get(contents);\r\n });\r\n }\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { IAppConfig, APP_CONFIG } from \"../../../models/app-config.model\";\r\nimport { IODataService } from \"../../../services/interfaces/iodata.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class PhraseBookService {\r\n\r\n public constructor(\r\n @Inject(APP_CONFIG) private config: IAppConfig,\r\n @Inject(\"ODataService\") private odataService: IODataService) { }\r\n\r\n public GetPhrases(phraseTypeId: number): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.ServiceSightOData}PhraseBookOD`,\r\n key: \"PhraseID\",\r\n keyType: \"Int32\",\r\n queryStringParams: {\r\n phraseTypeId\r\n }\r\n });\r\n }\r\n}\r\n","
\r\n \r\n
\r\n\r\n\r\n\r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n\r\n
\r\n
\r\n \r\n {{ 'buttons.save' | translate}}\r\n \r\n \r\n {{ 'buttons.cancel' | translate}}\r\n \r\n
\r\n
\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport { DxoPopupComponent } from \"devextreme-angular/ui/nested\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { PhraseBookType } from \"./../../../enums/phrase-book-type.enum\";\r\nimport { PhraseBookService } from \"../services/phrase-book.service\";\r\n\r\n@Component({\r\n selector: \"lib-phrase-book-list\",\r\n templateUrl: \"./phrase-book-list.component.html\",\r\n styleUrls: [\"./phrase-book-list.component.scss\"]\r\n})\r\nexport class PhraseBookListComponent implements OnInit, OnChanges {\r\n\r\n public phraseBookOData: DataSource;\r\n public selectedPhrases: string[] = [];\r\n\r\n @Input() modalWindow: DxoPopupComponent;\r\n @Input() phraseType: PhraseBookType;\r\n @Output() phrases: EventEmitter = new EventEmitter();\r\n @ViewChild(\"phraseDataGrid\", { static: true }) grid: DxDataGridComponent;\r\n\r\n public get IsModal(): boolean {\r\n return !!this.modalWindow;\r\n }\r\n\r\n public constructor(private phraseBookService: PhraseBookService) { }\r\n\r\n public OnSearchPhraseChanged(phrase: string): void {\r\n if (phrase.length > 0) {\r\n const filter = [\r\n [ \"Phrase\", \"contains\", phrase ], \"or\",\r\n [ \"PhraseType\", \"contains\", phrase ]\r\n ];\r\n this.grid.instance.filter(filter);\r\n } else {\r\n this.grid.instance.clearFilter();\r\n }\r\n }\r\n\r\n public OnSelectionChanged(): void {\r\n this.selectedPhrases = this.grid.instance.getSelectedRowsData();\r\n }\r\n\r\n public OnSaveButtonClicked(): void {\r\n this.phrases.emit(this.selectedPhrases);\r\n this.grid.instance.clearSelection();\r\n this.OnCloseWindow();\r\n }\r\n\r\n public OnCancelButtonClicked(): void {\r\n this.grid.instance.clearSelection();\r\n this.OnCloseWindow();\r\n }\r\n\r\n public ngOnChanges() {\r\n if (this.phraseType && !this.phraseBookOData) {\r\n this.phraseBookOData = this.phraseBookService.GetPhrases(this.phraseType);\r\n }\r\n }\r\n\r\n public ngOnInit(): void {\r\n if (this.IsModal) {\r\n this.modalWindow.instance.onShowing = () => {\r\n this.selectedPhrases = [];\r\n };\r\n }\r\n }\r\n\r\n private OnCloseWindow(): void {\r\n if (this.IsModal) {\r\n this.modalWindow.visible = false;\r\n }\r\n }\r\n}\r\n","import { Component, EventEmitter, Output, Input } from \"@angular/core\";\r\nimport { PhraseBookType } from \"../../../enums/phrase-book-type.enum\";\r\n\r\n@Component({\r\n selector: \"lib-phrase-book-modal\",\r\n templateUrl: \"./phrase-book-modal.component.html\",\r\n styleUrls: [\"./phrase-book-modal.component.css\"]\r\n})\r\nexport class PhraseBookModalComponent {\r\n\r\n @Input() phraseType: PhraseBookType;\r\n @Output() phrases: EventEmitter = new EventEmitter();\r\n public showWindow: boolean = false;\r\n\r\n public Show(): void {\r\n this.showWindow = true;\r\n }\r\n\r\n public selectedPhrases(selectedPhrases: string[]) {\r\n if (selectedPhrases) {\r\n this.phrases.emit(selectedPhrases);\r\n }\r\n this.showWindow = false;\r\n }\r\n}\r\n","\r\n \r\n\r\n","
\r\n \r\n
\r\n
\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { UntypedFormControl } from \"@angular/forms\";\r\nimport { PhraseBookType } from \"./../../../enums/phrase-book-type.enum\";\r\nimport { PhraseBookModalComponent } from \"./../phrase-book-modal/phrase-book-modal.component\";\r\nimport { Module } from \"../../../enums/module.enum\";\r\nimport { Phrase } from \"../../../models/phrase-book/phrase.model\";\r\nimport { ModuleService } from \"../../../services/module/module.service\";\r\n\r\n@Component({\r\n selector: \"lib-phrase-book-textarea\",\r\n templateUrl: \"./phrase-book-textarea.component.html\",\r\n styleUrls: [\"./phrase-book-textarea.component.scss\"]\r\n})\r\nexport class PhraseBookTextAreaComponent implements OnInit, OnChanges {\r\n\r\n @ViewChild(\"phraseBookModal\", { static: true }) phraseBookModal: PhraseBookModalComponent;\r\n @Input() control: UntypedFormControl = new UntypedFormControl();\r\n @Input() name: string;\r\n @Input() value: string;\r\n @Input() id: string;\r\n @Input() class: string;\r\n @Input() containerClass: string;\r\n @Input() height: string;\r\n @Input() disabled: boolean = false;\r\n @Input() phraseType: PhraseBookType;\r\n @Input() phraseBookEnabled: boolean = true;\r\n @Output() valueChanged: EventEmitter = new EventEmitter();\r\n\r\n public text: string;\r\n public proEnabled: boolean = false;\r\n\r\n public get buttonId(): string {\r\n return this.id + \"-phrasebook-button\";\r\n }\r\n\r\n constructor(private moduleService: ModuleService) { }\r\n\r\n public ngOnInit(): void {\r\n this.moduleService.GetEnabledModules().subscribe(modules => {\r\n this.proEnabled = modules.includes(Module.Pro);\r\n });\r\n }\r\n\r\n public ngOnChanges(): void {\r\n this.text = this.value;\r\n\r\n if (this.disabled) {\r\n this.control.disable();\r\n } else {\r\n this.control.enable();\r\n }\r\n\r\n this.control.setValue(this.value);\r\n }\r\n\r\n public onValueChanged(): void {\r\n if (this.value !== this.text) {\r\n this.value = this.text;\r\n this.valueChanged.emit(this.text);\r\n }\r\n }\r\n\r\n public applyPhrases(phrases: Phrase[]): void {\r\n const combinedText = phrases.map(x => x.Phrase);\r\n if (this.text && this.text.length) {\r\n combinedText.unshift(this.text);\r\n }\r\n this.text = combinedText.join(\" \");\r\n }\r\n\r\n}\r\n","\r\n\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n","import { Component, EventEmitter, Input, Output, OnInit } from \"@angular/core\";\r\nimport { WorkRequiredDialogueModel } from \"../../models/equipment/work-required-dialogue.model\";\r\nimport { PhraseBookType } from \"./../../enums/phrase-book-type.enum\";\r\nimport { Module } from \"../../enums/module.enum\";\r\nimport { ModuleService } from \"../../services/module/module.service\";\r\n\r\n@Component({\r\n selector: \"lib-work-required\",\r\n templateUrl: \"./work-required.component.html\",\r\n styleUrls: [\"./work-required.component.scss\"]\r\n})\r\nexport class WorkRequiredComponent implements OnInit {\r\n\r\n @Input() title: string = null;\r\n @Input() phraseBookEnabled: boolean = false;\r\n @Input() phraseType: PhraseBookType;\r\n @Input() showActivities: boolean = false;\r\n @Output() workRequiredEvent: EventEmitter = new EventEmitter();\r\n @Output() activitySelectedEvent: EventEmitter = new EventEmitter();\r\n\r\n public workRequired: string = null;\r\n public selectedActivityId: number = 0;\r\n public showDialog: boolean = false;\r\n public isProEnabled: boolean = false;\r\n\r\n constructor(private moduleService: ModuleService) { }\r\n\r\n public ngOnInit(): void{\r\n this.moduleService.GetEnabledModules().subscribe(modules => {\r\n this.isProEnabled = modules.includes(Module.Pro);\r\n });\r\n }\r\n\r\n public SetText(value: string): void {\r\n this.workRequired = value;\r\n }\r\n\r\n public Show(item: WorkRequiredDialogueModel = null): void {\r\n this.selectedActivityId = item?.ActivityId;\r\n this.workRequired = item?.WorkRequired;\r\n document.querySelector(\"body\").classList.add(\"overhidn\");\r\n this.showDialog = true;\r\n }\r\n\r\n public Select(): void {\r\n this.showDialog = false;\r\n this.workRequiredEvent.emit(this.workRequired);\r\n this.activitySelectedEvent.emit(this.selectedActivityId);\r\n this.ClearData();\r\n }\r\n\r\n public Cancel(): void {\r\n this.ClearData();\r\n this.showDialog = false;\r\n }\r\n\r\n public SelectActivity(data): void {\r\n this.selectedActivityId = data;\r\n }\r\n\r\n public OnHiding(): void {\r\n this.ClearData();\r\n document.querySelector(\"body\").classList.remove(\"overhidn\");\r\n }\r\n\r\n private ClearData(): void {\r\n this.selectedActivityId = null;\r\n this.workRequired = null;\r\n }\r\n}\r\n","import { Directive, EventEmitter, HostListener, Input, OnDestroy, OnInit, Output } from \"@angular/core\";\r\nimport { debounceTime, distinctUntilChanged, Subject, takeUntil, tap } from \"rxjs\";\r\n\r\n@Directive({\r\n selector: \"input[libOnChangeDebounced]\",\r\n})\r\nexport class OnChangeDebouncedDirective implements OnInit, OnDestroy {\r\n @Input() public debounceTime: number = 500;\r\n @Output() public changeDebounced: EventEmitter;\r\n\r\n protected emitEvent: Subject;\r\n protected subscription: Subject;\r\n\r\n constructor() {\r\n this.changeDebounced = new EventEmitter();\r\n this.emitEvent = new Subject();\r\n this.subscription = new Subject();\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.emitEvent\r\n .pipe(\r\n takeUntil(this.subscription),\r\n debounceTime(this.debounceTime),\r\n distinctUntilChanged(),\r\n tap(value => this.emitChange(value))\r\n ).subscribe();\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.subscription.next();\r\n this.subscription.complete();\r\n }\r\n\r\n public emitChange(value: any): void {\r\n this.changeDebounced.emit(value);\r\n }\r\n\r\n @HostListener(\"keyup\", [\"$event\"])\r\n public onKeyUp(event: any): void {\r\n event.preventDefault();\r\n this.emitEvent.next(event);\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { EquipmentStatus } from \"../enums/equipment-status.enum\";\r\n\r\n@Pipe({\r\n name: \"equipmentStatus\"\r\n})\r\nexport class EquipmentStatusPipe implements PipeTransform {\r\n\r\n private readonly status = {\r\n [EquipmentStatus.Returned]: \"equipment.status.returned\",\r\n [EquipmentStatus.Stock]: \"equipment.status.stock\",\r\n [EquipmentStatus.ForHire]: \"equipment.status.forHire\",\r\n [EquipmentStatus.OnHire]: \"equipment.status.onHire\",\r\n [EquipmentStatus.Rental]: \"equipment.status.rental\",\r\n [EquipmentStatus.CustomersOwn]: \"equipment.status.customersOwn\",\r\n [EquipmentStatus.Retired]: \"equipment.status.retired\",\r\n [EquipmentStatus.Sold]: \"equipment.status.sold\",\r\n };\r\n\r\n private readonly stringValueMapping = {\r\n Returned: EquipmentStatus.Returned,\r\n Stock: EquipmentStatus.Stock,\r\n ForHire: EquipmentStatus.ForHire,\r\n OnHire: EquipmentStatus.OnHire,\r\n Rental: EquipmentStatus.Rental,\r\n CustomersOwn: EquipmentStatus.CustomersOwn,\r\n Retired: EquipmentStatus.Retired,\r\n Sold: EquipmentStatus.Sold,\r\n };\r\n\r\n transform(value: number | string | EquipmentStatus): string {\r\n let safeValue = Number(value);\r\n if (isNaN(safeValue)) {\r\n safeValue = this.stringValueMapping[value];\r\n }\r\n\r\n return this.status[safeValue];\r\n }\r\n}\r\n","\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n
\r\n
\r\n \r\n \r\n {{ data.displayValue ?? 'customer.equipmentSystems.not-assigned' | translate }}\r\n {{data.groupContinuesMessage ? ' ('+data.groupContinuesMessage+')' : ''}}\r\n {{data.groupContinuedMessage ? ' ('+data.groupContinuedMessage+')': ''}}\r\n
\r\n
\r\n\r\n \r\n\r\n
{{ data.value | equipmentStatus | translate }}
\r\n\r\n \r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n {{ item.data.WarningNotes }}\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n
\r\n\r\n
\r\n\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n\r\n\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Inject,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { NavigationExtras, Router } from \"@angular/router\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { PhraseBookType } from \"./../../enums/phrase-book-type.enum\";\r\nimport { EquipJobListSource } from \"../../enums/equip-job-list-source.enum\";\r\nimport { EquipmentStatus } from \"../../enums/equipment-status.enum\";\r\nimport { JobTabEnum } from \"../../enums/job-tab.enum\";\r\nimport { Module } from \"../../enums/module.enum\";\r\nimport { SettingId } from \"../../enums/setting-id.enum\";\r\nimport { NewQuoteEquipment } from \"../../models/new-quote-equipment.model\";\r\nimport { SettingData } from \"../../models/setting-data.model\";\r\nimport { EquipmentDataService } from \"../../services/equipment/equipment-data.service\";\r\nimport { IAuthService } from \"../../services/interfaces/iauth.service\";\r\nimport { IRouterLinkService } from \"../../services/interfaces/irouter-link.service\";\r\nimport { JobDataService } from \"../../services/job-data.service\";\r\nimport { ModuleService } from \"../../services/module/module.service\";\r\nimport { SettingsService } from \"../../services/setting/settings.service\";\r\nimport { StoreService } from \"../../services/store.service\";\r\nimport { FormMesssageService } from \"../form-messages/form-messsage.service\";\r\nimport { WorkRequiredComponent } from \"../work-required/work-required.component\";\r\n\r\n@Component({\r\n selector: \"lib-add-equipment\",\r\n templateUrl: \"./add-equipment.component.html\",\r\n styleUrls: [\"./add-equipment.component.scss\"]\r\n})\r\nexport class AddEquipmentComponent implements OnChanges, OnInit {\r\n\r\n @Input() siteId: number;\r\n @Input() jobId: number;\r\n @Input() quoteId: number;\r\n @Input() skipWorkRequired = false;\r\n @Input() revisionId: number;\r\n @Input() formName: string;\r\n @Input() phraseBookEnabled: boolean = false;\r\n @Input() displaySource: EquipJobListSource = EquipJobListSource.EquipmentTab;\r\n @Input() usedEquipment: number[] = [];\r\n @Output() closed: EventEmitter = new EventEmitter();\r\n @ViewChild(\"newEquipmentGrid\", { static: true }) public newEquipmentGrid: DxDataGridComponent;\r\n @ViewChild(\"workRequiredComponent\", { static: true }) workRequiredComponent: WorkRequiredComponent;\r\n\r\n public isPortal: boolean;\r\n public baseDetailLinkJob: string;\r\n public showDialog: boolean = false;\r\n public newEquipmentSearchText: string = \"\";\r\n public equipmentDataSource: DataSource;\r\n public equipmentSystemDataStore: ODataStore;\r\n public selectedEquipmentKeys: number[] = [];\r\n public jobDataSources = new Map();\r\n public isProEnabled: boolean;\r\n private isEquipmentSystemsEnabled: boolean = false;\r\n\r\n public phraseType = PhraseBookType;\r\n public equipmentSystemGroupSelectedValues = new Map();\r\n public useGroupCheckBoxes: boolean;\r\n public useAdditionalStores: boolean = false;\r\n public storeList: DataSource;\r\n public storeId: number = 1;\r\n private retiredStatus = EquipmentStatus.Retired;\r\n private newEquipmentFilter: any;\r\n\r\n public get IsInstallTab(): boolean {\r\n return this.displaySource === EquipJobListSource.InstallTab;\r\n }\r\n\r\n constructor(\r\n private dataService: EquipmentDataService,\r\n private jobDataService: JobDataService,\r\n private formMessageService: FormMesssageService,\r\n private router: Router,\r\n private moduleService: ModuleService,\r\n private settingsService: SettingsService,\r\n private storeService: StoreService,\r\n @Inject(\"AuthService\") authService: IAuthService,\r\n @Inject(\"RouterLinkService\") private routerLink: IRouterLinkService) {\r\n this.isPortal = authService.isPortalUser;\r\n this.routerLink.jobDetailBaseLink.subscribe(link => this.baseDetailLinkJob = link);\r\n this.calculateStatusFilter = this.calculateStatusFilter.bind(this);\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.jobId && changes.jobId.currentValue) {\r\n this.HideDialog(false);\r\n }\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.moduleService.GetEnabledModules().subscribe(x => {\r\n this.isProEnabled = x.includes(Module.Pro);\r\n });\r\n this.equipmentSystemDataStore = this.dataService.GetCustomerEquipmentSystemDataStore();\r\n this.settingsService.getSetting(SettingId.EquipmentSystems).subscribe((setting: SettingData) => {\r\n this.isEquipmentSystemsEnabled = setting.ValueBool;\r\n });\r\n\r\n this.settingsService.getSetting(SettingId.UseAdditionalStores).subscribe((settingData: SettingData) => {\r\n this.useAdditionalStores = settingData.ValueBool;\r\n });\r\n\r\n this.storeList = this.storeService.GetDataSource();\r\n }\r\n\r\n public showSystemGroups(): boolean {\r\n return this.isProEnabled && this.isEquipmentSystemsEnabled && !this.isPortal;\r\n }\r\n\r\n public get IsSelectedEquipment(): boolean {\r\n return this.selectedEquipmentKeys.length > 0;\r\n }\r\n\r\n public Show(): void {\r\n if (this.siteId || this.isPortal) {\r\n document.querySelector(\"body\").classList.add(\"overhidn\");\r\n this.showDialog = true;\r\n this.newEquipmentGrid.instance.deselectAll();\r\n this.GetDataSources();\r\n this.newEquipmentGrid.instance.refresh();\r\n }\r\n }\r\n\r\n public Cancel(): void {\r\n this.HideDialog(false);\r\n }\r\n\r\n public WorkRequiredOpen(): void {\r\n if(this.skipWorkRequired) {\r\n this.AddItem(null);\r\n } else {\r\n this.workRequiredComponent.Show();\r\n }\r\n }\r\n\r\n public get UseRouterLink(): boolean {\r\n return !this.baseDetailLinkJob.includes(\"#\");\r\n }\r\n\r\n public AddItem(workRequired: string): void {\r\n const selectedEquipment = this.newEquipmentGrid.instance.getSelectedRowsData();\r\n const selectedEquipmentIds = selectedEquipment.map(el => el.EquipId);\r\n if (!this.isPortal && this.jobId) {\r\n this.formMessageService.RegisterObservable(\r\n this.dataService.AddEquipmentToJob({\r\n JobId: this.jobId,\r\n SelectedEquipmentIds: selectedEquipmentIds,\r\n WorkRequired: workRequired,\r\n IsInstall: this.IsInstallTab\r\n }), this.formName).subscribe(() => this.HideDialog(true));\r\n } else if(this.quoteId !== null && this.revisionId != null) {\r\n const newQuoteEquipment: NewQuoteEquipment = new NewQuoteEquipment();\r\n newQuoteEquipment.SelectedEquipmentIds = selectedEquipmentIds;\r\n newQuoteEquipment.WorkRequired = workRequired;\r\n\r\n this.dataService.AddEquipmentToQuoteJob(\r\n this.quoteId,\r\n this.revisionId,\r\n newQuoteEquipment\r\n ).subscribe(() => this.HideDialog(true));\r\n } else {\r\n const self = this;\r\n selectedEquipmentIds.forEach((value: number) => {\r\n (self.newEquipmentGrid.instance.getSelectedRowsData().find(o => o.EquipId === value));\r\n self.newEquipmentGrid.instance.getSelectedRowsData().find(o => o.EquipId === value).Notes = workRequired;\r\n });\r\n\r\n this.HideDialog(true);\r\n }\r\n }\r\n\r\n private HideDialog(shouldAdd: boolean): void {\r\n document.querySelector(\"body\").classList.remove(\"overhidn\");\r\n this.showDialog = false;\r\n this.closed.emit(shouldAdd);\r\n }\r\n\r\n public NewEquipmentFilterChanged($event: { currentTarget: { value: string }}): void {\r\n const filterValue = $event.currentTarget.value;\r\n if (filterValue === \"0\") {\r\n if (this.isPortal) {\r\n this.newEquipmentFilter = null;\r\n } else {\r\n this.newEquipmentFilter = [\"SiteId\", \"=\", this.siteId];\r\n }\r\n } else {\r\n if (this.isPortal) {\r\n this.newEquipmentFilter = [\"Status\", \"<>\", this.retiredStatus];\r\n } else {\r\n this.newEquipmentFilter = [[\"Status\", \"<>\", this.retiredStatus], \"and\", [\"SiteId\", \"=\", this.siteId]];\r\n }\r\n }\r\n this.SetFilters();\r\n }\r\n\r\n public NewEquipmentSearchTextChanged(): void {\r\n this.newEquipmentGrid.instance.searchByText(this.newEquipmentSearchText);\r\n }\r\n\r\n public ToggleRow(equipmentId: number, activeJobCount: number): void {\r\n if (this.jobDataSources.get(equipmentId)) {\r\n this.jobDataSources.delete(equipmentId);\r\n } else if (activeJobCount > 0) {\r\n this.jobDataSources.set(equipmentId, this.jobDataService.GetActiveEquipmentJobDataSource(equipmentId));\r\n }\r\n }\r\n\r\n public CreateNewEquipment(): void {\r\n document.querySelector(\"body\").classList.remove(\"overhidn\");\r\n this.showDialog = false;\r\n const extra: NavigationExtras = {\r\n state: {\r\n jobId: this.jobId,\r\n siteId: this.siteId,\r\n sourceTab: this.IsInstallTab ? JobTabEnum.Install : JobTabEnum.Equipment\r\n }\r\n };\r\n this.router.navigate([\"/equipment/new-equipment\"], extra);\r\n }\r\n\r\n public onGridSelectionChanged(args: any): void {\r\n if (this.showSystemGroups() && this.useGroupCheckBoxes) {\r\n this.SynchronizeCheckBoxes(args.currentDeselectedRowKeys);\r\n this.SynchronizeCheckBoxes(args.selectedRowKeys);\r\n }\r\n }\r\n\r\n public onEquipmentSystemGroupChecked(e: any, d: any): void {\r\n if (e.event) {\r\n const keys = [];\r\n\r\n if (d.data.items) {\r\n for (const item of d.data.items) {\r\n keys.push(item.EquipId);\r\n }\r\n }\r\n if (d.data.collapsedItems) {\r\n for (const item of d.data.collapsedItems) {\r\n keys.push(item.EquipId);\r\n }\r\n }\r\n if (e.value) {\r\n this.newEquipmentGrid.instance.selectRows(keys, true);\r\n } else {\r\n this.newEquipmentGrid.instance.deselectRows(keys);\r\n }\r\n }\r\n }\r\n\r\n public FilterStoreList(event): void {\r\n this.storeId = event.value;\r\n this.SetFilters();\r\n }\r\n\r\n private SetFilters(): void {\r\n const filters = [];\r\n\r\n if (this.newEquipmentFilter) {\r\n filters.push(this.newEquipmentFilter);\r\n }\r\n\r\n if (this.IsInstallTab) {\r\n if (filters.length) {\r\n filters.push(\"and\");\r\n }\r\n const storeFilter = [\"StoreId\", \"=\", this.storeId];\r\n filters.push(storeFilter);\r\n }\r\n\r\n if (!filters.length) {\r\n this.newEquipmentGrid.instance.clearFilter();\r\n } else {\r\n this.newEquipmentGrid.instance.filter(filters);\r\n }\r\n }\r\n\r\n private GetDataSources(): void {\r\n this.equipmentDataSource = this.dataService.GetEquipmentDataSource();\r\n const filter = this.usedEquipment.length ? this.filterUsedEquipment() : [];\r\n if (this.isPortal) {\r\n filter.push([\"Status\", \"<>\", this.retiredStatus]);\r\n } else {\r\n filter.push([\"Status\", \"<>\", this.retiredStatus], \"and\", [\"SiteId\", \"=\", this.siteId]);\r\n }\r\n\r\n if (this.IsInstallTab) {\r\n filter.push(\"and\");\r\n filter.push([\"StoreId\", \"=\", this.storeId]);\r\n }\r\n\r\n this.equipmentDataSource.filter(filter);\r\n this.equipmentDataSource.load();\r\n\r\n this.equipmentSystemGroupSelectedValues = new Map();\r\n if (this.showSystemGroups() && this.useGroupCheckBoxes) {\r\n const dataSource = new DataSource({\r\n store: this.equipmentDataSource.store(),\r\n filter\r\n });\r\n\r\n dataSource.load().then((data) => {\r\n data.map((p) => {\r\n this.equipmentSystemGroupSelectedValues[p.EquipmentSystemId] = false;\r\n });\r\n });\r\n }\r\n }\r\n\r\n private filterUsedEquipment(): any[] {\r\n const equipmentFilter = [];\r\n if (this.usedEquipment.length) {\r\n this.usedEquipment.forEach(x => {\r\n equipmentFilter.push([\"EquipId\", \"<>\", x]);\r\n equipmentFilter.push(\"and\");\r\n });\r\n equipmentFilter.pop();\r\n }\r\n return equipmentFilter;\r\n }\r\n\r\n public calculateStatusFilter(filterValue: string, selectedFilterOperation, filterType) {\r\n const column = this as any;\r\n // Search the status based on the string\r\n if (filterType === \"search\" && this.FilteredStatus(filterValue)) {\r\n return [\"Status\", \"=\", Number(status)];\r\n } else if (filterType === \"search\") {\r\n return null;\r\n }\r\n return column.defaultCalculateFilterExpression(filterValue, selectedFilterOperation, filterType);\r\n }\r\n\r\n private FilteredStatus(filterValue: string): string {\r\n return isNaN(Number(filterValue)) ? EquipmentStatus[filterValue.toUpperCase().replace(\" \", \"_\")] : null;\r\n }\r\n\r\n private SynchronizeCheckBoxes(keys: any[]): void {\r\n for (const key of keys) {\r\n const rowIndex = this.newEquipmentGrid.instance.getRowIndexByKey(key);\r\n const equipmentSystemId = this.newEquipmentGrid.instance.cellValue(rowIndex, \"EquipmentSystemId\");\r\n\r\n this.newEquipmentGrid.instance.byKey([equipmentSystemId]).then(group => {\r\n const everyChecked = group.items.every(e => this.selectedEquipmentKeys.includes(e.EquipId));\r\n const someChecked = group.items.some(e => this.selectedEquipmentKeys.includes(e.EquipId));\r\n\r\n if (everyChecked) {\r\n this.equipmentSystemGroupSelectedValues[equipmentSystemId] = true;\r\n } else if (someChecked) {\r\n this.equipmentSystemGroupSelectedValues[equipmentSystemId] = undefined;\r\n } else {\r\n this.equipmentSystemGroupSelectedValues[equipmentSystemId] = false;\r\n }\r\n });\r\n }\r\n }\r\n}\r\n","export enum AttributeType {\r\n Numeric = 1,\r\n Text = 2,\r\n YesNo = 3,\r\n List = 4,\r\n Date = 5,\r\n Memo = 6\r\n}\r\n","export enum HelpItemTagEnum {\r\n Currencies = \"currencies\",\r\n ActivityType = \"activityType\",\r\n JobType = \"jobType\",\r\n MaterialType = \"materialType\",\r\n Employees = \"employees\",\r\n CancelReason = \"cancelReason\",\r\n InspectionTemplate = \"inspectionTemplate\",\r\n PhraseBook = \"phraseBook\",\r\n PublicHolidays = \"publicHolidays\",\r\n LabourRate = \"labourRate\",\r\n ReasonsNotDone = \"reasonsNotDone\",\r\n JobTitle = \"jobTitle\",\r\n ReminderType = \"reminderType\",\r\n CustomerUpload = \"customerUpload\",\r\n Dashboard = \"dashboard\",\r\n Quotes = \"quotes\",\r\n Jobs = \"jobs\",\r\n Reminders = \"reminders\",\r\n Messages = \"messages\",\r\n Customers = \"customers\",\r\n Contacts = \"contacts\",\r\n TaxProfiles = \"taxProfiles\",\r\n PaymentSettings = \"paymentSettings\",\r\n GeneralSettings = \"generalSettings\",\r\n UserReferences = \"userRerferences\",\r\n LicenceViewer = \"licenceViewer\",\r\n JobPlannerboard = \"jobPlannerboard\",\r\n SecurityRoles = \"securityRoles\",\r\n EquipmentCondition = \"equipmentCondition\",\r\n JobGroup = \"jobGroup\",\r\n}\r\n","/* eslint-disable max-len */\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { Injectable } from \"@angular/core\";\r\nimport { Observable, of, Subject } from \"rxjs\";\r\nimport { parseString } from \"xml2js\";\r\nimport { HelpItemTagEnum } from \"../../enums/help-item-tag.enum\";\r\nimport { SupportKnowledgeBaseResult } from \"../../models/support-knowledge-base-result.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class HelpService {\r\n public openHelpRequested: Subject = new Subject();\r\n private videos: SupportKnowledgeBaseResult[] = [{\r\n title: \"Creating a new inspection\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/wp-content/uploads/sites/2/2020/10/Inspection-Final.mp4\",\r\n type: \"video\"\r\n }, {\r\n title: \"Adding customers\",\r\n description: \"\",\r\n // eslint-disable-next-line max-len\r\n href: \"https://proteansoftware-my.sharepoint.com/personal/supportsystem_proteansoftware_co_uk/_layouts/15/guestaccess.aspx?docid=0d27fa733a20d45638140284c769e8359&authkey=ARkvwX162BL9tyGqIlfqEC0\",\r\n type: \"video\"\r\n }, {\r\n title: \"Creating a new goods received note (GRN)\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/wp-content/uploads/sites/2/2020/12/New-GRN.mp4?_=1\",\r\n type: \"video\"\r\n }, {\r\n title: \"Creating a new purchase order (PO)\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/wp-content/uploads/sites/2/2020/12/New-PO.mp4?_=1\",\r\n type: \"video\"\r\n }, {\r\n title: \"Creating a new supplier\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/wp-content/uploads/sites/2/2020/11/New-Supplier.mp4?_=1\",\r\n type: \"video\"\r\n }, {\r\n title: \"Creating a new stock adjustment\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/wp-content/uploads/sites/2/2020/10/Stock-Adj-Final.mp4?_=1\",\r\n type: \"video\"\r\n }, {\r\n title: \"Adding an engineer visit\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/wp-content/uploads/sites/2/2020/10/Labour-Visit-Final.mp4?_=1\",\r\n type: \"video\"\r\n }, {\r\n title: \"Creating a new customer site\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/wp-content/uploads/sites/2/2020/10/New-Site-Final.mp4?_=1\",\r\n type: \"video\"\r\n }, {\r\n title: \"Creating a new stock part\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/wp-content/uploads/sites/2/2020/10/New-Part-Final.mp4?_=1\",\r\n type: \"video\"\r\n }, {\r\n title: \"Creating a new contract\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/wp-content/uploads/sites/2/2020/10/Maint-Final.mp4?_=1\",\r\n type: \"video\"\r\n }, {\r\n title: \"Creating a new job\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/wp-content/uploads/sites/2/2020/10/New-Job-Final.mp4?_=1\",\r\n type: \"video\"\r\n }, {\r\n title: \"Creating a new equipment record\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/wp-content/uploads/sites/2/2020/10/Equipment-Final.mp4?_=1\",\r\n type: \"video\"\r\n }, {\r\n title: \"Create a new stock type\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/wp-content/uploads/sites/2/2021/03/Final-ST-Project.mp4?_=1\",\r\n type: \"video\"\r\n }, {\r\n title: \"Creating a new inspection template\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/wp-content/uploads/sites/2/2020/10/Inspection-Final.mp4?_=1\",\r\n type: \"video\"\r\n }, {\r\n title: \"Creating a new contract type\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/wp-content/uploads/sites/2/2020/10/CT-Final.mp4?_=1\",\r\n type: \"video\"\r\n }, {\r\n title: \"Adding activity types\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/wp-content/uploads/sites/2/2020/10/AT-Final.mp4?_=1\",\r\n type: \"video\",\r\n tags: [HelpItemTagEnum.ActivityType]\r\n }, {\r\n title: \"Adding job types\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/wp-content/uploads/sites/2/2020/10/JT-Final.mp4?_=1\",\r\n type: \"video\",\r\n tags: [HelpItemTagEnum.JobType]\r\n }, {\r\n title: \"Adding job types\",\r\n description: \"\",\r\n href: \"https://proteansoftware-my.sharepoint.com/personal/supportsystem_proteansoftware_co_uk/_layouts/15/guestaccess.aspx?docid=04c2e616bdbfc41a386d205b6c05e7477&authkey=AQuEdvM70I0OkwhP2XnLIR4\",\r\n type: \"video\",\r\n tags: [HelpItemTagEnum.JobType]\r\n }, {\r\n title: \"Adding material types\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/wp-content/uploads/sites/2/2020/10/MT-Final.mp4?_=1\",\r\n type: \"video\",\r\n tags: [HelpItemTagEnum.MaterialType]\r\n }, {\r\n title: \"Adding employees\",\r\n description: \"\",\r\n href: \"https://proteansoftware-my.sharepoint.com/personal/supportsystem_proteansoftware_co_uk/_layouts/15/guestaccess.aspx?docid=0ddb94d1f30ae4992a2330d74f25dba17&authkey=AT7VQFpg-GuesJnYj3sQk00\",\r\n type: \"video\",\r\n tags: [HelpItemTagEnum.Employees]\r\n }, {\r\n title: \"Adding cancellation reasons\",\r\n description: \"\",\r\n href: \"https://proteansoftware-my.sharepoint.com/personal/supportsystem_proteansoftware_co_uk/_layouts/15/guestaccess.aspx?docid=0691974df3e414deb965bad7d664e1184&authkey=Ab2JZ_vB_x4e2EFMhKwPIVI\",\r\n type: \"video\",\r\n tags: [HelpItemTagEnum.CancelReason]\r\n }, {\r\n title: \"Adding public holidays\",\r\n description: \"\",\r\n href: \"https://proteansoftware-my.sharepoint.com/personal/supportsystem_proteansoftware_co_uk/_layouts/15/guestaccess.aspx?docid=1406ec5ef29ba4f7abfb08cd2d160dc23&authkey=AQr9qZknE4LZBpevbziAK-M\",\r\n type: \"video\",\r\n tags: [HelpItemTagEnum.PublicHolidays]\r\n }, {\r\n title: \"Adding labour rates\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/wp-content/uploads/sites/2/2021/04/LR-Project.mp4?_=1\",\r\n type: \"video\",\r\n tags: [HelpItemTagEnum.LabourRate]\r\n }, {\r\n title: \"Adding labour rates\",\r\n description: \"\",\r\n href: \"https://proteansoftware-my.sharepoint.com/personal/supportsystem_proteansoftware_co_uk/_layouts/15/guestaccess.aspx?docid=03705a1e25aad4ce9b4f135a3f23c06e2&authkey=AWyQSy_rxEGtAe3wUmE9AU0\",\r\n type: \"video\",\r\n tags: [HelpItemTagEnum.LabourRate]\r\n }, {\r\n title: \"Starting a new quote\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/wp-content/uploads/sites/2/2020/10/New-Quote-Final.mp4?_=1\",\r\n type: \"video\",\r\n tags: [HelpItemTagEnum.Quotes]\r\n }, {\r\n title: \"Adding materials to a job\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/wp-content/uploads/sites/2/2020/10/New-Material-Final.mp4?_=1\",\r\n type: \"video\",\r\n tags: [HelpItemTagEnum.Jobs]\r\n }, {\r\n title: \"Completing and Invoicing a job\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/wp-content/uploads/sites/2/2020/12/CI-Job-Project.mp4?_=1\",\r\n type: \"video\",\r\n tags: [HelpItemTagEnum.Jobs]\r\n }, {\r\n title: \"Adding a new customer\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/wp-content/uploads/sites/2/2020/10/Customer-Final.mp4?_=1\",\r\n type: \"video\",\r\n tags: [HelpItemTagEnum.Customers]\r\n }, {\r\n title: \"Adding a new site\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/wp-content/uploads/sites/2/2020/10/New-Site-Final.mp4?_=1\",\r\n type: \"video\",\r\n tags: [HelpItemTagEnum.Customers]\r\n }, {\r\n title: \"Adding security roles\",\r\n description: \"\",\r\n href: \"https://proteansoftware-my.sharepoint.com/personal/supportsystem_proteansoftware_co_uk/_layouts/15/guestaccess.aspx?docid=0b7b83b68fcac45fa8c408d161744c19b&authkey=ASR6KQwGd7OXUXYTPi2D9J4\",\r\n type: \"video\",\r\n tags: [HelpItemTagEnum.SecurityRoles]\r\n }];\r\n\r\n private walkthroughs: SupportKnowledgeBaseResult[] = [{\r\n title: \"Adding an engineer\",\r\n description: \"\",\r\n href: \"231c15ef-c78a-4f8d-a67d-e66c08ae3380\",\r\n type: \"walkthrough\",\r\n tags: [HelpItemTagEnum.Employees]\r\n }, {\r\n title: \"Adding a new currency\",\r\n description: \"\",\r\n href: \"e32aed68-976f-47b6-8e3f-14ce9f02887a\",\r\n type: \"walkthrough\",\r\n tags: [HelpItemTagEnum.Currencies]\r\n }, {\r\n title: \"Adding activity types\",\r\n description: \"\",\r\n href: \"a9bd4332-904d-468a-ae74-fcb650eaf00b\",\r\n type: \"walkthrough\",\r\n tags: [HelpItemTagEnum.ActivityType]\r\n }, {\r\n title: \"Adding job types\",\r\n description: \"\",\r\n href: \"c9f2e298-878a-48c2-91e0-5d7ee4a09ebc\",\r\n type: \"walkthrough\",\r\n tags: [HelpItemTagEnum.JobType]\r\n }, {\r\n title: \"Adding material types\",\r\n description: \"\",\r\n href: \"ddf19d9c-3086-47c6-a25e-18605e5728e8\",\r\n type: \"walkthrough\",\r\n tags: [HelpItemTagEnum.MaterialType]\r\n }, {\r\n title: \"Adding cancellation reasons\",\r\n description: \"\",\r\n href: \"a3dc2536-6b80-4d4b-ac67-5f9dc50dacbd\",\r\n type: \"walkthrough\",\r\n tags: [HelpItemTagEnum.CancelReason]\r\n }, {\r\n title: \"Adding inspection templates\",\r\n description: \"\",\r\n href: \"eb105756-736b-43a2-ba3e-58727f0e245a\",\r\n type: \"walkthrough\",\r\n tags: [HelpItemTagEnum.InspectionTemplate]\r\n }, {\r\n title: \"Adding phrase book entries\",\r\n description: \"\",\r\n href: \"25ddb1a4-b34d-4342-8afc-6aa9c4058199\",\r\n type: \"walkthrough\",\r\n tags: [HelpItemTagEnum.PhraseBook]\r\n }, {\r\n title: \"Adding a labour rate\",\r\n description: \"\",\r\n href: \"5d3beeb3-66d2-426e-842f-743246cd1bbf\",\r\n type: \"walkthrough\",\r\n tags: [HelpItemTagEnum.LabourRate]\r\n }, {\r\n title: \"Dashboard Tour\",\r\n description: \"\",\r\n href: \"1b2dcfc5-3fd2-485d-9d92-84c7dd962e31\",\r\n type: \"walkthrough\",\r\n tags: [HelpItemTagEnum.Dashboard]\r\n }, {\r\n title: \"Public holidays\",\r\n description: \"\",\r\n href: \"94f524c0-9a34-49a9-821f-d851bbcf5d9f\",\r\n type: \"walkthrough\",\r\n tags: [HelpItemTagEnum.PublicHolidays]\r\n }, {\r\n title: \"Settings tour\",\r\n description: \"\",\r\n href: \"f4ee4104-e1dd-4bd1-8c37-35d2ed45da3b\",\r\n type: \"walkthrough\",\r\n tags: [HelpItemTagEnum.GeneralSettings]\r\n }, {\r\n title: \"User references\",\r\n description: \"\",\r\n href: \"96d321e0-6c94-4322-819d-48a3e5e4a892\",\r\n type: \"walkthrough\",\r\n tags: [HelpItemTagEnum.UserReferences]\r\n }, {\r\n title: \"Plannerboard customisation\",\r\n description: \"\",\r\n href: \"da46b0ea-7fb1-4a62-991d-11907028cdad\",\r\n type: \"walkthrough\",\r\n tags: [HelpItemTagEnum.JobPlannerboard]\r\n }, {\r\n title: \"Reasons not done\",\r\n description: \"\",\r\n href: \"68a4463d-3966-4209-8373-f4cb5c7f439c\",\r\n type: \"walkthrough\",\r\n tags: [HelpItemTagEnum.ReasonsNotDone]\r\n }, {\r\n title: \"Job titles\",\r\n description: \"\",\r\n href: \"c0197aef-cf98-4661-a24b-393110c3eddc\",\r\n type: \"walkthrough\",\r\n tags: [HelpItemTagEnum.JobTitle]\r\n }, {\r\n title: \"Reminder types\",\r\n description: \"\",\r\n href: \"8fc19d59-48c9-41c3-addb-b46a81dcd55b\",\r\n type: \"walkthrough\",\r\n tags: [HelpItemTagEnum.ReminderType]\r\n }];\r\n\r\n private knowledgebase: SupportKnowledgeBaseResult[] = [{\r\n title: \"Currency module overview\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/currency/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Currencies]\r\n }, {\r\n title: \"Adding a new currency\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/how-to-a-create-a-new-currency/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Currencies]\r\n }, {\r\n title: \"Adding activity types\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/activity-types/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.ActivityType]\r\n }, {\r\n title: \"Adding job groups\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/job-groups/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.JobGroup]\r\n }, {\r\n title: \"Adding job types\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/job-types/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.JobType]\r\n }, {\r\n title: \"Adding non-chargeable job types\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/adding-non-chargeable-job-types/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.JobType]\r\n }, {\r\n title: \"Adding fixed price job types\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/adding-fixed-price-job-types/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.JobType]\r\n }, {\r\n title: \"Adding inspections to jobs automatically\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/adding-inspections-to-jobs-automatically/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.JobType]\r\n }, {\r\n title: \"Adding material types\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/material-types/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.MaterialType]\r\n }, {\r\n title: \"Adding office users\",\r\n description: \"In ServiceSight you can create employee records so that you can allow them access to the customer database, create new jobs, plan work for engineers as well as completing & invoicing jobs.\",\r\n href: \"https://support.servicesight.com/knowledge-base/adding-office-users/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Employees]\r\n }, {\r\n title: \"Adding engineers\",\r\n description: \"In ServiceSight you can create Engineer records so that you can plan their work, send them jobs & messages and see their productivity & utilisation.\",\r\n href: \"https://support.servicesight.com/knowledge-base/adding-engineers/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Employees]\r\n }, {\r\n title: \"Anonymising ex-employee records\",\r\n description: \"If an individual requests that you remove their personal data from your database or if you wish to anonymise employee data where you have determined that you have no need or legal requirement to retain them, it is easy to do so without affecting the referential integrity of your database.\",\r\n href: \"https://support.servicesight.com/knowledge-base/anonymising-ex-employee-records/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Employees]\r\n }, {\r\n title: \"Adding cancellation reasons\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/cancellation-reason/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.CancelReason]\r\n }, {\r\n title: \"Adding inspection templates\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/creating-new-inspections-templates/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.InspectionTemplate]\r\n }, {\r\n title: \"Adding pre-visit inspection templates\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/creating-a-new-pre-visit-inspection-template/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.InspectionTemplate]\r\n }, {\r\n title: \"Adding in-visit inspection templates\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/creating-a-new-in-visit-inspection-template/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.InspectionTemplate]\r\n }, {\r\n title: \"Editing an existing inspection template\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/editing-an-existing-inspection/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.InspectionTemplate]\r\n }, {\r\n title: \"Adding phrase book entries\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/phrase-book/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.PhraseBook]\r\n }, {\r\n title: \"Adding public holidays\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/public-holidays/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.PublicHolidays]\r\n }, {\r\n title: \"Adding labour rates\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/labour-rates/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.LabourRate],\r\n }, {\r\n title: \"Editing the standard labour rate\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/editing-the-standard-labour-rate/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.LabourRate]\r\n }, {\r\n title: \"Using reasons not done in an inspection template\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/creating-new-inspections-templates/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.ReasonsNotDone]\r\n }, {\r\n title: \"Adding job titles\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/job-titles/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.JobTitle]\r\n }, {\r\n title: \"Using the reminders list\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/reminder/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Reminders]\r\n }, {\r\n title: \"Adding reminders\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/creating-reminders/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Reminders]\r\n }, {\r\n title: \"Adding reminder types\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/remindertype/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Reminders, HelpItemTagEnum.ReminderType]\r\n }, {\r\n title: \"Uploading customers\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/customer-upload/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.CustomerUpload]\r\n }, {\r\n title: \"Introduction to the dashboard\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/dashboard/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Dashboard]\r\n }, {\r\n title: \"Using the dashboard\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/using-the-dashboard/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Dashboard]\r\n }, {\r\n title: \"Editing the dashboard\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/editing-the-dashboard/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Dashboard]\r\n }, {\r\n title: \"Creating a new job quote\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/creating-a-job-quote/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Quotes]\r\n }, {\r\n title: \"Quoting for further work required\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/quoting-for-further-work-required/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Quotes]\r\n }, {\r\n title: \"Revising an existing quote\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/revising-a-quote/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Quotes]\r\n }, {\r\n title: \"Sending a quote to a customer\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/sending-a-quote-to-the-customer/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Quotes]\r\n }, {\r\n title: \"Winning a quote\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/marking-a-quote-as-won/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Quotes]\r\n }, {\r\n title: \"Losing a quote\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/marking-a-quote-as-lost/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Quotes]\r\n }, {\r\n title: \"Creating a quote from the mobile app on site\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/creating-and-generating-a-quote-from-the-mobile-app/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Quotes]\r\n }, {\r\n title: \"Creating a new job from a quote\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/creating-a-job-from-a-quote/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Quotes]\r\n }, {\r\n title: \"Updating the next quote number to use\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/updating-the-next-quote-number/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Quotes]\r\n }, {\r\n title: \"Adding prospects\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/creating-prospects/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Quotes]\r\n }, {\r\n title: \"Using the jobs list\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/job/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Jobs]\r\n }, {\r\n title: \"Creating a new job\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/logging-new-jobs/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Jobs]\r\n }, {\r\n title: \"Adding job details\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/job-details/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Jobs]\r\n }, {\r\n title: \"Adding an inspection to a job\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/adding-an-inspection-to-a-job/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Jobs]\r\n }, {\r\n title: \"Updating jobs manually\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/updating-jobs-manually/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Jobs]\r\n }, {\r\n title: \"Creating a new job on the mobile app\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/creating-new-jobs-on-the-mobile-app/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Jobs]\r\n }, {\r\n title: \"Completing a job on the mobile app\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/completing-a-job-on-the-mobile-app/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Jobs]\r\n }, {\r\n title: \"Using the messages list\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/messagedetail/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Messages]\r\n }, {\r\n title: \"Sending messages\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/sending-messages/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Messages]\r\n }, {\r\n title: \"Messaging on the mobile app\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/mobile-app-messaging/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Messages]\r\n }, {\r\n title: \"Using the customer list\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/customer/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Customers]\r\n }, {\r\n title: \"Uploading your customers into ServiceSight\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/customer-upload/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Customers]\r\n }, {\r\n title: \"Adding customers\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/creating-customers/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Customers]\r\n }, {\r\n title: \"Turning prospects into customers\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/turning-prospects-into-customers/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Customers]\r\n }, {\r\n title: \"Anonymising closed customer records\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/anonymising-closed-customer-records/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Customers]\r\n }, {\r\n title: \"Using the contact list\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/contact/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Contacts]\r\n }, {\r\n title: \"Adding contacts\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/creating-contacts/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Contacts]\r\n }, {\r\n title: \"Anonymising closed contact records\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/anonymising-contact-records/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.Contacts]\r\n }, {\r\n title: \"Editing tax profiles\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/tax-profile/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.TaxProfiles]\r\n }, {\r\n title: \"Collecting payments\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/collecting-payments-on-the-mobile-app/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.PaymentSettings]\r\n }, {\r\n title: \"Choosing your settings\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/settings/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.GeneralSettings]\r\n }, {\r\n title: \"Editing user references\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/user-references/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.UserReferences]\r\n }, {\r\n title: \"Viewing your licence details\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/licence-manager/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.LicenceViewer]\r\n }, {\r\n title: \"Adding activities on the planner\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/adding-activities-on-the-planner-board/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.JobPlannerboard]\r\n }, {\r\n title: \"Adding security roles\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/security-roles/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.SecurityRoles]\r\n }, {\r\n title: \"Assigning security permissions\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/assigning-security-permissions/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.SecurityRoles]\r\n }, {\r\n title: \"Equipment conditions\",\r\n description: \"\",\r\n href: \"https://support.servicesight.com/knowledge-base/equipment-conditions/\",\r\n type: \"knowledgebase\",\r\n tags: [HelpItemTagEnum.EquipmentCondition]\r\n }];\r\n\r\n constructor(private httpClient: HttpClient) { }\r\n\r\n public getItemsByTags(tags: HelpItemTagEnum[]): Observable {\r\n const walkthroughsResult = this.walkthroughs.filter(x => x.tags?.some(tag => tags.includes(tag)));\r\n const videosResult = this.videos.filter(x => x.tags?.some(tag => tags.includes(tag)));\r\n const knowledgebaseResult = this.knowledgebase.filter(x => x.tags?.some(tag => tags.includes(tag)));\r\n\r\n return of(walkthroughsResult.concat(videosResult).concat(knowledgebaseResult));\r\n }\r\n\r\n public searchVideos(query: string): Observable {\r\n return of(this.videos.filter(x => x.title.split(\" \").some(word => query.split(\" \").some(part => word.toLowerCase().includes(part.toLowerCase())))));\r\n }\r\n\r\n public searchWalkthroughs(query: string): Observable {\r\n return of(this.walkthroughs.filter(x => x.title.split(\" \").some(word => query.split(\" \").some(part => word.toLowerCase().includes(part.toLowerCase())))));\r\n }\r\n\r\n public searchKnowledgeBase(query: string): Observable {\r\n return new Observable(observer => {\r\n this.httpClient.get(\r\n \"https://support.servicesight.com/?ajax=1&ht-kb-search=1&s=\" + encodeURIComponent(query),\r\n {\r\n responseType: \"text\"\r\n })\r\n .subscribe(html => {\r\n // dirty hack to get to fix bad html to xml\r\n html = html.replace(/[^]*?<\\/li>/gmi, \"\");\r\n\r\n parseString(html, (err, result) => {\r\n if (err) {\r\n observer.error(err);\r\n } else {\r\n const data = result as SupportKnowledgeBaseResultXML;\r\n\r\n const niceData = data.ul.li.map(item => {\r\n return {\r\n title: item.a[0].span[0]._,\r\n description: item.a[0].span[1]._,\r\n href: item.a[0].$.href,\r\n type: \"knowledgebase\"\r\n } as SupportKnowledgeBaseResult;\r\n });\r\n\r\n observer.next(niceData);\r\n observer.complete();\r\n }\r\n });\r\n });\r\n });\r\n }\r\n\r\n public openHelpModal(items: SupportKnowledgeBaseResult[]): void {\r\n this.openHelpRequested.next(items);\r\n }\r\n}\r\n\r\n// DO NOT LOOK HERE - this is filthy xml handling types, they are not exported\r\n\r\ninterface SupportKnowledgeBaseResultXML {\r\n ul: Ul;\r\n}\r\n\r\ninterface Ul {\r\n li: Li[];\r\n}\r\n\r\ninterface Li {\r\n a: A[];\r\n}\r\n\r\ninterface A {\r\n $: HrefValue;\r\n span: Span[];\r\n}\r\n\r\ninterface HrefValue {\r\n href: string;\r\n}\r\n\r\ninterface Span {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n _: string;\r\n}\r\n","import { Component, Input, OnInit } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { HelpItemTagEnum } from \"../../enums/help-item-tag.enum\";\r\nimport { SupportKnowledgeBaseResult } from \"../../models/support-knowledge-base-result.model\";\r\nimport { HelpService } from \"../../services/help/help.service\";\r\n\r\n@Component({\r\n selector: \"lib-button-with-help\",\r\n templateUrl: \"./button-with-help.component.html\",\r\n styleUrls: [\"./button-with-help.component.scss\"]\r\n})\r\nexport class ButtonWithHelpComponent implements OnInit {\r\n @Input() public helpItemsTags: HelpItemTagEnum[];\r\n @Input() public disabled: boolean = false;\r\n\r\n @Input() public set primaryActionTranslationKey(value: string) {\r\n this.translateService.get(value).subscribe(x => {\r\n this.primaryActionText = x;\r\n this.setItems();\r\n });\r\n }\r\n\r\n @Input() public set primaryActionLink(value: string) {\r\n if (this.primaryAction) {\r\n const errorMessage = \"Can't set primaryActionLink value when primaryActionFunction is already set. \"\r\n + \"primaryActionLink and primaryActionFunction are mutually exclusive and only one of them should be specified.\";\r\n throw Error(errorMessage);\r\n }\r\n\r\n this.primaryActionUrl = value;\r\n }\r\n\r\n @Input() public set primaryActionFunction(value: () => void) {\r\n if (this.primaryActionUrl) {\r\n const errorMessage = \"Can't set primaryActionFunction value when primaryActionLink is already set. \"\r\n + \"primaryActionLink and primaryActionFunction are mutually exclusive and only one of them should be specified.\";\r\n throw Error(errorMessage);\r\n }\r\n\r\n this.primaryAction = value;\r\n }\r\n\r\n public items: ButtonItem[] = [];\r\n\r\n private primaryAction: () => void;\r\n private primaryActionUrl: string;\r\n private helpItems: SupportKnowledgeBaseResult[] = [];\r\n private primaryActionText: string = \"\";\r\n\r\n constructor(\r\n private helpService: HelpService,\r\n private translateService: TranslateService) { }\r\n\r\n public ngOnInit(): void {\r\n if (this.helpItemsTags) {\r\n this.helpService.getItemsByTags(this.helpItemsTags).subscribe(x => this.helpItems = x);\r\n }\r\n\r\n if (this.primaryActionTranslationKey) {\r\n this.translateService.get(this.primaryActionTranslationKey).subscribe(x => {\r\n this.primaryActionText = x;\r\n this.setItems();\r\n });\r\n }\r\n\r\n this.setItems();\r\n }\r\n\r\n public itemClick(e: any): void {\r\n e.itemData.action();\r\n }\r\n\r\n private setItems(): void {\r\n this.items = [\r\n {\r\n text: this.primaryActionText,\r\n id: \"primary\",\r\n action: () => {\r\n if (this.primaryAction) {\r\n this.primaryAction();\r\n } else {\r\n window.location.href = this.primaryActionUrl;\r\n }\r\n }\r\n },\r\n {\r\n icon: \"fas fa-info\",\r\n id: \"help\",\r\n action: () => {\r\n this.helpService.openHelpModal(this.helpItems);\r\n },\r\n }\r\n ];\r\n }\r\n}\r\n\r\ninterface ButtonItem {\r\n id: string;\r\n text?: string;\r\n icon?: string;\r\n action: () => void;\r\n}\r\n","\r\n","import { Injectable, Injector, ComponentFactoryResolver, ComponentRef, Type } from \"@angular/core\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class ChartLoaderService {\r\n\r\n constructor(\r\n private injector: Injector,\r\n private factoryResolver: ComponentFactoryResolver) { }\r\n\r\n public getChartComponent(component: Type, options: any = null): ComponentRef {\r\n const factory = this.factoryResolver.resolveComponentFactory(component);\r\n const componentRef = factory.create(this.injector);\r\n if (options) {\r\n Object.assign(componentRef.instance, options);\r\n }\r\n return componentRef;\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { ComponentRef, Input, Output } from \"@angular/core\";\r\nimport { BehaviorSubject } from \"rxjs\";\r\n\r\n@Injectable()\r\nexport abstract class BaseChartComponent {\r\n @Input() height: number;\r\n @Output() changeChart: BehaviorSubject> = new BehaviorSubject>(null);\r\n public datasource: T[];\r\n}\r\n","import { Component, Inject, OnInit } from \"@angular/core\";\r\nimport { BaseChartComponent } from \"../chart-loader/base-chart.component\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { IAppConfig, APP_CONFIG } from \"../../../models/app-config.model\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\n\r\n@Component({\r\n selector: \"lib-equipment-up-time\",\r\n templateUrl: \"./equipment-up-time.component.html\",\r\n styleUrls: [\"./equipment-up-time.component.scss\"]\r\n})\r\nexport class EquipmentUpTimeComponent extends BaseChartComponent implements OnInit {\r\n datasourceAlt: number = 0;\r\n\r\n public title: string;\r\n constructor(\r\n @Inject(APP_CONFIG) private config: IAppConfig,\r\n translate: TranslateService,\r\n private http: HttpClient) {\r\n super();\r\n this.title = translate.instant(\"equipment.upTime\");\r\n }\r\n\r\n ngOnInit(): void {\r\n this.http.get(this.config.apiLocations.ServiceSight + \"JobEquipment/EquipmentUpTime\")\r\n .subscribe(data => this.datasourceAlt = data);\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport { IAuthService } from \"../interfaces/iauth.service\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { IAppConfig, APP_CONFIG } from \"../../models/app-config.model\";\r\nimport { Observable } from \"rxjs\";\r\nimport { WatchItem } from \"../../models/watch-item.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class EquipmentChartService {\r\n\r\n constructor(\r\n protected http: HttpClient,\r\n @Inject(\"AuthService\") protected auth: IAuthService,\r\n @Inject(APP_CONFIG) protected config: IAppConfig) { }\r\n\r\n public GetWatchList(): Observable {\r\n return this.http.get(this.config.apiLocations.ServiceSight + \"JobEquipment/GetEquipmentWatchList\");\r\n }\r\n\r\n}\r\n","
\r\n
{{ messageText | translate }}
\r\n

{{ 'equipment.chart.noData' | translate }}

\r\n
\r\n","import { Component, Input } from \"@angular/core\";\r\n\r\n@Component({\r\n selector: \"lib-empty-chart\",\r\n templateUrl: \"./empty-chart.component.html\",\r\n styleUrls: [\"./empty-chart.component.scss\"]\r\n})\r\nexport class EmptyChartComponent {\r\n @Input() height: number;\r\n @Input() isEnabled: boolean;\r\n @Input() messageText: string;\r\n}\r\n","\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n

{{ 'lob.list.equipment.details.make' | translate }}: {{data.point.data.Make}}

\r\n

{{ 'lob.list.equipment.details.model' | translate }}: {{data.point.data.Model}}

\r\n

{{ 'job.equipment.siteName' | translate }}: {{data.point.data.SiteName}}

\r\n
\r\n\r\n
\r\n\r\n\r\n","import { Component, OnInit } from \"@angular/core\";\r\nimport { WatchItem } from \"../../../models/watch-item.model\";\r\nimport { EquipmentChartService } from \"../../../services/equipment/equipment.chart.service\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { BaseChartComponent } from \"../chart-loader/base-chart.component\";\r\n\r\n@Component({\r\n selector: \"lib-equipment-watch-list\",\r\n templateUrl: \"./equipment-watch-list.component.html\",\r\n styleUrls: [\"./equipment-watch-list.component.scss\"]\r\n})\r\nexport class EquipmentWatchListComponent extends BaseChartComponent implements OnInit {\r\n\r\n public title: string;\r\n public titleY: string;\r\n public dataSource: WatchItem[];\r\n public label: string;\r\n public showChart: boolean = false;\r\n\r\n constructor(\r\n public equipmentService: EquipmentChartService,\r\n translate: TranslateService\r\n ) {\r\n super();\r\n this.title = translate.instant(\"equipment.watch.list\");\r\n this.titleY = translate.instant(\"equipment.watch.list.no-of-jobs\");\r\n }\r\n\r\n ngOnInit() {\r\n this.equipmentService.GetWatchList().subscribe(response => {\r\n this.dataSource = response;\r\n this.showChart = this.dataSource && this.dataSource.length > 0;\r\n });\r\n }\r\n}\r\n","import { Component, Inject, OnInit } from \"@angular/core\";\r\nimport { BaseChartComponent } from \"../chart-loader/base-chart.component\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { IAppConfig, APP_CONFIG } from \"../../../models/app-config.model\";\r\n\r\n@Component({\r\n selector: \"lib-onsite-response-times\",\r\n templateUrl: \"./onsite-response-times.component.html\",\r\n styleUrls: [\"./onsite-response-times.component.scss\"]\r\n})\r\nexport class OnsiteResponseTimesComponent extends BaseChartComponent implements OnInit {\r\n public datasourceAlt: number;\r\n public endValue: number;\r\n public interval: number;\r\n\r\n constructor(\r\n @Inject(APP_CONFIG) private config: IAppConfig,\r\n private http: HttpClient) {\r\n super();\r\n }\r\n\r\n ngOnInit(): void {\r\n this.http.get(this.config.apiLocations.ServiceSight + \"Dashboard/OnsiteResponseTime\")\r\n .subscribe(data => this.datasourceAlt = data);\r\n }\r\n\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n","import { NgModule } from \"@angular/core\";\r\nimport { CommonModule } from \"@angular/common\";\r\nimport { ChartLoaderComponent } from \"./chart-loader/chart-loader.component\";\r\nimport { DxCircularGaugeModule, DxChartModule } from \"devextreme-angular\";\r\nimport { OnsiteResponseTimesComponent } from \"./onsite-response-times/onsite-response-times.component\";\r\nimport { FirstTimeFixRateComponent } from \"./first-time-fix-rate/first-time-fix-rate.component\";\r\nimport { EquipmentWatchListComponent } from \"./equipment-watch-list/equipment-watch-list.component\";\r\nimport { EquipmentUpTimeComponent } from \"./equipment-up-time/equipment-up-time.component\";\r\nimport { TranslateModule } from \"@ngx-translate/core\";\r\nimport { EmptyChartComponent } from \"./empty-chart/empty-chart.component\";\r\n\r\n@NgModule({\r\n declarations: [\r\n ChartLoaderComponent,\r\n OnsiteResponseTimesComponent,\r\n FirstTimeFixRateComponent,\r\n EquipmentWatchListComponent,\r\n EquipmentUpTimeComponent,\r\n EmptyChartComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n DxCircularGaugeModule,\r\n DxChartModule,\r\n TranslateModule\r\n ],\r\n exports: [\r\n ChartLoaderComponent,\r\n OnsiteResponseTimesComponent,\r\n FirstTimeFixRateComponent,\r\n EquipmentWatchListComponent,\r\n EquipmentUpTimeComponent,\r\n EmptyChartComponent\r\n ]\r\n})\r\nexport class ChartsModule { }\r\n","\r\n
\r\n
\r\n
{{data.Label}}
\r\n
\r\n
\r\n
\r\n\r\n","import { Component, EventEmitter, forwardRef, Input, Output } from \"@angular/core\";\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from \"@angular/forms\";\r\nimport { ColourDropdownModel } from \"../../models/colour-dropdown.model\";\r\n\r\n@Component({\r\n selector: \"lib-colour-dropdown\",\r\n templateUrl: \"./colour-dropdown.component.html\",\r\n styleUrls: [\"./colour-dropdown.component.scss\"],\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => ColourDropdownComponent),\r\n multi: true\r\n }\r\n ]\r\n})\r\nexport class ColourDropdownComponent implements ControlValueAccessor {\r\n\r\n @Input() public selectedValue: number;\r\n @Input() public dropdownItems: ColourDropdownModel[];\r\n @Output() selectedValueChange: EventEmitter = new EventEmitter();\r\n\r\n private onTouchedCallback: () => void = () => {};\r\n private onChangeCallback: (v: number) => void = () => {};\r\n\r\n public onValueChanged(newValue: number): void {\r\n if (this.selectedValue !== newValue) {\r\n this.onTouchedCallback();\r\n this.onChangeCallback(newValue);\r\n this.selectedValue = newValue;\r\n this.selectedValueChange.emit(this.selectedValue);\r\n }\r\n }\r\n\r\n public writeValue(value: number): void {\r\n if (value && typeof value === \"number\" && value !== this.selectedValue) {\r\n this.selectedValue = value;\r\n this.onValueChanged(value);\r\n }\r\n }\r\n\r\n public registerOnChange(fn: (v: number) => void): void {\r\n this.onChangeCallback = fn;\r\n }\r\n\r\n public registerOnTouched(fn: any): void {\r\n this.onTouchedCallback = fn;\r\n }\r\n}\r\n","export enum CreditNoteStatus {\r\n Entry = 100,\r\n Credited = 800\r\n}\r\n","export enum GridKind {\r\n Quotes = 0,\r\n Inspections = 1,\r\n Jobs = 2,\r\n Customers = 3,\r\n Contacts = 4,\r\n Reminders = 5,\r\n Invoice = 6,\r\n Equipment = 7,\r\n MakeModels = 8,\r\n Attributes = 9,\r\n Payments = 10,\r\n Contracts = 11,\r\n Stock = 12,\r\n PurchaseOrders = 13,\r\n GoodReceived = 14,\r\n Suppliers = 15,\r\n CreditNotes = 16,\r\n SalesOrder = 17,\r\n Plannerboard = 19,\r\n DespatchNotes = 20,\r\n SalesOpportunity = 21,\r\n InvoiceBatch = 22,\r\n ReturnsNote = 23,\r\n RefrigerantTypes = 24,\r\n Cylinders = 25,\r\n RefrigerantTransactions = 26,\r\n RefrigerantTransactionsCustomer = 27,\r\n RefrigerantTransactionsCylinder = 28,\r\n RefrigerantTransactionsEquipment = 29,\r\n WasteTransferNotes = 30,\r\n Survey = 31,\r\n PurchaseNotes = 32,\r\n JobEquip = 33,\r\n EquipmentStock = 34,\r\n Employees = 35\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { IAppConfig, APP_CONFIG } from \"../models/app-config.model\";\r\nimport { IODataService } from \"./interfaces/iodata.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class CreditNoteService {\r\n\r\n constructor(\r\n @Inject(APP_CONFIG) private config: IAppConfig,\r\n @Inject(\"ODataService\") protected odataService: IODataService) {\r\n }\r\n\r\n public GetCreditNotes(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.ServiceSightOData}CreditNoteOD`,\r\n key: \"Id\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { Observable } from \"rxjs\";\r\nimport { GridKind } from \"../enums/grid-kind.enum\";\r\nimport { IAppConfig, APP_CONFIG } from \"../models/app-config.model\";\r\nimport { map } from \"rxjs/operators\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class GridService {\r\n\r\n private gridUrl: string = this.config.apiLocations.ServiceSight + \"Grid/\";\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private config: IAppConfig) { }\r\n\r\n public GetLayout(kind: GridKind): Observable {\r\n return this.http.get(this.gridUrl + \"GetLayout?gridKind=\" + kind).pipe(map(value => JSON.parse(value)));\r\n }\r\n\r\n public SaveLayout(layout: any, kind: GridKind) {\r\n this.http.post(this.gridUrl + \"SaveLayout?gridKind=\" + kind, { Layout: JSON.stringify(layout) }).subscribe();\r\n }\r\n\r\n public ResetLayout(kind: GridKind) {\r\n this.http.delete(this.gridUrl + \"Delete?gridKind=\" + kind).subscribe();\r\n }\r\n}\r\n","import { formatDate } from \"@angular/common\";\r\nimport { Pipe, PipeTransform } from \"@angular/core\";\r\n\r\n@Pipe({\r\n name: \"customDate\"\r\n})\r\nexport class CustomDatePipe implements PipeTransform {\r\n\r\n transform(value: any, format: string): any {\r\n if (!value) {\r\n return \"\";\r\n }\r\n\r\n if (value === \"Invalid Date\") {\r\n return value;\r\n }\r\n\r\n if (!format) {\r\n format = \"shortDate\";\r\n }\r\n\r\n try {\r\n if (format === \"short\") {\r\n return formatDate(value, format, navigator.language).replace(\",\", \"\");\r\n }\r\n\r\n return formatDate(value, format, navigator.language);\r\n } catch (e) {\r\n // eslint-disable-next-line no-console\r\n console.error(e);\r\n return \"\";\r\n }\r\n }\r\n}\r\n\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\n\r\n@Pipe({\r\n name: \"customCurrency\"\r\n})\r\nexport class CurrencyPipe implements PipeTransform {\r\n\r\n constructor(private translate: TranslateService) { }\r\n\r\n public transform(value: number, currencyCode: string): string {\r\n if (value != null && currencyCode) {\r\n return new Intl.NumberFormat(this.translate.currentLang, { style: \"currency\", currency: currencyCode }).format(value);\r\n } else {\r\n return null;\r\n }\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { CreditNoteStatus } from \"../../enums/credit-note-status.enum\";\r\n\r\n@Pipe({\r\n name: \"creditNoteStatus\"\r\n})\r\n\r\nexport class CreditNoteStatusPipe implements PipeTransform {\r\n transform(value: CreditNoteStatus) {\r\n const status = {\r\n [CreditNoteStatus.Credited]: \"creditNotes.status.credited\",\r\n [CreditNoteStatus.Entry]: \"creditNotes.status.pending\"\r\n };\r\n return status[value] || \"\";\r\n }\r\n}\r\n","import { PipeTransform, Pipe } from \"@angular/core\";\r\nimport { CreditNoteStatus } from \"../enums/credit-note-status.enum\";\r\n\r\n@Pipe({\r\n name: \"creditNoteStatusBar\"\r\n})\r\n\r\nexport class CreditNoteStatusBarPipe implements PipeTransform {\r\n\r\n private readonly status = {\r\n [CreditNoteStatus.Credited]: \"bggreenstatuslong\",\r\n [CreditNoteStatus.Entry]: \"bgredstatuslong\"\r\n };\r\n\r\n private readonly bgcolors = {\r\n [CreditNoteStatus.Credited]: \"clrgreen\",\r\n [CreditNoteStatus.Entry]: \"clrred\"\r\n };\r\n\r\n transform(value: CreditNoteStatus, args?: any): string {\r\n const colors = {\r\n bg: this.bgcolors[value],\r\n bar: this.status[value]\r\n };\r\n return colors[args];\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'creditNotes.list.title' | translate }}

\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n\r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n
\r\n {{ data.value | customDate: 'shortDate' }}\r\n
\r\n\r\n
\r\n {{ data.value | customCurrency: data.data.CurrencyCode}}\r\n
\r\n\r\n
\r\n
\r\n
\r\n {{ data.text | creditNoteStatus | translate }}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { Component, Inject, OnInit, ViewChild } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { CreditNoteStatus } from \"../../enums/credit-note-status.enum\";\r\nimport { GridKind } from \"../../enums/grid-kind.enum\";\r\nimport { Module } from \"../../enums/module.enum\";\r\nimport { CreditNoteService } from \"../../services/credit-note.service\";\r\nimport { GridService } from \"../../services/grid.service\";\r\nimport { IAuthService } from \"../../services/interfaces/iauth.service\";\r\nimport { IRouterLinkService } from \"../../services/interfaces/irouter-link.service\";\r\nimport { IShowCustomerName } from \"../../services/interfaces/ishow-customer.service\";\r\nimport { ModuleService } from \"../../services/module/module.service\";\r\n\r\n@Component({\r\n selector: \"lib-credit-notes-list\",\r\n templateUrl: \"./credit-notes-list.component.html\",\r\n styleUrls: [\r\n \"./credit-notes-list.component.scss\",\r\n \"../../styles/global.scss\",\r\n \"../../styles/backgrounds.scss\",\r\n \"../../styles/servicesight-shared.scss\"]\r\n})\r\nexport class CreditNotesListComponent implements OnInit {\r\n @ViewChild(\"grid\") private dataGrid: DxDataGridComponent;\r\n public readonly isPortal: boolean;\r\n public showCustomerName: boolean;\r\n public searchText: string = \"\";\r\n public creditNotesDataSource: DataSource;\r\n public baseLink: string;\r\n public selectedStatusCreditNote: string = \"0\";\r\n\r\n public filters: any = {\r\n 1: [[\"Status\", \"=\", CreditNoteStatus.Entry]],\r\n 2: [[\"Status\", \"=\", CreditNoteStatus.Credited]]\r\n };\r\n\r\n constructor(\r\n private router: Router,\r\n private gridService: GridService,\r\n private creditNoteService: CreditNoteService,\r\n @Inject(\"RouterLinkService\") private routerLink: IRouterLinkService,\r\n @Inject(\"AuthService\") private authService: IAuthService,\r\n private moduleService: ModuleService,\r\n @Inject(\"ShowCustomerName\") private showCustomerNameService: IShowCustomerName) {\r\n this.routerLink.baseLink.subscribe(\r\n (link) => {\r\n this.baseLink = link;\r\n });\r\n\r\n this.isPortal = this.authService.isPortalUser;\r\n }\r\n\r\n ngOnInit() {\r\n this.showCustomerNameService.ShowCustomerName().subscribe(res => this.showCustomerName = res);\r\n this.gridService.GetLayout(GridKind.CreditNotes).subscribe(\r\n (value) => {\r\n if (value) {\r\n this.dataGrid.instance.state(value);\r\n }\r\n this.getDataSources();\r\n }, () => this.getDataSources());\r\n\r\n this.moduleService.GetEnabledModules().subscribe(enabledModules => {\r\n const isProEnabled = enabledModules.includes(Module.Pro);\r\n if (!isProEnabled) {\r\n return;\r\n }\r\n });\r\n }\r\n\r\n public searchTextChanged(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.searchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public saveLayout(): void {\r\n const state = this.dataGrid.instance.state();\r\n this.gridService.SaveLayout(state, GridKind.CreditNotes);\r\n }\r\n\r\n public resetLayout(): void {\r\n this.gridService.ResetLayout(GridKind.CreditNotes);\r\n this.dataGrid.instance.state(null);\r\n }\r\n\r\n public get UseRouterLink() {\r\n return !this.baseLink.includes(\"#\");\r\n }\r\n\r\n public filterChanged($event) {\r\n const filterValue = $event.currentTarget.value;\r\n this.dataGrid.instance.clearFilter();\r\n this.selectedStatusCreditNote = filterValue;\r\n if (filterValue !== \"0\") {\r\n this.dataGrid.instance.filter(this.filters[filterValue]);\r\n }\r\n }\r\n\r\n public viewDetails(event): void {\r\n if (this.UseRouterLink) {\r\n this.router.navigate([this.baseLink, \"credit-note\", event.data.Id]);\r\n } else {\r\n this.router.navigate([\"/credit-notes/credit-note/\", event.data.Id]);\r\n }\r\n }\r\n\r\n private getDataSources(): void {\r\n this.creditNotesDataSource = this.creditNoteService.GetCreditNotes();\r\n }\r\n}\r\n","export enum DespatchNoteStatus {\r\n Cancelled = 0,\r\n Pending = 100,\r\n Allocated = 200,\r\n Despatched = 701,\r\n Invoiced = 800\r\n}\r\n","export enum SalesOrdersType {\r\n Equipment = 1,\r\n Parts = 2,\r\n EquipmentAndParts = 3,\r\n Materials = 4,\r\n EquipmentAndMaterials = 5,\r\n PartsAndMaterials = 6,\r\n All = 7\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { IODataService } from \"./interfaces/iodata.service\";\r\nimport { IAppConfig, APP_CONFIG } from \"../models/app-config.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class DespatchNotesService {\r\n\r\n constructor(\r\n @Inject(\"ODataService\") protected odataService: IODataService,\r\n @Inject(APP_CONFIG) private config: IAppConfig) { }\r\n\r\n public GetDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.SalesOrdersOData}DespatchNoteList`,\r\n key: \"DespatchId\",\r\n keyType: \"String\"\r\n });\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { exportDataGrid as exportDataGridToXlsx } from \"devextreme/excel_exporter\";\r\nimport { exportDataGrid as exportDataGridToPdf } from \"devextreme/pdf_exporter\";\r\nimport DxDataGrid from \"devextreme/ui/data_grid\";\r\nimport ExcelJS from \"exceljs\";\r\nimport saveAs from \"file-saver\";\r\nimport { jsPDF, jsPDFOptions } from \"jspdf\";\r\nimport \"jspdf-autotable\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class GridExportService {\r\n\r\n constructor() { }\r\n\r\n public exportGridAsPdf(dataGridInstance: any, filename: string, options?: jsPDFOptions, customizeCellFunction?: ({ gridCell, pdfCell }) => void): void {\r\n this.exportGridAsPdfAsync(dataGridInstance, filename, options, customizeCellFunction);\r\n }\r\n\r\n public exportGridAsPdfAsync(dataGridInstance: any, filename: string, options?: jsPDFOptions, customizeCellFunction?: ({ gridCell, pdfCell }) => void): Promise {\r\n const doc = new jsPDF(options);\r\n return exportDataGridToPdf({\r\n jsPDFDocument: doc,\r\n component: dataGridInstance,\r\n customizeCell: customizeCellFunction\r\n }).then(() => {\r\n doc.save(`${filename}.pdf`);\r\n });\r\n }\r\n\r\n public exportGridAsXlsx(dataGridInstance: DxDataGrid, filename: string, customizeCellFunction?: ({ gridCell, excelCell }) => void): void {\r\n this.exportXlsxOrCsvAsync(dataGridInstance, filename, \"xlsx\", customizeCellFunction);\r\n }\r\n\r\n public exportGridAsCsv(dataGridInstance: DxDataGrid, filename: string, customizeCellFunction?: ({ gridCell, excelCell }) => void): void {\r\n this.exportXlsxOrCsvAsync(dataGridInstance, filename, \"csv\", customizeCellFunction);\r\n }\r\n\r\n public exportGridAsXlsxAsync(dataGridInstance: DxDataGrid, filename: string, customizeCellFunction?: ({ gridCell, excelCell }) => void): Promise {\r\n return this.exportXlsxOrCsvAsync(dataGridInstance, filename, \"xlsx\", customizeCellFunction);\r\n }\r\n\r\n public exportGridAsCsvAsync(dataGridInstance: DxDataGrid, filename: string, customizeCellFunction?: ({ gridCell, excelCell }) => void): Promise {\r\n return this.exportXlsxOrCsvAsync(dataGridInstance, filename, \"csv\", customizeCellFunction);\r\n }\r\n\r\n private exportXlsxOrCsvAsync(dataGridInstance: DxDataGrid, filename: string, type: string, customizeCellFunction: ({ gridCell, excelCell }) => void): Promise {\r\n const workbook = new ExcelJS.Workbook();\r\n const worksheet = workbook.addWorksheet(filename);\r\n return exportDataGridToXlsx({\r\n worksheet,\r\n component: dataGridInstance,\r\n customizeCell: ({ gridCell, excelCell }) => {\r\n if(gridCell.rowType === \"data\" && gridCell.column.dataType === \"string\") {\r\n excelCell.value = gridCell.value?.toString().replace(\"=\", \"\\=\"); // escape \"=\" to avoid command inject\r\n }\r\n\r\n if(customizeCellFunction) {\r\n customizeCellFunction({ gridCell, excelCell });\r\n }\r\n }\r\n }).then(() => {\r\n switch (type) {\r\n case \"xlsx\":\r\n this.exportXlsx(workbook, filename);\r\n break;\r\n case \"csv\":\r\n this.exportCsv(workbook, filename);\r\n break;\r\n default:\r\n throw new Error(\"Unknown export option: \" + type);\r\n }\r\n });\r\n }\r\n\r\n private exportXlsx(workbook: ExcelJS.Workbook, filename: string): void {\r\n workbook.xlsx.writeBuffer().then((buffer) => {\r\n saveAs(new Blob([buffer], { type: \"application/octet-stream\" }), `${filename}.xlsx`);\r\n });\r\n }\r\n\r\n private exportCsv(workbook: ExcelJS.Workbook, filename: string): void {\r\n workbook.csv.writeBuffer().then((buffer) => {\r\n saveAs(new Blob([buffer], { type: \"application/octet-stream\" }), `${filename}.csv`);\r\n });\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable, of } from \"rxjs\";\r\nimport { catchError, map } from \"rxjs/operators\";\r\nimport { IAppConfig, APP_CONFIG } from \"../models/app-config.model\";\r\nimport { ButtonCreatePermissions } from \"../models/buttons.create.permission\";\r\nimport { withCache } from \"@ngneat/cashew\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class PermissionsService {\r\n private static readonly cacheKey: string = \"permissions\";\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private config: IAppConfig) {\r\n }\r\n\r\n public ArePermissionsLoaded(): Observable {\r\n return this.getPermissionsHttp().pipe(map(permissions => permissions && Object.keys(permissions).length > 0));\r\n }\r\n\r\n public CurrentUserHasPermission(permission: string): Observable {\r\n return this.getPermissionsHttp().pipe(map(permissions => permissions[permission] === true));\r\n }\r\n\r\n public CurrentUserHasPermissions(...permissions: string[]): Observable<{ [key: string]: boolean }> {\r\n return this.getPermissionsHttp().pipe(map(cache => {\r\n return permissions.map(permission => {\r\n return {\r\n permission,\r\n allowed: cache[permission] === true\r\n };\r\n }).reduce((dictionary, item) => (dictionary[item.permission] = item.allowed, dictionary), {});\r\n }));\r\n }\r\n\r\n public GetButtonsCreatePermissions(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Dashboard/GetButtonsCreatePermissions`);\r\n }\r\n\r\n private getPermissionsHttp(): Observable<{ [key: string]: boolean }> {\r\n return this.http.get<{ [key: string]: boolean }>(`${this.config.apiLocations.ServiceSight}Permissions/MyList`, {\r\n context: withCache({\r\n key: PermissionsService.cacheKey\r\n })\r\n }).pipe(catchError(() => of({})));\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { DespatchNoteStatus } from \"../enums/depatch-note-status.enum\";\r\n\r\n@Pipe({\r\n name: \"despatchNoteStatusBar\"\r\n})\r\nexport class DespatchNoteStatusBarPipe implements PipeTransform {\r\n private readonly status = {\r\n [DespatchNoteStatus.Cancelled]: \"bggraystatus\",\r\n [DespatchNoteStatus.Pending]: \"bgredstatusshort\",\r\n [DespatchNoteStatus.Allocated]: \"bgyellowstatusshort\",\r\n [DespatchNoteStatus.Despatched]: \"bgyellowstatuslong\",\r\n [DespatchNoteStatus.Invoiced]: \"bggreenstatuslong\"\r\n };\r\n\r\n private readonly bgcolors = {\r\n [DespatchNoteStatus.Cancelled]: \"clrgrey\",\r\n [DespatchNoteStatus.Pending]: \"clrred\",\r\n [DespatchNoteStatus.Allocated]: \"clryellow\",\r\n [DespatchNoteStatus.Despatched]: \"clryellow\",\r\n [DespatchNoteStatus.Invoiced]: \"clrgreen\"\r\n };\r\n\r\n private readonly stringValueMapping = {\r\n Cancelled: DespatchNoteStatus.Cancelled,\r\n Pending: DespatchNoteStatus.Pending,\r\n Allocated: DespatchNoteStatus.Allocated,\r\n Despatched: DespatchNoteStatus.Despatched,\r\n Invoiced: DespatchNoteStatus.Invoiced\r\n };\r\n\r\n transform(value: DespatchNoteStatus | number | string, args?: any): string {\r\n if (value) {\r\n let safeValue = Number(value);\r\n if (isNaN(safeValue)) {\r\n safeValue = this.stringValueMapping[value];\r\n }\r\n\r\n const colors = {\r\n bg: this.bgcolors[safeValue],\r\n bar: this.status[safeValue]\r\n };\r\n\r\n return colors[args];\r\n }\r\n\r\n return null;\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { DespatchNoteStatus } from \"../enums/depatch-note-status.enum\";\r\n\r\n@Pipe({\r\n name: \"despatchNoteStatus\"\r\n})\r\nexport class DespatchNoteStatusPipe implements PipeTransform {\r\n private readonly despatchStatus = {\r\n [DespatchNoteStatus.Cancelled]: \"despatch-note.status.cancelled\",\r\n [DespatchNoteStatus.Pending]: \"despatch-note.status.pending\",\r\n [DespatchNoteStatus.Allocated]: \"despatch-note.status.allocated\",\r\n [DespatchNoteStatus.Despatched]: \"despatch-note.status.despatched\",\r\n [DespatchNoteStatus.Invoiced]: \"despatch-note.status.invoiced\",\r\n };\r\n\r\n private readonly stringValueMapping = {\r\n Cancelled: DespatchNoteStatus.Cancelled,\r\n Pending: DespatchNoteStatus.Pending,\r\n Allocated: DespatchNoteStatus.Allocated,\r\n Despatched: DespatchNoteStatus.Despatched,\r\n Invoiced: DespatchNoteStatus.Invoiced\r\n };\r\n\r\n transform(value: number | string | DespatchNoteStatus): string {\r\n let safeValue = Number(value);\r\n if (isNaN(safeValue)) {\r\n safeValue = this.stringValueMapping[value];\r\n }\r\n\r\n return this.despatchStatus[safeValue];\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'despatch-notes.list.title' | translate }}

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n
\r\n
\r\n
{{ item.value | despatchNoteStatus | translate }}
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n\r\n","import { Component, Inject, OnInit, ViewChild } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { EdmLiteral } from \"devextreme/data/odata/utils\";\r\nimport { DespatchNoteStatus } from \"../../enums/depatch-note-status.enum\";\r\nimport { GridKind } from \"../../enums/grid-kind.enum\";\r\nimport { Module } from \"../../enums/module.enum\";\r\nimport { SalesOrdersType } from \"../../enums/sales-orders-type.enum\";\r\nimport { DespatchNotesService } from \"../../services/despatch-notes.service\";\r\nimport { GridExportService } from \"../../services/grid-export.service\";\r\nimport { GridService } from \"../../services/grid.service\";\r\nimport { IAuthService } from \"../../services/interfaces/iauth.service\";\r\nimport { IRouterLinkService } from \"../../services/interfaces/irouter-link.service\";\r\nimport { ModuleService } from \"../../services/module/module.service\";\r\nimport { PermissionsService } from \"../../services/permissions-service.service\";\r\n\r\n@Component({\r\n selector: \"lib-despatch-notes-list\",\r\n templateUrl: \"./despatch-notes-list.component.html\",\r\n styleUrls: [\r\n \"./despatch-notes-list.component.scss\",\r\n \"../../styles/global.scss\",\r\n \"../../styles/backgrounds.scss\",\r\n \"../../styles/servicesight-shared.scss\"\r\n ]\r\n})\r\nexport class DespatchNotesListComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n\r\n public readonly isPortal: boolean;\r\n public IsProEnabled: boolean = false;\r\n public dataSource: DataSource;\r\n public SearchText: string = \"\";\r\n public baseLink: string;\r\n\r\n public filters: any = {\r\n 1: [\"Status\", \"=\", new EdmLiteral(\"ServiceSight.Shared.Enums.DespatchStatus'Cancelled'\")],\r\n 2: [\"Status\", \"=\", new EdmLiteral(\"ServiceSight.Shared.Enums.DespatchStatus'Pending'\")],\r\n 3: [\"Status\", \"=\", new EdmLiteral(\"ServiceSight.Shared.Enums.DespatchStatus'Allocated'\")],\r\n 4: [\"Status\", \"=\", new EdmLiteral(\"ServiceSight.Shared.Enums.DespatchStatus'Despatched'\")],\r\n 5: [\"Status\", \"=\", new EdmLiteral(\"ServiceSight.Shared.Enums.DespatchStatus'Invoiced'\")]\r\n };\r\n\r\n public ynDataSource = [\r\n { id: false, name: \"No\" },\r\n { id: true, name: \"Yes\" }\r\n ];\r\n\r\n public exportOptions: { id: number; label: string }[] = [\r\n { id: 1, label: \"Export data as xlsx\" },\r\n { id: 2, label: \"Export data as csv\" },\r\n { id: 3, label: \"Export data as pdf\" }\r\n ];\r\n\r\n public salesOrdersTypes: { id: SalesOrdersType; value: string }[] = [\r\n { id: SalesOrdersType.Equipment, value: \"Equipment\" },\r\n { id: SalesOrdersType.Parts, value: \"Parts\" },\r\n { id: SalesOrdersType.Materials, value: \"Materials\" },\r\n ];\r\n\r\n private gridState: any = { };\r\n\r\n public despatchStatus = DespatchNoteStatus;\r\n\r\n public baseCurrencyCode = JSON.parse(localStorage.getItem(\"ls.BaseCurrencyCode\"));\r\n\r\n constructor(\r\n private despatchNotesService: DespatchNotesService,\r\n private gridService: GridService,\r\n private router: Router,\r\n private permissionsService: PermissionsService,\r\n private gridExportService: GridExportService,\r\n private translate: TranslateService,\r\n private moduleService: ModuleService,\r\n @Inject(\"AuthService\") authService: IAuthService,\r\n @Inject(\"RouterLinkService\") private routerLink: IRouterLinkService) {\r\n this.CalculateSearchFilterForDespatchId = this.CalculateSearchFilterForDespatchId.bind(this);\r\n this.CalculateSearchFilterForSalesId = this.CalculateSearchFilterForSalesId.bind(this);\r\n this.CalculateSearchFilterForInvoiceNo = this.CalculateSearchFilterForInvoiceNo.bind(this);\r\n this.CalculateStatusFilter = this.CalculateStatusFilter.bind(this);\r\n this.isPortal = authService.isPortalUser;\r\n }\r\n\r\n public ngOnInit(): void {\r\n if (this.isPortal) {\r\n this.Load();\r\n this.routerLink.baseLink.subscribe(\r\n (link) => {\r\n this.baseLink = link;\r\n });\r\n } else {\r\n this.permissionsService.CurrentUserHasPermission(\"DespatchNoteView\").subscribe(isAllowedView => {\r\n if (isAllowedView) {\r\n this.Load();\r\n }\r\n });\r\n }\r\n\r\n this.moduleService.GetEnabledModules().subscribe(modules => {\r\n this.IsProEnabled = modules.includes(Module.Pro);\r\n });\r\n }\r\n\r\n public onInitialized(e): void {\r\n e.component.option(\"syncLookupFilterValues\", false);\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public FilterChanged($event): void {\r\n const filterValue = $event.currentTarget.value;\r\n if (filterValue === \"0\") {\r\n this.dataGrid.instance.clearFilter();\r\n } else {\r\n this.dataGrid.instance.filter(this.filters[filterValue]);\r\n }\r\n }\r\n\r\n public CalculateStatusFilter(filterValue, selectedFilterOperation, filterType) {\r\n const column = this as any;\r\n\r\n if (filterValue === SalesOrdersType.Equipment) {\r\n return [[\"Type\", \"=\", SalesOrdersType.Equipment], \"or\", [\"Type\", \"=\", SalesOrdersType.EquipmentAndParts], \"or\",\r\n [\"Type\", \"=\", SalesOrdersType.EquipmentAndParts], \"or\", [\"Type\", \"=\", SalesOrdersType.All]];\r\n }\r\n else if (filterValue === SalesOrdersType.Parts) {\r\n return [[\"Type\", \"=\", SalesOrdersType.Parts], \"or\", [\"Type\", \"=\", SalesOrdersType.EquipmentAndParts], \"or\",\r\n [\"Type\", \"=\", SalesOrdersType.PartsAndMaterials], \"or\", [\"Type\", \"=\", SalesOrdersType.All]];\r\n }\r\n else if (filterValue === SalesOrdersType.Materials) {\r\n return [[\"Type\", \"=\", SalesOrdersType.Materials], \"or\", [\"Type\", \"=\", SalesOrdersType.EquipmentAndMaterials],\r\n \"or\", [\"Type\", \"=\", SalesOrdersType.PartsAndMaterials], \"or\", [\"Type\", \"=\", SalesOrdersType.All]];\r\n }\r\n\r\n return column.defaultCalculateFilterExpression(filterValue, selectedFilterOperation, filterType);\r\n }\r\n\r\n public SaveLayout(): void {\r\n const state = this.dataGrid.instance.state();\r\n this.gridService.SaveLayout(state, GridKind.DespatchNotes);\r\n }\r\n\r\n public ResetLayout(): void {\r\n this.gridService.ResetLayout(GridKind.DespatchNotes);\r\n this.dataGrid.instance.state(null);\r\n this.gridState = null;\r\n }\r\n\r\n public OpenColumnChooser(): void {\r\n this.dataGrid.instance.showColumnChooser();\r\n }\r\n\r\n public onExportItemClick(e: any): void {\r\n const title = this.translate.instant(\"despatch-note.title\");\r\n switch (e.itemData.id) {\r\n case 1:\r\n this.gridExportService.exportGridAsXlsx(this.dataGrid.instance, title, this.despatchNotesExcelCustomCellFunction);\r\n break;\r\n case 2:\r\n this.gridExportService.exportGridAsCsv(this.dataGrid.instance, title, this.despatchNotesExcelCustomCellFunction);\r\n break;\r\n case 3:\r\n this.gridExportService.exportGridAsPdf(this.dataGrid.instance, title, { orientation: \"l\" }, this.despatchNotesPdfCustomCellFunction);\r\n break;\r\n default:\r\n throw new Error(\"Unhandled export type: \" + e.itemData.id);\r\n }\r\n }\r\n\r\n public columnVisible(name: string, defaultValue: boolean): boolean {\r\n if (this.gridState && this.gridState.columns) {\r\n const column = this.gridState.columns.find(x => x.name === name);\r\n\r\n if (column) {\r\n return column.visible;\r\n }\r\n }\r\n\r\n return defaultValue;\r\n }\r\n\r\n public GoToDetail(id: number): void {\r\n this.router.navigate([\"/despatch-notes\", \"detail\", id]);\r\n }\r\n\r\n public CalculateSearchFilterForDespatchId(filterValue: string, selectedFilterOperation: string, target: string) {\r\n return this.CalculateSearchFilter(\"DespatchId\", filterValue, selectedFilterOperation, target);\r\n }\r\n\r\n public CalculateSearchFilterForSalesId(filterValue: string, selectedFilterOperation: string, target: string) {\r\n return this.CalculateSearchFilter(\"SalesId\", filterValue, selectedFilterOperation, target);\r\n }\r\n\r\n public CalculateSearchFilterForInvoiceNo(filterValue: string, selectedFilterOperation: string, target: string) {\r\n return this.CalculateSearchFilter(\"InvoiceNo\", filterValue, selectedFilterOperation, target);\r\n }\r\n\r\n private CalculateSearchFilter(column: string, filterValue: string, selectedFilterOperation: string, target: string) {\r\n if (target === \"search\" || target === \"filterRow\") {\r\n return [\r\n new EdmLiteral(`cast(${column}, 'Edm.String')`),\r\n \"contains\",\r\n `${filterValue}`,\r\n ];\r\n }\r\n return [\r\n column,\r\n selectedFilterOperation,\r\n filterValue\r\n ];\r\n }\r\n\r\n private GetDataSources(): void {\r\n this.dataSource = this.despatchNotesService.GetDataSource();\r\n }\r\n\r\n private Load() {\r\n this.gridService.GetLayout(GridKind.DespatchNotes).subscribe(value => {\r\n if (value) {\r\n value.searchText = \"\";\r\n this.gridState = value;\r\n this.dataGrid.instance.state(value);\r\n }\r\n this.GetDataSources();\r\n }, () => this.GetDataSources());\r\n }\r\n\r\n private despatchNotesExcelCustomCellFunction = ({ gridCell, excelCell }): void => {\r\n if (gridCell.rowType === \"data\" && gridCell.value) {\r\n if (gridCell.column.dataField === \"Type\") {\r\n excelCell.value = this.getDespatchNotesTypeText(gridCell.data);\r\n }\r\n }\r\n };\r\n\r\n private despatchNotesPdfCustomCellFunction = ({ gridCell, pdfCell }): void => {\r\n if (gridCell.rowType === \"data\" && gridCell.value) {\r\n if (gridCell.column.dataField === \"Type\") {\r\n pdfCell.text = this.getDespatchNotesTypeText(gridCell.data);\r\n }\r\n }\r\n };\r\n\r\n private getDespatchNotesTypeText(despatchNoteData: any): string {\r\n let typeValue = \"\";\r\n if (despatchNoteData.IncludeEquipment) {\r\n typeValue += \"Equipment\";\r\n }\r\n if (despatchNoteData.IncludeParts) {\r\n if (typeValue) {\r\n typeValue += \", \";\r\n }\r\n typeValue += \"Parts\";\r\n }\r\n if (despatchNoteData.IncludeMaterials) {\r\n if (typeValue) {\r\n typeValue += \", \";\r\n }\r\n typeValue += \"Materials\";\r\n }\r\n\r\n return typeValue;\r\n }\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { IAppConfig, APP_CONFIG } from \"../../models/app-config.model\";\r\nimport { EngineerType } from \"../../models/engineer-type.model\";\r\nimport { JobVisitEngineer } from \"../../models/job-visit-engineer.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class EngineersService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private config: IAppConfig) { }\r\n\r\n public GetEngineerTypes(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}EngineerType/GetEngineerTypes`);\r\n }\r\n\r\n public GetAllEngineers(): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}JobVisit/GetAllEngineers`;\r\n return this.http.get(url);\r\n }\r\n}\r\n","\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n {{ engineer.Name }}\r\n \r\n
\r\n
\r\n \r\n {{ typesDictionary[engineer.TypeId] }}\r\n \r\n
\r\n
\r\n
\r\n","import { Component, EventEmitter, forwardRef, Input, OnInit, Output } from \"@angular/core\";\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from \"@angular/forms\";\r\nimport { DomSanitizer, SafeResourceUrl } from \"@angular/platform-browser\";\r\nimport { EngineerChanged } from \"../../models/engineer-changed.model\";\r\nimport { JobVisitEngineer } from \"../../models/job-visit-engineer.model\";\r\nimport { EngineersService } from \"../../services/engineers/engineers.service\";\r\n\r\n@Component({\r\n selector: \"lib-engineer-selector\",\r\n templateUrl: \"./engineer-selector.component.html\",\r\n styleUrls: [\"./engineer-selector.component.scss\"],\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => EngineerSelectorComponent),\r\n multi: true\r\n }\r\n ]\r\n})\r\nexport class EngineerSelectorComponent implements OnInit, ControlValueAccessor {\r\n @Input() disabled: boolean = false;\r\n @Input() name: string;\r\n @Input() value: number;\r\n @Output() selectedEngineerChanged: EventEmitter = new EventEmitter();\r\n\r\n public typesDictionary: { [key: string]: string } = {};\r\n public Engineers: JobVisitEngineer[] = [];\r\n public selectedEngineer: JobVisitEngineer;\r\n\r\n constructor(\r\n private sanitizer: DomSanitizer,\r\n private engineersService: EngineersService\r\n ) {}\r\n\r\n onChange: (v: number) => void;\r\n onTouched: () => void;\r\n\r\n public registerOnChange(fn: (v: number) => void): void {\r\n this.onChange = fn;\r\n }\r\n\r\n public writeValue(initialValue: number): void {\r\n this.value = initialValue;\r\n if (initialValue) {\r\n this.selectedEngineer = this.getEngineer(initialValue);\r\n }\r\n }\r\n\r\n public registerOnTouched(fn: () => void): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.engineersService.GetEngineerTypes().subscribe(types => {\r\n this.typesDictionary = Object.assign({}, ...types.map((x) => ({[x.TypeId]: x.Name})));\r\n });\r\n\r\n this.engineersService.GetAllEngineers().subscribe(engineers => {\r\n this.Engineers = engineers.filter((eng) => eng.IsActive).sort((a, b) => a.Name > b.Name ? 1 : -1);\r\n });\r\n }\r\n\r\n public OnEngineerChanged(e): void {\r\n if (e.event) {\r\n this.value = e.value;\r\n this.selectedEngineer = this.getEngineer(this.value);\r\n this.onTouched();\r\n this.onChange(this.value);\r\n\r\n const engineerChanged: EngineerChanged = {\r\n PreviousEngineerId: e.previousValue,\r\n CurrentEngineerId: e.value,\r\n SelectedEngineer: this.selectedEngineer,\r\n event: e\r\n };\r\n\r\n this.selectedEngineerChanged.emit(engineerChanged);\r\n }\r\n }\r\n\r\n public GetImage(base64string: string): SafeResourceUrl {\r\n return this.sanitizer.bypassSecurityTrustResourceUrl(\"data:image/bmp;charset=utf-8;base64,\" + base64string);\r\n }\r\n\r\n public selectBoxOpened(e: any): void {\r\n // eslint-disable-next-line no-underscore-dangle\r\n const list = e.component._list;\r\n if (!list.option(\"useNativeScrolling\")) {\r\n list.option(\"useNativeScrolling\", true);\r\n // eslint-disable-next-line no-underscore-dangle\r\n list._scrollView.option(\"useNative\", true);\r\n list.reload();\r\n }\r\n }\r\n\r\n private getEngineer(employeeId: number): JobVisitEngineer {\r\n return this.Engineers.find((i) => i.Id === employeeId);\r\n }\r\n}\r\n","export enum UICustomisation {\r\n EMPLOYEE_REF1 = 1,\r\n EMPLOYEE_REF2 = 2,\r\n CUSTOMER_REF1 = 3,\r\n CUSTOMER_REF2 = 4,\r\n SUPPLIERS = 5,\r\n EQUIPMENT = 7,\r\n JOB_REF1 = 8,\r\n JOB_REF2 = 9,\r\n EQUIPMENT_REF1 = 10,\r\n EQUIPMENT_REF2 = 11,\r\n MAINT_CONTRACT_REF1 = 12,\r\n MAINT_CONTRACT_REF2 = 13,\r\n SUPPLIER_REF1 = 14,\r\n SUPPLIER_REF2 = 15,\r\n CUSTOMER_CONTACT_REF1 = 16,\r\n CUSTOMER_CONTACT_REF2 = 17,\r\n PURCHASE_REF1 = 18,\r\n PURCHASE_REF2 = 19,\r\n SALES_REF1 = 20,\r\n SALES_REF2 = 21,\r\n MAKE_MODEL_REF1 = 22,\r\n MAKE_MODEL_REF2 = 23,\r\n EQUIPMENT_REF3 = 24,\r\n EQUIPMENT_REF4 = 25,\r\n TRANSPORT_REF1 = 26,\r\n TRANSPORT_REF2 = 27,\r\n TRANSPORT_REF3 = 28,\r\n TRANSPORT_REF4 = 29,\r\n HIRE_REF1 = 30,\r\n HIRE_REF2 = 31,\r\n HIRE_REF3 = 32,\r\n HIRE_REF4 = 33,\r\n MAINT_CONTRACT_REF3 = 34,\r\n MAINT_CONTRACT_REF4 = 35,\r\n SALES_OPPORTUNITY_REF1 = 36,\r\n SALES_OPPORTUNITY_REF2 = 37,\r\n QUOTE_REF1 = 38,\r\n QUOTE_REF2 = 39,\r\n STOCK_REF1 = 40,\r\n STOCK_REF2 = 41,\r\n STOCK_REF3 = 42,\r\n REMINDER_REF1 = 43,\r\n REMINDER_REF2 = 44,\r\n CUSTOMER = 45,\r\n SUPPLIER = 46,\r\n CYLINDERREF1 = 47,\r\n CYLINDERREF2 = 48,\r\n PURCHASE_NOTE_1 = 49,\r\n PURCHASE_NOTE_2 = 50,\r\n PROJECT_REF_1 = 51,\r\n PROJECT_REF_2 = 52\r\n}\r\n","export enum UserRefType {\r\nCONTACT_1 = 1,\r\nCONTACT_2 = 2,\r\nCUSTOMER_1 = 3,\r\nCUSTOMER_2 = 4,\r\nEMPLOYEE_1 = 5,\r\nEMPLOYEE_2 = 6,\r\nEQUIP_1 = 7,\r\nEQUIP_2 = 8,\r\nEQUIP_3 = 9,\r\nEQUIP_4 = 10,\r\nEQUIPMOVEMENT_1 = 11,\r\nEQUIPMOVEMENT_2 = 12,\r\nEQUIPMOVEMENT_3 = 13,\r\nEQUIPMOVEMENT_4 = 14,\r\nHIRE_1 = 15,\r\nHIRE_2 = 16,\r\nHIRE_3 = 17,\r\nHIRE_4 = 18,\r\nJOB_1 = 19,\r\nJOB_2 = 20,\r\nMAINTENANCE_CONTRACT_1 = 21,\r\nMAINTENANCE_CONTRACT_2 = 22,\r\nMAINTENANCE_CONTRACT_3 = 23,\r\nMAINTENANCE_CONTRACT_4 = 24,\r\nMAKE_MODEL_1 = 25,\r\nMAKE_MODEL_2 = 26,\r\nPURCHASE_ORDER_1 = 27,\r\nPURCHASE_ORDER_2 = 28,\r\nSALES_ORDER_1 = 29,\r\nSALES_ORDER_2 = 30,\r\nSALES_OPPORTUNITY_1 = 31,\r\nSALES_OPPORTUNITY_2 = 32,\r\nQUOTE_1 = 33,\r\nQUOTE_2 = 34,\r\nSTOCK_1 = 35,\r\nSTOCK_2 = 36,\r\nSTOCK_3 = 37,\r\nSUPPLIER_1 = 38,\r\nSUPPLIER_2 = 39,\r\nTASK_1 = 40,\r\nTASK_2 = 41,\r\nCYLINDER_1 = 42,\r\nCYLINDER_2 = 43,\r\nPURCHASE_NOTE_1 = 44,\r\nPURCHASE_NOTE_2 = 45\r\n}\r\n","import { EquipmentStatus } from \"../enums/equipment-status.enum\";\r\n\r\nexport const EquipmentFilters: any = {\r\n 1: [[\"Status\", \"<>\", EquipmentStatus.Retired], \"and\", [\"Status\", \"<>\", EquipmentStatus.Returned]], // default filter\r\n 2: [[\"Status\", \"=\", EquipmentStatus.Stock], \"or\", [\"Status\", \"=\", EquipmentStatus.OnHire], \"or\", [\"Status\", \"=\", EquipmentStatus.ForHire]],\r\n 3: [[\"Status\", \"=\", EquipmentStatus.Sold], \"or\", [\"Status\", \"=\", EquipmentStatus.CustomersOwn]],\r\n 4: [[\"Status\", \"=\", EquipmentStatus.ForHire], \"or\", [\"Status\", \"=\", EquipmentStatus.OnHire]],\r\n 5: [\"Status\", \"=\", EquipmentStatus.Returned]\r\n};\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { FilterDescriptor } from \"devextreme/data\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { forkJoin, Observable } from \"rxjs\";\r\nimport { map } from \"rxjs/operators\";\r\nimport { IODataService } from \"./interfaces/iodata.service\";\r\nimport { AccountType } from \"../enums/account-type.enum\";\r\nimport { APP_CONFIG, IAppConfig } from \"../models/app-config.model\";\r\nimport { BooleanResponse } from \"../models/boolean-response.model\";\r\nimport { ContactModel } from \"../models/contact-model\";\r\nimport { CustomerMetaData } from \"../models/customer-meta-data.model\";\r\nimport { CustomerSite } from \"../models/customer-site.model\";\r\nimport { CustomerModel } from \"../models/customer.model\";\r\nimport { ProteanResponse } from \"../models/protean-response.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class CustomerService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(\"ODataService\") private odataService: IODataService,\r\n @Inject(APP_CONFIG) private config: IAppConfig) {\r\n }\r\n\r\n public GetCustomersDataSource(filter: FilterDescriptor | Array = null): DataSource {\r\n return new DataSource({\r\n store: this.GetCustomerDataStore(),\r\n paginate: true,\r\n pageSize: 50,\r\n filter\r\n });\r\n }\r\n\r\n public GetCustomerDataStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: this.config.apiLocations.ServiceSightOData + \"CustomerOD\",\r\n key: \"CustomerId\",\r\n paging: true,\r\n pageSize: 50,\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetSiteIdsByInvoiceId(invoiceId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Customer/GetCustomerAndSites?customerId=${invoiceId}`).pipe(map(customers =>\r\n customers.map(customer => customer.CustomerID as number)\r\n ));\r\n }\r\n\r\n /**\r\n * Get customer with metadata.\r\n * Not recommended when only basic customer data is needed.\r\n */\r\n public Get(id: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Customer/GetAsync?customerId=${id}`);\r\n }\r\n\r\n /**\r\n * Get basic customer model.\r\n * Recommended when only basic customer data is needed.\r\n */\r\n public GetCustomerSimpleModel(id: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Customer/GetCustomerSimpleModel?customerId=${id}`);\r\n }\r\n\r\n public GetCustomerMetaData(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Customer/GetCustomerListMetaData`);\r\n }\r\n\r\n public GetCustomerHistory(customerId: number): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.ServiceSightOData}CustomerHistoryOD`,\r\n key: \"HistoryItemId\",\r\n keyType: \"String\",\r\n paging: true,\r\n pageSize: 50,\r\n queryStringParams: {\r\n customerId\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Use this method to avoid making unnecessary requests when customerId === siteId.\r\n * If customerId == siteId, method will return customer and site objects to maintain current behaviour\r\n * @returns Object containg customer and site data\r\n */\r\n public GetCustomerAndSite(customerId: number, siteId: number): Observable<{ customer: CustomerModel; site: CustomerModel }> {\r\n if (siteId === customerId) {\r\n return this.GetCustomerSimpleModel(customerId).pipe(map(customer => {\r\n return {\r\n customer,\r\n site: customer\r\n };\r\n }));\r\n } else {\r\n return forkJoin({\r\n customer: this.GetCustomerSimpleModel(customerId),\r\n site: this.GetCustomerSimpleModel(siteId)\r\n });\r\n }\r\n }\r\n\r\n public DefaultReverseChargeValue(customerId: number): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Customer/DefaultReverseChargeValue?customerId=${customerId}`;\r\n return this.http.get(url);\r\n }\r\n\r\n public IsOrderNumberRequired(customerId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Customer/IsOrderNumberRequired?customerId=${customerId}`);\r\n }\r\n\r\n public GetCustomerContactsAsync(customerId: number): Observable{\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Customer/GetCustomerContactsAsync?customerId=${customerId}&includeSiteContacts=true`);\r\n }\r\n\r\n public GetCustomerSitesAsync(customerId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Customer/GetCustomerSitesAsync?customerId=${customerId}`);\r\n }\r\n\r\n public GetNewCustomer(accountType: AccountType, parentId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Customer/GetNewDefaultModelAsync?accountType=${accountType}&parentID=${parentId}`);\r\n }\r\n\r\n public CreateCustomer(customer: CustomerModel): Observable {\r\n return this.http.post(this.config.apiLocations.ServiceSight + \"Customer/Create\", customer);\r\n }\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { UICustomisation } from \"../enums/ui-customisation.enum\";\r\nimport { UserRefType } from \"../enums/user-ref-type.enum\";\r\nimport { IAppConfig, APP_CONFIG } from \"../models/app-config.model\";\r\nimport { IUserReferences } from \"../models/user-references.model\";\r\nimport { IODataService } from \"./interfaces/iodata.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class UserReferenceService {\r\n\r\n private get UserRefs(): IUserReferences {\r\n return JSON.parse(localStorage.getItem(\"ls.userReferences\"));\r\n }\r\n\r\n constructor(\r\n @Inject(\"ODataService\") protected odataService: IODataService,\r\n @Inject(APP_CONFIG) private config: IAppConfig) { }\r\n\r\n public getLabel(customisation: UICustomisation): string {\r\n if (!this.UserRefs) {\r\n return null;\r\n }\r\n const ref = this.UserRefs.list.find(r => r.UICustomisationID === customisation);\r\n return ref.CustomText || ref.OriginalText;\r\n }\r\n\r\n public getListDataSource(type: UserRefType, paging: boolean = true): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.ServiceSightOData}UserReferenceOD`,\r\n key: \"UserReferenceListItemID\",\r\n keyType: \"Int32\",\r\n paging,\r\n queryStringParams: {\r\n userReferenceId: type\r\n }\r\n });\r\n }\r\n\r\n public getListDataStore(type: UserRefType): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.config.apiLocations.ServiceSightOData}UserReferenceOD`,\r\n key: \"UserReferenceListItemID\",\r\n keyType: \"Int32\",\r\n queryStringParams: {\r\n userReferenceId: type\r\n }\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'equipment.list.equipment.list' | translate }}

\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
{{ item.data.Status | equipmentStatus | translate }}
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n {{ item.data.ConditionName }}\r\n
\r\n
\r\n
\r\n {{ data.value | customDate: 'shortDate' }}\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n","import { Component, Inject, OnInit, ViewChild } from \"@angular/core\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { EquipmentStatus } from \"../../enums/equipment-status.enum\";\r\nimport { GridKind } from \"../../enums/grid-kind.enum\";\r\nimport { Module } from \"../../enums/module.enum\";\r\nimport { SettingId } from \"../../enums/setting-id.enum\";\r\nimport { UICustomisation } from \"../../enums/ui-customisation.enum\";\r\nimport { UserRefType } from \"../../enums/user-ref-type.enum\";\r\nimport { EquipmentFilters } from \"../../filters/equipment.filter\";\r\nimport { SettingData } from \"../../models/setting-data.model\";\r\nimport { CustomerService } from \"../../services/customer.service\";\r\nimport { EquipmentDataService } from \"../../services/equipment/equipment-data.service\";\r\nimport { GridExportService } from \"../../services/grid-export.service\";\r\nimport { GridService } from \"../../services/grid.service\";\r\nimport { IAuthService } from \"../../services/interfaces/iauth.service\";\r\nimport { IRouterLinkService } from \"../../services/interfaces/irouter-link.service\";\r\nimport { ModuleService } from \"../../services/module/module.service\";\r\nimport { SettingsService } from \"../../services/setting/settings.service\";\r\nimport { UserReferenceService } from \"../../services/user-reference.service\";\r\n\r\n@Component({\r\n selector: \"lib-equipment-list\",\r\n templateUrl: \"./equipment-list.component.html\",\r\n styleUrls: [\r\n \"./equipment-list.component.scss\",\r\n \"../../styles/global.scss\",\r\n \"../../styles/backgrounds.scss\",\r\n \"../../styles/servicesight-shared.scss\"\r\n ]\r\n})\r\nexport class EquipmentListComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n\r\n public baseDetailLink: string;\r\n public contractBaseLink: string;\r\n public equipmentDataSource: DataSource;\r\n public SearchText: string = \"\";\r\n public isAllowedCreateEquipment = false;\r\n public isPortal = false;\r\n public customerId: number;\r\n public invoiceId: number;\r\n public IsRecurringJobModuleEnabled: boolean = false;\r\n public IsFGasModuleEnabled: boolean = false;\r\n public IsServiceContractModuleEnabled: boolean = false;\r\n public hidePriority: Array = [\r\n \"SiteEquipId\",\r\n \"UserRef1EquipId\",\r\n \"UserRef2Equip\",\r\n \"UserRef3Equip\",\r\n \"CurrentCharge\",\r\n \"Co2Equivalent\",\r\n \"Gwp\",\r\n \"DesignCapacity\",\r\n \"RefrigerantType\",\r\n \"SystemName\",\r\n \"MaintContractId\",\r\n \"Location\",\r\n \"LastServiceDate\",\r\n \"NextServiceDate\",\r\n \"Logo\",\r\n \"Address\",\r\n \"SubType\",\r\n \"Type\",\r\n \"Category\",\r\n \"Status\",\r\n \"Site\",\r\n \"SerialNo\",\r\n \"Model\",\r\n \"Make\",\r\n \"ConditionName\",\r\n \"EquipNumber\"\r\n ];\r\n\r\n public IsProEnabled: boolean = false;\r\n public filters = EquipmentFilters;\r\n public uploadButtonItems: Array<{ name: string; link: string }> = [];\r\n private equipFilter = [];\r\n private isAllowedView: boolean = false;\r\n private gridState: any = {};\r\n\r\n public cachedUserRef1: any[];\r\n public userRef1Label: string;\r\n public userRef2Label: string;\r\n public userRef3Label: string;\r\n public isEquipmentSystemsEnabled: boolean = false;\r\n public displayEquipmentConditionsOnWebPortal: boolean = false;\r\n\r\n public columnHidePriority(columnName: string): number {\r\n return this.isPortal ? this.hidePriority.indexOf(columnName) : null;\r\n }\r\n\r\n constructor(\r\n private customerService: CustomerService,\r\n private equipmentService: EquipmentDataService,\r\n private gridService: GridService,\r\n private router: Router,\r\n private route: ActivatedRoute,\r\n private translate: TranslateService,\r\n private gridExportService: GridExportService,\r\n private settingsService: SettingsService,\r\n @Inject(\"AuthService\") authService: IAuthService,\r\n @Inject(\"RouterLinkService\") private routerLink: IRouterLinkService,\r\n private userRefService: UserReferenceService,\r\n private moduleService: ModuleService) {\r\n this.isPortal = authService.isPortalUser;\r\n this.routerLink.baseLink.subscribe(link => this.baseDetailLink = link);\r\n this.routerLink.serviceContractDetailsBaseLink.subscribe(link => this.contractBaseLink = link);\r\n this.calculateStatusFilter = this.calculateStatusFilter.bind(this);\r\n\r\n // code below must be here because OnInit method is executed to late.\r\n // in 'OnInit' 'state' object is override/cleared and we don't have access to data which was send\r\n // Doc ref. https://angular.io/api/router/NavigationExtras#state\r\n const nav = this.router.getCurrentNavigation();\r\n if (nav) {\r\n const extras = nav.extras;\r\n if (extras && extras.state && extras.state.hasOwnProperty(\"equipIds\")) {\r\n extras.state.equipIds.forEach((el, index) => {\r\n this.equipFilter.push([\"EquipNumber\", \"=\", el]);\r\n if (extras.state.equipIds.length > index) {\r\n this.equipFilter.push(\"or\");\r\n }\r\n });\r\n }\r\n }\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.settingsService.getSetting(SettingId.EquipmentSystems).subscribe((setting: SettingData) => {\r\n this.isEquipmentSystemsEnabled = setting.ValueBool;\r\n });\r\n\r\n this.settingsService.getSetting(SettingId.DisplayEquipmentConditionsOnWebPortal).subscribe((setting: SettingData) => {\r\n this.displayEquipmentConditionsOnWebPortal = setting.ValueBool;\r\n });\r\n\r\n this.userRef1Label = this.userRefService.getLabel(UICustomisation.EQUIPMENT_REF1);\r\n this.userRef2Label = this.userRefService.getLabel(UICustomisation.EQUIPMENT_REF2);\r\n this.userRef3Label = this.userRefService.getLabel(UICustomisation.EQUIPMENT_REF3);\r\n this.userRefService.getListDataStore(UserRefType.EQUIP_1).load().then(res => this.cachedUserRef1 = res);\r\n\r\n this.moduleService.GetEnabledModules().subscribe(modules => {\r\n this.IsProEnabled = modules.includes(Module.Pro);\r\n this.IsRecurringJobModuleEnabled = modules.includes(Module.RecurringJobs);\r\n this.IsFGasModuleEnabled = modules.includes(Module.FGas);\r\n this.IsServiceContractModuleEnabled = modules.includes(Module.ServiceContract);\r\n });\r\n\r\n this.equipmentService.GetViewPermission(\"EquipView\").subscribe(isAllowedView => {\r\n this.isAllowedView = isAllowedView;\r\n if (isAllowedView) {\r\n this.gridService.GetLayout(GridKind.Equipment).subscribe(value => {\r\n if (value) {\r\n this.gridState = value;\r\n this.dataGrid.instance.state(value);\r\n }\r\n this.GetDataSources();\r\n }, () => this.GetDataSources());\r\n\r\n this.equipmentService.GetButtonsCreatePermissions()\r\n .subscribe(res => this.isAllowedCreateEquipment = res.IsAllowedEquipmentCreate);\r\n }\r\n });\r\n\r\n this.translate.get(\r\n [\r\n \"equipment.list.upload.records\",\r\n \"equipment.list.upload.service-schedules\"\r\n ]).subscribe(translations => {\r\n this.uploadButtonItems = [\r\n { name: translations[\"equipment.list.upload.records\"], link: \"upload\" },\r\n { name: translations[\"equipment.list.upload.service-schedules\"], link: \"service-upload\" }\r\n ];\r\n });\r\n\r\n this.route.params.subscribe(x => {\r\n this.customerId = Number(x.customerId);\r\n this.invoiceId = Number(x.invoiceId);\r\n\r\n if (this.isAllowedView) {\r\n this.GetDataSources();\r\n }\r\n });\r\n }\r\n\r\n public columnVisible(name: string, defaultValue: boolean): boolean {\r\n if (this.gridState && this.gridState.columns) {\r\n const column = this.gridState.columns.find(x => x.name === name);\r\n\r\n if (column) {\r\n return column.visible;\r\n }\r\n }\r\n\r\n return defaultValue;\r\n }\r\n\r\n public openColumnChooser(): void {\r\n this.dataGrid.instance.showColumnChooser();\r\n }\r\n\r\n public exportOptions: { id: number; label: string }[] = [\r\n { id: 1, label: \"Export data as xlsx\" },\r\n { id: 2, label: \"Export data as csv\" }\r\n ];\r\n\r\n public onExportItemClick(e: any): void {\r\n switch (e.itemData.id) {\r\n case 1:\r\n this.gridExportService.exportGridAsXlsx(this.dataGrid.instance, this.translate.instant(\"label.equipment\"));\r\n break;\r\n case 2:\r\n this.gridExportService.exportGridAsCsv(this.dataGrid.instance, this.translate.instant(\"label.equipment\"));\r\n break;\r\n default:\r\n throw new Error(\"Unhandled export type: \" + e.itemData.id);\r\n }\r\n }\r\n\r\n public get UseRouterLink() {\r\n return !this.baseDetailLink.includes(\"#\");\r\n }\r\n\r\n private GetDataSources(): void {\r\n this.equipmentDataSource = this.equipmentService.GetDataSource(true);\r\n if (this.equipFilter.length > 0) {\r\n this.equipmentDataSource.filter(this.equipFilter);\r\n } else {\r\n this.equipmentDataSource.filter(this.filters[1]); // apply default filter\r\n }\r\n\r\n if (this.customerId && this.invoiceId) {\r\n this.FilterByCustomer(null);\r\n }\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.dataGrid.instance.searchByText(this.SearchText);\r\n }\r\n\r\n public FilterChanged($event): void {\r\n const filterValue = $event.currentTarget.value;\r\n if (filterValue === \"0\") {\r\n if (this.customerId && this.invoiceId) {\r\n this.FilterByCustomer(null);\r\n } else {\r\n this.dataGrid.instance.clearFilter();\r\n }\r\n } else {\r\n if (this.customerId && this.invoiceId) {\r\n this.FilterByCustomer(this.filters[filterValue]);\r\n } else {\r\n this.dataGrid.instance.filter(this.filters[filterValue]);\r\n }\r\n }\r\n }\r\n\r\n public SaveLayout(): void {\r\n const state = this.dataGrid.instance.state();\r\n this.gridService.SaveLayout(state, GridKind.Equipment);\r\n }\r\n\r\n public ResetLayout(): void {\r\n this.gridService.ResetLayout(GridKind.Equipment);\r\n this.dataGrid.instance.state(null);\r\n this.gridState = null;\r\n }\r\n\r\n public SetDisplayValue(item): string {\r\n return (item.InvoiceId !== item.CustomerId) + \"|\" + item.CustomerLogo;\r\n }\r\n\r\n public viewDetails(event) {\r\n if (this.UseRouterLink) {\r\n this.router.navigate([this.baseDetailLink, \"equipment\", \"detail\", event.data.EquipId]);\r\n } else {\r\n this.router.navigate([\"equipment\", \"detail\", event.data.EquipId]);\r\n }\r\n }\r\n\r\n public NewEquipment(): void {\r\n this.dataGrid.instance.clearFilter();\r\n this.router.navigate([\"equipment\", \"new-equipment\"]);\r\n }\r\n\r\n calculateStatusFilter(filterValue, selectedFilterOperation, filterType) {\r\n const column = this as any;\r\n // Search the status based on the string\r\n if (filterType === \"search\" && this.FilteredStatus(filterValue)) {\r\n return [\"Status\", \"=\", Number(status)];\r\n } else if (filterType === \"search\") {\r\n return null;\r\n }\r\n // Invokes the default filtering behavior\r\n return column.defaultCalculateFilterExpression(filterValue, selectedFilterOperation, filterType);\r\n }\r\n\r\n public uploadButtonItemClick(e: any): void {\r\n this.router.navigate([\"equipment\", e.itemData.link]);\r\n }\r\n\r\n public isConditionColumnVisible(): boolean {\r\n return (this.isPortal && this.displayEquipmentConditionsOnWebPortal) ||\r\n (!this.isPortal && this.columnVisible(\"ConditionName\", false));\r\n }\r\n\r\n private FilteredStatus(filterValue): string {\r\n return !isNaN(Number(filterValue)) ? EquipmentStatus[filterValue.toUpperCase().replace(\" \", \"_\")] : null;\r\n }\r\n\r\n private FilterByCustomer(statusFilter): void {\r\n const filters = [];\r\n\r\n if (this.customerId === this.invoiceId) {\r\n this.customerService.GetSiteIdsByInvoiceId(this.invoiceId).subscribe(ids => {\r\n const customers = ids.map(id => ({\r\n CustomerId: id\r\n }));\r\n\r\n customers.forEach(x => {\r\n filters.push([\"SiteId\", \"=\", x.CustomerId]);\r\n filters.push(\"or\");\r\n });\r\n\r\n filters.pop();\r\n if (statusFilter) {\r\n const combinedFilter = [filters, \"and\", statusFilter];\r\n this.equipmentDataSource.filter(combinedFilter);\r\n } else {\r\n this.equipmentDataSource.filter(filters);\r\n }\r\n\r\n this.equipmentDataSource.load();\r\n });\r\n } else {\r\n filters.push([\"SiteId\", \"=\", this.invoiceId]);\r\n if (statusFilter) {\r\n const combinedFilter = [filters, \"and\", statusFilter];\r\n this.equipmentDataSource.filter(combinedFilter);\r\n } else {\r\n this.equipmentDataSource.filter(filters);\r\n }\r\n\r\n this.equipmentDataSource.load();\r\n }\r\n }\r\n}\r\n","export class RefrigerantData {\r\n DesignCapacity?: number;\r\n RefrigerantTypeId?: number;\r\n RefrigerantType?: string;\r\n RefrigerantTypeEditable?: boolean;\r\n CurrentCharge?: number;\r\n CurrentChargeEditable?: boolean;\r\n AutoLeakDetectionSystem?: boolean;\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable, of } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"../../models/app-config.model\";\r\nimport { CustomerEquipmentSystemModel } from \"../../models/equipment/models/customer-equipment-system.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class CustomerEquipmentSystemsService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private config: IAppConfig) { }\r\n\r\n public GetEquipmentSystem(id: number): Observable {\r\n if (!id) {\r\n return of(null);\r\n }\r\n\r\n return this.http.get(`${this.config.apiLocations.Equipment}CustomerEquipmentSystem/${id}`);\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { Observable, of } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"../../models/app-config.model\";\r\nimport { RefrigerantTypeModel } from \"../../models/refrigerant/refrigerant-type.model\";\r\nimport { IODataService } from \"../interfaces/iodata.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class RefrigerantTypeService {\r\n private readonly refrigerantTypeODataBaseUrl: string;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(\"ODataService\") private odataService: IODataService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig\r\n ) {\r\n this.refrigerantTypeODataBaseUrl = this.appConfig.apiLocations.FGasOData + \"RefrigerantTypeOData\";\r\n }\r\n\r\n public GetDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.refrigerantTypeODataBaseUrl}`,\r\n key: \"RefrigerantTypeId\",\r\n keyType: \"Int32\",\r\n });\r\n }\r\n\r\n public Get(id: number): Observable {\r\n if (!id) {\r\n return of(null);\r\n }\r\n\r\n return this.http.get(`${this.appConfig.apiLocations.FGas}RefrigerantType/${id}`);\r\n }\r\n}\r\n","export enum CustomerAccountType {\r\n Prospect = 1,\r\n ManagingAgent = 2,\r\n Site = 3,\r\n Customer = 4\r\n}\r\n","export enum LogPreviewType {\r\n Main = 0,\r\n Equipment = 1,\r\n Customer = 2,\r\n ManagingAgent = 3,\r\n Site = 4,\r\n Cylinder = 5,\r\n System = 6\r\n}\r\n","export enum RefrigerantTransactionType {\r\n Addition = 1,\r\n Removal = 2,\r\n LeakTest = 3,\r\n Decant = 4,\r\n InitialCharge = 5\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { RefrigerantTransactionType } from \"./enums/refrigerant-transaction-type.enum\";\r\n\r\n@Pipe({\r\n name: \"refrigerantTransactionType\"\r\n})\r\nexport class RefrigerantTransactionTypePipe implements PipeTransform {\r\n\r\n private readonly refrigerantTransactionType = {\r\n [RefrigerantTransactionType.Addition]: \"fgas.logtype.Addition\",\r\n [RefrigerantTransactionType.Removal]: \"fgas.logtype.Removal\",\r\n [RefrigerantTransactionType.LeakTest]: \"fgas.logtype.LeakTest\",\r\n [RefrigerantTransactionType.Decant]: \"fgas.logtype.Decant\",\r\n [RefrigerantTransactionType.InitialCharge]: \"fgas.logtype.InitialCharge\"\r\n };\r\n\r\n private readonly stringValueMapping = {\r\n Addition: RefrigerantTransactionType.Addition,\r\n Removal: RefrigerantTransactionType.Removal,\r\n LeakTest: RefrigerantTransactionType.LeakTest,\r\n Decant: RefrigerantTransactionType.Decant,\r\n InitialCharge: RefrigerantTransactionType.InitialCharge\r\n };\r\n\r\n transform(value: number | string | RefrigerantTransactionType, status: string): string {\r\n let safeValue = Number(value);\r\n if (isNaN(safeValue)) {\r\n safeValue = this.stringValueMapping[value];\r\n }\r\n\r\n if (safeValue === RefrigerantTransactionType.LeakTest) {\r\n if (status) {\r\n if (status === \"Pass\") {\r\n return \"fgas.logtype.LeakTest-pass\";\r\n }\r\n return \"fgas.logtype.LeakTest-fail\";\r\n }\r\n }\r\n\r\n return this.refrigerantTransactionType[safeValue];\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"../../models/app-config.model\";\r\nimport { RefrigerantTransactionCorrectionViewModel } from \"../../models/refrigerant/refrigerant-transaction-correction-view-model\";\r\nimport { RefrigerantTransaction } from \"../../models/refrigerant/refrigerant-transaction.model\";\r\nimport { IODataService } from \"../interfaces/iodata.service\";\r\nimport { PageableDatastoreService } from \"../pageable-datastore.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class RefrigerantTransactionService extends PageableDatastoreService {\r\n\r\n private static readonly odataKey: string = \"TransactionId\";\r\n\r\n constructor(\r\n @Inject(\"ODataService\") protected odataService: IODataService,\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private config: IAppConfig) {\r\n super(RefrigerantTransactionService.odataKey);\r\n }\r\n\r\n protected GetDataSourceObject(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.FGasOData}RefrigerantTransactionsOData`,\r\n key: RefrigerantTransactionService.odataKey,\r\n keyType: \"Int32\",\r\n paging: true,\r\n pageSize: 50\r\n });\r\n }\r\n\r\n public GetRefrigerantTransactions(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.config.apiLocations.FGasOData}RefrigerantTransactionsOData`,\r\n key: \"TransactionId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public Get(id: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.FGasOData}RefrigerantTransactionsOData/${id}`);\r\n }\r\n\r\n public GetCorrections(transactionId: number): Observable {\r\n const url = `${this.config.apiLocations.FGas}RefrigerantTransactionCorrection/${transactionId}`;\r\n return this.http.get(url);\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'f-gas.log' | translate}}

\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n
\r\n \r\n {{ data.value }}\r\n \r\n {{ data.value }}\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n {{ item.data.SrcDisplayId }}\r\n \r\n {{ item.data.SrcDisplayId }}\r\n
\r\n
\r\n \r\n {{ item.data.SrcDisplayId }}\r\n \r\n {{ item.data.SrcDisplayId }}\r\n
\r\n
\r\n \r\n {{ item.data.SrcDisplayId }}\r\n \r\n {{ item.data.SrcDisplayId }}\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n {{ item.data.DestDisplayId }}\r\n \r\n {{ item.data.DestDisplayId }}\r\n
\r\n
\r\n \r\n {{ item.data.DestDisplayId }}\r\n \r\n {{ item.data.DestDisplayId }}\r\n
\r\n
\r\n \r\n {{ item.data.DestDisplayId }}\r\n \r\n {{ item.data.DestDisplayId }}\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n {{ item.data.CorrectedWeight?.toFixed(5) }}\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n {{ item.data.ReferenceStr }}\r\n \r\n {{ item.data.ReferenceStr }}\r\n
\r\n
\r\n \r\n {{ item.data.ReferenceStr }}\r\n \r\n {{ item.data.ReferenceStr }}\r\n
\r\n
\r\n \r\n
\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Inject,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { CustomerAccountType } from \"../../enums/customer-account-type.enum\";\r\nimport { GridKind } from \"../../enums/grid-kind.enum\";\r\nimport { LogPreviewType } from \"../../enums/log-preview-type.enum\";\r\nimport { Module } from \"../../enums/module.enum\";\r\nimport { SettingId } from \"../../enums/setting-id.enum\";\r\nimport { SettingData } from \"../../models/setting-data.model\";\r\nimport { RefrigerantTransactionTypePipe } from \"../../pipes/refrigerant-transaction-type.pipe\";\r\nimport { RefrigerantTransactionService } from \"../../services/fgas/refrigerant-transaction-service\";\r\nimport { GridExportService } from \"../../services/grid-export.service\";\r\nimport { GridService } from \"../../services/grid.service\";\r\nimport { IAuthService } from \"../../services/interfaces/iauth.service\";\r\nimport { ModuleService } from \"../../services/module/module.service\";\r\nimport { SettingsService } from \"../../services/setting/settings.service\";\r\n\r\n@Component({\r\n selector: \"lib-f-gas-log\",\r\n templateUrl: \"./f-gas-log.component.html\",\r\n styleUrls: [\r\n \"./f-gas-log.component.scss\",\r\n \"../../styles/global.scss\",\r\n \"../../styles/backgrounds.scss\",\r\n \"../../styles/servicesight-shared.scss\"]\r\n})\r\nexport class FGasLogComponent implements OnInit, OnChanges {\r\n\r\n @Input() cylinderId: number = 0;\r\n @Input() siteId: number = 0;\r\n @Input() customerId: number = 0;\r\n @Input() agentId: number = 0;\r\n @Input() equipmentId: number = 0;\r\n @Input() systemId: number = 0;\r\n @Input() displayAddButton: boolean = false;\r\n @Input() disabledAddButton: boolean = false;\r\n @Output() addLogEntry = new EventEmitter();\r\n @ViewChild(\"grid\") private dataGrid: DxDataGridComponent;\r\n\r\n public hasDecantPermission: boolean = true;\r\n public SearchText: string = \"\";\r\n public logTypeId: any;\r\n public logsDataSource: DataSource;\r\n private gridState: any = { };\r\n public units: string = \"kg\";\r\n public IsProEnabled: boolean = false;\r\n public isPortal: boolean;\r\n public contactForCustomerType: CustomerAccountType = CustomerAccountType.Prospect;\r\n\r\n public logTypeDataOptions: { id: number; value: string; label: string } [] = [];\r\n\r\n public exportOptions: { id: number; label: string } [] = [\r\n { id: 1, label: \"Export data as xlsx\" },\r\n { id: 2, label: \"Export data as csv\" }\r\n ];\r\n\r\n public get isHostPageMainFgasLog(): boolean {\r\n return this.isHostPageOverview &&\r\n !this.isPortal;\r\n }\r\n\r\n public get isHostPageOverview(): boolean {\r\n return !this.isCustomerPage &&\r\n !this.isCylinderPage &&\r\n !this.isEquipmentPage;\r\n }\r\n\r\n public get isEquipmentPage(): boolean {\r\n return this.equipmentId !== 0 || this.systemId !== 0;\r\n }\r\n\r\n public get isCylinderPage(): boolean {\r\n return this.cylinderId !== 0;\r\n }\r\n\r\n public get isCustomerPage(): boolean {\r\n return this.customerId !== 0 || this.siteId !== 0 || this.agentId !== 0;\r\n }\r\n\r\n public get isCustomer(): boolean {\r\n return this.customerId !== 0 || this.contactForCustomerType === CustomerAccountType.Customer;\r\n }\r\n\r\n public get isManagingAgent(): boolean {\r\n return this.agentId !== 0 || this.contactForCustomerType === CustomerAccountType.ManagingAgent;\r\n }\r\n\r\n public get isSite(): boolean {\r\n return this.siteId !== 0 || this.contactForCustomerType === CustomerAccountType.Site;\r\n }\r\n\r\n public get gridKind(): GridKind {\r\n if (this.isCylinderPage) {\r\n return GridKind.RefrigerantTransactionsCylinder;\r\n }\r\n\r\n if (this.isCustomerPage) {\r\n return GridKind.RefrigerantTransactionsCustomer;\r\n }\r\n\r\n if (this.isEquipmentPage) {\r\n return GridKind.RefrigerantTransactionsEquipment;\r\n }\r\n\r\n return GridKind.RefrigerantTransactions;\r\n }\r\n\r\n constructor(\r\n private gridService: GridService,\r\n private gridExportService: GridExportService,\r\n private translate: TranslateService,\r\n private router: Router,\r\n private settingsService: SettingsService,\r\n private transactionsService: RefrigerantTransactionService,\r\n private refrigerantTransactionTypePipe: RefrigerantTransactionTypePipe,\r\n private moduleService: ModuleService,\r\n @Inject(\"AuthService\") authService: IAuthService) {\r\n this.isPortal = authService.isPortalUser;\r\n\r\n if (this.isPortal) {\r\n this.contactForCustomerType = authService.CustomerType;\r\n }\r\n\r\n this.getTransactionTypeSortValue = this.getTransactionTypeSortValue.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.moduleService.GetEnabledModules().subscribe(modules => {\r\n this.IsProEnabled = modules.includes(Module.Pro);\r\n });\r\n\r\n this.settingsService.getSetting(SettingId.FGasRefrigerantUnits).subscribe((settingData: SettingData) => {\r\n this.units = settingData.ValueListSelectedId === 1 ? \"kg\" : \"lb\";\r\n });\r\n\r\n this.gridService.GetLayout(this.gridKind).subscribe(value => {\r\n if (value) {\r\n this.gridState = value;\r\n this.dataGrid.instance.state(value);\r\n }\r\n this.SetDataSources();\r\n });\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if ((changes.cylinderId && Number(changes.cylinderId.currentValue) > 0) ||\r\n (changes.customerId && Number(changes.customerId.currentValue) > 0) ||\r\n (changes.siteId && Number(changes.siteId.currentValue) > 0) ||\r\n (changes.agentId && Number(changes.agentId.currentValue) > 0) ||\r\n changes.equipmentId ||\r\n (changes.systemId && Number(changes.systemId.currentValue) > 0)) {\r\n this.SetDataSources();\r\n }\r\n }\r\n\r\n public toLocalString(row) {\r\n const date = new Date(row.LogDate);\r\n const newDate = new Date(date.getTime()-date.getTimezoneOffset()*60*1000);\r\n\r\n return newDate.toLocaleDateString();\r\n }\r\n\r\n public calculateLoggedDateFilter(filterValue, selectedFilterOperation, filterType) {\r\n const column = this as any;\r\n\r\n if (filterType === \"filterRow\") {\r\n const filter = column.defaultCalculateFilterExpression(filterValue, selectedFilterOperation, filterType);\r\n\r\n if (filter) {\r\n if (typeof filter[0] === \"string\") {\r\n filter[2] = new Date(filter[2].getTime()+filter[2].getTimezoneOffset()*60*1000);\r\n } else {\r\n filter[0][2] = new Date(filter[0][2].getTime()+filter[0][2].getTimezoneOffset()*60*1000);\r\n filter[2][2] = new Date(filter[2][2].getTime()+filter[2][2].getTimezoneOffset()*60*1000);\r\n }\r\n\r\n return filter;\r\n }\r\n }\r\n\r\n // Invokes the default filtering behavior\r\n return column.defaultCalculateFilterExpression(filterValue, selectedFilterOperation, filterType);\r\n }\r\n\r\n public getTransactionTypeSortValue(rowData) {\r\n const piped = this.refrigerantTransactionTypePipe.transform(rowData.TransactionType, rowData.Status);\r\n const translated = this.translate.instant(piped);\r\n return translated;\r\n }\r\n\r\n public get selectionMode(): string {\r\n return \"none\";\r\n }\r\n\r\n public SetDataSources(): void {\r\n this.logsDataSource = this.transactionsService.GetDataSource(true);\r\n this.SearchText = \"\";\r\n\r\n const options = [\r\n { id: 0, value: \"All\", label: this.translate.instant(\"fgas.logtype.All\") },\r\n { id: 1, value: \"Addition\", label: this.translate.instant(\"fgas.logtype.Addition\") },\r\n { id: 2, value: \"Removal\", label: this.translate.instant(\"fgas.logtype.Removal\") },\r\n ];\r\n\r\n if (this.isCylinderPage && !this.isPortal) {\r\n options.push({ id: 4, value: \"Decant\", label: this.translate.instant(\"fgas.logtype.Decant\") });\r\n } else if (this.isEquipmentPage || this.isCustomerPage) {\r\n options.push({ id: 3, value: \"LeakTest\", label: this.translate.instant(\"fgas.logtype.LeakTest\") });\r\n options.push({ id: 5, value: \"InitialCharge\", label: this.translate.instant(\"fgas.logtype.InitialCharge\") });\r\n } else {\r\n options.push({ id: 3, value: \"LeakTest\", label: this.translate.instant(\"fgas.logtype.LeakTest\") });\r\n if (!this.isPortal) {\r\n options.push({ id: 4, value: \"Decant\", label: this.translate.instant(\"fgas.logtype.Decant\") });\r\n }\r\n options.push({ id: 5, value: \"InitialCharge\", label: this.translate.instant(\"fgas.logtype.InitialCharge\") });\r\n }\r\n this.logTypeDataOptions = options;\r\n this.logTypeId = this.logTypeDataOptions[0];\r\n\r\n this.SetFilters();\r\n this.SearchTextChanged();\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n if (this.dataGrid && this.dataGrid.instance) {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n }\r\n\r\n public SetFilters(): void {\r\n if (!this.logsDataSource) {\r\n return;\r\n }\r\n\r\n // when adding a cylinder, cylinderId is null.\r\n // set it to -1 so we don't show any logs for new items\r\n const cylinderId: number = this.cylinderId ?? -1;\r\n let equipmentId: number;\r\n let systemId: number;\r\n\r\n if (this.equipmentId === null && this.systemId === null) {\r\n // when adding a new equip, both equipmentId and systemId will be null\r\n // set them to -1 so we don't show any logs for new items\r\n equipmentId = -1;\r\n systemId = -1;\r\n } else {\r\n equipmentId = this.equipmentId;\r\n systemId = this.systemId;\r\n }\r\n\r\n const filter: any[] = [];\r\n if (cylinderId) {\r\n filter.push([[[\"SrcId\", \"=\", cylinderId], [\"SrcTypeId\", \"=\", \"Cylinder\"]], \"or\",\r\n [[\"DestId\", \"=\", cylinderId],[\"DestTypeId\", \"=\", \"Cylinder\"]]]);\r\n }\r\n\r\n if (this.customerId) {\r\n filter.push([\"CustomerId\", \"=\", this.customerId]);\r\n }\r\n\r\n if (this.siteId) {\r\n filter.push([\"SiteId\", \"=\", this.siteId]);\r\n }\r\n\r\n if (this.agentId) {\r\n filter.push([\"ManagingAgentId\", \"=\", this.agentId]);\r\n }\r\n\r\n if (equipmentId) {\r\n filter.push([[[\"SrcId\", \"=\", equipmentId], [\"SrcTypeId\", \"=\", \"Equipment\"]], \"or\",\r\n [[\"DestId\", \"=\", equipmentId],[\"DestTypeId\", \"=\", \"Equipment\"]]]);\r\n }\r\n\r\n if (systemId) {\r\n filter.push([[[\"SrcId\", \"=\", systemId], [\"SrcTypeId\", \"=\", \"System\"]], \"or\",\r\n [[\"DestId\", \"=\", systemId],[\"DestTypeId\", \"=\", \"System\"]]]);\r\n }\r\n\r\n if (this.logTypeId && this.logTypeId.id) {\r\n filter.push([\"TransactionType\", \"=\", this.logTypeId.value]);\r\n }\r\n\r\n if (filter.length) {\r\n this.logsDataSource.filter(filter);\r\n } else {\r\n this.logsDataSource.filter(null);\r\n }\r\n\r\n this.logsDataSource.load();\r\n }\r\n\r\n public loadState = () => this.gridService.GetLayout(this.gridKind).toPromise();\r\n\r\n public SaveLayout(): void {\r\n const state = this.dataGrid.instance.state();\r\n this.gridService.SaveLayout(state, this.gridKind);\r\n }\r\n\r\n public ResetLayout(): void {\r\n this.gridService.ResetLayout(this.gridKind);\r\n this.dataGrid.instance.state(null);\r\n this.gridState = null;\r\n }\r\n\r\n public openColumnChooser(): void {\r\n this.dataGrid.instance.showColumnChooser();\r\n }\r\n\r\n public viewDetails(event): void {\r\n this.router.navigate([\"/f-gas/log\", event.data.TransactionId]);\r\n }\r\n\r\n public columnVisible(name: string, defaultValue: boolean): boolean {\r\n if (this.isHostPageMainFgasLog && this.gridState && this.gridState.columns) {\r\n const column = this.gridState.columns.find(x => x.name === name);\r\n\r\n if (column) {\r\n return column.visible;\r\n }\r\n }\r\n\r\n return defaultValue;\r\n }\r\n\r\n public onExportItemClick(e: any): void {\r\n switch (e.itemData.id) {\r\n case 1:\r\n this.gridExportService.exportGridAsXlsx(this.dataGrid.instance, this.translate.instant(\"f-gas.log\"), this.fGasLogCustomCellFunction);\r\n break;\r\n case 2:\r\n this.gridExportService.exportGridAsCsv(this.dataGrid.instance, this.translate.instant(\"f-gas.log\"), this.fGasLogCustomCellFunction);\r\n break;\r\n default:\r\n throw new Error(\"Unhandled export type: \" + e.itemData.id);\r\n }\r\n }\r\n\r\n public ViewLog(): void {\r\n let previewType = LogPreviewType.Main;\r\n let docId;\r\n if (this.equipmentId) {\r\n previewType = LogPreviewType.Equipment;\r\n docId = this.equipmentId;\r\n } else if (this.systemId) {\r\n previewType = LogPreviewType.System;\r\n docId = this.systemId;\r\n } else if (this.isCylinderPage) {\r\n previewType = LogPreviewType.Cylinder;\r\n docId = this.cylinderId;\r\n } else if (this.customerId !== 0) {\r\n previewType = LogPreviewType.Customer;\r\n docId = this.customerId;\r\n } else if (this.siteId !== 0) {\r\n previewType = LogPreviewType.Site;\r\n docId = this.siteId;\r\n } else if (this.customerId !== 0) {\r\n previewType = LogPreviewType.ManagingAgent;\r\n docId = this.agentId;\r\n }\r\n\r\n let gridFilter = this.dataGrid.instance.getCombinedFilter();\r\n if (gridFilter == null) {\r\n gridFilter = [];\r\n }\r\n const filter = JSON.stringify(gridFilter);\r\n\r\n const previewPath = [\"/f-gas/preview\", previewType];\r\n if (docId) {\r\n previewPath.push(docId);\r\n }\r\n this.router.navigate(previewPath, { queryParams: { filter } });\r\n }\r\n\r\n public AddLog(): void {\r\n this.addLogEntry.emit();\r\n }\r\n\r\n private fGasLogCustomCellFunction = ({ gridCell, excelCell }): void => {\r\n if (gridCell.rowType === \"data\" && gridCell.value) {\r\n if (gridCell.column.dataField === \"SrcDisplayId\") {\r\n excelCell.value = this.formatCellValue(gridCell.data.SrcTypeId, gridCell.value);\r\n }\r\n\r\n if (gridCell.column.dataField === \"DestDisplayId\") {\r\n excelCell.value = this.formatCellValue(gridCell.data.DestTypeId, gridCell.value);\r\n }\r\n\r\n if (gridCell.column.dataField === \"ReferenceStr\") {\r\n excelCell.value = `Job no: ${gridCell.value}`;\r\n }\r\n }\r\n };\r\n\r\n private formatCellValue(type: string, value: string): string {\r\n if (type === \"System\") {\r\n return `${type}: ${value}`;\r\n } else {\r\n return `${type} no: ${value}`;\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n

Assigned to system: {{ system ? system.SystemName : null }}{{ system ? system.SystemName : null }} - {{ system ? system.SystemDescription : null }}

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n {{ 'equipment.refrigerant.fitted-with-auto-leak-detection-system' | translate }}\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Inject,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Optional,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { ControlContainer, NgForm } from \"@angular/forms\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { SettingId } from \"../../enums/setting-id.enum\";\r\nimport { CustomerEquipmentSystemModel } from \"../../models/equipment/models/customer-equipment-system.model\";\r\nimport { Equipment } from \"../../models/equipment/models/equipment\";\r\nimport { RefrigerantData } from \"../../models/refrigerant/refrigerant-data.model\";\r\nimport { RefrigerantTypeModel } from \"../../models/refrigerant/refrigerant-type.model\";\r\nimport { SettingData } from \"../../models/setting-data.model\";\r\nimport { CustomerEquipmentSystemsService } from \"../../services/equipment/customer-equipment-system.service\";\r\nimport { RefrigerantTypeService } from \"../../services/fgas/refrigerant-type.service\";\r\nimport { IAuthService } from \"../../services/interfaces/iauth.service\";\r\nimport { SettingsService } from \"../../services/setting/settings.service\";\r\nimport { FGasLogComponent } from \"../f-gas-log/f-gas-log.component\";\r\n\r\n@Component({\r\n selector: \"lib-equipment-refrigerant\",\r\n templateUrl: \"./equipment-refrigerant.component.html\",\r\n styleUrls: [\"./equipment-refrigerant.component.scss\"],\r\n viewProviders: [\r\n {\r\n provide: ControlContainer,\r\n deps: [[Optional, NgForm]],\r\n useFactory: (ngForm: NgForm) => ngForm\r\n }\r\n ]\r\n})\r\nexport class EquipmentRefrigerantComponent implements OnInit, OnChanges {\r\n @Input() public model: RefrigerantData;\r\n @Output() public refrigerantTypeChange: EventEmitter = new EventEmitter();\r\n @Output() public openLogEntryDialog: EventEmitter = new EventEmitter();\r\n @ViewChild(\"logList\", { static: false }) logList: FGasLogComponent;\r\n\r\n public refrigerantTypeDataSource: DataSource;\r\n public unit: string;\r\n public system: CustomerEquipmentSystemModel = null;\r\n public refrigerantType: RefrigerantTypeModel;\r\n public isPortal: boolean;\r\n\r\n public get equipmentModel(): Equipment {\r\n const equipment = this.model as Equipment;\r\n\r\n if (equipment.EquipId) {\r\n return equipment;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n public get equipmentId(): number {\r\n if (this.equipmentModel) {\r\n return this.equipmentModel.EquipId;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n public get systemModel(): CustomerEquipmentSystemModel {\r\n const system = this.model as CustomerEquipmentSystemModel;\r\n\r\n if (system.EquipmentSystemId) {\r\n return system;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n public get systemUrl(): string {\r\n if (this.system) {\r\n return `#/customers/equipment-system/${this.system.CustomerId}/${this.system.EquipmentSystemId}`;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n public get hasSystem(): boolean {\r\n return this.system !== null;\r\n }\r\n\r\n public get systemId(): number {\r\n if (this.systemModel) {\r\n return this.systemModel.EquipmentSystemId;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n public get globalWarmingPotential(): number {\r\n if (this.refrigerantType) {\r\n return this.refrigerantType.GlobalWarmingPotential;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n public get co2equivalent(): number {\r\n if (this.refrigerantType && this.model && this.model.DesignCapacity > 0) {\r\n return (this.model.DesignCapacity / 1000) * this.refrigerantType.GlobalWarmingPotential;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n public get leakTestFrequency(): string {\r\n if (this.co2equivalent) {\r\n if (this.co2equivalent > 5 && this.co2equivalent < 50) {\r\n return \"Every 12 months\";\r\n } else if (this.co2equivalent >= 50 && this.co2equivalent < 500) {\r\n return \"Every 6 months\";\r\n } else if (this.co2equivalent >= 500) {\r\n return \"Auto leak detection system required\";\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n constructor(\r\n private customerEquipmentSystemsService: CustomerEquipmentSystemsService,\r\n private refrigerantTypeService: RefrigerantTypeService,\r\n private settingsService: SettingsService,\r\n @Inject(\"AuthService\") authService: IAuthService) {\r\n this.isPortal = authService.isPortalUser;\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes && changes.model && changes.model.currentValue) {\r\n this.refrigerantTypeService.Get(this.model.RefrigerantTypeId).subscribe(type => {\r\n this.refrigerantType = type;\r\n });\r\n\r\n const equipmentModel = this.model as Equipment;\r\n if (equipmentModel.EquipId && equipmentModel.EquipmentSystemId) {\r\n this.customerEquipmentSystemsService.GetEquipmentSystem(equipmentModel.EquipmentSystemId).subscribe(system => {\r\n this.system = system;\r\n this.model = system;\r\n\r\n if (system.RefrigerantTypeId) {\r\n this.refrigerantTypeService.Get(system.RefrigerantTypeId).subscribe(type => {\r\n this.refrigerantType = type;\r\n });\r\n }\r\n });\r\n }\r\n } else {\r\n this.model = this.getEmptyRefrigrantData();\r\n }\r\n }\r\n\r\n public ngOnInit(): void {\r\n if (!this.model) {\r\n this.model = this.getEmptyRefrigrantData();\r\n }\r\n this.refrigerantTypeDataSource = this.refrigerantTypeService.GetDataSource();\r\n if (this.model.RefrigerantTypeId) {\r\n this.refrigerantTypeService.Get(this.model.RefrigerantTypeId).subscribe(type => {\r\n this.refrigerantType = type;\r\n });\r\n }\r\n\r\n this.settingsService.getSetting(SettingId.FGasRefrigerantUnits).subscribe((settingData: SettingData) => {\r\n this.unit = settingData.ValueListSelectedId === 1 ? \"(kg)\" : \"(lb)\";\r\n });\r\n\r\n if (this.equipmentModel && this.equipmentModel.EquipmentSystemId) {\r\n this.customerEquipmentSystemsService.GetEquipmentSystem(this.equipmentModel.EquipmentSystemId).subscribe(system => {\r\n this.system = system;\r\n this.model = system;\r\n });\r\n }\r\n }\r\n\r\n public OpenLogEntryDialog(): void {\r\n this.openLogEntryDialog.emit();\r\n }\r\n\r\n public UpdateRefrigerantType(event: any): void {\r\n if (event && event.value) {\r\n const refrigerantTypeId: number = event?.value;\r\n\r\n this.refrigerantTypeDataSource.store().byKey(refrigerantTypeId).then((refrigerantType: RefrigerantTypeModel) => {\r\n this.refrigerantType = refrigerantType;\r\n this.refrigerantTypeChange.emit(refrigerantType);\r\n });\r\n }\r\n }\r\n\r\n public OnLogAdded(): void {\r\n this.logList.SetDataSources();\r\n }\r\n\r\n public OnLogUpdated(): void {\r\n this.logList.SetDataSources();\r\n }\r\n\r\n private getEmptyRefrigrantData(): RefrigerantData {\r\n return {\r\n RefrigerantTypeId: null,\r\n DesignCapacity: null,\r\n CurrentCharge: null,\r\n CurrentChargeEditable: false,\r\n RefrigerantTypeEditable: false\r\n };\r\n }\r\n}\r\n","import { Component, EventEmitter, Input, Output, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport { JobSessionModel } from \"../../../../models/job-session.model\";\r\nimport { JobVisitListItem } from \"../../../../models/job-visit\";\r\nimport { EquipmentDataService } from \"../../../../services/equipment/equipment-data.service\";\r\nimport { FormMesssageService } from \"../../../form-messages/form-messsage.service\";\r\n\r\n@Component({\r\n selector: \"lib-add-visit\",\r\n templateUrl: \"./add-visit.component.html\",\r\n styleUrls: [\"./add-visit.component.scss\"]\r\n})\r\nexport class AddVisitComponent {\r\n\r\n @Input() jobId: number;\r\n @Input() siteId: number;\r\n @Input() formName: string;\r\n @Output() update: EventEmitter = new EventEmitter();\r\n @ViewChild(\"jobVisitGrid\", { static: true }) jobVisitGrid: DxDataGridComponent;\r\n\r\n public equipmentItemIds: number[] = [];\r\n public makeModelInstallIds: number[] = [];\r\n public jobVisitCollection: JobVisitListItem[] = [];\r\n public selectedVisit: JobSessionModel[] = [];\r\n public showDialog: boolean = false;\r\n\r\n public get IsJobSessionSelected(): boolean {\r\n return this.selectedVisit.length > 0;\r\n }\r\n\r\n public constructor(\r\n private service: EquipmentDataService,\r\n private formMessageService: FormMesssageService) {\r\n }\r\n\r\n public Show(): void {\r\n this.jobVisitGrid.instance.deselectAll();\r\n this.service.GetJobVisit(this.jobId).subscribe(visits => {\r\n this.jobVisitCollection = visits;\r\n });\r\n this.showDialog = true;\r\n }\r\n\r\n public Cancel(): void {\r\n this.showDialog = false;\r\n this.update.emit(false);\r\n }\r\n\r\n public Save(): void {\r\n if (this.IsJobSessionSelected) {\r\n this.formMessageService.RegisterObservable(\r\n this.service.AddVisit({\r\n SessionId: this.selectedVisit[0].SessionID,\r\n EquipmentItemIds: this.equipmentItemIds,\r\n MakeModelInstallIds: this.makeModelInstallIds,\r\n JobId: this.jobId\r\n })\r\n , this.formName).subscribe( () => {\r\n this.Cancel();\r\n this.update.emit(true);\r\n });\r\n }\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n","export enum JobStatus {\r\n CANCELLED = 0,\r\n ENTRY = 100,\r\n CREDIT_HOLD = 125,\r\n ORDER_NO_REQ = 135,\r\n AUTO_ENTRY = 150,\r\n ESTIMATED = 160,\r\n QUOTED = 175,\r\n REQUESTED = 190,\r\n UNALLOCATED = 200,\r\n PARTS_IN = 220,\r\n WAITING_ACCEPTANCE = 230,\r\n ALLOCATED = 250,\r\n EN_ROUTE = 300,\r\n ON_SITE = 350,\r\n AWAITING_PARTS = 400,\r\n SITE_ATTENDED = 500,\r\n FURTHER_WORK_REQUIRED = 550,\r\n READY_TO_COMPLETE = 575,\r\n AWAITING_DETAILS = 600,\r\n AUTHORISE_REQ = 650,\r\n COMPLETED = 700,\r\n COMPLETED_UNCHARGEABLE = 710,\r\n INVOICE_MARKED = 720,\r\n INVOICED = 750,\r\n BATCH_UPDATED = 800,\r\n ARCHIVED = 900\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { Subject } from \"rxjs\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class InspectionService {\r\n public equipmentChanged = new Subject();\r\n public inspectionChanged = new Subject();\r\n public refreshDataSource = new Subject();\r\n\r\n constructor() {\r\n }\r\n\r\n public RefreshDataSource() {\r\n this.refreshDataSource.next(true);\r\n }\r\n\r\n public EquipmentChanged() {\r\n this.equipmentChanged.next(true);\r\n }\r\n\r\n public InspectionChanged() {\r\n this.inspectionChanged.next(true);\r\n }\r\n\r\n}\r\n","import { Component, EventEmitter, Input, Output, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { JobStatus } from \"../../../../enums/job-status.enum\";\r\nimport { EquipmentDataService } from \"../../../../services/equipment/equipment-data.service\";\r\nimport { InspectionService } from \"../../../../services/inspection.service\";\r\nimport { FormMesssageService } from \"../../../form-messages/form-messsage.service\";\r\n\r\n@Component({\r\n selector: \"lib-move-to-job-dialog\",\r\n templateUrl: \"./move-to-job-dialog.component.html\",\r\n styleUrls: [\"./move-to-job-dialog.component.scss\"]\r\n})\r\nexport class MoveToJobDialogComponent {\r\n @Input() showDialog: boolean = false;\r\n @Input() jobId: number;\r\n @Input() siteId: number;\r\n @Input() equipmentItemIds: number[];\r\n @Input() makeModelInstallIds: number[];\r\n @Input() formName: string;\r\n @Output() update: EventEmitter = new EventEmitter();\r\n @ViewChild(\"jobListGrid\", { static: true }) jobListGrid: DxDataGridComponent;\r\n\r\n public jobDataSource: DataSource;\r\n public selectedJob: number[] = [];\r\n\r\n public get IsJobSelected(): boolean {\r\n return this.selectedJob.length > 0;\r\n }\r\n\r\n constructor(\r\n private service: EquipmentDataService,\r\n private formMessageService: FormMesssageService,\r\n private inspectionsService: InspectionService) {\r\n }\r\n\r\n public Show(): void {\r\n const filter = [\r\n [\"JobID\", \"<>\", this.jobId.toString()], \"and\",\r\n [\"Status\", \"<\", JobStatus.COMPLETED], \"and\",\r\n [\"SiteID\", \"=\", this.siteId]\r\n ];\r\n this.GetDataSource();\r\n this.jobListGrid.instance.clearSelection();\r\n this.jobDataSource.filter(filter);\r\n this.showDialog = true;\r\n }\r\n\r\n private GetDataSource(): void {\r\n this.jobDataSource = this.service.GetJobListDataSource(this.siteId);\r\n }\r\n\r\n public Save(): void {\r\n if (this.selectedJob[0]) {\r\n this.formMessageService.RegisterObservable(\r\n this.service.CopyToNewJob(this.jobId, this.equipmentItemIds, this.makeModelInstallIds, false, this.selectedJob[0])\r\n , this.formName\r\n ).subscribe( () => {\r\n this.inspectionsService.EquipmentChanged();\r\n this.inspectionsService.InspectionChanged();\r\n this.Cancel();\r\n });\r\n }\r\n }\r\n\r\n public CreateNewJob() {\r\n this.formMessageService.RegisterObservable(\r\n this.service.CopyToNewJob(this.jobId, this.equipmentItemIds, this.makeModelInstallIds), this.formName\r\n ).subscribe(() => {\r\n this.inspectionsService.EquipmentChanged();\r\n this.Cancel();\r\n }, () => this.showDialog = false);\r\n }\r\n\r\n public Cancel(): void {\r\n this.showDialog = false;\r\n this.update.emit(true);\r\n }\r\n\r\n public OnSelectionChanged(): void {\r\n if (this.selectedJob.length > 1) {\r\n this.jobListGrid.instance.deselectRows([this.selectedJob.shift()]);\r\n }\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n","export enum JobEquipmentStatus {\r\n Outstanding = 100,\r\n NotDone = 600,\r\n Done = 700,\r\n Skipped = 740,\r\n Moved = 760\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"../../models/app-config.model\";\r\nimport { EquipmentConditionModel } from \"../../models/equipment/equipment-condition.model\";\r\nimport { OdataService } from \"../odata.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class EquipmentConditionService {\r\n\r\n private get BaseUrl(): string {\r\n return this.appConfig.apiLocations.Equipment + \"EquipmentCondition\";\r\n }\r\n\r\n private get ODataBaseUrl(): string {\r\n return this.appConfig.apiLocations.EquipmentOData + \"EquipmentConditionOData\";\r\n }\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig,\r\n private odataService: OdataService) { }\r\n\r\n public GetCondition(conditionId: number): Observable {\r\n return this.http.get(`${this.BaseUrl}/${conditionId}`);\r\n }\r\n\r\n public DeleteCondition(conditionId: number): Observable {\r\n return this.http.delete(`${this.BaseUrl}/${conditionId}`);\r\n }\r\n\r\n public GetConditionDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: this.ODataBaseUrl,\r\n key: \"ConditionId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetConditionUsageCount(conditionId: number): Observable {\r\n return this.http.get(`${this.BaseUrl}/${conditionId}/usage-count`);\r\n }\r\n\r\n public GetAll(): Observable> {\r\n return this.http.get>(this.BaseUrl);\r\n }\r\n\r\n public UpdateSortOrder(fromIndex: number, toIndex: number): Observable {\r\n return this.http.put(`${this.BaseUrl}/UpdateSortOrder`, { fromIndex, toIndex });\r\n }\r\n\r\n public SaveCondition(condition: EquipmentConditionModel): Observable {\r\n return this.http.put(`${this.BaseUrl}`, condition);\r\n }\r\n}\r\n","import { Injectable, Inject } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { IODataService } from \"./interfaces/iodata.service\";\r\nimport { IAppConfig, APP_CONFIG } from \"../models/app-config.model\";\r\nimport { PageableDatastoreService } from \"./pageable-datastore.service\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { Observable } from \"rxjs\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class InspectionDataService extends PageableDatastoreService {\r\n\r\n private static readonly odataKey: string = \"InspectionId\";\r\n\r\n constructor(\r\n protected http: HttpClient,\r\n @Inject(\"ODataService\") private odataService: IODataService,\r\n @Inject(APP_CONFIG) private config: IAppConfig) {\r\n super(InspectionDataService.odataKey);\r\n }\r\n\r\n protected GetDataSourceObject(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.InspectionsOData}Inspections`,\r\n key: InspectionDataService.odataKey,\r\n keyType: \"String\",\r\n paging: true,\r\n pageSize: 50\r\n });\r\n }\r\n\r\n public GetNumberOfEquipmentInspections(jobId: number, equipmentIds: number[]): Observable {\r\n return this.http.post(this.config.apiLocations.Inspections + `Inspection/NumberOfEquipmentInspections/${jobId}`, equipmentIds);\r\n }\r\n}\r\n","export enum InstallLineTypeEnum {\r\n Equipment = 0,\r\n MakeModel = 1\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Injectable, Inject } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IODataService } from \"./interfaces/iodata.service\";\r\nimport { IAppConfig, APP_CONFIG } from \"../models/app-config.model\";\r\nimport { MakeModelSupplierPrice } from \"../models/make-model-supplier-price.model\";\r\nimport { MakeModelStoreEquipmentCountModel } from \"../models/make-model-store-equip-count.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class MakeModelSharedService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(\"ODataService\") private odataService: IODataService,\r\n @Inject(APP_CONFIG) private config: IAppConfig) { }\r\n\r\n public GetMakeModelsDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: this.config.apiLocations.EquipmentOData + \"MakeModelListOData\",\r\n key: \"MakeModelId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetMakeModelsDataStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: this.config.apiLocations.EquipmentOData + \"MakeModelListOData\",\r\n key: \"MakeModelId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public MakeModelStoreEquipmentCount(): Observable {\r\n return this.http.get(`${this.config.apiLocations.Equipment}makemodel/GetMakeModelWithEquipCounts`);\r\n }\r\n\r\n public Get(makeModelId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.Equipment}makemodel/${makeModelId}`);\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IODataService } from \"./interfaces/iodata.service\";\r\nimport { PageableDatastoreService } from \"./pageable-datastore.service\";\r\nimport { IAppConfig, APP_CONFIG } from \"../models/app-config.model\";\r\nimport { Sfg20ScheduleInterval } from \"../models/sfg20/sfg20-schedule-interval.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class Sfg20Service extends PageableDatastoreService {\r\n private static readonly odataKey: string = \"Sfg20ScheduleId\";\r\n\r\n constructor(\r\n protected http: HttpClient,\r\n @Inject(\"ODataService\") private odataService: IODataService,\r\n @Inject(APP_CONFIG) private config: IAppConfig) {\r\n super(Sfg20Service.odataKey);\r\n }\r\n\r\n public GetSfg20ScheduleIntervals(scheduleId: number): Observable {\r\n const url = `Sfg20Schedule/${scheduleId}/Intervals`;\r\n return this.http.get(this.config.apiLocations.Equipment + url);\r\n }\r\n\r\n public GetDataStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.config.apiLocations.EquipmentOData}Sfg20OData`,\r\n key: Sfg20Service.odataKey,\r\n keyType: \"Int64\"\r\n });\r\n }\r\n\r\n protected GetDataSourceObject(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.EquipmentOData}Sfg20OData`,\r\n key: Sfg20Service.odataKey,\r\n keyType: \"Int64\",\r\n paging: true,\r\n pageSize: 50\r\n });\r\n }\r\n}\r\n","
\r\n \"{{\r\n
\r\n \r\n \r\n
\r\n {{ schedule.Sfg20Code }} - {{ schedule.Sfg20ScheduleTitle }}\r\n
\r\n \r\n
\r\n
","import { Component, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\r\nimport { UntypedFormControl } from \"@angular/forms\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { Module } from \"../../../enums/module.enum\";\r\nimport { ModuleService } from \"../../../services/module/module.service\";\r\nimport { Sfg20Service } from \"../../../services/sfg20.service\";\r\n\r\n@Component({\r\n selector: \"lib-sfg20-schedule-select-box\",\r\n templateUrl: \"./sfg20-schedule-select-box.component.html\",\r\n styleUrls: [\"./sfg20-schedule-select-box.component.scss\"]\r\n})\r\nexport class Sfg20ScheduleSelectBoxComponent implements OnInit {\r\n @Input() form: UntypedFormControl;\r\n @Input() value: number = null;\r\n @Input() rowMode: boolean = false;\r\n @Input() disabled: boolean = false;\r\n @Output() valueChange: EventEmitter = new EventEmitter();\r\n @Output() itemSelected: EventEmitter = new EventEmitter();\r\n @Output() valueCleared: EventEmitter = new EventEmitter();\r\n\r\n public isEnabled: boolean = false;\r\n public scheduleCodesSource: DataSource;\r\n\r\n constructor(\r\n private moduleService: ModuleService,\r\n private sfg20service: Sfg20Service) {\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.moduleService.GetEnabledModules().subscribe(modules => {\r\n if (modules.includes(Module.Pro) && modules.includes(Module.Equipment) && modules.includes(Module.Sfg20)) {\r\n this.isEnabled = true;\r\n }\r\n });\r\n\r\n this.scheduleCodesSource = this.sfg20service.GetDataSource(true);\r\n this.Sort();\r\n }\r\n\r\n public Sort(): void {\r\n if (this.scheduleCodesSource) {\r\n this.scheduleCodesSource.sort({ selector: \"Sfg20ScheduleId\", desc: false });\r\n this.scheduleCodesSource.reload();\r\n }\r\n }\r\n\r\n public onItemClick(e: any): void {\r\n // triggered only when item has been selected by the user\r\n this.itemSelected.emit(e.itemData.Sfg20ScheduleId);\r\n }\r\n\r\n public onValueChanged(e: any): void {\r\n if (this.form) {\r\n this.form.markAsDirty();\r\n }\r\n\r\n if (e.value === null) {\r\n // triggered when schedule id value has been cleared\r\n this.valueCleared.emit();\r\n }\r\n\r\n // triggered when schedule id value has changed\r\n this.valueChange.emit(e.value);\r\n }\r\n}\r\n","export class ModuleAccessModel {\r\n ConsumerPortalEnabled: boolean;\r\n AccountsLinkEnabled: boolean;\r\n EquipmentEnabled: boolean;\r\n RecurringJobsEnabled: boolean;\r\n ServiceContractsEnabled: boolean;\r\n StockEnabled: boolean;\r\n PurchaseOrdersEnabled: boolean;\r\n ProEnabled: boolean;\r\n SalesOrderEnabled: boolean;\r\n PowerBiEnabled: boolean;\r\n SalesOpportunityEnabled: boolean;\r\n SalesCampaignsEnabled: boolean;\r\n FGasEnabled: boolean;\r\n CustomerFeedbackEnabled: boolean;\r\n GasSafeEnabled: boolean;\r\n TimesheetsEnabled: boolean;\r\n AdvancedQuotesEnabled: boolean;\r\n CFTSEnabled: boolean;\r\n Sfg20Enabled: boolean;\r\n ProjectEnabled: boolean;\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { BehaviorSubject } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"../../models/app-config.model\";\r\nimport { EquipmentPermissions } from \"../../models/equipment/equipment-permissions\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class EquipmentPermissionsService {\r\n public HasAddEquipmentPermission: BehaviorSubject = new BehaviorSubject(false);\r\n public HasEditEquipmentPermission: BehaviorSubject = new BehaviorSubject(false);\r\n public HasDeleteEquipmentPermission: BehaviorSubject = new BehaviorSubject(false);\r\n public HasAddAttributePermission: BehaviorSubject = new BehaviorSubject(false);\r\n public HasEditAttributePermission: BehaviorSubject = new BehaviorSubject(false);\r\n public HasDeleteAttributePermission: BehaviorSubject = new BehaviorSubject(false);\r\n public HasAddCategoryPermission: BehaviorSubject = new BehaviorSubject(false);\r\n public HasEditCategoryPermission: BehaviorSubject = new BehaviorSubject(false);\r\n public HasDeleteCategoryPermission: BehaviorSubject = new BehaviorSubject(false);\r\n public HasAddMakeModelPermission: BehaviorSubject = new BehaviorSubject(false);\r\n public HasEditMakeModelPermission: BehaviorSubject = new BehaviorSubject(false);\r\n public HasDeleteMakeModelPermission: BehaviorSubject = new BehaviorSubject(false);\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) {\r\n this.Reload();\r\n }\r\n\r\n public Reload() {\r\n this.http.get(this.appConfig.apiLocations.Equipment + \"Permissions\").subscribe(x => {\r\n this.HasAddEquipmentPermission.next(x.AddEquipment);\r\n this.HasEditEquipmentPermission.next(x.EditEquipment);\r\n this.HasDeleteEquipmentPermission.next(x.DeleteEquipment);\r\n this.HasAddAttributePermission.next(x.AddAttribute);\r\n this.HasEditAttributePermission.next(x.EditAttribute);\r\n this.HasDeleteAttributePermission.next(x.DeleteAttribute);\r\n this.HasAddCategoryPermission.next(x.AddCategory);\r\n this.HasEditCategoryPermission.next(x.EditCategory);\r\n this.HasDeleteCategoryPermission.next(x.DeleteCategory);\r\n this.HasAddMakeModelPermission.next(x.AddMakeModel);\r\n this.HasEditMakeModelPermission.next(x.EditMakeModel);\r\n this.HasDeleteMakeModelPermission.next(x.DeleteMakeModel);\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'makemodel.list.makes.and.models' | translate }}\r\n   
{{ 'makemodel.list.sub.title' | translate }}
\r\n

\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{ calculateCount(d) }}\r\n
\r\n \r\n
\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { GridKind } from \"../../enums/grid-kind.enum\";\r\nimport { SettingId } from \"../../enums/setting-id.enum\";\r\nimport { ModuleAccessModel } from \"../../models/module-access.model\";\r\nimport { SettingData } from \"../../models/setting-data.model\";\r\nimport { EquipmentPermissionsService } from \"../../services/equipment/equipment-permissions.service\";\r\nimport { GridService } from \"../../services/grid.service\";\r\nimport { MakeModelSharedService } from \"../../services/make-model.service\";\r\nimport { ModuleService } from \"../../services/module/module.service\";\r\nimport { SettingsService } from \"../../services/setting/settings.service\";\r\nimport { StoreService } from \"../../services/store.service\";\r\n\r\n\r\n@Component({\r\n selector: \"lib-make-model-list\",\r\n templateUrl: \"./make-model-list.component.html\",\r\n styleUrls: [\"./make-model-list.component.scss\"]\r\n})\r\nexport class MakeModelListComponent implements OnInit, OnChanges {\r\n\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n\r\n @Input() isAddDialogue: boolean = false;\r\n @Input() selected: number[] = [];\r\n @Input() supplierId: number = null;\r\n @Output() selectedChange = new EventEmitter();\r\n\r\n public modulesAccess: ModuleAccessModel = new ModuleAccessModel();\r\n public makeModelDataSource: DataSource;\r\n public SearchText: string = \"\";\r\n public hasAddPermission: boolean;\r\n public filters: any = { };\r\n public storeId: number = 1;\r\n public storeList: DataSource;\r\n\r\n public useAdditionalStores: boolean = false;\r\n\r\n public uploadOptions = [\r\n {\r\n id: \"make-model\",\r\n name: this.translate.instant(\"makemodel.list.make-model.upload\"),\r\n link: \"#/proteansystem/systems/equipment-settings/make-and-model-upload\"\r\n },\r\n {\r\n id: \"service-schedule\",\r\n name: this.translate.instant(\"makemodel.list.service-schedule.upload\"),\r\n link: \"#/proteansystem/systems/equipment-settings/service-schedule-upload\"\r\n }\r\n ];\r\n\r\n public equipmentStockCount: any[] = [];\r\n\r\n constructor(\r\n private moduleService: ModuleService,\r\n private translate: TranslateService,\r\n private makeModelService: MakeModelSharedService,\r\n private gridService: GridService,\r\n private storeService: StoreService,\r\n private settingsService: SettingsService,\r\n private permissionsService: EquipmentPermissionsService\r\n ) {\r\n this.calculateCount = this.calculateCount.bind(this);\r\n }\r\n\r\n ngOnInit() {\r\n this.permissionsService.Reload();\r\n this.permissionsService.HasAddMakeModelPermission.subscribe(x => this.hasAddPermission = x);\r\n\r\n this.moduleService.GetEnabledModulesAccess()\r\n .subscribe(x => this.modulesAccess = x);\r\n\r\n this.storeList = this.storeService.GetDataSource();\r\n\r\n this.makeModelService.MakeModelStoreEquipmentCount().subscribe(result => {\r\n this.equipmentStockCount = result;\r\n });\r\n\r\n this.settingsService.getSetting(SettingId.UseAdditionalStores)\r\n .subscribe((settingData: SettingData) => {\r\n this.useAdditionalStores = settingData.ValueBool;\r\n });\r\n\r\n this.gridService.GetLayout(GridKind.MakeModels).subscribe(value => {\r\n if (value) {\r\n this.dataGrid.instance.state(value);\r\n }\r\n this.GetDataSources();\r\n }, () => this.GetDataSources());\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n const supplierIdChange = changes.supplierId;\r\n if (!supplierIdChange || supplierIdChange.currentValue === supplierIdChange.previousValue) {\r\n return;\r\n }\r\n\r\n if (this.supplierId) {\r\n this.filters[\"preffered-supplier\"] = [\"SupplierId\", \"=\", this.supplierId];\r\n this.dataGrid.instance?.filter(this.filters[\"preffered-supplier\"]);\r\n } else {\r\n this.filters = { };\r\n this.dataGrid.instance?.clearFilter();\r\n }\r\n }\r\n\r\n public FilterStoreList(event) {\r\n this.storeId = event.value;\r\n this.dataGrid.instance.repaint();\r\n }\r\n\r\n public FilterChanged($event): void {\r\n const filterValue = $event.currentTarget.value;\r\n if (filterValue === \"no-filter\" || this.filters[filterValue] === undefined) {\r\n this.dataGrid.instance.clearFilter();\r\n } else {\r\n this.dataGrid.instance.filter(this.filters[filterValue]);\r\n }\r\n }\r\n\r\n public SetFilter(filter: any[]): void {\r\n this.dataGrid.instance.filter(filter);\r\n }\r\n\r\n public OnSelectionChanged(): void {\r\n this.selectedChange.emit(this.selected);\r\n }\r\n\r\n private GetDataSources(): void {\r\n this.makeModelDataSource = this.makeModelService.GetMakeModelsDataSource();\r\n if (this.supplierId && this.filters[\"preffered-supplier\"] !== undefined ) {\r\n this.makeModelDataSource.filter(this.filters[\"preffered-supplier\"]);\r\n }\r\n }\r\n\r\n public calculateCount(data) {\r\n if (this.equipmentStockCount.length > 0) {\r\n const storeCount = this.equipmentStockCount.find(x => x.MakeModelId === data.data.MakeModelId);\r\n if (storeCount) {\r\n const count = storeCount.Stores.find(x => x.StoreId === this.storeId);\r\n if (count) {\r\n return count.Count;\r\n }\r\n }\r\n }\r\n\r\n return 0;\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public SaveLayout(): void {\r\n const state = this.dataGrid.instance.state();\r\n this.gridService.SaveLayout(state, GridKind.MakeModels);\r\n }\r\n\r\n public ResetLayout(): void {\r\n this.gridService.ResetLayout(GridKind.MakeModels);\r\n this.dataGrid.instance.state(null);\r\n }\r\n\r\n public CustomSortingFunction(rowData: any): string {\r\n return `${rowData.Make} / ${rowData.Model}`;\r\n }\r\n\r\n public CalculateFilterExpression(filterValue: string, selectedFilterOperation: any, filterType: string): any {\r\n const column = this as any;\r\n if (filterType === \"search\") {\r\n return [[\"Make\", \"contains\", filterValue], \"or\", [\"Model\", \"contains\", filterValue]];\r\n }\r\n\r\n return column.defaultCalculateFilterExpression(filterValue, selectedFilterOperation, filterType);\r\n }\r\n\r\n public RedirectTo(link: string): void {\r\n location.href = link;\r\n }\r\n}\r\n","
\r\n \r\n \r\n \r\n
\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges\r\n} from \"@angular/core\";\r\nimport { Module } from \"../../../enums/module.enum\";\r\nimport { Sfg20ScheduleInterval } from \"../../../models/sfg20/sfg20-schedule-interval.model\";\r\nimport { ModuleService } from \"../../../services/module/module.service\";\r\nimport { Sfg20Service } from \"../../../services/sfg20.service\";\r\n\r\n@Component({\r\n selector: \"lib-sfg20-schedule-interval-select-box\",\r\n templateUrl: \"./sfg20-schedule-interval-select-box.component.html\",\r\n styleUrls: [\"./sfg20-schedule-interval-select-box.component.scss\"]\r\n})\r\nexport class Sfg20ScheduleIntervalSelectBoxComponent implements OnInit, OnChanges {\r\n @Input() scheduleId: number = null;\r\n @Input() value: string = null;\r\n @Input() disabled: boolean = false;\r\n @Input() rowMode: boolean = false;\r\n @Output() valueChange: EventEmitter = new EventEmitter();\r\n\r\n public isVisible: boolean = false;\r\n public scheduleIntervals: Sfg20ScheduleInterval[];\r\n\r\n public get intervalSelectionDisabled(): boolean {\r\n return this.disabled || !this.scheduleIntervals;\r\n }\r\n\r\n constructor(\r\n private moduleService: ModuleService,\r\n private sfg20Service: Sfg20Service) {\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.moduleService.GetEnabledModules().subscribe(modules => {\r\n if (modules.includes(Module.Pro) &&\r\n modules.includes(Module.Equipment) &&\r\n modules.includes(Module.Sfg20)) {\r\n this.isVisible = true;\r\n }\r\n });\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.scheduleId && changes.scheduleId.currentValue) {\r\n this.sfg20Service.GetSfg20ScheduleIntervals(this.scheduleId)\r\n .subscribe(x => this.scheduleIntervals = x);\r\n }\r\n }\r\n\r\n public onValueChanged(e: any): void {\r\n const interval = this.scheduleIntervals.find(x => x.FrequencyDuration === e.value);\r\n this.valueChange.emit(interval);\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { JobEquipmentStatus } from \"../enums/job-equipment-status\";\r\n\r\n@Pipe({\r\n name: \"jobEquipmentStatus\"\r\n})\r\nexport class JobEquipmentPipe implements PipeTransform {\r\n\r\n private readonly jobEquipmentStatus = {\r\n [JobEquipmentStatus.Outstanding]: \"job.equip.status.outstanding\",\r\n [JobEquipmentStatus.NotDone]: \"job.equip.status.notDone\",\r\n [JobEquipmentStatus.Done]: \"job.equip.status.done\",\r\n [JobEquipmentStatus.Skipped]: \"job.equip.status.skipped\",\r\n [JobEquipmentStatus.Moved]: \"job.equip.status.moved\"\r\n };\r\n\r\n transform(value: any): string {\r\n return this.jobEquipmentStatus[value];\r\n }\r\n}\r\n","\r\n
\r\n = jobStatusValue.COMPLETED || !IsSelectedEquipment\"\r\n (onItemClick)=\"UpdateStatus($event)\"\r\n itemTemplate=\"customItem\">\r\n
\r\n {{ data.Status | translate }}\r\n
\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n
\r\n {{ data.name }}\r\n
\r\n \r\n\r\n \r\n {{ 'grid.button.choose-columns.text' | translate }}\r\n \r\n\r\n = jobStatusValue.COMPLETED\"\r\n id=\"job-equipment-add-equipment\"\r\n (click)=\"OpenNewEquipmentDialog()\">\r\n {{ 'equipment.joblist.add' | translate }}\r\n \r\n\r\n = jobStatusValue.COMPLETED\"\r\n id=\"job-equipment-add-make-model\"\r\n (click)=\"OpenNewMakeModelDialog()\">\r\n {{ 'equipment.joblist.add-make-model' | translate }}\r\n \r\n\r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n
{{ data.value | currency: baseCurrencySymbol }}
\r\n
\r\n {{ item.data.Make + \" / \" + item.data.Model }}\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n {{ item.data.SerialNo }}\r\n
\r\n
\r\n \r\n {{ item.data.SessionId }}\r\n \r\n \r\n {{ 'job.equipment.no' | translate }}\r\n \r\n
\r\n
\r\n {{ item.data.Status | jobEquipmentStatus | translate }}\r\n \r\n - {{ item.data.AddedToJobId }}\r\n \r\n
\r\n \r\n
\r\n {{ 'job.equipment.yes' | translate }}\r\n {{ 'job.equipment.no' | translate }}\r\n
\r\n
\r\n
\r\n
\r\n {{ item.value }}\r\n TBC\r\n
\r\n
\r\n
\r\n {{ item.value }}\r\n TBC\r\n
\r\n
\r\n
\r\n {{ data.data.WorkRequired }}\r\n
\r\n
\r\n {{ data.data.ReasonNotDone }}\r\n
\r\n
\r\n \r\n {{ data.data.WorkReport }}\r\n
\r\n
\r\n {{ data.data.WarningNotes }}\r\n
\r\n
\r\n
\r\n {{ cellData.text }}\r\n
\r\n
\r\n {{ GetSfg20IntervalDisplayValue(cellData) }}\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n

{{ \"job.save-job-first.equipment\" | translate }}

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

{{ deleteMessage | translate }}

\r\n
\r\n
\r\n \r\n \r\n
\r\n\r\n\r\n\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n\r\n\r\n\r\n
\r\n {{ conditionTooltipText }}\r\n
\r\n
\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Inject,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent, DxTooltipComponent } from \"devextreme-angular\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { on } from \"devextreme/events\";\r\nimport { combineLatest, forkJoin, lastValueFrom, Observable, of } from \"rxjs\";\r\nimport { catchError, map } from \"rxjs/operators\";\r\nimport { AddVisitComponent } from \"./add-visit/add-visit.component\";\r\nimport { MoveToJobDialogComponent } from \"./move-to-job-dialog/move-to-job-dialog.component\";\r\nimport { GridKind } from \"../../../enums/grid-kind.enum\";\r\nimport { JobEquipmentStatus } from \"../../../enums/job-equipment-status\";\r\nimport { JobStatus } from \"../../../enums/job-status.enum\";\r\nimport { Module } from \"../../../enums/module.enum\";\r\nimport { PhraseBookType } from \"../../../enums/phrase-book-type.enum\";\r\nimport { ResponseType } from \"../../../enums/response-type.enum\";\r\nimport { SettingId } from \"../../../enums/setting-id.enum\";\r\nimport { EquipmentConditionModel } from \"../../../models/equipment/equipment-condition.model\";\r\nimport { EquipmentStatusModel } from \"../../../models/equipment/equipment-status.model\";\r\nimport { IProteanResponse } from \"../../../models/iprotean-response.model\";\r\nimport { JobVisitListItem } from \"../../../models/job-visit\";\r\nimport { EquipmentConditionService } from \"../../../services/equipment/equipment-condition.service\";\r\nimport { EquipmentDataService } from \"../../../services/equipment/equipment-data.service\";\r\nimport { GridService } from \"../../../services/grid.service\";\r\nimport { InspectionDataService } from \"../../../services/inspection-data.service\";\r\nimport { InspectionService } from \"../../../services/inspection.service\";\r\nimport { IAuthService } from \"../../../services/interfaces/iauth.service\";\r\nimport { JobDataService } from \"../../../services/job-data.service\";\r\nimport { ModuleService } from \"../../../services/module/module.service\";\r\nimport { SettingsService } from \"../../../services/setting/settings.service\";\r\nimport { AddEquipmentComponent } from \"../../add-equipment/add-equipment.component\";\r\nimport { FormMesssageService } from \"../../form-messages/form-messsage.service\";\r\nimport { WorkRequiredComponent } from \"../../work-required/work-required.component\";\r\nimport { EquipJobListSource } from \"../../../enums/equip-job-list-source.enum\";\r\nimport { InstallLineTypeEnum } from \"../../../enums/install-line-type.enum\";\r\nimport { Guid } from \"guid-typescript\";\r\nimport { MakeModelSharedService } from \"../../../services/make-model.service\";\r\nimport { Equipment } from \"../../../models/equipment/models/equipment\";\r\nimport { JobMakeModelSaveModel } from \"../../../models/equipment/models/job-make-model-save.model\";\r\nimport { Sfg20Service } from \"../../../services/sfg20.service\";\r\n\r\n@Component({\r\n selector: \"lib-equipment-job-list\",\r\n templateUrl: \"./equipment-job-list.component.html\",\r\n styleUrls: [\"./equipment-job-list.component.scss\"]\r\n})\r\n\r\nexport class EquipmentJobListComponent implements OnChanges, OnInit {\r\n public readonly isPortal: boolean;\r\n @Input() jobId: number;\r\n @Input() siteId: number;\r\n @Input() jobStatus: JobStatus;\r\n @Input() phraseBookEnabled: boolean = false;\r\n @Input() filesColumnEnabled: boolean = false;\r\n @Input() jobEquipmentCollection: Equipment[] = [];\r\n @Input() showPriceColumn: boolean = false;\r\n @Input() displaySource: EquipJobListSource = EquipJobListSource.EquipmentTab;\r\n @Output() jobEquipmentCollectionChange: EventEmitter = new EventEmitter();\r\n\r\n @Output() openVisit = new EventEmitter();\r\n @Output() openInspections = new EventEmitter();\r\n @Output() openFiles = new EventEmitter();\r\n // eslint-disable-next-line @angular-eslint/no-output-native\r\n @Output() load = new EventEmitter();\r\n @ViewChild(\"addEquipmentComponent\", { static: true }) addEquipmentComponent: AddEquipmentComponent;\r\n @ViewChild(\"jobEquipmentGrid\", { static: true }) jobEquipmentGrid: DxDataGridComponent;\r\n @ViewChild(\"moveToNewJobComponent\", { static: true }) moveToNewJobComponent: MoveToJobDialogComponent;\r\n @ViewChild(\"addVisitComponent\", { static: true }) addVisitComponent: AddVisitComponent;\r\n @ViewChild(\"workRequiredComponent\", { static: true }) workRequiredComponent: WorkRequiredComponent;\r\n @ViewChild(\"workReportComponent\", { static: true }) workReportComponent: WorkRequiredComponent;\r\n @ViewChild(\"makeModelWorkRequiredComponent\", { static: true }) makeModelWorkRequiredComponent: WorkRequiredComponent;\r\n @ViewChild(DxTooltipComponent) tooltip: DxTooltipComponent;\r\n public baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n\r\n private equipmentEditId: number = null;\r\n\r\n public isLoading: boolean = false;\r\n public hasAddPermission: boolean = true;\r\n public readonly formName: string = \"jobform\";\r\n public locationStore: ODataStore;\r\n public sfg20Schedules: ODataStore;\r\n public jobSessionsCollection: Observable = new Observable();\r\n public selectedLineIds: string[] = [];\r\n public moveToJobDisabled: boolean = true;\r\n public showDeleteMessage: boolean = false;\r\n public jobEquipStatus = JobEquipmentStatus;\r\n public jobStatusValue = JobStatus;\r\n public phraseType = PhraseBookType;\r\n public deleteMessage: string;\r\n public isProEnabled: boolean;\r\n public sfg20Enabled: boolean;\r\n public conditionTooltipText: string;\r\n private showConditionInPortal: boolean = false;\r\n public intallationTypes = InstallLineTypeEnum;\r\n public makeModelDialogVisible: boolean = false;\r\n public selectedMakeModelIds: number[] = [];\r\n public makeModelStore: ODataStore;\r\n\r\n public addVisitText: string = \"Add to visit\";\r\n\r\n public addVisitOptions: { id: number; name: string }[] = [\r\n { id: 1, name: \"Move to new job\" },\r\n { id: 2, name: \"Edit work required\" }\r\n ];\r\n\r\n private gridState: any = {};\r\n private conditions: EquipmentConditionModel[];\r\n\r\n public get IsSelectedEquipment(): boolean {\r\n return this.SelectedEquipItemIds.length > 0;\r\n }\r\n\r\n public get IsSelectedLine(): boolean {\r\n return this.selectedLineIds.length > 0;\r\n }\r\n\r\n public get ModifyEnabled(): boolean {\r\n return this.PortalModifyEnabled || this.WebModifyEnabled;\r\n }\r\n\r\n public get showCondition(): boolean {\r\n return this.isProEnabled && (!this.isPortal || this.showConditionInPortal);\r\n }\r\n\r\n public get EditMode(): string {\r\n return this.isPortal ? \"cell\" : \"row\";\r\n }\r\n\r\n public equipmentStatusCollection: EquipmentStatusModel[] = [\r\n { StatusId: JobEquipmentStatus.Outstanding, Status: \"job.equip.status.outstanding\" },\r\n { StatusId: JobEquipmentStatus.NotDone, Status: \"job.equip.status.notDone\" },\r\n { StatusId: JobEquipmentStatus.Done, Status: \"job.equip.status.done\" },\r\n { StatusId: JobEquipmentStatus.Skipped, Status: \"job.equip.status.skipped\" },\r\n { StatusId: JobEquipmentStatus.Moved, Status: \"job.equip.status.moved\" }\r\n ];\r\n public showWarning: boolean = false;\r\n\r\n private get PortalModifyEnabled(): boolean {\r\n return this.isPortal &&\r\n this.showConditionInPortal;\r\n }\r\n\r\n private get WebModifyEnabled(): boolean {\r\n //Price column is the only field thats editable thats why we check if its visible\r\n return !this.isPortal &&\r\n this.jobId &&\r\n this.showPriceColumn &&\r\n this.jobStatus < JobStatus.COMPLETED;\r\n }\r\n\r\n public get IsInstall(): boolean {\r\n return this.displaySource === EquipJobListSource.InstallTab;\r\n }\r\n\r\n public get SelectedEquipItemIds(): number[] {\r\n return this.jobEquipmentCollection\r\n .filter(x => this.selectedLineIds.includes(x.LineId) && x.InstallLineType === InstallLineTypeEnum.Equipment)\r\n .map(x => x.EquipItemId);\r\n }\r\n\r\n private get SelectedMakeModelInstallIds(): number[] {\r\n return this.jobEquipmentCollection\r\n .filter(x => this.selectedLineIds.includes(x.LineId) && x.InstallLineType === InstallLineTypeEnum.MakeModel)\r\n .map(x => x.MakeModelInstallId);\r\n }\r\n\r\n public get ButtonDisabled(): boolean {\r\n return this.isLoading || this.jobStatus >= this.jobStatusValue.COMPLETED || !this.IsSelectedLine;\r\n }\r\n\r\n constructor(\r\n private dataService: EquipmentDataService,\r\n private formMessageService: FormMesssageService,\r\n @Inject(\"AuthService\") authService: IAuthService,\r\n private inspectionsService: InspectionService,\r\n private inspectionsDataService: InspectionDataService,\r\n private jobDataService: JobDataService,\r\n private gridService: GridService,\r\n private translation: TranslateService,\r\n private moduleService: ModuleService,\r\n private conditionService: EquipmentConditionService,\r\n private makeModelService: MakeModelSharedService,\r\n private sfg20Service: Sfg20Service,\r\n private settingsService: SettingsService) {\r\n this.EditRowDisabled = this.EditRowDisabled.bind(this);\r\n\r\n this.inspectionsService.inspectionChanged.subscribe(() => {\r\n this.GetJobEquipmentData();\r\n });\r\n\r\n this.isPortal = authService.isPortalUser;\r\n\r\n this.SaveState = this.SaveState.bind(this);\r\n this.LoadState = this.LoadState.bind(this);\r\n this.EditorPreparing = this.EditorPreparing.bind(this);\r\n\r\n this.moduleService.GetEnabledModules().subscribe(x => {\r\n this.isProEnabled = x.includes(Module.Pro);\r\n this.sfg20Enabled = x.includes(Module.Sfg20);\r\n\r\n if (this.sfg20Enabled) {\r\n this.sfg20Schedules = this.sfg20Service.GetDataStore();\r\n }\r\n });\r\n\r\n this.settingsService.getSetting(SettingId.DisplayEquipmentConditionsOnWebPortal).subscribe(x => {\r\n this.showConditionInPortal = x.ValueBool;\r\n });\r\n\r\n this.conditionService.GetAll().subscribe(conditions => {\r\n this.conditions = conditions;\r\n });\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.makeModelStore = this.makeModelService.GetMakeModelsDataStore();\r\n this.translation.get([\r\n \"job.equipment.addToVisit\",\r\n \"job.equipment.moveToNewJob\",\r\n \"job.equipment.editwork\"\r\n ]).subscribe(value => {\r\n this.addVisitText = value[\"job.equipment.addToVisit\"];\r\n this.addVisitOptions[0].name = value[\"job.equipment.moveToNewJob\"];\r\n this.addVisitOptions[1].name = value[\"job.equipment.editwork\"];\r\n });\r\n }\r\n\r\n public onItemClick(e: any): void {\r\n switch (e.itemData.id) {\r\n case 1:\r\n this.MoveToNewJob();\r\n break;\r\n case 2:\r\n this.EditWorkRequired();\r\n break;\r\n }\r\n }\r\n public UpdateStatus(event: any) {\r\n const status = event.itemData.StatusId;\r\n this.formMessageService.RegisterObservable(this.dataService.UpdateEquipmentStatus({\r\n Status: status,\r\n EquipmentItemIds: this.SelectedEquipItemIds\r\n }), this.formName).subscribe(() => {\r\n this.GetJobEquipmentData();\r\n this.jobDataService.JobEquipmentChanged();\r\n this.jobEquipmentGrid.instance.deselectAll();\r\n });\r\n }\r\n\r\n public OnSfgScheduleChanged(value: number, cellData: any): void {\r\n cellData.setValue(value);\r\n\r\n // reset schedule interval values\r\n this.SetSfg20IntervalValue(cellData, null, null);\r\n }\r\n\r\n public OnSfgIntervalChanged(data: any, cellData: any): void {\r\n // setValue to trigger datasource change\r\n cellData.setValue(data?.FrequencyInterval ?? null);\r\n this.SetSfg20IntervalValue(cellData, data?.FrequencyInterval ?? null, data?.FrequencyPeriod ?? null);\r\n }\r\n\r\n public SfgIntervalEditDisabled(cellData: any): boolean {\r\n return !this.GetJobEquipmentRowScheduleId(cellData);\r\n }\r\n\r\n public GetJobEquipmentRowScheduleId(cellData: any): number {\r\n return this.jobEquipmentGrid.instance.cellValue(cellData.rowIndex, \"Sfg20ScheduleId\");\r\n }\r\n\r\n public GetSfg20IntervalDisplayValue(cellData: any): string {\r\n return cellData.data.Sfg20FrequencyInterval && cellData.data.Sfg20FrequencyPeriod ?\r\n `${cellData.data.Sfg20FrequencyInterval}${cellData.data.Sfg20FrequencyPeriod}` :\r\n null;\r\n }\r\n\r\n public EditRowDisabled(e: any): boolean {\r\n return e.row.data.Sfg20ScheduleId && !e.row.data.Sfg20FrequencyInterval;\r\n }\r\n\r\n public SetSfg20IntervalValue(cellData: any, frequencyInterval: number, frequencyPeriod: string): void {\r\n this.jobEquipmentGrid.instance.cellValue(cellData.rowIndex, \"Sfg20FrequencyInterval\", frequencyInterval);\r\n this.jobEquipmentGrid.instance.cellValue(cellData.rowIndex, \"Sfg20FrequencyPeriod\", frequencyPeriod);\r\n }\r\n\r\n public OnRowUpdated(data: Equipment): void {\r\n if (data.InstallLineType === InstallLineTypeEnum.Equipment) {\r\n this.formMessageService.RegisterObservable(this.dataService.UpdateJobEquipment({\r\n FlatCharge: data.Price,\r\n EquipItemId: data.EquipItemId,\r\n Sfg20ScheduleId: data.Sfg20ScheduleId,\r\n Sfg20FrequencyInterval: data.Sfg20FrequencyInterval,\r\n Sfg20FrequencyPeriod: data.Sfg20FrequencyPeriod\r\n }), this.formName).subscribe(() => {\r\n this.ReloadView();\r\n });\r\n }\r\n\r\n if (data.InstallLineType === InstallLineTypeEnum.MakeModel) {\r\n this.formMessageService.RegisterChainableObservable(this.dataService.UpdateMakeModelLine({\r\n MakeModelInstallId: data.MakeModelInstallId,\r\n Price: data.Price,\r\n Cost: data.Cost,\r\n Qty: data.Qty\r\n }), this.formName).subscribe(() => {\r\n this.ReloadView();\r\n });\r\n }\r\n }\r\n\r\n private ReloadView(): void {\r\n this.GetJobEquipmentData();\r\n this.jobDataService.JobEquipmentChanged();\r\n this.jobEquipmentGrid.instance.deselectAll();\r\n }\r\n\r\n public Remove() {\r\n this.deleteMessage = this.translation.instant(\"job.detail.delete-equipment.message\");\r\n if (this.isPortal) {\r\n this.showDeleteMessage = true;\r\n } else {\r\n this.inspectionsDataService.GetNumberOfEquipmentInspections(this.jobId, this.SelectedEquipItemIds).subscribe(x => {\r\n if (x > 0) {\r\n this.deleteMessage = this.translation.instant(\"job.detail.delete-equipment-with-inspections.message\", { value: x.toString() });\r\n }\r\n this.showDeleteMessage = true;\r\n });\r\n }\r\n }\r\n\r\n public LoadState(): Promise {\r\n return lastValueFrom(this.gridService.GetLayout(GridKind.JobEquip)).then(state => {\r\n if (state) {\r\n // put new columns in a correct place when loading saved state\r\n const currentState = this.jobEquipmentGrid.instance.state();\r\n const currentStateColumns = currentState?.columns || [];\r\n const savedStateColumns = state?.columns || [];\r\n if (currentStateColumns.length > savedStateColumns.length) {\r\n const savedStateColumNames = savedStateColumns.map((x) => x.name);\r\n const newColumns = currentStateColumns.filter((x) => !savedStateColumNames.includes(x.name));\r\n newColumns.forEach((newColumn) => {\r\n const newColumnIndex = currentStateColumns.indexOf(newColumn);\r\n savedStateColumns.forEach((column) => {\r\n if (column.visibleIndex >= newColumnIndex) {\r\n column.visibleIndex++;\r\n }\r\n });\r\n newColumn.visibleIndex = newColumnIndex;\r\n savedStateColumns.push(newColumn);\r\n });\r\n state.columns = savedStateColumns;\r\n }\r\n\r\n if (state.selectedRowKeys) {\r\n state.selectedRowKeys.length = 0;\r\n }\r\n\r\n this.gridState = state;\r\n this.jobEquipmentGrid.instance.state(state);\r\n }\r\n });\r\n }\r\n\r\n public SaveState(state): void {\r\n if (state) {\r\n state.pageIndex = 0; // do not save the page number when the grid layout is saved\r\n }\r\n this.gridService.SaveLayout(state, GridKind.JobEquip);\r\n }\r\n\r\n public OpenColumnChooser(): void {\r\n this.jobEquipmentGrid.instance.showColumnChooser();\r\n }\r\n\r\n public columnVisible(name: string, defaultValue: boolean): boolean {\r\n if (this.gridState && this.gridState.columns) {\r\n const column = this.gridState.columns.find(x => x.name === name);\r\n\r\n if (column) {\r\n return column.visible;\r\n }\r\n }\r\n\r\n return defaultValue;\r\n }\r\n\r\n public SfgColumnVisible(columnName: string): boolean {\r\n return this.columnVisible(columnName, true) && this.sfg20Enabled;\r\n }\r\n\r\n public EditorPreparing(e): void {\r\n if (e.parentType === \"dataRow\" && e.dataField === \"Qty\") {\r\n const isEquipmentLine = this.jobEquipmentCollection.find(x => x.EquipItemId === e.row.data.EquipItemId);\r\n if (isEquipmentLine && isEquipmentLine.InstallLineType === InstallLineTypeEnum.Equipment) {\r\n e.editorOptions.disabled = true;\r\n }\r\n }\r\n }\r\n\r\n public MeterColumnVisible(): boolean {\r\n if (this.showMeterColumn) {\r\n return this.columnVisible(\"MeterUnits\", true);\r\n }\r\n\r\n return false;\r\n }\r\n\r\n public ConfirmDeleteAction(): void {\r\n if (!this.isPortal) {\r\n const observablesArray: Array> = [];\r\n\r\n if (this.SelectedEquipItemIds.length) {\r\n observablesArray.push(\r\n this.formMessageService.RegisterObservable(\r\n this.dataService.RemoveJobEquipment(this.SelectedEquipItemIds), this.formName)\r\n );\r\n }\r\n\r\n if (this.SelectedMakeModelInstallIds.length) {\r\n observablesArray.push(\r\n this.formMessageService.RegisterObservable(\r\n this.dataService.RemoveJobMakeModel({\r\n JobId: this.jobId,\r\n MakeModelInstallIds: this.SelectedMakeModelInstallIds\r\n }), this.formName)\r\n );\r\n }\r\n\r\n combineLatest(observablesArray).subscribe(() => {\r\n this.GetJobEquipmentData();\r\n this.inspectionsService.EquipmentChanged();\r\n this.jobDataService.JobEquipmentChanged();\r\n this.load.emit();\r\n });\r\n } else {\r\n const self = this;\r\n this.SelectedEquipItemIds.forEach((value: number) => {\r\n self.jobEquipmentCollection = self.jobEquipmentCollection.filter(o => o.EquipItemId !== value);\r\n self.jobEquipmentCollectionChange.emit(self.jobEquipmentCollection);\r\n });\r\n }\r\n this.showDeleteMessage = false;\r\n }\r\n\r\n public CancelDeleteAction(): void {\r\n this.showDeleteMessage = false;\r\n }\r\n\r\n public AddToVisit() {\r\n this.addVisitComponent.equipmentItemIds = this.SelectedEquipItemIds;\r\n this.addVisitComponent.makeModelInstallIds = this.SelectedMakeModelInstallIds;\r\n this.addVisitComponent.Show();\r\n }\r\n\r\n public OnAddVisitClosed(): void {\r\n this.GetJobEquipmentData();\r\n this.inspectionsService.EquipmentChanged();\r\n }\r\n\r\n public MoveToNewJob() {\r\n const validator = new Observable(subscriber => {\r\n const incorrectStatus = this.SelectedEquipItemIds.filter(item => {\r\n const element = this.jobEquipmentCollection.find(x =>\r\n x.EquipItemId === item &&\r\n (x.Status === Number(JobEquipmentStatus.Done) || x.Status === Number(JobEquipmentStatus.Moved)));\r\n\r\n return element ? element : false;\r\n });\r\n\r\n if (incorrectStatus.length === 0) {\r\n this.moveToNewJobComponent.equipmentItemIds = this.SelectedEquipItemIds;\r\n this.moveToNewJobComponent.makeModelInstallIds = this.SelectedMakeModelInstallIds;\r\n this.moveToNewJobComponent.Show();\r\n subscriber.next(true);\r\n } else {\r\n const message = this.translation.instant(\"job.equip.item.canNotCopyItem\");\r\n const errors: IProteanResponse = {\r\n EntityId: this.jobId,\r\n IsSuccess: false,\r\n Messages: [{ Message: message }],\r\n ResponseType: ResponseType.Failure\r\n };\r\n subscriber.error(errors);\r\n this.jobEquipmentGrid.instance.deselectAll();\r\n }\r\n });\r\n this.formMessageService.RegisterObservable(validator, this.formName).subscribe();\r\n }\r\n\r\n public OpenNewEquipmentDialog() {\r\n if (!this.jobId && !this.isPortal) {\r\n this.showWarning = true;\r\n } else {\r\n this.addEquipmentComponent.Show();\r\n }\r\n }\r\n\r\n public OpenNewMakeModelDialog() {\r\n this.makeModelDialogVisible = true;\r\n }\r\n\r\n public AddEquipments(shouldAdd: boolean) {\r\n if (!this.isPortal && shouldAdd) {\r\n this.jobDataService.JobEquipmentChanged();\r\n this.GetJobEquipmentData();\r\n this.load.emit();\r\n } else if (shouldAdd) {\r\n const selectedEquipment = this.addEquipmentComponent.newEquipmentGrid.instance.getSelectedRowsData();\r\n const self = this;\r\n selectedEquipment.forEach((value: any) => {\r\n if (!self.jobEquipmentCollection.find(o => o.EquipId === value.EquipId)) {\r\n value.EquipItemId = value.EquipId;\r\n value.WorkRequired = value.Notes;\r\n value.Equip = value.EquipNumber;\r\n value.Qty = 1;\r\n value.InstallLineType = InstallLineTypeEnum.Equipment;\r\n value.LineId = Guid.create().toString();\r\n value.IsInstall = false;\r\n value.MarkAsOutOfAction = this.isOutOfActionCondition(value.ConditionId);\r\n self.jobEquipmentCollection.push(value);\r\n self.jobEquipmentCollectionChange.emit(self.jobEquipmentCollection);\r\n }\r\n });\r\n }\r\n }\r\n\r\n public AddItem(): void {\r\n this.makeModelWorkRequiredComponent.Show();\r\n }\r\n\r\n public async AddMakeModels(workRequired: string): Promise {\r\n if (!this.selectedMakeModelIds.length){\r\n return;\r\n }\r\n\r\n const makeModelsToSave: JobMakeModelSaveModel[] = [];\r\n for (const id of this.selectedMakeModelIds) {\r\n const makeModel = await this.makeModelService.Get(id).toPromise();\r\n const supplierPrice = makeModel.SupplierPrices.find(s => s.Preferred);\r\n\r\n makeModelsToSave.push({\r\n MakeModelId: makeModel.MakeModelId,\r\n Cost: supplierPrice?.Price || 0,\r\n Price: 0,\r\n Qty: 1,\r\n JobId: this.jobId,\r\n WorkRequired: workRequired\r\n });\r\n }\r\n\r\n this.formMessageService.RegisterObservable(\r\n this.dataService.SaveJobMakeModel(this.jobId, makeModelsToSave), this.formName)\r\n .subscribe(() => {\r\n this.GetJobEquipmentData();\r\n this.selectedMakeModelIds = [];\r\n this.makeModelDialogVisible = false;\r\n });\r\n }\r\n\r\n public Close(): void {\r\n this.makeModelDialogVisible = false;\r\n this.selectedMakeModelIds = [];\r\n }\r\n\r\n public OnMoveToJobClosed() {\r\n this.jobEquipmentGrid.instance.deselectAll();\r\n this.jobDataService.JobEquipmentChanged();\r\n this.GetJobEquipmentData();\r\n }\r\n\r\n public OpenSessionWindow(id: number) {\r\n this.openVisit.emit(id);\r\n }\r\n\r\n public EditWorkReport(equipItemId: number, currentValue: string): void {\r\n this.equipmentEditId = equipItemId;\r\n this.workReportComponent.SetText(currentValue);\r\n this.workReportComponent.Show();\r\n }\r\n\r\n public EditWorkRequired() {\r\n let workRequiredDialogueModel = null;\r\n if (this.selectedLineIds.length === 1) {\r\n const jobEquip = this.jobEquipmentCollection.find(o => o.EquipItemId === this.SelectedEquipItemIds[0]);\r\n if (jobEquip) {\r\n workRequiredDialogueModel = { WorkRequired: jobEquip.WorkRequired };\r\n }\r\n }\r\n this.workRequiredComponent.Show(workRequiredDialogueModel);\r\n }\r\n\r\n public OnEditWorkRequired($event) {\r\n if (!this.isPortal) {\r\n const updateEquipmentWorkRequiredObservable = this.formMessageService\r\n .RegisterObservable(this.dataService.UpdateWorkRequired({\r\n EquipmentItemIds: this.SelectedEquipItemIds,\r\n WorkRequired: $event\r\n }), this.formName);\r\n\r\n const updateMakeModelWorkRequiredObservable = this.formMessageService\r\n .RegisterObservable(this.dataService.UpdateJobMakeModelWorkRequired({\r\n JobId: this.jobId,\r\n MakeModelInstallIds: this.SelectedMakeModelInstallIds,\r\n WorkRequired: $event\r\n }), this.formName);\r\n\r\n combineLatest([updateEquipmentWorkRequiredObservable, updateMakeModelWorkRequiredObservable]).subscribe(([]) => {\r\n this.jobDataService.JobEquipmentChanged();\r\n this.GetJobEquipmentData();\r\n this.jobEquipmentGrid.instance.refresh();\r\n });\r\n } else {\r\n const self = this;\r\n this.SelectedEquipItemIds.forEach((value: number) => {\r\n self.jobEquipmentCollection.find(o => o.EquipId === value).WorkRequired = $event;\r\n self.jobEquipmentCollectionChange.emit(self.jobEquipmentCollection);\r\n });\r\n }\r\n }\r\n\r\n public conditionValueChanged($event, equipId: number) {\r\n const self = this;\r\n self.jobEquipmentCollection.find(x => x.EquipId === equipId).MarkAsOutOfAction = $event.value;\r\n self.jobEquipmentCollectionChange.emit(self.jobEquipmentCollection);\r\n }\r\n\r\n public OnEditWorkReport($event) {\r\n if (!this.isPortal) {\r\n this.formMessageService.RegisterObservable(this.dataService.UpdateWorkReport({\r\n EquipmentItemIds: [ this.equipmentEditId ],\r\n WorkRequired: $event\r\n }), this.formName).subscribe(() => {\r\n this.jobDataService.JobEquipmentChanged();\r\n this.GetJobEquipmentData();\r\n this.jobEquipmentGrid.instance.refresh();\r\n });\r\n }\r\n }\r\n\r\n public NavigateToInspection(e: Event): void {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.openInspections.emit();\r\n }\r\n\r\n public NavigateToFiles(equipmentId: number): void {\r\n this.openFiles.emit(equipmentId);\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.jobId && Number(changes.jobId.currentValue) > 0) {\r\n this.jobId = Number(changes.jobId.currentValue);\r\n this.GetJobEquipmentData();\r\n }\r\n\r\n if (changes.siteId && Number(changes.siteId.currentValue) > 0) {\r\n this.siteId = Number(changes.siteId.currentValue);\r\n this.locationStore = this.dataService.GetLocationsDataStore(this.siteId);\r\n }\r\n }\r\n\r\n public onEquipmentSelectionChanged(value: any) {\r\n this.moveToJobDisabled = value.selectedRowsData.length === 0 || value.selectedRowsData.some(x => x.Status === JobEquipmentStatus.Done || x.Status === JobEquipmentStatus.Moved);\r\n }\r\n\r\n public get showMeterColumn(): boolean {\r\n return this.jobEquipmentCollection != null && this.jobEquipmentCollection.some(eq => eq.MeterUnits);\r\n }\r\n\r\n public onCellPrepared(e: any): void {\r\n if (e.rowType === \"data\" && e.column.cellTemplate === \"equipTemplate\" && this.isProEnabled) {\r\n const id = `eq-no-${e.key}`;\r\n e.cellElement.id = id;\r\n e.cellElement.className += \"eq-number-cell\";\r\n\r\n const element = document.querySelector(`#${id} .colour-stripe`);\r\n on(element, \"mouseover\", arg => {\r\n this.conditionTooltipText = e.data.ConditionName;\r\n this.tooltip.instance.show(arg.target);\r\n });\r\n\r\n on(element, \"mouseout\", () => {\r\n this.tooltip.instance.hide();\r\n });\r\n }\r\n }\r\n\r\n public isOutOfActionCondition(conditionId: number): boolean {\r\n return this.conditions.find(condition => condition.ConditionId === conditionId).Ooa;\r\n }\r\n\r\n private GetJobEquipmentData() {\r\n if (!this.isPortal) {\r\n if (!this.jobId) {\r\n return;\r\n }\r\n\r\n const getJobMakeModelInstallObservable = this.displaySource === EquipJobListSource.InstallTab\r\n ? this.dataService.GetJobMakeModelInstall(this.jobId)\r\n : of(null);\r\n\r\n const getJobEquipmentObservable = this.displaySource === EquipJobListSource.InstallTab\r\n ? this.dataService.GetInstalledEquipmentForJob(this.jobId)\r\n : this.dataService.GetEquipmentForJob(this.jobId);\r\n\r\n forkJoin([getJobEquipmentObservable, getJobMakeModelInstallObservable]).subscribe(results => {\r\n let equip = results[0];\r\n equip.forEach(e => {\r\n e.InstallLineType = InstallLineTypeEnum.Equipment;\r\n e.Qty = 1;\r\n });\r\n\r\n if (results[1]) {\r\n const makeModels = results[1];\r\n const makeModelsToEquip = this.mapMakeModelsToEquipmentJobModels(makeModels);\r\n equip = equip.concat(makeModelsToEquip);\r\n }\r\n\r\n equip.forEach(e => {\r\n e.LineId = Guid.create().toString();\r\n });\r\n // if any of the equipment does not have a meter reading for the job\r\n if (equip.some(e => e.MeterUnits == null)) {\r\n // build an array of calls to retrieve the meter readings for the equipment\r\n const equipmentCalls: Observable[] = equip\r\n .filter(e => e.MeterUnits == null)\r\n .map(e => {\r\n return this.dataService.GetMeterReading(e.EquipId)\r\n .pipe(\r\n // service can return 404 for no meter reading = null\r\n catchError(() => of(null)),\r\n map(rd => {\r\n return {\r\n equipmentId: e.EquipId,\r\n reading: rd\r\n };\r\n })\r\n );\r\n });\r\n\r\n // now get the meter readings\r\n forkJoin(equipmentCalls).subscribe(ec => {\r\n // for each meter reading\r\n ec.forEach(meterReading => {\r\n // get the matching equipment record\r\n const eq = equip.find(equipment => equipment.EquipId === meterReading?.equipmentId);\r\n\r\n // if there is one\r\n if (eq) {\r\n // set the value to the meter reading\r\n eq.MeterUnits = meterReading?.reading?.MeterReading;\r\n }\r\n });\r\n\r\n this.jobEquipmentCollection = equip.filter(e => e.IsInstall === this.IsInstall);\r\n this.jobEquipmentCollectionChange.emit(this.jobEquipmentCollection);\r\n });\r\n\r\n } else {\r\n // just use the job equipment as is\r\n this.jobEquipmentCollection = equip.filter(e => e.IsInstall === this.IsInstall);\r\n this.jobEquipmentCollectionChange.emit(this.jobEquipmentCollection);\r\n }\r\n });\r\n\r\n this.jobSessionsCollection = this.dataService.GetJobVisit(this.jobId);\r\n } else {\r\n this.jobEquipmentCollection = new Array();\r\n this.jobEquipmentCollectionChange.emit(this.jobEquipmentCollection);\r\n }\r\n }\r\n\r\n private mapMakeModelsToEquipmentJobModels(makeModels: Equipment[]): Equipment[] {\r\n return makeModels.map(m => {\r\n const lineId = m.LineId ? m.LineId : Guid.create().toString();\r\n return {\r\n ...m,\r\n LineId: lineId,\r\n IsInstall: true,\r\n Inspections: [],\r\n FurtherWork: false,\r\n Visit: false,\r\n FilesCount: 0,\r\n AddedOnMobile: false,\r\n InstallLineType: InstallLineTypeEnum.MakeModel\r\n } as Equipment;\r\n });\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\n\r\nexport enum ErrorMessages {\r\n maxlength = \"form.errors.lengthexceeded\",\r\n required = \"form.errors.required\",\r\n email = \"form.errors.email\",\r\n notMatch = \"form.errors.notMatch\",\r\n outOfRange = \"form.errors.outofrange\",\r\n duplicatedMakeModel = \"makemodel.duplicated.message\",\r\n duplicatedEquipmentNo = \"equipment.duplicated.message\",\r\n duplicatedPurchaseNoteNo = \"purchase-notes.general.duplicated-number\",\r\n attributeOptionListItemEmpty = \"messages.validators.attributes.emptyOption\",\r\n attributeInUse = \"messages.attributes.attributeinuse\",\r\n duplicatedAttribute = \"messages.attributes.attributeExist\",\r\n unacceptedError = \"messages.error.genericError\",\r\n duplicatedCategories = \"form.errors.duplicatedCategories\",\r\n duplicatedType = \"form.errors.duplicated.types\",\r\n duplicatedSubType = \"form.errors.duplicated.subtypes\",\r\n duplicated = \"form.errors.duplicated\",\r\n negative = \"form.errors.negative\",\r\n notmatch = \"form.errors.not-match\",\r\n recipientsRequired = \"form.errors.recipientsRequired\",\r\n min = \"form.errors.min\",\r\n max = \"form.errors.max\",\r\n sameStores = \"form.errors.same-stores\",\r\n dueDateBeforeInvoiceDate = \"purchase-notes.general.invalid-due-date\",\r\n wrongTimeOnTimeOff = \"job.visit.error.time-on-time-off\",\r\n invalidPostcode = \"messages.error.invalid-post-code\",\r\n invalidPhoneNumber = \"messages.error.invalid-phone-number\"\r\n}\r\n\r\n\r\n@Pipe({\r\n name: \"errorMessage\"\r\n})\r\nexport class ErrorMessagePipe implements PipeTransform {\r\n\r\n transform(value: any, isGeneric: boolean): any {\r\n if (isGeneric && value === \"required\") {\r\n return \"form.errors.required.generic\";\r\n } else if (isGeneric && value === \"maxlength\") {\r\n return \"form.errors.lengthexceeded.generic\";\r\n }\r\n\r\n return ErrorMessages[value] || value;\r\n }\r\n\r\n}\r\n","
{{ error.message | errorMessage: isGeneric | translate: { value: error.control | translate, arg1: error.args[0], arg2: error.args[1] } }}
\r\n
{{ error.message | translate }}
\r\n
{{ error.message | errorMessage: isGeneric | translate }}
\r\n
{{ successMessage | translate }}
","import { AfterContentInit, Component, Input, OnInit } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { FormMesssageService } from \"./form-messsage.service\";\r\nimport { Validatable } from \"../../models/i-validatable\";\r\n\r\n@Component({\r\n selector: \"lib-form-messages\",\r\n templateUrl: \"./form-messages.component.html\",\r\n styleUrls: [\"./form-messages.component.scss\", \"../../styles/global.scss\"]\r\n})\r\nexport class GenericFormMessagesComponent implements OnInit, AfterContentInit {\r\n\r\n @Input() public form: NgForm;\r\n @Input() public formName: string;\r\n @Input() public isNewlyCreated: boolean;\r\n @Input() public successMessage: string = \"save.success.message\";\r\n @Input() public isGeneric = false;\r\n @Input() public viewModel: Validatable;\r\n\r\n public showSuccess: boolean = false;\r\n public formErrors: Array = [];\r\n public formWarnings: Array = [];\r\n public serverErrors: Array = [];\r\n\r\n public get canShowSuccessMessage() {\r\n return this.form ? !this.form.dirty : true;\r\n }\r\n constructor(private formMessageService: FormMesssageService) { }\r\n\r\n public ClearFormErrors(): void {\r\n this.formErrors.length = 0;\r\n }\r\n\r\n ngOnInit() {\r\n this.formMessageService.RegisterComponent(this.formName, this.isNewlyCreated)\r\n .subscribe(val => {\r\n if (val) {\r\n this.showSuccess = val.IsSuccess;\r\n if (val.IsSuccess && this.form) {\r\n this.form.form.markAsPristine();\r\n }\r\n\r\n this.serverErrors.length = 0;\r\n this.serverErrors.push(...val.Errors);\r\n\r\n this.formWarnings.length = 0;\r\n this.formWarnings.push(...val.Warnings);\r\n }\r\n });\r\n }\r\n\r\n ngAfterContentInit(): void {\r\n if (this.form) {\r\n this.form.onSubmit = (e: Event) => {\r\n this.formErrors.length = 0;\r\n this.serverErrors.length = 0;\r\n const viewModelErrors = this.viewModel ? this.viewModel.Validate() : null;\r\n if (this.form.invalid || (viewModelErrors && viewModelErrors.length > 0)) {\r\n const summaryErrors = [];\r\n const controls = this.form.controls;\r\n Object.keys(this.form.controls).forEach(key => {\r\n const errors = controls[key].errors;\r\n if (errors) {\r\n controls[key].markAsDirty();\r\n const errorObjs = Object.keys(errors).map((er) => ({ control: key, message: er, args: Object.values(errors[er]) }));\r\n summaryErrors.push(...errorObjs);\r\n }\r\n });\r\n this.formErrors.push(...summaryErrors);\r\n this.formErrors.push(...viewModelErrors);\r\n\r\n e.cancelBubble = true;\r\n e.preventDefault();\r\n } else {\r\n this.form.ngSubmit.emit();\r\n }\r\n return false;\r\n };\r\n }\r\n }\r\n}\r\n","export enum DocumentTypeEnum {\r\n Stock = 2,\r\n ServiceContract = 3,\r\n Job = 4,\r\n SalesInvoice = 5,\r\n Equipment = 6,\r\n MakeModel = 7,\r\n SalesOrder = 8,\r\n PurchaseOrder = 9,\r\n DespatchNote = 10,\r\n AdviceNote = 11,\r\n StockAdjustment = 12,\r\n JobVisit = 13,\r\n Credit = 15,\r\n ReturnsNote = 16,\r\n PurchaseNote = 17,\r\n Customer = 18,\r\n SalesOpportunity = 19,\r\n Supplier = 20,\r\n Employee = 25,\r\n Reminder = 26,\r\n Contact = 28,\r\n Message = 30,\r\n Quote = 31,\r\n Batch = 34,\r\n Inspections = 35,\r\n Cylinder = 36,\r\n FGasLog = 37,\r\n WasteTransferNotes = 38,\r\n MeterRead = 39,\r\n Project = 40\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { IAuthService } from \"./interfaces/iauth.service\";\r\nimport { IODataService } from \"./interfaces/iodata.service\";\r\nimport { DocumentTypeEnum } from \"../enums/document-type-enum\";\r\nimport { IAppConfig, APP_CONFIG } from \"../models/app-config.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class AttributesService {\r\n\r\n constructor(\r\n protected http: HttpClient,\r\n @Inject(\"AuthService\") protected auth: IAuthService,\r\n @Inject(\"ODataService\") protected odataService: IODataService,\r\n @Inject(APP_CONFIG) protected config: IAppConfig) { }\r\n\r\n public ODataStoreAttributes(docTypeId: DocumentTypeEnum): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.config.apiLocations.ServiceSightOData}AttributesOD`,\r\n key: \"AttributeId\",\r\n keyType: \"Int32\",\r\n queryStringParams: {\r\n docType: docTypeId\r\n }\r\n });\r\n }\r\n\r\n public ODataStoreCategories(docTypeId: DocumentTypeEnum): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.config.apiLocations.ServiceSightOData}AttributeCategoriesOD`,\r\n key: \"AttributeCatId\",\r\n keyType: \"Int32\",\r\n queryStringParams: {\r\n docType: docTypeId\r\n }\r\n });\r\n }\r\n\r\n public GetAttributeListDataSource(attributeId: number): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.ServiceSightOData}AttributeListOD`,\r\n key: \"AttributeId\",\r\n keyType: \"Int32\",\r\n queryStringParams: {\r\n attributeId\r\n }\r\n });\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class DateOnlyService {\r\n\r\n public RecalculateDateOnLoad(datetime: Date): Date {\r\n if (datetime) {\r\n const d = new Date(datetime);\r\n return new Date(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), d.getUTCHours(), d.getUTCMinutes());\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n public RecalculateDateOnSave(datetime: Date): Date {\r\n if (datetime) {\r\n const d = new Date(datetime);\r\n return new Date(Date.UTC(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours(), d.getMinutes()));\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n /*\r\n * Reverses any local timezone adjustment to keep date as original\r\n */\r\n public ReverseUTC(datetime: Date): Date {\r\n if (datetime) {\r\n return new Date(datetime.getTime() + (new Date().getTimezoneOffset() * -60000)); // 60000 * minutes = milliseconds\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { AttributeType } from \"../enums/attribute-type.enum\";\r\n\r\n@Pipe({\r\n name: \"selectedType\"\r\n})\r\nexport class SelectedTypePipe implements PipeTransform {\r\n private attributesTypes = {\r\n [AttributeType.List]: \"equipments.type.list\",\r\n [AttributeType.Memo]: \"equipments.type.memo\",\r\n [AttributeType.YesNo]: \"equipments.type.yesNo\",\r\n [AttributeType.Date]: \"equipments.type.date\",\r\n [AttributeType.Numeric]: \"equipments.type.numeric\",\r\n [AttributeType.Text]: \"equipments.type.text\"\r\n };\r\n\r\n transform(value: any): any {\r\n return this.attributesTypes.hasOwnProperty(value) ? this.attributesTypes[value] : value;\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n\r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n
\r\n {{ GetValue(data) }}\r\n {{ GetValue(data) | customDate: \"shortDate\" }}\r\n
\r\n\r\n
\r\n {{ data.data.AttributeName }}\r\n {{ data.data.AttributeName }}\r\n
\r\n\r\n
\r\n {{ data.data.AttributeTypeId | selectedType | translate }}\r\n
\r\n\r\n
\r\n {{ data.data.AttributeCatName }}\r\n
\r\n
\r\n\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{ data.value | selectedType | translate }}\r\n
\r\n
\r\n {{ data.data.AttributeCatName }}\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n

{{ \"job.save-job-first.attributes\" | translate }}

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

{{ deleteConfirmationMessage }}

\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Inject,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { UntypedFormControl } from \"@angular/forms\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { AttributeType } from \"../../enums/attribute-type.enum\";\r\nimport { DocumentTypeEnum } from \"../../enums/document-type-enum\";\r\nimport { Module } from \"../../enums/module.enum\";\r\nimport { EquipmentCfts } from \"../../models/equipment/equipment-cfts.model\";\r\nimport { GenericAttribute } from \"../../models/generic-attribute.model\";\r\nimport { AttributesService } from \"../../services/attributes.service\";\r\nimport { DateOnlyService } from \"../../services/date-only.service\";\r\nimport { IODataService } from \"../../services/interfaces/iodata.service\";\r\nimport { ModuleService } from \"../../services/module/module.service\";\r\n\r\n@Component({\r\n selector: \"lib-generic-attributes\",\r\n templateUrl: \"./generic-attributes.component.html\",\r\n styleUrls: [\"./generic-attributes.component.scss\"]\r\n})\r\nexport class GenericAttributesComponent implements OnInit, OnChanges {\r\n\r\n @ViewChild(\"attributegrid\", { static: true }) private attributeGrid: DxDataGridComponent;\r\n @ViewChild(\"genericattributegrid\", { static: true }) private genericAttributeGrid: DxDataGridComponent;\r\n @Input() genericId: number;\r\n @Input() genericAttributes: Array;\r\n @Input() form: UntypedFormControl;\r\n @Input() docType: DocumentTypeEnum;\r\n @Input() readOnly: boolean = false;\r\n @Input() showDeleteConfirmationMessage: boolean = false;\r\n @Input() deleteConfirmationMessage: string;\r\n @Input() gridHeight: string;\r\n @Input() repaint: boolean = false;\r\n @Input() cftsData: any;\r\n @Input() cftsAreaVisible: boolean = false;\r\n @Output() genericAttributesChanged = new EventEmitter>();\r\n @Output() cftsDataChanged = new EventEmitter();\r\n\r\n public attributelist: string = \"attributelist\";\r\n public attributesDataStore: ODataStore;\r\n public categoriesDataStore: ODataStore;\r\n public attributesAddDialogDataSource: DataSource;\r\n public attributeTypeListDataSource: DataSource;\r\n public genericAttributesDataSource: DataSource;\r\n public attributeType = AttributeType;\r\n public selectedCategoryId = 0;\r\n public isLoading: boolean = false;\r\n public showAttributeDialog: boolean = false;\r\n public editorAttributeType: AttributeType = null;\r\n public showEditAttributeDialog: boolean = false;\r\n public selectedAttributeIds: Array = [];\r\n public selectedGenericAttributeIds: Array = [];\r\n public usedAttributes: Array = [];\r\n public attributeModel: GenericAttribute;\r\n public editAttributeData: any;\r\n public editValue: any;\r\n public editText: any;\r\n public showWarning: boolean = false;\r\n public showDeleteMessage: boolean = false;\r\n public isCftsEnabled: boolean = false;\r\n public documentType = DocumentTypeEnum;\r\n public customerCftsMemberNumber: string;\r\n public equipmentCfts: EquipmentCfts = {\r\n YearOfManufacture: null,\r\n AttachmentLc: null,\r\n AttachmentSwl: null,\r\n Lc: null,\r\n Swl: null\r\n };\r\n\r\n constructor(\r\n @Inject(\"ODataService\") protected odataService: IODataService,\r\n private attributeService: AttributesService,\r\n private dateOnlyService: DateOnlyService,\r\n private moduleService: ModuleService) { }\r\n\r\n public ngOnInit(): void {\r\n this.attributesDataStore = this.attributeService.ODataStoreAttributes(this.docType);\r\n this.SetDataSource();\r\n this.attributesAddDialogDataSource = new DataSource({ store: this.attributesDataStore });\r\n this.categoriesDataStore = this.attributeService.ODataStoreCategories(this.docType);\r\n this.SetDataSource();\r\n\r\n this.moduleService.GetEnabledModules().subscribe(modules => {\r\n this.isCftsEnabled = modules.includes(Module.CFTS);\r\n });\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.genericAttributes && changes.genericAttributes.currentValue) {\r\n this.usedAttributes = this.genericAttributes.map((i) => i.AttributeId);\r\n this.SetDataSource();\r\n }\r\n\r\n if (changes.repaint && this.repaint) {\r\n this.genericAttributeGrid.instance.repaint();\r\n this.repaint = false;\r\n }\r\n\r\n if (changes.cftsData && this.cftsData) {\r\n switch(this.docType){\r\n case DocumentTypeEnum.Equipment:\r\n this.equipmentCfts = this.cftsData;\r\n break;\r\n case DocumentTypeEnum.Customer:\r\n this.customerCftsMemberNumber = this.cftsData;\r\n break;\r\n };\r\n }\r\n }\r\n\r\n public FilterChanged(): void {\r\n this.attributeGrid.instance.clearFilter();\r\n if (this.selectedCategoryId) {\r\n this.attributesAddDialogDataSource.filter(i => i.AttributeCatId === this.selectedCategoryId && this.usedAttributes.indexOf(i.AttributeId) < 0);\r\n } else {\r\n this.filterUsedAttributes();\r\n }\r\n this.attributesAddDialogDataSource.load();\r\n }\r\n\r\n public ShowAddAttributesDialogue(): void {\r\n if (this.docType === DocumentTypeEnum.Job && !this.genericId) {\r\n this.showWarning = true;\r\n } else {\r\n this.selectedCategoryId = null;\r\n this.attributeGrid.instance.clearSelection();\r\n this.filterUsedAttributes();\r\n this.attributesAddDialogDataSource.load().then(() => {\r\n this.showAttributeDialog = true;\r\n document.querySelector(\"body\").style.overflow = \"hidden\";\r\n });\r\n }\r\n }\r\n\r\n public CloseEditAttributesDialogue(): void {\r\n this.showEditAttributeDialog = false;\r\n this.editorAttributeType = null;\r\n }\r\n\r\n public ShowEditAttributesDialogue(row: any): void {\r\n if (!row.data.Text || row.data.Text === undefined) {\r\n row.data.Text = \"\";\r\n }\r\n\r\n this.editValue = row.data.Memo ? row.data.Memo : row.data.Value;\r\n this.editText = row.data.Text;\r\n this.editAttributeData = row;\r\n this.showEditAttributeDialog = true;\r\n this.GetType(this.editAttributeData.data.AttributeId).then(attributeType => {\r\n this.editorAttributeType = attributeType;\r\n });\r\n this.attributeTypeListDataSource = this.attributeService.GetAttributeListDataSource(row.data.AttributeId);\r\n if (this.form) {\r\n this.form.markAsDirty();\r\n }\r\n document.querySelector(\"body\").style.overflow = \"hidden\";\r\n }\r\n\r\n public CloseAttributesDialogue(): void {\r\n this.showAttributeDialog = false;\r\n }\r\n\r\n public DialogClosed(): void {\r\n document.querySelector(\"body\").style.overflow = \"\";\r\n }\r\n\r\n public AddAttributes(): void {\r\n if (this.selectedAttributeIds.length > 0) {\r\n this.usedAttributes = this.usedAttributes.concat(this.selectedAttributeIds);\r\n this.selectedAttributeIds.forEach((i) => { // adds new attributes to the model\r\n const newItem = {\r\n Id: this.genericId,\r\n AttributeId: i,\r\n Text: \"\",\r\n Memo: \"\",\r\n Value: null\r\n };\r\n\r\n this.GetType(newItem.AttributeId).then(attributeType => {\r\n if (attributeType === AttributeType.YesNo) {\r\n newItem.Value = 0;\r\n newItem.Text = \"No\";\r\n }\r\n this.genericAttributes.push(newItem);\r\n this.genericAttributesChanged.emit(this.genericAttributes);\r\n this.SetDataSource();\r\n });\r\n });\r\n }\r\n if (this.form) {\r\n this.form.markAsDirty();\r\n }\r\n this.showAttributeDialog = false;\r\n }\r\n\r\n public DeleteGenericAttributes(): void {\r\n if (this.selectedGenericAttributeIds) {\r\n if (this.showDeleteConfirmationMessage) {\r\n this.showDeleteMessage = true;\r\n } else {\r\n this.DeleteAttributes();\r\n }\r\n }\r\n }\r\n\r\n public ConfirmDeleteAction(): void {\r\n this.DeleteAttributes();\r\n this.showDeleteMessage = false;\r\n }\r\n\r\n public CancelDeleteAction(): void {\r\n this.showDeleteMessage = false;\r\n }\r\n\r\n private DeleteAttributes(): void {\r\n if (this.selectedGenericAttributeIds) {\r\n this.usedAttributes = this.usedAttributes.filter((a) => this.selectedGenericAttributeIds.indexOf(a) < 0);\r\n this.selectedGenericAttributeIds // removes deleted attributes from the model\r\n .forEach(f => this.genericAttributes.splice(this.genericAttributes.findIndex(e => e.AttributeId === f), 1));\r\n this.genericAttributesChanged.emit(this.genericAttributes);\r\n if (this.form) {\r\n this.form.markAsDirty();\r\n }\r\n this.SetDataSource();\r\n }\r\n }\r\n\r\n public GetValue(item: any): any {\r\n switch (item.displayValue) {\r\n case AttributeType.Numeric:\r\n return item.data.Value;\r\n case AttributeType.Memo:\r\n return item.data.Memo;\r\n case AttributeType.Date:\r\n if (item.data.Value) {\r\n return this.DisplayDate(item.data.Value);\r\n }\r\n\r\n return null;\r\n default:\r\n return item.data.Text;\r\n }\r\n }\r\n\r\n public GetType(attributeId: number): Promise {\r\n return this.attributesDataStore.byKey(attributeId).then(attribute => attribute.AttributeTypeId as AttributeType);\r\n }\r\n\r\n public SetValue(event: any): void {\r\n this.editValue = event.target.value;\r\n this.editText = event.target.value;\r\n }\r\n\r\n public SetBoolean(value: boolean): void {\r\n if (value) {\r\n this.editValue = -1;\r\n this.editText = \"Yes\";\r\n } else {\r\n this.editValue = 0;\r\n this.editText = \"No\";\r\n }\r\n }\r\n\r\n public SetDate($event: any): void {\r\n if ($event.value) {\r\n const d = new Date($event.value);\r\n const date = this.dateOnlyService.RecalculateDateOnSave(d);\r\n this.editText = d.toLocaleString();\r\n this.editValue = date.getTime();\r\n } else {\r\n this.editText = null;\r\n this.editValue = null;\r\n }\r\n }\r\n\r\n public SetListValue($event: any): void {\r\n this.editText = $event.event.target.textContent;\r\n this.editValue = $event.value;\r\n }\r\n\r\n public DisplayDate(datetime: Date): Date {\r\n return this.dateOnlyService.RecalculateDateOnLoad(datetime);\r\n }\r\n\r\n public EditAttributes(row: any): void {\r\n this.GetType(this.editAttributeData.data.AttributeId).then(attributeType => {\r\n switch (attributeType) {\r\n case AttributeType.Text:\r\n row.Text = this.editText;\r\n this.genericAttributesChanged.emit(this.genericAttributes);\r\n break;\r\n case AttributeType.Numeric:\r\n row.Value = this.editValue;\r\n this.genericAttributesChanged.emit(this.genericAttributes);\r\n break;\r\n case AttributeType.Memo:\r\n row.Memo = this.editValue;\r\n this.genericAttributesChanged.emit(this.genericAttributes);\r\n break;\r\n case AttributeType.YesNo:\r\n case AttributeType.Date:\r\n case AttributeType.List:\r\n row.Value = this.editValue;\r\n row.Text = this.editText;\r\n break;\r\n }\r\n this.CloseEditAttributesDialogue();\r\n this.SetDataSource();\r\n this.editText = null;\r\n this.editValue = null;\r\n });\r\n }\r\n\r\n public ValueSorting(data: any): any {\r\n const column = this as any;\r\n const displayValue = column.calculateCellValue(data);\r\n\r\n switch (displayValue) {\r\n case AttributeType.Date:\r\n case AttributeType.Numeric:\r\n return data.Value;\r\n case AttributeType.Memo:\r\n return data.Memo;\r\n default:\r\n return data.Text;\r\n }\r\n }\r\n\r\n public OnCftsDataChanges(): void {\r\n if (this.form) {\r\n this.form.markAsDirty();\r\n }\r\n switch(this.docType){\r\n case DocumentTypeEnum.Equipment:\r\n this.cftsDataChanged.emit(this.equipmentCfts);\r\n break;\r\n case DocumentTypeEnum.Customer:\r\n this.cftsDataChanged.emit(this.customerCftsMemberNumber);\r\n break;\r\n default:\r\n this.cftsDataChanged.emit();\r\n break;\r\n };\r\n }\r\n\r\n private filterUsedAttributes(): void {\r\n this.attributesAddDialogDataSource.filter((i) => this.usedAttributes.indexOf(i.AttributeId) < 0);\r\n }\r\n\r\n private SetDataSource(): void {\r\n this.genericAttributesDataSource = this.odataService.GetDataSourceWithLookups(\r\n this.genericAttributes,\r\n \"AttributeId\",\r\n [\r\n {\r\n store: this.attributesDataStore,\r\n dataKey: \"AttributeId\",\r\n lookupKey: \"AttributeId\",\r\n displayExprs: [\"AttributeName\", \"AttributeTypeId\", \"AttributeCatName\"]\r\n }\r\n ]);\r\n }\r\n}\r\n","import {\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\n\r\n@Component({\r\n selector: \"lib-video-modal\",\r\n templateUrl: \"./video-modal.component.html\",\r\n styleUrls: [\"./video-modal.component.scss\"]\r\n})\r\nexport class VideoModalComponent implements OnChanges {\r\n @Input() public videoTitle: string = \"Video Title\";\r\n @Input() public videoUrl: string = \"\";\r\n @Input() public videoVisible: boolean = false;\r\n @Output() public videoVisibleChange = new EventEmitter();\r\n\r\n @ViewChild(\"video\", { read: ElementRef }) public video: ElementRef;\r\n\r\n public get internalVideoVisble(): boolean {\r\n return this.videoVisible;\r\n }\r\n\r\n public set internalVideoVisble(value: boolean) {\r\n if (!value) {\r\n this.pauseVideo();\r\n }\r\n\r\n this.videoVisible = value;\r\n this.videoVisibleChange.emit(value);\r\n }\r\n\r\n constructor() { }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.videoVisible && changes.videoVisible.currentValue) {\r\n this.playVideo();\r\n }\r\n }\r\n\r\n private playVideo(): void {\r\n if (this.video && this.video.nativeElement) {\r\n this.video.nativeElement.load();\r\n this.video.nativeElement.play();\r\n }\r\n }\r\n\r\n private pauseVideo(): void {\r\n if (this.video && this.video.nativeElement) {\r\n this.video.nativeElement.pause();\r\n }\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n","\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n {{ getTypeText(item.type) }} — {{ item.title }}\r\n \r\n

{{ item.description }}

\r\n \r\n \r\n
\r\n
\r\n Navigate Open\r\n
\r\n
\r\n
\r\n\r\n\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnDestroy,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { DxScrollViewComponent } from \"devextreme-angular\";\r\nimport { combineLatest, Subject } from \"rxjs\";\r\nimport { debounceTime, distinctUntilChanged } from \"rxjs/operators\";\r\nimport { SupportKnowledgeBaseResult } from \"../../models/support-knowledge-base-result.model\";\r\nimport { HelpService } from \"../../services/help/help.service\";\r\n\r\n/* eslint-disable no-var */\r\ndeclare var Appcues;\r\ndeclare var gtag;\r\n/* eslint-enable no-var */\r\n\r\n@Component({\r\n selector: \"lib-help-modal\",\r\n templateUrl: \"./help-modal.component.html\",\r\n styleUrls: [\"./help-modal.component.scss\"]\r\n})\r\nexport class HelpModalComponent implements OnInit, OnDestroy, OnChanges {\r\n @Input() public suggestedHelpLink: string | null = null;\r\n @Input() public helpVisible: boolean = false;\r\n @Output() public helpVisibleChange = new EventEmitter();\r\n @ViewChild(DxScrollViewComponent, { static: false }) scrollView: DxScrollViewComponent;\r\n\r\n private searchChanged: Subject = new Subject();\r\n public selectedIndex: number | null = null;\r\n\r\n public searchValue: string = \"\";\r\n public defaultSearchResults: SupportKnowledgeBaseResult[] = [];\r\n public searchResults: SupportKnowledgeBaseResult[] = [];\r\n public displayVideoTitle: string = \"\";\r\n public displayVideoUrl: string = \"\";\r\n public displayVideoVisible: boolean = false;\r\n\r\n public get internalHelpVisble(): boolean {\r\n return this.helpVisible;\r\n }\r\n\r\n public set internalHelpVisble(value: boolean) {\r\n this.helpVisible = value;\r\n this.helpVisibleChange.emit(value);\r\n }\r\n\r\n public get suggestedHelpPage(): string | null {\r\n if (this.suggestedHelpLink) {\r\n const parts = this.suggestedHelpLink.split(\"/\");\r\n let url = parts.pop() || parts.pop();\r\n\r\n // replace - in url with space to make it a valid title\r\n url = url.replace(/-/g, \" \");\r\n\r\n // capitalize first letter of first word\r\n url = url.replace(/^\\w/, c => c.toUpperCase());\r\n\r\n return url;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n constructor(private helpService: HelpService) {\r\n this.handleKeydown = this.handleKeydown.bind(this);\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n document.removeEventListener(\"keydown\", this.handleKeydown);\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.helpVisible && changes.helpVisible.currentValue) {\r\n this.selectedIndex = null;\r\n\r\n gtag(\"event\", \"open\", {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n event_category: \"help\"\r\n });\r\n } else if (changes.suggestedHelpLink && changes.suggestedHelpLink.currentValue && !this.helpVisible) {\r\n this.searchResults = this.suggestedHelpPage ? [{\r\n type: \"knowledgebase\",\r\n title: this.suggestedHelpPage,\r\n href: this.suggestedHelpLink,\r\n description: \"Recommended based on current page\"\r\n }] : [];\r\n }\r\n }\r\n\r\n public ngOnInit(): void {\r\n document.addEventListener(\"keydown\", this.handleKeydown);\r\n\r\n this.helpService.openHelpRequested.subscribe(items => {\r\n if (items) {\r\n this.defaultSearchResults = items;\r\n this.searchResults = items;\r\n this.helpVisible = true;\r\n }\r\n });\r\n\r\n this.searchChanged.pipe(\r\n debounceTime(500),\r\n distinctUntilChanged())\r\n .subscribe(value => {\r\n if (value) {\r\n gtag(\"event\", \"search\", {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n event_category: \"help\",\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n event_label: value\r\n });\r\n\r\n combineLatest([\r\n this.helpService.searchWalkthroughs(value),\r\n this.helpService.searchVideos(value),\r\n this.helpService.searchKnowledgeBase(value)\r\n ]).subscribe(results => {\r\n this.searchResults = this.suggestedHelpPage ? [{\r\n type: \"knowledgebase\",\r\n title: this.suggestedHelpPage,\r\n href: this.suggestedHelpLink,\r\n description: \"Recommended based on current page\"\r\n }] : [];\r\n\r\n this.searchResults.push(...results[0]);\r\n this.searchResults.push(...results[1]);\r\n this.searchResults.push(...results[2]);\r\n });\r\n } else {\r\n this.searchResults = this.suggestedHelpPage ? [{\r\n type: \"knowledgebase\",\r\n title: this.suggestedHelpPage,\r\n href: this.suggestedHelpLink,\r\n description: \"Recommended based on current page\"\r\n }] : this.defaultSearchResults;\r\n }\r\n });\r\n\r\n this.helpVisibleChange.subscribe(visible => {\r\n if (!visible) {\r\n this.searchValue = \"\";\r\n }\r\n });\r\n }\r\n\r\n // https://js.devexpress.com/Documentation/ApiReference/UI_Components/dxTextBox/Configuration/#onValueChanged\r\n public searchValueChanged(e: any): void {\r\n this.searchChanged.next(e.value);\r\n }\r\n\r\n public openItem(item: SupportKnowledgeBaseResult): void {\r\n this.displayVideoTitle = \"\";\r\n this.displayVideoUrl = \"\";\r\n this.displayVideoVisible = false;\r\n this.internalHelpVisble = false;\r\n\r\n gtag(\"event\", item.type, {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n event_category: \"help\",\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n event_label: item.title\r\n });\r\n\r\n if (item.type === \"walkthrough\") {\r\n Appcues.show(item.href);\r\n } else if (item.type === \"knowledgebase\") {\r\n window.open(item.href, \"_blank\");\r\n } else if (item.type === \"video\") {\r\n this.displayVideoTitle = item.title;\r\n this.displayVideoUrl = item.href;\r\n this.displayVideoVisible = true;\r\n }\r\n }\r\n\r\n public getTypeText(type: string): string {\r\n if (type === \"walkthrough\") {\r\n return \"Walkthrough\";\r\n } else if (type === \"video\") {\r\n return \"Video\";\r\n } else if (type === \"knowledgebase\") {\r\n return \"Knowledge base\";\r\n }\r\n\r\n return \"\";\r\n }\r\n\r\n public getTypeIcon(type: string): string {\r\n if (type === \"walkthrough\") {\r\n return \"fa-walking\";\r\n } else if (type === \"video\") {\r\n return \"fa-video\";\r\n } else if (type === \"knowledgebase\") {\r\n return \"fa-book\";\r\n }\r\n\r\n return \"fa-question-square\";\r\n }\r\n\r\n private handleKeydown(e: KeyboardEvent): void {\r\n if (this.internalHelpVisble) {\r\n // if the user presses the escape key, close the help modal\r\n if (e.key === \"Escape\") {\r\n this.internalHelpVisble = false;\r\n e.preventDefault();\r\n }\r\n\r\n // if the user presses the enter key, open the selected item\r\n if (e.key === \"Enter\") {\r\n if (this.selectedIndex !== null) {\r\n const item = this.searchResults[this.selectedIndex];\r\n this.openItem(item);\r\n e.preventDefault();\r\n }\r\n }\r\n\r\n // if the user presses the up or down arrow keys, select the next item\r\n if (e.key === \"ArrowUp\") {\r\n if (this.selectedIndex !== null && this.selectedIndex > 0) {\r\n this.selectedIndex--;\r\n } else {\r\n this.selectedIndex = this.searchResults.length - 1;\r\n }\r\n this.scrollToActiveItem();\r\n\r\n e.preventDefault();\r\n }\r\n\r\n if (e.key === \"ArrowDown\") {\r\n if (this.selectedIndex !== null && this.selectedIndex < this.searchResults.length - 1) {\r\n this.selectedIndex++;\r\n } else {\r\n this.selectedIndex = 0;\r\n }\r\n this.scrollToActiveItem();\r\n\r\n e.preventDefault();\r\n }\r\n }\r\n }\r\n\r\n private scrollToActiveItem(): void {\r\n const activeItemNumber = this.selectedIndex + 1;\r\n const activeItem = document.querySelector(`.help-result:nth-child(${activeItemNumber})`);\r\n this.scrollView.instance.scrollToElement(activeItem);\r\n }\r\n}\r\n","export enum InspectionStatus {\r\n Outstanding = 100,\r\n NotDone = 600,\r\n DetailsRequired = 650,\r\n Skipped = 700,\r\n Completed = 800,\r\n Fail = 801,\r\n Pass = 802\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\n\r\n@Pipe({\r\n name: \"inspectionStatus\"\r\n})\r\nexport class InspectionStatusPipe implements PipeTransform {\r\n transform(value: any): any {\r\n return \"inspections.status.\" + value;\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'inspections.list.heading' | translate}}

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n\r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n
{{data.value | inspectionStatus | translate}}
\r\n
\r\n {{ data.value | customDate: 'shortDate' }}\r\n
\r\n
\r\n","import { Component, Inject, OnInit, ViewChild } from \"@angular/core\";\r\nimport { ActivatedRoute } from \"@angular/router\";\r\nimport { Router } from \"@angular/router\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { EdmLiteral } from \"devextreme/data/odata/utils\";\r\nimport { PermissionsService } from \"./../../services/permissions-service.service\";\r\nimport { GridKind } from \"../../enums/grid-kind.enum\";\r\nimport { InspectionStatus } from \"../../enums/inspection-status.enum\";\r\nimport { Module } from \"../../enums/module.enum\";\r\nimport { GridService } from \"../../services/grid.service\";\r\nimport { InspectionDataService } from \"../../services/inspection-data.service\";\r\nimport { IAuthService } from \"../../services/interfaces/iauth.service\";\r\nimport { IRouterLinkService } from \"../../services/interfaces/irouter-link.service\";\r\nimport { ModuleService } from \"../../services/module/module.service\";\r\n\r\n@Component({\r\n selector: \"lib-inspections-list\",\r\n templateUrl: \"./inspections-list.component.html\",\r\n styleUrls: [\r\n \"./inspections-list.component.scss\",\r\n \"../../styles/global.scss\",\r\n \"../../styles/backgrounds.scss\",\r\n \"../../styles/servicesight-shared.scss\"\r\n ]\r\n})\r\nexport class InspectionsListComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n\r\n private skippedStatus = new EdmLiteral(\"Inspections.Enums.InspectionDisplayStatus'Skipped'\");\r\n\r\n public inspectionsDataSource: DataSource;\r\n public baseDetailLink: string;\r\n public baseDetailLinkJob: string;\r\n public SearchText: string = \"\";\r\n public jobId: number;\r\n public readonly isPortal: boolean = false;\r\n public isRecurringJobsModuleEnabled: boolean = false;\r\n public isProEnabled: boolean = false;\r\n public plannerBoardEnabled: boolean = false;\r\n\r\n public filters: any = {\r\n 1: [\"Status\", \"<\", this.skippedStatus],\r\n 2: [\"Status\", \">=\", this.skippedStatus]\r\n };\r\n\r\n public hidePriority: Array = [\r\n \"SiteName\",\r\n \"Employee\",\r\n \"VisitDate\",\r\n \"Status\",\r\n \"TemplateName\"\r\n ];\r\n\r\n constructor(\r\n private inspectionsService: InspectionDataService,\r\n private gridService: GridService,\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private permissionsService: PermissionsService,\r\n private moduleService: ModuleService,\r\n @Inject(\"AuthService\") authService: IAuthService,\r\n @Inject(\"RouterLinkService\") private routerLink: IRouterLinkService) {\r\n this.isPortal = authService.isPortalUser;\r\n this.routerLink.inspectionDetailBaseLink.subscribe(link => this.baseDetailLink = link);\r\n this.routerLink.jobDetailBaseLink.subscribe(link => this.baseDetailLinkJob = link);\r\n }\r\n\r\n public get UseRouterLink() {\r\n return !this.baseDetailLink.includes(\"#\");\r\n }\r\n\r\n public get UseJobRouterLink() {\r\n return !this.baseDetailLinkJob.includes(\"#\");\r\n }\r\n\r\n public columnHidePriority(columnName: string): number {\r\n return this.hidePriority.indexOf(columnName);\r\n }\r\n\r\n ngOnInit() {\r\n this.gridService.GetLayout(GridKind.Inspections).subscribe(value => {\r\n if (value) {\r\n this.dataGrid.instance.state(value);\r\n }\r\n this.GetDataSources();\r\n }, () => this.GetDataSources());\r\n this.route.params.subscribe(params => this.jobId = params.jobId);\r\n\r\n this.permissionsService.CurrentUserHasPermission(\"JobPlannerboard\").subscribe(isAllowedView => {\r\n this.plannerBoardEnabled = isAllowedView;\r\n });\r\n\r\n this.moduleService.GetEnabledModules().subscribe(enabledModules => {\r\n this.isProEnabled = enabledModules.includes(Module.Pro);\r\n this.isRecurringJobsModuleEnabled = enabledModules.includes(Module.Pro);\r\n });\r\n }\r\n\r\n private GetDataSources() {\r\n this.inspectionsDataSource = this.inspectionsService.GetDataSource(true);\r\n if (this.jobId) {\r\n this.inspectionsDataSource.filter(x => x.JobId === this.jobId);\r\n }\r\n }\r\n\r\n SearchTextChanged() {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n FilterChanged($event): void {\r\n const filters = [];\r\n const filterValue = $event.currentTarget.value;\r\n if (filterValue !== \"0\") {\r\n filters.push(this.filters[filterValue]);\r\n filters.push(\"and\");\r\n }\r\n if (this.jobId) {\r\n filters.push([\"JobId\", \"=\", this.jobId]);\r\n } else if (filters) {\r\n filters.pop();\r\n }\r\n\r\n if (filters.length) {\r\n this.dataGrid.instance.filter(filters);\r\n } else {\r\n this.dataGrid.instance.clearFilter();\r\n }\r\n }\r\n\r\n SaveLayout() {\r\n const state = this.dataGrid.instance.state();\r\n this.gridService.SaveLayout(state, GridKind.Inspections);\r\n }\r\n\r\n ResetLayout() {\r\n this.gridService.ResetLayout(GridKind.Inspections);\r\n this.dataGrid.instance.state(null);\r\n }\r\n\r\n calculateJobSession(data) {\r\n return data.JobId + \".\" + data.SessionId;\r\n }\r\n\r\n calculateStatusFilter(filterValue, selectedFilterOperation, filterType) {\r\n const column = this as any;\r\n // Search the status based on the string\r\n if (filterType === \"search\" && !isNaN(Number(filterValue)) && InspectionStatus[filterValue]) {\r\n return [column.dataField, \"=\", new EdmLiteral(`Inspections.Enums.InspectionDisplayStatus'${filterValue}'`)];\r\n } else if (filterType === \"search\") {\r\n return null;\r\n }\r\n // Invokes the default filtering behavior\r\n return column.defaultCalculateFilterExpression(filterValue, selectedFilterOperation, filterType);\r\n }\r\n\r\n public viewDetails(event) {\r\n this.router.navigate([this.baseDetailLink, event.data.InspectionId]);\r\n }\r\n}\r\n","export enum InvoiceExportOption {\r\n Sage50 = 1,\r\n SageBusinessCloud = 2\r\n}\r\n","export enum ProteanSystem {\r\n Other = 0,\r\n Hire = 1,\r\n Stock = 2,\r\n Service = 3,\r\n Job = 4,\r\n Invoice = 5,\r\n Equip = 6,\r\n MakeAndModel = 7,\r\n SalesOrder = 8,\r\n Purchases = 9,\r\n Despatches = 10,\r\n AdviceNote = 11,\r\n StockAdjust = 12,\r\n EngineerPDA = 13,\r\n JobStockIssues = 14,\r\n Credit = 15,\r\n ReturnsNotes = 16,\r\n PurchaseInvoicing = 17,\r\n CRM = 18,\r\n SalesOpportunity = 19,\r\n CustomerWeb = 20,\r\n StockKitBuild = 21,\r\n SalesPDA = 22,\r\n Accounting = 23,\r\n RecurringJob = 24\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { Observable, of } from \"rxjs\";\r\nimport { IODataService } from \"./interfaces/iodata.service\";\r\nimport { PageableDatastoreService } from \"./pageable-datastore.service\";\r\nimport { IAppConfig, APP_CONFIG } from \"../models/app-config.model\";\r\nimport { InvoiceDocument } from \"../models/invoice-document.model\";\r\nimport { InvoiceHeader } from \"../models/invoice-header.model\";\r\nimport { InvoiceListMetadata } from \"../models/invoice-list-metadata.model\";\r\nimport { InvoiceMetadata } from \"../models/invoice-metadata.model\";\r\nimport { IProteanResponse } from \"../models/iprotean-response.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class InvoiceDataService extends PageableDatastoreService {\r\n private static readonly odataKey: string = \"InvoiceId\";\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(\"ODataService\") private odataService: IODataService,\r\n @Inject(APP_CONFIG) private config: IAppConfig) {\r\n super(InvoiceDataService.odataKey);\r\n }\r\n\r\n protected GetDataSourceObject(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: this.config.apiLocations.ServiceSightOData + \"InvoiceOD\",\r\n key: InvoiceDataService.odataKey,\r\n keyType: \"String\",\r\n paging: true,\r\n pageSize: 50\r\n });\r\n }\r\n\r\n // gets the invoice list metadata\r\n public GetInvoiceListMetaData(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Invoice/GetInvoiceListMetaData`);\r\n }\r\n\r\n public GetInvoiceIdByNumber(invoiceNo: number): Observable {\r\n if (invoiceNo === undefined || invoiceNo === null) {\r\n return of(null);\r\n }\r\n\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Invoice/GetInvoiceId?invoiceNo=${invoiceNo}`);\r\n }\r\n\r\n public GetInvoiceHeader(invoiceId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Invoice/GetInvoiceHeader?noteId=${invoiceId}`);\r\n }\r\n\r\n public GetInvoiceMetadata(invoiceId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Invoice/GetInvoiceMetadata?invoiceId=${invoiceId}`);\r\n }\r\n\r\n public GetInvoiceDocuments(invoiceId): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Invoice/GetInvoiceDocuments?noteId=${invoiceId}`);\r\n }\r\n\r\n public MarkPrinted(invoiceId: number): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Invoice/MarkPrintedAsync?entityId=${invoiceId}`;\r\n return this.http.post(url, null);\r\n }\r\n\r\n public MarkAsPaid(invoiceId: number): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Invoice/MarkAsPaid?id=${invoiceId}`;\r\n return this.http.get(url);\r\n }\r\n\r\n public MarkAsUnpaid(invoiceId: number): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Invoice/MarkAsUnpaid?id=${invoiceId}`;\r\n return this.http.get(url);\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { ProteanSystem } from \"./enums/protean-system.enum\";\r\n\r\n@Pipe({\r\n name: \"documentType\"\r\n})\r\nexport class DocumentTypePipe implements PipeTransform {\r\n\r\n private readonly system = {\r\n [ProteanSystem.Service]: \"system.type.service\",\r\n [ProteanSystem.Job]: \"system.type.job\",\r\n [ProteanSystem.SalesOrder]: \"system.type.salesOrder\",\r\n [ProteanSystem.Despatches]: \"system.type.despatchNote\"\r\n };\r\n\r\n transform(value: any): string {\r\n return this.system[value];\r\n }\r\n\r\n}\r\n","
\r\n
\r\n

{{ 'label.invoice.grid.invoice' | translate }}

\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n\r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n
\r\n {{ data.value | documentType | translate }}\r\n
\r\n\r\n
\r\n {{ data.value | customDate: 'shortDate' }}\r\n
\r\n\r\n
\r\n {{ data.value | customCurrency: data.data.CurrencyCode}}\r\n
\r\n\r\n
\r\n {{ data.data.Gross | customCurrency: data.data.BaseCurrencyCode}}\r\n
\r\n\r\n
0\">\r\n {{ data.data.Outstanding | customCurrency: data.data.CurrencyCode}}\r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n \"Xero\r\n \"QuickBooks\r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n\r\n","import { Component, Inject, OnInit, ViewChild } from \"@angular/core\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { EdmLiteral } from \"devextreme/data/odata/utils\";\r\nimport { GridKind } from \"../../enums/grid-kind.enum\";\r\nimport { InvoiceExportOption } from \"../../enums/invoice-export-option.enum\";\r\nimport { Module } from \"../../enums/module.enum\";\r\nimport { InvoiceListMetadata } from \"../../models/invoice-list-metadata.model\";\r\nimport { IUserReferences } from \"../../models/user-references.model\";\r\nimport { ProteanSystem } from \"../../pipes/enums/protean-system.enum\";\r\nimport { GridExportService } from \"../../services/grid-export.service\";\r\nimport { GridService } from \"../../services/grid.service\";\r\nimport { IAuthService } from \"../../services/interfaces/iauth.service\";\r\nimport { IRouterLinkService } from \"../../services/interfaces/irouter-link.service\";\r\nimport { IShowCustomerName } from \"../../services/interfaces/ishow-customer.service\";\r\nimport { InvoiceDataService } from \"../../services/invoice-data.service\";\r\nimport { ModuleService } from \"../../services/module/module.service\";\r\n\r\n@Component({\r\n selector: \"lib-invoice-list\",\r\n templateUrl: \"./invoice-list.component.html\",\r\n styleUrls: [\r\n \"./invoice-list.component.scss\",\r\n \"../../styles/global.scss\",\r\n \"../../styles/backgrounds.scss\",\r\n \"../../styles/servicesight-shared.scss\",\r\n \"../../styles/servicesight-shared.scss\"\r\n ]\r\n})\r\nexport class InvoiceListComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n private gridState: any = {};\r\n\r\n //The default value for combo\r\n public readonly isPortal: boolean;\r\n public isProEnabled: boolean = false;\r\n public showCustomerName: boolean;\r\n public selectedItem: number = 0;\r\n public filterValue: any;\r\n public invoiceDataSource: DataSource;\r\n public SearchText: string = \"\";\r\n public UICustomisations: IUserReferences;\r\n public userRefJob1Label: string;\r\n public userRefJob2Label: string;\r\n public baseDetailLink: string;\r\n public creditNoteBaseLink: string = \"\";\r\n public batchInvoicesBaseLink: string = \"\";\r\n public baseLink: string;\r\n public XeroConnected: boolean = false;\r\n public QBConnected: boolean = false;\r\n public sageExportOptions: { value: InvoiceExportOption; name: string }[];\r\n public metadata: InvoiceListMetadata = {\r\n IsAccountsConnected: false,\r\n IsAllowedToSync: false,\r\n IsQbConnected: false,\r\n IsSageConnected: false,\r\n IsXeroConnected: false\r\n };\r\n\r\n public hidePriority: Array = [\r\n \"Gross\",\r\n \"InvoiceDate\",\r\n \"DocumentType\",\r\n \"DocumentNo\",\r\n \"Customer\",\r\n \"EmailedDate\",\r\n \"Credited\",\r\n \"AccountNo\",\r\n \"AccountUrl\",\r\n \"OrderNo\",\r\n \"DueDate\",\r\n \"Outstanding\",\r\n \"InvoiceNo\"\r\n ];\r\n\r\n public filters: any = {\r\n 1: [\"!\", [\"EmailedDate\", \"=\", null]],\r\n 2: [\"EmailedDate\", \"=\", null],\r\n 3: [\"Outstanding\", \"=\", 0],\r\n 4: [\"Outstanding\", \">\", 0]\r\n };\r\n\r\n public exportOptions: { id: number; label: string }[] = [\r\n { id: 1, label: \"Export data as xlsx\" },\r\n { id: 2, label: \"Export data as csv\" },\r\n { id: 3, label: \"Export data as pdf\" }\r\n ];\r\n\r\n public documentTypes: { id: number; value: string }[] = [\r\n { id: ProteanSystem.Service, value: this.translator.instant(\"system.type.service\") },\r\n { id: ProteanSystem.Job, value: this.translator.instant(\"system.type.job\") },\r\n { id: ProteanSystem.SalesOrder, value: this.translator.instant(\"system.type.salesOrder\") },\r\n { id: ProteanSystem.Despatches, value: this.translator.instant(\"system.type.despatchNote\") }\r\n ];\r\n\r\n public get UseRouterLink() {\r\n return !this.baseDetailLink.includes(\"#\");\r\n }\r\n\r\n constructor(\r\n private invoiceDataService: InvoiceDataService,\r\n private gridService: GridService,\r\n private route: ActivatedRoute,\r\n @Inject(\"AuthService\") authService: IAuthService,\r\n @Inject(\"RouterLinkService\") private routerLink: IRouterLinkService,\r\n @Inject(\"ng1invoiceservice\") private ng1InvoiceService: any,\r\n private moduleService: ModuleService,\r\n private router: Router,\r\n private translator: TranslateService,\r\n @Inject(\"ShowCustomerName\") private showCustomerNameService: IShowCustomerName,\r\n private gridExportService: GridExportService) {\r\n this.routerLink.invoiceDetailBaseLink.subscribe(link => this.baseDetailLink = link);\r\n this.routerLink.baseLink.subscribe(link => this.baseLink = link);\r\n this.isPortal = authService.isPortalUser;\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.showCustomerNameService.ShowCustomerName().subscribe(res => this.showCustomerName = res);\r\n this.gridService.GetLayout(GridKind.Invoice).subscribe(value => {\r\n if (value) {\r\n this.dataGrid.instance.state(value);\r\n }\r\n this.GetDataSources();\r\n }, () => this.GetDataSources());\r\n\r\n if (!this.isPortal) {\r\n this.invoiceDataService.GetInvoiceListMetaData().subscribe(metadata => this.metadata = metadata);\r\n }\r\n\r\n this.moduleService.GetEnabledModules().subscribe(enabledModules => {\r\n this.isProEnabled = enabledModules.includes(Module.Pro);\r\n });\r\n\r\n this.sageExportOptions = [\r\n {\r\n value: InvoiceExportOption.Sage50,\r\n name: this.translator.instant(\"label.invoice.grid.export.sage50\")\r\n },\r\n {\r\n value: InvoiceExportOption.SageBusinessCloud,\r\n name: this.translator.instant(\"label.invoice.grid.export.sageBusinessCloud\")\r\n }\r\n ];\r\n\r\n this.gridService.GetLayout(GridKind.Invoice).subscribe(state => {\r\n this.SearchText = \"\";\r\n this.RestoreSavedLayout(state);\r\n this.GetDataSources();\r\n });\r\n }\r\n\r\n private GetDataSources() {\r\n this.invoiceDataSource = this.invoiceDataService.GetDataSource(true);\r\n this.selectedItem = this.getFilterId();\r\n this.filterValue = this.filters[this.selectedItem];\r\n }\r\n\r\n searchTextChanged() {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n filterChanged($event) {\r\n const filterValue = $event.currentTarget.value;\r\n this.dataGrid.instance.clearFilter();\r\n if (filterValue !== \"0\") {\r\n this.dataGrid.instance.filter(this.filters[filterValue]);\r\n }\r\n }\r\n\r\n saveLayout() {\r\n const state = this.dataGrid.instance.state();\r\n this.gridService.SaveLayout(state, GridKind.Invoice);\r\n }\r\n\r\n resetLayout() {\r\n this.gridService.ResetLayout(GridKind.Invoice);\r\n this.dataGrid.instance.state(null);\r\n this.gridState = null;\r\n }\r\n\r\n private RestoreSavedLayout(state: any): void {\r\n if (state) {\r\n state.searchText = \"\";\r\n this.gridState = state;\r\n this.dataGrid.instance.state(state);\r\n }\r\n }\r\n\r\n public openColumnChooser(): void {\r\n this.dataGrid.instance.showColumnChooser();\r\n }\r\n\r\n public columnVisible(name: string, defaultValue: boolean): boolean {\r\n if (this.gridState && this.gridState.columns) {\r\n const column = this.gridState.columns.find(x => x.name === name);\r\n\r\n if (column) {\r\n return column.visible;\r\n }\r\n }\r\n\r\n return defaultValue;\r\n }\r\n\r\n exportInvoices(exportOption: InvoiceExportOption) {\r\n this.ng1InvoiceService.exportInvoices(exportOption);\r\n }\r\n\r\n public onExportItemClick(e: any): void {\r\n switch (e.itemData.id) {\r\n case 1:\r\n this.gridExportService.exportGridAsXlsx(this.dataGrid.instance, this.translator.instant(\"menu.invoices\"));\r\n break;\r\n case 2:\r\n this.gridExportService.exportGridAsCsv(this.dataGrid.instance, this.translator.instant(\"menu.invoices\"));\r\n break;\r\n case 3:\r\n this.gridExportService.exportGridAsPdf(this.dataGrid.instance, this.translator.instant(\"menu.invoices\"), { orientation: \"l\" });\r\n break;\r\n default:\r\n throw new Error(\"Unhandled export type: \" + e.itemData.id);\r\n }\r\n }\r\n\r\n public viewDetails(event) {\r\n if (this.UseRouterLink) {\r\n this.router.navigate([this.baseDetailLink, event.data.InvoiceId]);\r\n } else {\r\n this.router.navigate([\"/invoices/invoice\", event.data.InvoiceId]);\r\n }\r\n }\r\n\r\n public calculateSearchFilterForInvoiceNo(filterValue: string, selectedFilterOperation: string, target: string) {\r\n if (target === \"search\" || target === \"filterRow\") {\r\n return [\r\n new EdmLiteral(\"cast(InvoiceNo, 'Edm.String')\"),\r\n \"contains\",\r\n `${filterValue}`,\r\n ];\r\n }\r\n return [\r\n \"InvoiceNo\",\r\n selectedFilterOperation,\r\n filterValue\r\n ];\r\n }\r\n\r\n private getFilterId(): number {\r\n const filter = this.route.snapshot.paramMap.get(\"filterName\");\r\n switch (filter) {\r\n case \"Emailed\": {\r\n return 1;\r\n }\r\n case \"Not emailed\": {\r\n return 2;\r\n }\r\n case \"Paid\": {\r\n return 3;\r\n }\r\n case \"Unpaid\": {\r\n return 4;\r\n }\r\n default: {\r\n return this.selectedItem;\r\n }\r\n }\r\n }\r\n}\r\n\r\n","export enum JobOrderStatus {\r\n Outstanding = 300,\r\n BookedIn = 500\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { JobStatus } from \"../../enums/job-status.enum\";\r\n\r\n@Pipe({\r\n name: \"jobStatus\"\r\n})\r\nexport class JobStatusPipe implements PipeTransform {\r\n\r\n transform(value: any): any {\r\n const status = {\r\n [JobStatus.CANCELLED]: \"label.jobs.grid.cancelled\",\r\n [JobStatus.ENTRY]: \"label.jobs.grid.entry\",\r\n [JobStatus.CREDIT_HOLD]: \"label.jobs.grid.credit.hold\",\r\n [JobStatus.ORDER_NO_REQ]: \"label.jobs.grid.order.no.req\",\r\n [JobStatus.AUTO_ENTRY]: \"label.jobs.grid.auto.entry\",\r\n [JobStatus.ESTIMATED]: \"label.jobs.grid.estimated\",\r\n [JobStatus.QUOTED]: \"label.jobs.grid.quoted\",\r\n [JobStatus.REQUESTED]: \"label.jobs.grid.requested\",\r\n [JobStatus.UNALLOCATED]: \"label.jobs.grid.unallocated\",\r\n [JobStatus.PARTS_IN]: \"label.jobs.grid.parts.in\",\r\n [JobStatus.WAITING_ACCEPTANCE]: \"label.jobs.grid.waiting.acceptance\",\r\n [JobStatus.ALLOCATED]: \"label.jobs.grid.allocated\",\r\n [JobStatus.EN_ROUTE]: \"label.jobs.grid.en-route\",\r\n [JobStatus.ON_SITE]: \"label.jobs.grid.on.site\",\r\n [JobStatus.AWAITING_PARTS]: \"label.jobs.grid.awaiting.parts\",\r\n [JobStatus.SITE_ATTENDED]: \"label.jobs.grid.site.attended\",\r\n [JobStatus.FURTHER_WORK_REQUIRED]: \"label.jobs.grid.further.work.required\",\r\n [JobStatus.READY_TO_COMPLETE]: \"label.jobs.grid.ready.to.complete\",\r\n [JobStatus.AWAITING_DETAILS]: \"label.jobs.grid.awaiting.details\",\r\n [JobStatus.AUTHORISE_REQ]: \"label.jobs.grid.authorise.req\",\r\n [JobStatus.COMPLETED]: \"label.jobs.grid.completed\",\r\n [JobStatus.COMPLETED_UNCHARGEABLE]: \"label.jobs.grid.completednonchargable\",\r\n [JobStatus.INVOICE_MARKED]: \"label.jobs.grid.invoice.marked\",\r\n [JobStatus.INVOICED]: \"label.jobs.grid.invoiced\",\r\n [JobStatus.BATCH_UPDATED]: \"label.jobs.grid.batch.updated\",\r\n [JobStatus.ARCHIVED]: \"label.jobs.grid.archived\",\r\n [JobStatus.REQUESTED]: \"label.jobs.grid.requested\"\r\n };\r\n return status[value] || \"\";\r\n }\r\n}\r\n","import { Injectable, Inject } from \"@angular/core\";\r\nimport { APP_CONFIG, IAppConfig } from \"../models/app-config.model\";\r\nimport { IODataService } from \"./interfaces/iodata.service\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class PriorityService {\r\n constructor(\r\n @Inject(\"ODataService\") private odataService: IODataService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) {\r\n }\r\n\r\n public OrderedPrioritiesDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.appConfig.apiLocations.ServiceSightOData}PriorityOD`,\r\n key: \"PriorityId\",\r\n keyType: \"Int32\",\r\n sortSelector: \"SortOrder\",\r\n });\r\n }\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport { IODataService } from \"./interfaces/iodata.service\";\r\nimport { IAppConfig, APP_CONFIG } from \"../models/app-config.model\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class PurchaseOrderDataService {\r\n\r\n constructor(\r\n @Inject(\"ODataService\") private odataService: IODataService,\r\n @Inject(APP_CONFIG) private config: IAppConfig) {\r\n }\r\n\r\n public GetJobOrderDataStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: this.config.apiLocations.PurchaseOrdersOData + \"JobOrders\",\r\n key: \"JobId\",\r\n keyType: \"Int32\",\r\n });\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { APP_CONFIG, IAppConfig } from \"../../models/app-config.model\";\r\nimport { Observable } from \"rxjs\";\r\nimport { ReportModel } from \"../../models/report.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class PlannedJobsReportService {\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) { }\r\n\r\n public GetReport(): Observable> {\r\n return this.http.get>(this.appConfig.apiLocations.RecurringJob + `Report`);\r\n }\r\n\r\n public GetSvcJobRunReport(svcJobRunId: number): Observable {\r\n return this.http.get(this.appConfig.apiLocations.RecurringJob + `Report/${svcJobRunId}`);\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { JobStatus } from \"../enums/job-status.enum\";\r\n\r\n@Pipe({\r\n name: \"jobStatusBar\"\r\n})\r\nexport class JobStatusBarPipe implements PipeTransform {\r\n\r\n private readonly status = {\r\n [JobStatus.CANCELLED]: \"bggraystatus\",\r\n [JobStatus.ENTRY]: \"bgredstatusshort\",\r\n [JobStatus.CREDIT_HOLD]: \"bgredstatusshort\",\r\n [JobStatus.ORDER_NO_REQ]: \"bgredstatusshort\",\r\n [JobStatus.AUTO_ENTRY]: \"bgredstatusshort\",\r\n [JobStatus.ESTIMATED]: \"bgredstatusshort\",\r\n [JobStatus.QUOTED]: \"bgredstatusshort\",\r\n [JobStatus.REQUESTED]: \"bgredstatusshort\",\r\n [JobStatus.UNALLOCATED]: \"bgredstatusshort\",\r\n [JobStatus.PARTS_IN]: \"bgredstatusshort\",\r\n [JobStatus.WAITING_ACCEPTANCE]: \"bgredstatusshort\",\r\n [JobStatus.ALLOCATED]: \"bgredstatuslong\",\r\n [JobStatus.EN_ROUTE]: \"bgredstatuslong\",\r\n [JobStatus.ON_SITE]: \"bgyellowstatusshort\",\r\n [JobStatus.AWAITING_PARTS]: \"bgyellowstatusshort\",\r\n [JobStatus.SITE_ATTENDED]: \"bgyellowstatusshort\",\r\n [JobStatus.FURTHER_WORK_REQUIRED]: \"bgyellowstatusshort\",\r\n [JobStatus.READY_TO_COMPLETE]: \"bgyellowstatusshort\",\r\n [JobStatus.AWAITING_DETAILS]: \"bgyellowstatusshort\",\r\n [JobStatus.AUTHORISE_REQ]: \"bgyellowstatuslong\",\r\n [JobStatus.COMPLETED]: \"bgyellowstatuslong\",\r\n [JobStatus.COMPLETED_UNCHARGEABLE]: \"bggreenstatuslong\",\r\n [JobStatus.INVOICE_MARKED]: \"bggreenstatusshort\",\r\n [JobStatus.INVOICED]: \"bggreenstatuslong\",\r\n [JobStatus.BATCH_UPDATED]: \"bggreenstatuslong\",\r\n [JobStatus.ARCHIVED]: \"bggreenstatuslong\",\r\n [JobStatus.REQUESTED]: \"bgyellowstatusshorter\"\r\n };\r\n\r\n private readonly bgcolors = {\r\n [JobStatus.CANCELLED]: \"clrred\",\r\n [JobStatus.ENTRY]: \"clrred\",\r\n [JobStatus.CREDIT_HOLD]: \"clrred\",\r\n [JobStatus.ORDER_NO_REQ]: \"clrred\",\r\n [JobStatus.AUTO_ENTRY]: \"clrred\",\r\n [JobStatus.ESTIMATED]: \"clrred\",\r\n [JobStatus.QUOTED]: \"clrred\",\r\n [JobStatus.REQUESTED]: \"clrred\",\r\n [JobStatus.UNALLOCATED]: \"clrred\",\r\n [JobStatus.PARTS_IN]: \"clrred\",\r\n [JobStatus.WAITING_ACCEPTANCE]: \"clrred\",\r\n [JobStatus.ALLOCATED]: \"clrred\",\r\n [JobStatus.EN_ROUTE]: \"clrred\",\r\n [JobStatus.ON_SITE]: \"clryellow\",\r\n [JobStatus.AWAITING_PARTS]: \"clryellow\",\r\n [JobStatus.SITE_ATTENDED]: \"clryellow\",\r\n [JobStatus.FURTHER_WORK_REQUIRED]: \"clryellow\",\r\n [JobStatus.READY_TO_COMPLETE]: \"clryellow\",\r\n [JobStatus.AWAITING_DETAILS]: \"clryellow\",\r\n [JobStatus.AUTHORISE_REQ]: \"clryellow\",\r\n [JobStatus.COMPLETED]: \"clryellow\",\r\n [JobStatus.COMPLETED_UNCHARGEABLE]: \"clrgreen\",\r\n [JobStatus.INVOICE_MARKED]: \"clrgreen\",\r\n [JobStatus.INVOICED]: \"clrgreen\",\r\n [JobStatus.BATCH_UPDATED]: \"clrgreen\",\r\n [JobStatus.ARCHIVED]: \"clrgreen\",\r\n [JobStatus.REQUESTED]: \"clryellow\"\r\n };\r\n\r\n transform(value: any, args?: any): string {\r\n if (value) {\r\n if (!value.Chargeable && value.Code === JobStatus.COMPLETED) {\r\n value.Code = JobStatus.COMPLETED_UNCHARGEABLE;\r\n }\r\n const colors = {\r\n bg: this.bgcolors[value.Code],\r\n bar: this.status[value.Code]\r\n };\r\n return colors[args];\r\n }\r\n return null;\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { JobStatus } from \"../enums/job-status.enum\";\r\n\r\n@Pipe({\r\n name: \"jobStatusBarPortal\"\r\n})\r\nexport class JobStatusBarPortalPipe implements PipeTransform {\r\n\r\n private readonly status = {\r\n [JobStatus.CANCELLED]: \"bggraystatus\",\r\n [JobStatus.ENTRY]: \"bgredstatusshort\",\r\n [JobStatus.CREDIT_HOLD]: \"bgredstatusshort\",\r\n [JobStatus.ORDER_NO_REQ]: \"bgredstatusshort\",\r\n [JobStatus.AUTO_ENTRY]: \"bgredstatusshort\",\r\n [JobStatus.ESTIMATED]: \"bgredstatusshort\",\r\n [JobStatus.QUOTED]: \"bgredstatusshort\",\r\n [JobStatus.REQUESTED]: \"bgredstatusshort\",\r\n [JobStatus.UNALLOCATED]: \"bgredstatusshort\",\r\n [JobStatus.PARTS_IN]: \"bgredstatusshort\",\r\n [JobStatus.WAITING_ACCEPTANCE]: \"bgredstatusshort\",\r\n [JobStatus.ALLOCATED]: \"bgredstatuslong\",\r\n [JobStatus.EN_ROUTE]: \"bgredstatuslong\",\r\n [JobStatus.ON_SITE]: \"bgyellowstatusshort\",\r\n [JobStatus.AWAITING_PARTS]: \"bgyellowstatusshort\",\r\n [JobStatus.SITE_ATTENDED]: \"bgyellowstatusshort\",\r\n [JobStatus.FURTHER_WORK_REQUIRED]: \"bgyellowstatusshort\",\r\n [JobStatus.READY_TO_COMPLETE]: \"bgyellowstatusshort\",\r\n [JobStatus.AWAITING_DETAILS]: \"bgyellowstatusshort\",\r\n [JobStatus.AUTHORISE_REQ]: \"bgyellowstatuslong\",\r\n [JobStatus.COMPLETED]: \"bgyellowstatuslong\",\r\n [JobStatus.COMPLETED_UNCHARGEABLE]: \"bggreenstatuslong\",\r\n [JobStatus.INVOICE_MARKED]: \"bggreenstatusshort\",\r\n [JobStatus.INVOICED]: \"bggreenstatuslong\",\r\n [JobStatus.BATCH_UPDATED]: \"bggreenstatuslong\",\r\n [JobStatus.ARCHIVED]: \"bggreenstatuslong\",\r\n [JobStatus.REQUESTED]: \"bgyellowstatusshorter\"\r\n };\r\n\r\n private readonly bgcolors = {\r\n [JobStatus.CANCELLED]: \"clrred\",\r\n [JobStatus.ENTRY]: \"clrred\",\r\n [JobStatus.CREDIT_HOLD]: \"clrred\",\r\n [JobStatus.ORDER_NO_REQ]: \"clrred\",\r\n [JobStatus.AUTO_ENTRY]: \"clrred\",\r\n [JobStatus.ESTIMATED]: \"clrred\",\r\n [JobStatus.QUOTED]: \"clrred\",\r\n [JobStatus.REQUESTED]: \"clrred\",\r\n [JobStatus.UNALLOCATED]: \"clrred\",\r\n [JobStatus.PARTS_IN]: \"clrred\",\r\n [JobStatus.WAITING_ACCEPTANCE]: \"clrred\",\r\n [JobStatus.ALLOCATED]: \"clrred\",\r\n [JobStatus.EN_ROUTE]: \"clrred\",\r\n [JobStatus.ON_SITE]: \"clryellow\",\r\n [JobStatus.AWAITING_PARTS]: \"clryellow\",\r\n [JobStatus.SITE_ATTENDED]: \"clryellow\",\r\n [JobStatus.FURTHER_WORK_REQUIRED]: \"clryellow\",\r\n [JobStatus.READY_TO_COMPLETE]: \"clryellow\",\r\n [JobStatus.AWAITING_DETAILS]: \"clryellow\",\r\n [JobStatus.AUTHORISE_REQ]: \"clryellow\",\r\n [JobStatus.COMPLETED]: \"clryellow\",\r\n [JobStatus.COMPLETED_UNCHARGEABLE]: \"clrgreen\",\r\n [JobStatus.INVOICE_MARKED]: \"clrgreen\",\r\n [JobStatus.INVOICED]: \"clrgreen\",\r\n [JobStatus.BATCH_UPDATED]: \"clrgreen\",\r\n [JobStatus.ARCHIVED]: \"clrgreen\",\r\n [JobStatus.REQUESTED]: \"clryellow\"\r\n };\r\n\r\n transform(value: any, args?: any): string {\r\n if (!value.Chargeable && value.Code === JobStatus.COMPLETED) {\r\n value.Code = JobStatus.COMPLETED_UNCHARGEABLE;\r\n }\r\n const colors = {\r\n bg: this.bgcolors[this.GetPortalCode(value)],\r\n bar: this.status[this.GetPortalCode(value)]\r\n };\r\n return colors[args];\r\n }\r\n\r\n public GetPortalCode(data): number {\r\n if ( (data.Code >= JobStatus.COMPLETED.valueOf() && data.Code <= JobStatus.INVOICED.valueOf() ) ||\r\n data.Code === JobStatus.FURTHER_WORK_REQUIRED.valueOf() ||\r\n data.Code === JobStatus.READY_TO_COMPLETE.valueOf() ||\r\n data.Code === JobStatus.SITE_ATTENDED.valueOf()\r\n ) {\r\n return JobStatus.COMPLETED_UNCHARGEABLE;\r\n } else if (data.Code === JobStatus.ON_SITE.valueOf() ||\r\n data.Code === JobStatus.EN_ROUTE.valueOf()\r\n ) {\r\n return JobStatus.ON_SITE;\r\n } else {\r\n return data.Code;\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n

{{ 'label.jobs.grid.jobs' | translate }}

\r\n {{ rjRunProgress.NoOfJobs }}/{{ rjRunProgress.JobCount }} {{ RjRunStatus | translate }}\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n
\r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n
\r\n
\r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n
\r\n \r\n \r\n {{ data.value }}\r\n \r\n \r\n {{ data.value }}\r\n \r\n \r\n {{ data.value }}\r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n
{{ GetStatus(data) | jobStatus | translate }}
\r\n
\r\n\r\n
{{ data.value | jobStatus | translate }}
\r\n
\r\n
\r\n
\r\n\r\n
\r\n {{ data.value | customDate: 'shortDate' }}\r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n
\r\n {{ data.value | jobEquipmentStatus | translate }}\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n {{ item.data.Equip }}\r\n
\r\n
\r\n \r\n {{ item.data.Equip }}\r\n \r\n
\r\n\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n\r\n\r\n
\r\n
\r\n {{ tooltipText }}\r\n
\r\n
\r\n
\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Inject,\r\n Input,\r\n OnDestroy,\r\n OnInit,\r\n Output,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent, DxTooltipComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { EdmLiteral } from \"devextreme/data/odata/utils\";\r\nimport { on } from \"devextreme/events\";\r\nimport * as moment from \"moment\";\r\nimport { interval, Subscription } from \"rxjs\";\r\nimport { startWith, switchMap, takeWhile } from \"rxjs/operators\";\r\nimport { GridKind } from \"../../enums/grid-kind.enum\";\r\nimport { HelpItemTagEnum } from \"../../enums/help-item-tag.enum\";\r\nimport { JobOrderStatus } from \"../../enums/job-order-status.enum\";\r\nimport { JobStatus } from \"../../enums/job-status.enum\";\r\nimport { Module } from \"../../enums/module.enum\";\r\nimport { SettingId } from \"../../enums/setting-id.enum\";\r\nimport { Equipment } from \"../../models/equipment/models/equipment\";\r\nimport { ReportModel } from \"../../models/report.model\";\r\nimport { IUserReferences } from \"../../models/user-references.model\";\r\nimport { CurrencyPipe } from \"../../pipes/currency.pipe\";\r\nimport { JobStatusPipe } from \"../../pipes/enums/job-status.pipe\";\r\nimport { JobEquipmentPipe } from \"../../pipes/job-equipment.pipe\";\r\nimport { EquipmentDataService } from \"../../services/equipment/equipment-data.service\";\r\nimport { GridExportService } from \"../../services/grid-export.service\";\r\nimport { GridService } from \"../../services/grid.service\";\r\nimport { IAuthService } from \"../../services/interfaces/iauth.service\";\r\nimport { IRouterLinkService } from \"../../services/interfaces/irouter-link.service\";\r\nimport { JobDataService } from \"../../services/job-data.service\";\r\nimport { ModuleService } from \"../../services/module/module.service\";\r\nimport { PermissionsService } from \"../../services/permissions-service.service\";\r\nimport { PriorityService } from \"../../services/priority.service\";\r\nimport { PurchaseOrderDataService } from \"../../services/purchase-order-data.service\";\r\nimport { PlannedJobsReportService } from \"../../services/recurring-jobs/planned-jobs-report.service\";\r\nimport { SettingsService } from \"../../services/setting/settings.service\";\r\n\r\n@Component({\r\n selector: \"lib-jobs-list\",\r\n templateUrl: \"./jobs-list.component.html\",\r\n styleUrls: [\"./jobs-list.component.scss\", \"../../styles/global.scss\", \"../../styles/backgrounds.scss\", \"../../styles/servicesight-shared.scss\"]\r\n})\r\nexport class JobsListComponent implements OnInit, OnDestroy {\r\n @ViewChild(\"grid\") private dataGrid: DxDataGridComponent;\r\n @ViewChild(DxTooltipComponent) tooltip: DxTooltipComponent;\r\n @Input() showHeader = true;\r\n @Input() preselectedFilter: string = null;\r\n @Output() selectedJob = new EventEmitter();\r\n\r\n private gridState: any = {};\r\n private dataSources: { [jobId: string]: Equipment[] } = {};\r\n private locationsDataSources: { [siteId: string]: ODataStore } = {};\r\n private readonly baseCurrencyCode: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencyCode\"));\r\n //The default value for combo\r\n public readonly isPortal: boolean;\r\n public helpItemTagEnum = HelpItemTagEnum;\r\n public isEquipmentModuleEnabled: boolean;\r\n public isPurchaseOrderModuleEnabled: boolean = false;\r\n public isRecurringJobsModuleEnabled: boolean = false;\r\n public selectedItem: string = \"6\";\r\n public filterValue: any;\r\n public jobsDataSource: DataSource;\r\n public searchJobsDataSource: DataSource;\r\n public prioritiesDataSource: DataSource;\r\n public jobOrderDataStore: ODataStore;\r\n public jobEquipmentDataSource: DataSource;\r\n public SearchText: string = \"\";\r\n public UICustomisations: IUserReferences;\r\n public userRefJob1Label: string;\r\n public userRefJob2Label: string;\r\n public baseDetailLink: string;\r\n public isAllowedCreateJob: boolean;\r\n public tooltipText: string;\r\n public showRjRunProgress: boolean;\r\n public rjRunProgress: ReportModel;\r\n public hidePriority: Array = [\r\n \"UserRef2Job\",\r\n \"UserRef1Job\",\r\n \"Phone\",\r\n \"Due\",\r\n \"Logged\",\r\n \"EquipmentCount\",\r\n \"Engineer\",\r\n \"JobType\",\r\n \"OrderStatus\",\r\n \"Status\",\r\n \"OrderNo\",\r\n \"SiteName\",\r\n \"Completed\",\r\n \"Files\"\r\n ];\r\n public filters: any = {\r\n 0: [\"Status\", \"<>\", null],\r\n 1: [[\"Status\", \">=\", JobStatus.REQUESTED], \"and\", [\"Status\", \"<=\", JobStatus.PARTS_IN]],\r\n 2: [[\"Status\", \">=\", JobStatus.WAITING_ACCEPTANCE], \"and\", [\"Status\", \"<=\", JobStatus.ON_SITE]],\r\n 3: [[\"Status\", \">=\", JobStatus.AWAITING_PARTS], \"and\", [\"Status\", \"<=\", JobStatus.AUTHORISE_REQ]],\r\n 4: [[\"Status\", \">=\", JobStatus.COMPLETED], \"and\", [\"Status\", \"<=\", JobStatus.INVOICE_MARKED], \"and\", [\"Chargeable\", \"=\", true]],\r\n 5: [\"Status\", \"=\", JobStatus.CANCELLED],\r\n 6: [\"Status\", \"<>\", JobStatus.CANCELLED],\r\n 7: [\"Status\", \"=\", JobStatus.REQUESTED],\r\n 8: [\"Status\", \"=\", JobStatus.UNALLOCATED],\r\n 9: [[\"Status\", \"=\", JobStatus.WAITING_ACCEPTANCE], \"or\", [\"Status\", \"=\", JobStatus.ALLOCATED]],\r\n 10: [[\"Status\", \"=\", JobStatus.ON_SITE], \"or\", [\"Status\", \"=\", JobStatus.EN_ROUTE]],\r\n // eslint-disable-next-line max-len\r\n 11: [[[\"Status\", \">=\", JobStatus.COMPLETED], \"and\", [\"Status\", \"<=\", JobStatus.INVOICED]], \"or\", [\"Status\", \"=\", JobStatus.FURTHER_WORK_REQUIRED], \"or\", [\"Status\", \"=\", JobStatus.READY_TO_COMPLETE], \"or\", [\"Status\", \"=\", JobStatus.SITE_ATTENDED]],\r\n 12: [[\"Status\", \">=\", JobStatus.UNALLOCATED], \"and\", [\"Status\", \"<=\", JobStatus.AWAITING_DETAILS], \"and\", [\"SiteID\", \"=\", this.jobsService.SiteId]]\r\n //13: generated in runtime - Equipment job history\r\n //14: generated in runtime - Recurring jobs\r\n //15: generated in runtime - Filter by supplied job ids\r\n };\r\n\r\n public exportOptions: { id: number; label: string }[] = [\r\n { id: 1, label: \"Export data as xlsx\" },\r\n { id: 2, label: \"Export data as csv\" },\r\n { id: 3, label: \"Export data as pdf\" }\r\n ];\r\n\r\n public jobGroups: { jobGroupId: number; jobGroup: string }[] = [];\r\n\r\n public get statusDataSource(): { status: number; text: string }[] {\r\n return [\r\n { status: JobStatus.CREDIT_HOLD, text: this.translate.instant(this.jobStatusPipe.transform(JobStatus.CREDIT_HOLD)) },\r\n { status: JobStatus.ORDER_NO_REQ, text: this.translate.instant(this.jobStatusPipe.transform(JobStatus.ORDER_NO_REQ)) },\r\n { status: JobStatus.UNALLOCATED, text: this.translate.instant(this.jobStatusPipe.transform(JobStatus.UNALLOCATED)) },\r\n { status: JobStatus.WAITING_ACCEPTANCE, text: this.translate.instant(this.jobStatusPipe.transform(JobStatus.WAITING_ACCEPTANCE)) },\r\n { status: JobStatus.ALLOCATED, text: this.translate.instant(this.jobStatusPipe.transform(JobStatus.ALLOCATED)) },\r\n { status: JobStatus.AWAITING_PARTS, text: this.translate.instant(this.jobStatusPipe.transform(JobStatus.AWAITING_PARTS)) },\r\n { status: JobStatus.PARTS_IN, text: this.translate.instant(this.jobStatusPipe.transform(JobStatus.PARTS_IN)) },\r\n { status: JobStatus.EN_ROUTE, text: this.translate.instant(this.jobStatusPipe.transform(JobStatus.EN_ROUTE)) },\r\n { status: JobStatus.ON_SITE, text: this.translate.instant(this.jobStatusPipe.transform(JobStatus.ON_SITE)) },\r\n { status: JobStatus.SITE_ATTENDED, text: this.translate.instant(this.jobStatusPipe.transform(JobStatus.SITE_ATTENDED)) },\r\n { status: JobStatus.AWAITING_DETAILS, text: this.translate.instant(this.jobStatusPipe.transform(JobStatus.AWAITING_DETAILS)) },\r\n { status: JobStatus.FURTHER_WORK_REQUIRED, text: this.translate.instant(this.jobStatusPipe.transform(JobStatus.FURTHER_WORK_REQUIRED)) },\r\n { status: JobStatus.READY_TO_COMPLETE, text: this.translate.instant(this.jobStatusPipe.transform(JobStatus.READY_TO_COMPLETE)) },\r\n { status: JobStatus.COMPLETED, text: this.translate.instant(this.jobStatusPipe.transform(JobStatus.COMPLETED)) },\r\n { status: JobStatus.COMPLETED_UNCHARGEABLE, text: this.translate.instant(this.jobStatusPipe.transform(JobStatus.COMPLETED_UNCHARGEABLE)) },\r\n { status: JobStatus.INVOICED, text: this.translate.instant(this.jobStatusPipe.transform(JobStatus.INVOICED)) },\r\n { status: JobStatus.CANCELLED, text: this.translate.instant(this.jobStatusPipe.transform(JobStatus.CANCELLED)) }\r\n ];\r\n }\r\n\r\n public get UseRouterLink(): boolean {\r\n return !this.baseDetailLink.includes(\"#\");\r\n }\r\n\r\n public get EquipmentOOAVisible(): boolean {\r\n return this.isProEnabled &&\r\n ((this.isPortal && this.displayEquipmentConditionsOnWebPortal) ||\r\n (!this.isPortal && this.columnVisible(\"EquipmentOoa\", false)));\r\n }\r\n\r\n public get EquipmentOoaColumnInGridVisible(): boolean {\r\n if (this.dataGrid && this.dataGrid.instance) {\r\n return this.dataGrid.instance.getVisibleColumns().some(x => x.dataField === \"EquipmentOoa\");\r\n }\r\n return false;\r\n }\r\n\r\n public get RjRunStatus(): string {\r\n return this.IsRecurringJobRunInProgress(this.rjRunProgress) ? \"label.jobs.grid.rj-run-status.running\" : \"label.jobs.grid.rj-run-status.finished\";\r\n }\r\n\r\n public inspectionsEnabled: boolean = false;\r\n public isProEnabled: boolean = false;\r\n public isJobWizardEnabled: boolean = true;\r\n public displayEquipmentConditionsOnWebPortal: boolean = false;\r\n public isSalesOpportunityEnabled: boolean = false;\r\n public plannerBoardEnabled: boolean = false;\r\n\r\n private rjRunProgressSubscription: Subscription = new Subscription();\r\n\r\n constructor(\r\n private jobStatusPipe: JobStatusPipe,\r\n private moduleService: ModuleService,\r\n private jobsService: JobDataService,\r\n private equipmentService: EquipmentDataService,\r\n private purchaseOrderDataService: PurchaseOrderDataService,\r\n private plannedJobsReportService: PlannedJobsReportService,\r\n private gridService: GridService,\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n public translate: TranslateService,\r\n private settingService: SettingsService,\r\n private permissionsService: PermissionsService,\r\n private gridExportService: GridExportService,\r\n private jobEquipmentPipe: JobEquipmentPipe,\r\n private currencyPipe: CurrencyPipe,\r\n private priorityService: PriorityService,\r\n @Inject(\"AuthService\") authService: IAuthService,\r\n @Inject(\"RouterLinkService\") private routerLink: IRouterLinkService) {\r\n this.routerLink.jobDetailBaseLink.subscribe(link => this.baseDetailLink = link);\r\n this.isPortal = authService.isPortalUser;\r\n this.statusDisplayValue = this.statusDisplayValue.bind(this);\r\n this.GetSortJobEquipmentStatusDescription = this.GetSortJobEquipmentStatusDescription.bind(this);\r\n this.FormatCurrency = this.FormatCurrency.bind(this);\r\n this.jobOrderCellValue = this.jobOrderCellValue.bind(this);\r\n this.onEditorPreparing = this.onEditorPreparing.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.jobEquipmentDataSource = this.equipmentService.GetJobDataSource();\r\n this.jobOrderDataStore = this.purchaseOrderDataService.GetJobOrderDataStore();\r\n this.prioritiesDataSource = this.priorityService.OrderedPrioritiesDataSource();\r\n this.prioritiesDataSource.load();\r\n\r\n this.GetUserReferences();\r\n this.selectedItem = this.getFilterId();\r\n if (this.selectedItem === \"13\") {\r\n this.searchJobsByEquipmentId(this.jobsService.EquipmentId).then(result => this.filterValue = result);\r\n } else if (this.selectedItem === \"14\") {\r\n const svcJobRunId = Number(this.route.snapshot.paramMap.get(\"svcJobRunId\"));\r\n this.filterValue = this.searchJobsBySvcJobRunId(svcJobRunId);\r\n this.filters[this.selectedItem] = this.filterValue;\r\n\r\n if (this.router.url.includes(\"progress\")) {\r\n this.rjRunProgressSubscription.add(\r\n interval(5000)\r\n .pipe(\r\n startWith(0), // run the first request immediately\r\n switchMap(() => this.plannedJobsReportService.GetSvcJobRunReport(svcJobRunId)),\r\n takeWhile((rjRunProgress) => this.IsRecurringJobRunInProgress(rjRunProgress), true)\r\n )\r\n .subscribe(rjRunProgress => {\r\n this.rjRunProgress = rjRunProgress;\r\n // When RJ run progress available, and not portal, show.\r\n this.showRjRunProgress = !this.isPortal;\r\n this.jobsDataSource.reload();\r\n }));\r\n }\r\n } else if(this.selectedItem === \"15\") {\r\n const jobIds = this.route.snapshot.queryParamMap.getAll(\"ids\");\r\n jobIds.forEach(id => {\r\n if(!this.filterValue) {\r\n this.filterValue = [];\r\n }\r\n this.filterValue.push([\"JobID\", \"=\", id]);\r\n this.filterValue.push(\"or\");\r\n });\r\n if (this.filterValue.length > 0) {\r\n this.filterValue.pop();\r\n this.filters[\"15\"] = this.filterValue;\r\n }\r\n } else {\r\n this.filterValue = this.filters[this.selectedItem];\r\n }\r\n\r\n this.permissionsService.CurrentUserHasPermission(\"InspectionView\").subscribe(permission => {\r\n this.inspectionsEnabled = permission;\r\n });\r\n\r\n this.permissionsService.CurrentUserHasPermission(\"JobPlannerboard\").subscribe(isAllowedView => {\r\n this.plannerBoardEnabled = isAllowedView;\r\n });\r\n\r\n this.jobsService.GetJobCreatePermission().subscribe((res) => this.isAllowedCreateJob = res);\r\n\r\n this.gridService.GetLayout(GridKind.Jobs).subscribe(state => {\r\n this.SearchText = \"\";\r\n // Restore the loaded state only if not a portal user.\r\n if (!this.isPortal && state) {\r\n this.gridState = state;\r\n this.dataGrid.instance.state(state);\r\n }\r\n this.GetDataSources();\r\n });\r\n\r\n this.moduleService.GetEnabledModules().subscribe(enabledModules => {\r\n this.isEquipmentModuleEnabled = enabledModules.includes(Module.Equipment);\r\n this.isPurchaseOrderModuleEnabled = enabledModules.includes(Module.PurchaseOrders);\r\n this.isProEnabled = enabledModules.includes(Module.Pro);\r\n this.isRecurringJobsModuleEnabled = enabledModules.includes(Module.RecurringJobs);\r\n this.isSalesOpportunityEnabled = enabledModules.includes(Module.SalesOpportunity);\r\n });\r\n\r\n this.settingService.getSetting(SettingId.JobCreationWizard).subscribe(jobWizardSetting => {\r\n this.isJobWizardEnabled = jobWizardSetting.ValueBool;\r\n });\r\n\r\n this.settingService.getSetting(SettingId.DisplayEquipmentConditionsOnWebPortal).subscribe(setting => {\r\n this.displayEquipmentConditionsOnWebPortal = setting.ValueBool;\r\n });\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n if (this.rjRunProgressSubscription) {\r\n this.rjRunProgressSubscription.unsubscribe();\r\n }\r\n }\r\n\r\n public columnVisible(name: string, defaultValue: boolean): boolean {\r\n if (this.gridState && this.gridState.columns) {\r\n const column = this.gridState.columns.find(x => x.name === name);\r\n\r\n if (column) {\r\n return column.visible;\r\n }\r\n }\r\n\r\n return defaultValue;\r\n }\r\n\r\n public columnHidePriority(columnName: string): number {\r\n return this.hidePriority.indexOf(columnName);\r\n }\r\n\r\n public onExportItemClick(e: any): void {\r\n switch (e.itemData.id) {\r\n case 1:\r\n this.gridExportService.exportGridAsXlsx(this.dataGrid.instance, \"Jobs\");\r\n break;\r\n case 2:\r\n this.gridExportService.exportGridAsCsv(this.dataGrid.instance, \"Jobs\");\r\n break;\r\n case 3:\r\n this.gridExportService.exportGridAsPdf(this.dataGrid.instance, \"Jobs\", { orientation: \"l\" });\r\n break;\r\n default:\r\n throw new Error(\"Unhandled export type: \" + e.itemData.id);\r\n }\r\n }\r\n\r\n public onDataErrorOccurred(e: any): void {\r\n // TODO: Remove this temporary error message once we've got the export working serverside\r\n if (e.error.requestOptions &&\r\n !e.error.requestOptions.data.$top &&\r\n e.error.message === \"Network connection timeout\") {\r\n // A network connection timeout with no $top in the request is pretty much the only way we can tell this error came specifically from the export\r\n e.error.message = this.translate.instant(\"label.jobs.grid.error.export\");\r\n }\r\n console.error(e, e.stack);\r\n }\r\n\r\n public openColumnChooser(): void {\r\n this.dataGrid.instance.showColumnChooser();\r\n }\r\n\r\n public FormatCurrency(rowData: any): string {\r\n const { JobTotal } = rowData;\r\n return this.currencyPipe.transform(JobTotal, this.baseCurrencyCode);\r\n }\r\n\r\n private getFilterId(): string {\r\n let filter = this.route.snapshot.paramMap.get(\"filterName\");\r\n\r\n if (this.route.snapshot.paramMap.get(\"svcJobRunId\") !== null) {\r\n filter = \"RecurringJobHistory\";\r\n } else if(this.route.snapshot.queryParamMap.get(\"ids\") !== null) {\r\n filter = \"JobIdFilter\";\r\n }\r\n\r\n switch (filter) {\r\n case \"UnassignedJobs\": {\r\n return \"1\";\r\n }\r\n case \"ActiveJobs\": {\r\n return \"2\";\r\n }\r\n case \"IncompleteJobs\": {\r\n return \"3\";\r\n }\r\n case \"OutstandingInvoices\": {\r\n return \"4\";\r\n }\r\n case \"requested\": {\r\n return \"7\";\r\n }\r\n case \"logged\": {\r\n return \"8\";\r\n }\r\n case \"planned\": {\r\n return \"9\";\r\n }\r\n case \"inprogress\": {\r\n return \"10\";\r\n }\r\n case \"completed\": {\r\n return \"11\";\r\n }\r\n case \"EquipmentJobHistory\": {\r\n return \"13\";\r\n }\r\n case \"RecurringJobHistory\": {\r\n return \"14\";\r\n }\r\n case \"JobIdFilter\": {\r\n return \"15\";\r\n }\r\n default: {\r\n return this.preselectedFilter || this.isPortal ? \"0\" : \"6\";\r\n }\r\n }\r\n }\r\n\r\n private GetDataSources(): void {\r\n this.searchJobsDataSource = this.jobsService.GetDataSource(true);\r\n this.jobsDataSource = this.jobsService.GetDataSource(true);\r\n this.selectedItem = this.getFilterId();\r\n this.jobsDataSource.filter(this.filters[this.selectedItem]);\r\n\r\n this.jobsService.GetAllGroups().subscribe(result => {\r\n this.jobGroups = result.map(group => {\r\n return {\r\n jobGroupId: group.JobGroupID,\r\n jobGroup: group.JobGroup\r\n };\r\n });\r\n });\r\n this.dataGrid.instance.searchByText(\"\");\r\n }\r\n\r\n private GetUserReferences() {\r\n this.UICustomisations = JSON.parse(localStorage.getItem(\"ls.userReferences\"));\r\n if (this.UICustomisations) {\r\n const userRefJob1 = this.UICustomisations.list.filter((i) => i.UICustomisationID === 8)[0]; // UICustomisationID for job ref 1 is 8 in ServiceSight\r\n this.userRefJob1Label = userRefJob1.CustomText || userRefJob1.OriginalText;\r\n const userRefJob2 = this.UICustomisations.list.filter((i) => i.UICustomisationID === 9)[0]; // UICustomisationID for job ref 2 is 9 in ServiceSight\r\n this.userRefJob2Label = userRefJob2.CustomText || userRefJob2.OriginalText;\r\n }\r\n }\r\n\r\n public newJob: () => void = () => {\r\n if (this.routerLink.newJob.value.includes(\"#\")) {\r\n if (this.isProEnabled && !this.isJobWizardEnabled) {\r\n this.router.navigate([\"/jobs/add-job\"]);\r\n } else {\r\n window.location.href = this.routerLink.newJob.value;\r\n }\r\n } else {\r\n this.router.navigate([this.routerLink.newJob.value]);\r\n }\r\n };\r\n\r\n searchJobsBySvcJobRunId(svcJobRunId: number) {\r\n const svcJobRunIdFilter = [];\r\n svcJobRunIdFilter.push([\"SvcJobRunId\", \"=\", svcJobRunId]);\r\n return svcJobRunIdFilter;\r\n }\r\n\r\n searchJobsByEquipmentId(equipmentId: number) {\r\n const equipIdFilter = [];\r\n equipIdFilter.push([\"EquipId\", \"=\", equipmentId]);\r\n this.jobEquipmentDataSource.filter(equipIdFilter);\r\n return this.jobEquipmentDataSource.load().then(() => {\r\n const filter = [];\r\n const jobEquips = this.jobEquipmentDataSource.items();\r\n filter.push([\"JobID\", \"=\", Infinity]); //this is done by purpose, to remove all results in case that ids list is empty\r\n if (jobEquips.length > 0) {\r\n filter.pop();\r\n jobEquips.forEach((i) => {\r\n filter.push([\"JobID\", \"=\", i.JobId.toString()]);\r\n filter.push(\"or\");\r\n });\r\n filter.pop();\r\n }\r\n return filter;\r\n });\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n const search = encodeURI(this.SearchText)?.replace(/%20/g, \" \") ?? \"\";\r\n this.dataGrid.instance.searchByText(search);\r\n }\r\n\r\n calculateEquipmentIdsValue(rowData): string {\r\n return rowData.EquipmentIds.toString();\r\n }\r\n\r\n filterChanged($event) {\r\n const filterValue = $event.currentTarget.value;\r\n this.dataGrid.instance.clearFilter();\r\n this.selectedItem = filterValue;\r\n if (filterValue !== \"0\") {\r\n this.dataGrid.instance.filter(this.filters[filterValue]);\r\n }\r\n }\r\n\r\n public saveLayout(): void {\r\n const state = this.dataGrid.instance.state();\r\n this.gridService.SaveLayout(state, GridKind.Jobs);\r\n }\r\n\r\n public resetLayout(): void {\r\n this.gridService.ResetLayout(GridKind.Jobs);\r\n this.dataGrid.instance.state(null);\r\n this.gridState = null;\r\n }\r\n\r\n public statusDisplayValue(rowData: any): string {\r\n return this.translate.instant(this.jobStatusPipe.transform(rowData.Status));\r\n }\r\n\r\n public calculateDueDateFilter(filterValue, selectedFilterOperation, filterType) {\r\n const column = this as any;\r\n\r\n if (filterType === \"filterRow\") {\r\n const filter = column.defaultCalculateFilterExpression(filterValue, selectedFilterOperation, filterType);\r\n\r\n if (filter) {\r\n if (typeof filter[0] === \"string\") {\r\n filter[0] = \"DueDate\";\r\n } else {\r\n filter[0][0] = \"DueDate\";\r\n filter[2][0] = \"DueDate\";\r\n }\r\n\r\n return filter;\r\n }\r\n }\r\n\r\n // Invokes the default filtering behavior\r\n return column.defaultCalculateFilterExpression(filterValue, selectedFilterOperation, filterType);\r\n }\r\n\r\n public calculateLoggedDateFilter(filterValue, selectedFilterOperation, filterType) {\r\n const column = this as any;\r\n\r\n if (filterType === \"filterRow\") {\r\n const filter = column.defaultCalculateFilterExpression(filterValue, selectedFilterOperation, filterType);\r\n\r\n if (filter) {\r\n if (typeof filter[0] === \"string\") {\r\n filter[0] = \"LoggedDate\";\r\n } else {\r\n filter[0][0] = \"LoggedDate\";\r\n filter[2][0] = \"LoggedDate\";\r\n }\r\n\r\n return filter;\r\n }\r\n }\r\n\r\n // Invokes the default filtering behavior\r\n return column.defaultCalculateFilterExpression(filterValue, selectedFilterOperation, filterType);\r\n }\r\n\r\n public calculateNextVisitDateFilter(filterValue, selectedFilterOperation, filterType) {\r\n const column = this as any;\r\n\r\n if (filterType === \"filterRow\") {\r\n const filter = column.defaultCalculateFilterExpression(filterValue, selectedFilterOperation, filterType);\r\n\r\n if (filter) {\r\n if (typeof filter[0] === \"string\") {\r\n filter[0] = \"NextVisitDate\";\r\n } else {\r\n filter[0][0] = \"NextVisitDate\";\r\n filter[2][0] = \"NextVisitDate\";\r\n }\r\n\r\n return filter;\r\n }\r\n }\r\n\r\n // Invokes the default filtering behavior\r\n return column.defaultCalculateFilterExpression(filterValue, selectedFilterOperation, filterType);\r\n }\r\n\r\n public calculateStatusFilter(filterValue, selectedFilterOperation, filterType) {\r\n const column = this as any;\r\n // Search the status based on the string\r\n if (filterType === \"search\" && column.dataField === \"Status\" && !isNaN(Number(filterValue)) && JobStatus[filterValue]) {\r\n return [\"Status\", \"=\", new EdmLiteral(`ServiceSight.Core.Enums.StatusJob'${filterValue}'`)];\r\n } else if (filterType === \"search\") {\r\n return null;\r\n } else if (filterType === \"filterRow\") {\r\n const filter = column.defaultCalculateFilterExpression(filterValue, selectedFilterOperation, filterType);\r\n\r\n if (filter) {\r\n if (typeof filter[0] === \"string\") {\r\n filter[0] = \"Status\";\r\n }\r\n\r\n return filter;\r\n }\r\n }\r\n // Invokes the default filtering behavior\r\n return column.defaultCalculateFilterExpression(filterValue, selectedFilterOperation, filterType);\r\n }\r\n\r\n public GetStatus(data): number {\r\n return !data.data.Chargeable && data.value === JobStatus.COMPLETED ? JobStatus.COMPLETED_UNCHARGEABLE : data.value;\r\n }\r\n\r\n public OnSelectionChanged(e: any): void {\r\n this.selectedJob.emit(e.selectedRowsData[0]);\r\n }\r\n\r\n public getEquipments(jobId: string) {\r\n if (!this.dataSources[jobId]) {\r\n this.dataSources[jobId] = [];\r\n this.equipmentService.GetJobEquipment(Number(jobId)).subscribe(equip => {\r\n this.dataSources[jobId] = equip;\r\n });\r\n\r\n }\r\n return this.dataSources[jobId];\r\n }\r\n\r\n public GetLocationDataStore(siteId: number) {\r\n let source = this.locationsDataSources[siteId];\r\n if (source == null) {\r\n source = this.equipmentService.GetLocationsDataStore(siteId);\r\n source.load();\r\n this.locationsDataSources[siteId] = source;\r\n }\r\n return source;\r\n }\r\n\r\n public SortOrderStatus(data: any): any {\r\n const column = this as any;\r\n const value = column.calculateCellValue(data);\r\n return column.lookup.calculateCellValue(value);\r\n }\r\n\r\n public viewDetails(event) {\r\n if (this.UseRouterLink) {\r\n this.router.navigate([this.baseDetailLink, event.data.JobID]);\r\n } else {\r\n this.router.navigate([\"/jobs/job\", event.data.JobID]);\r\n }\r\n }\r\n\r\n public GetSortJobEquipmentStatusDescription(rowdata: any): string {\r\n return this.translate.instant(this.jobEquipmentPipe.transform(rowdata.Status));\r\n }\r\n\r\n public onCellPrepared(e: any): void {\r\n if (e.rowType === \"header\" && e.column.dataField === \"EquipmentOoa\") {\r\n on(e.cellElement, \"mouseover\", arg => {\r\n this.tooltipText = this.translate.instant(\"label.jobs.grid.equipments.out-of-action\");\r\n this.tooltip.instance.show(arg.target);\r\n });\r\n\r\n on(e.cellElement, \"mouseout\", () => {\r\n this.tooltip.instance.hide();\r\n });\r\n }\r\n\r\n if (e.rowType === \"data\" && e.column.dataField === \"PriorityName\") {\r\n on(e.cellElement, \"mouseover\", arg => {\r\n this.tooltipText = e.text;\r\n this.tooltip.instance.show(arg.target);\r\n });\r\n\r\n on(e.cellElement, \"mouseout\", () => {\r\n this.tooltip.instance.hide();\r\n });\r\n }\r\n }\r\n\r\n public onMasterDetailCellPrepared(e: any): void {\r\n if (e.rowType === \"data\" && e.column.cellTemplate === \"equipmentCellTemplate\" && this.isProEnabled) {\r\n const id = `eq-no-${e.key.EquipItemId}`;\r\n e.cellElement.id = id;\r\n\r\n const element = document.querySelector(`#${id} .condition-colour-bar`);\r\n on(element, \"mouseover\", arg => {\r\n this.tooltipText = e.data.ConditionName;\r\n this.tooltip.instance.show(arg.target);\r\n });\r\n\r\n on(element, \"mouseout\", () => {\r\n this.tooltip.instance.hide();\r\n });\r\n }\r\n }\r\n\r\n public onEditorPreparing(e: any): void {\r\n if (e.parentType === \"filterRow\" && e.name === \"SortStatus\") {\r\n // Overriding the filter for JobOrders to be a dropdown as we're not using a lookup column\r\n e.editorName = \"dxSelectBox\";\r\n e.editorOptions.dataSource = [\"(All)\", \"Outstanding\", \"Booked In\"];\r\n }\r\n\r\n if (e.parentType === \"filterRow\" && e.name === \"PriorityName\") {\r\n e.editorName = \"dxSelectBox\";\r\n const prioritiesNames = this.prioritiesDataSource.items().map(x => x.Name);\r\n e.editorOptions.dataSource = [\"(All)\", ...prioritiesNames];\r\n }\r\n }\r\n\r\n public jobOrderCellValue(rowData): string {\r\n if (rowData.JobOrderStatus && rowData.JobOrderStatus === JobOrderStatus.Outstanding) {\r\n return this.translate.instant(\"label.jobs.grid.outstanding.days\", { value: rowData.JobOrderOutstandingDays.toString() });\r\n } else if (rowData.JobOrderStatus && rowData.JobOrderStatus === JobOrderStatus.BookedIn) {\r\n return this.translate.instant(\"label.jobs.grid.booked.in\");\r\n }\r\n\r\n return \"\";\r\n }\r\n\r\n public calculateJobOrderFilter(filterValue, selectedFilterOperation, filterType) {\r\n if (!filterValue) {\r\n return null;\r\n }\r\n filterValue = filterValue.replace(\" \", \"\");\r\n const column = this as any;\r\n\r\n if (filterValue === \"(All)\"){\r\n return null;\r\n } else if (filterType === \"search\" && column.dataField === \"JobOrderStatus\" && !isNaN(Number(filterValue)) && JobOrderStatus[filterValue]) {\r\n return [\"JobOrderStatus\", \"=\", JobOrderStatus[filterValue]];\r\n } else if (filterType === \"search\") {\r\n return null;\r\n } else if (filterType === \"filterRow\") {\r\n const filter = column.defaultCalculateFilterExpression(JobOrderStatus[filterValue], \"=\", filterType);\r\n\r\n if (filter) {\r\n if (typeof filter[0] === \"string\") {\r\n filter[0] = \"JobOrderStatus\";\r\n }\r\n console.log(filter);\r\n return filter;\r\n }\r\n }\r\n // Invokes the default filtering behavior\r\n return column.defaultCalculateFilterExpression(filterValue, selectedFilterOperation, filterType);\r\n }\r\n\r\n public calculatePriorityFilter(filterValue, selectedFilterOperation, filterType) {\r\n if (!filterValue) {\r\n return null;\r\n }\r\n filterValue = filterValue.replace(\" \", \"\");\r\n const column = this as any;\r\n\r\n if (filterValue === \"(All)\"){\r\n return null;\r\n }\r\n // Invokes the default filtering behavior\r\n return column.defaultCalculateFilterExpression(filterValue, selectedFilterOperation, filterType);\r\n }\r\n\r\n private IsRecurringJobRunInProgress(report: ReportModel): boolean {\r\n return report.JobCount !== report.NoOfJobs &&\r\n moment.utc().diff(report.CreatedDate, \"hours\") < 1;\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { BehaviorSubject, Observable, Subject } from \"rxjs\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class LeavingFormMessageService {\r\n\r\n private subject: BehaviorSubject = new BehaviorSubject(false);\r\n private resultSubject: Subject = new Subject();\r\n\r\n public get ShowMessage(): Observable {\r\n return this.subject.asObservable();\r\n }\r\n\r\n public get Result(): Observable {\r\n return this.resultSubject.asObservable();\r\n }\r\n\r\n constructor() { }\r\n\r\n public ShowInfoMessage(show: boolean): void {\r\n this.subject.next(show);\r\n }\r\n\r\n public SetResult(result: boolean): void {\r\n this.resultSubject.next(result);\r\n }\r\n}\r\n","import { Component, OnInit } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { LeavingFormMessageService } from \"../../services/leaving-form-message.service\";\r\n\r\n@Component({\r\n selector: \"lib-leaving-form-message\",\r\n templateUrl: \"./leaving-form-message.component.html\",\r\n styleUrls: [\"./leaving-form-message.component.css\"]\r\n})\r\nexport class LeavingFormMessageComponent implements OnInit {\r\n\r\n public title: string = \"\";\r\n public message: string = \"\";\r\n public isVisible: boolean;\r\n public Proceed = () => this.CloseModal(true);\r\n public Cancel = () => this.CloseModal(false);\r\n\r\n public constructor(\r\n private translate: TranslateService,\r\n private leavingService: LeavingFormMessageService) { }\r\n\r\n public ngOnInit(): void {\r\n // I use 'get' instead 'instant' because 'instant' method\r\n // returns a key of translation instead translated value\r\n this.translate.get(\"messages.changes-warning\").subscribe(x => this.title = x);\r\n this.translate.get(\"messages.changes-warning.body\").subscribe(x => this.message = x);\r\n this.leavingService.ShowMessage.subscribe(showMessage => {\r\n if (showMessage) {\r\n document.querySelector(\"body\").classList.add(\"overhidn\");\r\n } else {\r\n document.querySelector(\"body\").classList.remove(\"overhidn\");\r\n }\r\n this.isVisible = showMessage;\r\n });\r\n }\r\n\r\n private CloseModal(result: boolean): void {\r\n this.isVisible = false;\r\n document.querySelector(\"body\").classList.remove(\"overhidn\");\r\n this.leavingService.SetResult(result);\r\n }\r\n\r\n}\r\n","\r\n
\r\n
\r\n {{message}}\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n","\r\n
\r\n \r\n \r\n
\r\n\r\n","import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges, ViewChild } from \"@angular/core\";\r\nimport { DxTreeViewComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\n\r\n@Component({\r\n selector: \"lib-multiple-selection\",\r\n templateUrl: \"./multiple-selection.component.html\",\r\n styleUrls: [\"./multiple-selection.component.scss\"]\r\n})\r\nexport class MultipleSelectionComponent implements OnChanges {\r\n @Input() selectionDataSource: DataSource;\r\n @Input() keyExpr: string;\r\n @Input() displayExpr: string;\r\n @Input() placeholder: string;\r\n @Input() parentIdExpr: string;\r\n @Input() selectNodesRecursive: boolean = false;\r\n @Output() selectedItems = new EventEmitter>();\r\n\r\n @Input() treeBoxValue: number[] = [];\r\n\r\n @ViewChild(DxTreeViewComponent, { static: false }) treeView;\r\n\r\n constructor() { }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.treeBoxValue) {\r\n this.syncTreeViewSelection(this.treeView);\r\n }\r\n }\r\n\r\n syncTreeViewSelection(treeView: DxTreeViewComponent) {\r\n if (treeView && treeView.instance) {\r\n treeView.instance.unselectAll();\r\n if (this.treeBoxValue) {\r\n this.treeBoxValue.forEach(value => treeView.instance.selectItem(value));\r\n }\r\n }\r\n }\r\n\r\n getSelectedItemsKeys(items) {\r\n let result = [];\r\n\r\n items.forEach((item) => {\r\n if (item.selected) {\r\n result.push(item.key);\r\n }\r\n if (item.items.length) {\r\n result = result.concat(this.getSelectedItemsKeys(item.items));\r\n }\r\n });\r\n\r\n this.selectedItems.emit(result);\r\n return result;\r\n }\r\n\r\n treeView_itemSelectionChanged(e) {\r\n const nodes = e.component.getNodes();\r\n this.treeBoxValue = this.getSelectedItemsKeys(nodes);\r\n }\r\n}\r\n","import { NgModule } from \"@angular/core\";\r\nimport { CommonModule } from \"@angular/common\";\r\nimport { PhraseBookListComponent } from \"./phrase-book-list/phrase-book-list.component\";\r\nimport { PhraseBookModalComponent } from \"./phrase-book-modal/phrase-book-modal.component\";\r\nimport {\r\n DxButtonModule,\r\n DxDataGridModule,\r\n DxPopupModule,\r\n DxTextBoxModule,\r\n DxTextAreaModule\r\n} from \"devextreme-angular\";\r\nimport { TranslateModule } from \"@ngx-translate/core\";\r\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\r\nimport { PhraseBookTextAreaComponent } from \"./phrase-book-textarea/phrase-book-textarea.component\";\r\n\r\nconst components = [\r\n PhraseBookListComponent,\r\n PhraseBookModalComponent,\r\n PhraseBookTextAreaComponent\r\n];\r\n\r\n@NgModule({\r\n declarations: [...components],\r\n imports: [\r\n CommonModule,\r\n DxDataGridModule,\r\n DxTextBoxModule,\r\n DxTextAreaModule,\r\n DxButtonModule,\r\n DxPopupModule,\r\n TranslateModule,\r\n FormsModule,\r\n ReactiveFormsModule\r\n ],\r\n exports: components\r\n})\r\nexport class PhraseBookModule { }\r\n","export enum SalesQuoteStatus {\r\n UNDEFINED = -1,\r\n CANCELLED = 0,\r\n REQUESTED = 200,\r\n QUOTED = 300,\r\n LOST = 600,\r\n NOT_REQUIRED = 650,\r\n WON = 700\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { IODataService } from \"./interfaces/iodata.service\";\r\nimport { IAppConfig, APP_CONFIG } from \"../models/app-config.model\";\r\nimport { PageableDatastoreService } from \"./pageable-datastore.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class QuoteDataService extends PageableDatastoreService {\r\n private static readonly odataKey: string = \"SalesQuotationId\";\r\n\r\n constructor(\r\n @Inject(\"ODataService\") private odataService: IODataService,\r\n @Inject(APP_CONFIG) private config: IAppConfig) {\r\n super(QuoteDataService.odataKey);\r\n }\r\n\r\n public GetQuotesDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: this.config.apiLocations.QuotesOData + \"QuotesList\",\r\n key: QuoteDataService.odataKey,\r\n keyType: \"String\",\r\n paging: true,\r\n pageSize: 50,\r\n });\r\n }\r\n\r\n protected GetDataSourceObject(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.QuotesOData}QuotesList`,\r\n key: QuoteDataService.odataKey,\r\n keyType: \"String\",\r\n paging: true,\r\n pageSize: 50\r\n });\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { SalesQuoteStatus } from \"../enums/sales-quote-status.enum\";\r\n\r\n@Pipe({\r\n name: \"quoteStatusBar\"\r\n})\r\nexport class QuoteStatusBarPipe implements PipeTransform {\r\n\r\n private readonly stringValueMapping = {\r\n Cancelled: SalesQuoteStatus.CANCELLED,\r\n Quoted: SalesQuoteStatus.QUOTED,\r\n Lost: SalesQuoteStatus.LOST,\r\n Won: SalesQuoteStatus.WON,\r\n Requested: SalesQuoteStatus.REQUESTED,\r\n NotRequired: SalesQuoteStatus.NOT_REQUIRED\r\n };\r\n\r\n private readonly status = {\r\n [SalesQuoteStatus.CANCELLED]: \"bggraystatus\",\r\n [SalesQuoteStatus.REQUESTED]: \"bgyellowstatusshort\",\r\n [SalesQuoteStatus.QUOTED]: \"bggreenstatusshort\",\r\n [SalesQuoteStatus.LOST]: \"bgredstatusfull\",\r\n [SalesQuoteStatus.NOT_REQUIRED]: \"bgyellowstatusfull\",\r\n [SalesQuoteStatus.WON]: \"bggreenstatuslong\"\r\n };\r\n\r\n private readonly bgcolors = {\r\n [SalesQuoteStatus.CANCELLED]: \"clrred\",\r\n [SalesQuoteStatus.REQUESTED]: \"clryellow\",\r\n [SalesQuoteStatus.QUOTED]: \"clrgreen\",\r\n [SalesQuoteStatus.NOT_REQUIRED]: \"clryellow\",\r\n [SalesQuoteStatus.WON]: \"clrgreen\",\r\n [SalesQuoteStatus.LOST]: \"clrred\"\r\n };\r\n\r\n transform(value: any, args?: any): any {\r\n let safeValue = Number(value);\r\n if (isNaN(safeValue)) {\r\n safeValue = this.stringValueMapping[value];\r\n }\r\n\r\n const colors = {\r\n bg: this.bgcolors[safeValue],\r\n bar: this.status[safeValue]\r\n };\r\n\r\n return colors[args];\r\n }\r\n\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { SalesQuoteStatus } from \"../../enums/sales-quote-status.enum\";\r\n\r\n@Pipe({\r\n name: \"quoteStatus\"\r\n})\r\nexport class QuoteStatusPipe implements PipeTransform {\r\n\r\n private readonly quoteStatus = {\r\n [SalesQuoteStatus.CANCELLED]: \"label.quotes.cancelled\",\r\n [SalesQuoteStatus.QUOTED]: \"label.quotes.quoted\",\r\n [SalesQuoteStatus.LOST]: \"label.quotes.lost\",\r\n [SalesQuoteStatus.REQUESTED]: \"label.quotes.requested\",\r\n [SalesQuoteStatus.NOT_REQUIRED]: \"label.quotes.notRequired\",\r\n [SalesQuoteStatus.WON]: \"label.quotes.won\",\r\n };\r\n\r\n private readonly stringValueMapping = {\r\n Cancelled: SalesQuoteStatus.CANCELLED,\r\n Quoted: SalesQuoteStatus.QUOTED,\r\n Lost: SalesQuoteStatus.LOST,\r\n Won: SalesQuoteStatus.WON,\r\n Requested: SalesQuoteStatus.REQUESTED,\r\n NotRequired: SalesQuoteStatus.NOT_REQUIRED\r\n };\r\n\r\n transform(value: any): any {\r\n let safeValue = Number(value);\r\n if (isNaN(safeValue)) {\r\n safeValue = this.stringValueMapping[value];\r\n }\r\n\r\n return this.quoteStatus[safeValue];\r\n }\r\n\r\n}\r\n","
\r\n
\r\n

{{ 'quotes.list.title' | translate }}

\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
{{ data.value | quoteStatus | translate }}
\r\n
\r\n
\r\n
\r\n
\r\n {{ data.value | customDate: 'shortDate' }}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n

{{message}}

\r\n
\r\n","import { Component, Inject, OnInit, ViewChild } from \"@angular/core\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { EdmLiteral } from \"devextreme/data/odata/utils\";\r\nimport { GridKind } from \"../../enums/grid-kind.enum\";\r\nimport { HelpItemTagEnum } from \"../../enums/help-item-tag.enum\";\r\nimport { Module } from \"../../enums/module.enum\";\r\nimport { SalesQuoteStatus } from \"../../enums/sales-quote-status.enum\";\r\nimport { UICustomisation } from \"../../enums/ui-customisation.enum\";\r\nimport { IUserReferences } from \"../../models/user-references.model\";\r\nimport { CurrencyPipe } from \"../../pipes/currency.pipe\";\r\nimport { GridExportService } from \"../../services/grid-export.service\";\r\nimport { GridService } from \"../../services/grid.service\";\r\nimport { IAuthService } from \"../../services/interfaces/iauth.service\";\r\nimport { IRouterLinkService } from \"../../services/interfaces/irouter-link.service\";\r\nimport { IShowCustomerName } from \"../../services/interfaces/ishow-customer.service\";\r\nimport { ModuleService } from \"../../services/module/module.service\";\r\nimport { QuoteDataService } from \"../../services/quote-data.service\";\r\n\r\n@Component({\r\n selector: \"lib-quotes-list\",\r\n templateUrl: \"./quotes-list.component.html\",\r\n styleUrls: [\r\n \"./quotes-list.component.scss\",\r\n \"../../styles/global.scss\",\r\n \"../../styles/backgrounds.scss\",\r\n \"../../styles/servicesight-shared.scss\"]\r\n})\r\nexport class QuotesListComponent implements OnInit {\r\n private readonly baseCurrencyCode: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencyCode\"));\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n\r\n public helpItemTagEnum = HelpItemTagEnum;\r\n public proEnabled: boolean = false;\r\n public salesOpportunityEnabled: boolean = false;\r\n public salesCampaignsEnabled: boolean = false;\r\n public showCustomerName: boolean = false;\r\n public message: string;\r\n public readonly isPortal: boolean;\r\n public selectedItem: string = \"0\";\r\n public filterValue: any;\r\n public quotesDataSource: DataSource;\r\n public baseDetailLink: string;\r\n public baseQuotelLink: string;\r\n public hidePriority: Array = [\r\n \"Logo\",\r\n \"SiteId\",\r\n \"CustomerId\",\r\n \"RequestedDate\",\r\n \"RequiredByDate\",\r\n \"ContactId\",\r\n \"QuoteDate\",\r\n \"Files\"\r\n ];\r\n\r\n public SearchText: string = \"\";\r\n public UICustomisations: IUserReferences;\r\n public UserRef1Label: string;\r\n public UserRef2Label: string;\r\n public exportOptions: { id: number; label: string }[] = [\r\n { id: 1, label: \"Export data as xlsx\" },\r\n { id: 2, label: \"Export data as csv\" },\r\n { id: 3, label: \"Export data as pdf\" }\r\n ];\r\n\r\n private cancelledStatus = new EdmLiteral(\"Quotes.Enums.SalesQuotationStatus'Cancelled'\");\r\n private requestedStatus = new EdmLiteral(\"Quotes.Enums.SalesQuotationStatus'Requested'\");\r\n private quotedStatus = new EdmLiteral(\"Quotes.Enums.SalesQuotationStatus'Quoted'\");\r\n private lostStatus = new EdmLiteral(\"Quotes.Enums.SalesQuotationStatus'Lost'\");\r\n private wonStatus = new EdmLiteral(\"Quotes.Enums.SalesQuotationStatus'Won'\");\r\n private gridState: any = {};\r\n\r\n public filters: any = {\r\n 1: [[\"Status\", \"=\", this.quotedStatus], \"or\", [\"Status\", \"=\", this.requestedStatus]],\r\n 2: [\"Status\", \"=\", this.wonStatus],\r\n 3: [\"Status\", \"=\", this.lostStatus],\r\n 4: [\"Status\", \"=\", this.cancelledStatus],\r\n 5: [\"Status\", \"<>\", this.cancelledStatus]\r\n };\r\n\r\n constructor(\r\n private moduleService: ModuleService,\r\n private quoteDataService: QuoteDataService,\r\n private gridService: GridService,\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private translate: TranslateService,\r\n private gridExportService: GridExportService,\r\n private currencyPipe: CurrencyPipe,\r\n @Inject(\"AuthService\") authService: IAuthService,\r\n @Inject(\"RouterLinkService\") private routerLink: IRouterLinkService,\r\n @Inject(\"ShowCustomerName\") private showCustomerNameService: IShowCustomerName) {\r\n this.isPortal = authService.isPortalUser;\r\n this.routerLink.quoteDetailsBaseLink.subscribe(x => this.baseDetailLink = x);\r\n this.routerLink.quoteBaseLink.subscribe(x => this.baseQuotelLink = x);\r\n this.FormatCurrency = this.FormatCurrency.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.showCustomerNameService.ShowCustomerName().subscribe(res => this.showCustomerName = res);\r\n this.GetUserReferences();\r\n this.gridService.GetLayout(GridKind.Quotes).subscribe(value => {\r\n if (value) {\r\n this.gridState = value;\r\n this.dataGrid.instance.state(value);\r\n }\r\n this.GetDataSources();\r\n }, () => this.GetDataSources());\r\n\r\n this.moduleService.GetEnabledModules().subscribe(o => {\r\n this.proEnabled = o.includes(Module.Pro);\r\n this.salesOpportunityEnabled = o.includes(Module.SalesOpportunity);\r\n this.salesCampaignsEnabled = o.includes(Module.SalesCampaigns);\r\n });\r\n\r\n const tempmessage = this.route.snapshot.paramMap.get(\"message\");\r\n if (tempmessage !== null) {\r\n this.message = this.translate.instant(tempmessage);\r\n }\r\n }\r\n\r\n public loadState = () => this.gridService.GetLayout(GridKind.Quotes).toPromise();\r\n\r\n private GetDataSources(): void {\r\n this.quotesDataSource = this.quoteDataService.GetDataSource(true);\r\n this.selectedItem = this.getFilterId();\r\n this.quotesDataSource.filter(this.filters[this.selectedItem]);\r\n }\r\n\r\n public searchTextChanged(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public filterChanged($event): void {\r\n const filterValue = $event.currentTarget.value;\r\n if (filterValue === \"0\") {\r\n this.dataGrid.instance.clearFilter();\r\n } else {\r\n this.dataGrid.instance.filter(this.filters[filterValue]);\r\n }\r\n }\r\n\r\n public saveLayout(): void {\r\n const state = this.dataGrid.instance.state();\r\n this.gridService.SaveLayout(state, GridKind.Quotes);\r\n }\r\n\r\n public resetLayout(): void {\r\n this.gridService.ResetLayout(GridKind.Quotes);\r\n this.dataGrid.instance.state(null);\r\n this.gridState = null;\r\n }\r\n\r\n public allowLink(data): boolean {\r\n return !this.isPortal || data.Status !== SalesQuoteStatus.REQUESTED;\r\n }\r\n\r\n public viewDetails(event) {\r\n if (this.allowLink(event.data)) {\r\n this.router.navigate([this.baseDetailLink, event.data.SalesQuotationId, event.data.RevisionId]);\r\n }\r\n }\r\n\r\n public onExportItemClick(e: any): void {\r\n this.dataGrid.instance.columnOption(\"QuoteTypes\", \"visible\", true);\r\n\r\n switch (e.itemData.id) {\r\n case 1:\r\n this.gridExportService.exportGridAsXlsxAsync(this.dataGrid.instance, \"Quotes\")\r\n .then(() => this.dataGrid.instance.columnOption(\"QuoteTypes\", \"visible\", false));\r\n break;\r\n case 2:\r\n this.gridExportService.exportGridAsCsvAsync(this.dataGrid.instance, \"Quotes\")\r\n .then(() => this.dataGrid.instance.columnOption(\"QuoteTypes\", \"visible\", false));\r\n break;\r\n case 3:\r\n this.gridExportService.exportGridAsPdfAsync(this.dataGrid.instance, \"Quotes\", {orientation: \"l\"})\r\n .then(() => this.dataGrid.instance.columnOption(\"QuoteTypes\", \"visible\", false));\r\n break;\r\n default:\r\n throw new Error(\"Unhandled export type: \" + e.itemData.id);\r\n }\r\n }\r\n\r\n public FormatCurrency(rowData: any): string {\r\n const { TotalValue } = rowData;\r\n return this.currencyPipe.transform(TotalValue, this.baseCurrencyCode);\r\n }\r\n\r\n public columnVisible(name: string, defaultValue: boolean): boolean {\r\n if (this.gridState && this.gridState.columns) {\r\n const column = this.gridState.columns.find(x => x.name === name);\r\n\r\n if (column) {\r\n return column.visible;\r\n }\r\n }\r\n\r\n return defaultValue;\r\n }\r\n\r\n public OpenColumnChooser(): void {\r\n this.dataGrid.instance.showColumnChooser();\r\n }\r\n\r\n private getFilterId(): string {\r\n const filter = this.route.snapshot.paramMap.get(\"filterName\");\r\n switch (filter) {\r\n case \"oustanding\": {\r\n return \"1\";\r\n }\r\n case \"won\": {\r\n return \"2\";\r\n }\r\n case \"lost\": {\r\n return \"3\";\r\n }\r\n case \"cancelled\": {\r\n return \"4\";\r\n }\r\n case \"allButCancelled\": {\r\n return \"4\";\r\n }\r\n default: {\r\n return \"0\";\r\n }\r\n }\r\n }\r\n\r\n private GetUserReferences(): void {\r\n this.UICustomisations = JSON.parse(localStorage.getItem(\"ls.userReferences\"));\r\n if (this.UICustomisations) {\r\n const userRefQuote1 = this.UICustomisations.list.filter((i) => i.UICustomisationID === UICustomisation.QUOTE_REF1)[0];\r\n this.UserRef1Label = userRefQuote1.CustomText || userRefQuote1.OriginalText;\r\n const userRefQuote2 = this.UICustomisations.list.filter((i) => i.UICustomisationID === UICustomisation.QUOTE_REF2)[0];\r\n this.UserRef2Label = userRefQuote2.CustomText || userRefQuote2.OriginalText;\r\n }\r\n }\r\n}\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Inject,\r\n Input,\r\n OnInit,\r\n Output,\r\n ViewChild,\r\n ViewEncapsulation\r\n} from \"@angular/core\";\r\nimport { ajaxSetup } from \"@devexpress/analytics-core/analytics-utils\";\r\nimport { DxReportViewerComponent } from \"devexpress-reporting-angular\";\r\nimport { ActionId } from \"devexpress-reporting/dx-webdocumentviewer\";\r\nimport { IAuthService } from \"../../services/interfaces/iauth.service\";\r\n\r\n@Component({\r\n selector: \"lib-report-viewer\",\r\n templateUrl: \"./report-viewer.component.html\",\r\n encapsulation: ViewEncapsulation.None,\r\n styleUrls: [\r\n \"./report-viewer.component.scss\",\r\n \"../../../../../../node_modules/@devexpress/analytics-core/dist/css/dx-analytics.common.css\",\r\n \"../../../../../../node_modules/@devexpress/analytics-core/dist/css/dx-analytics.light.css\",\r\n \"../../../../../../node_modules/devexpress-reporting/dist/css/dx-webdocumentviewer.css\"]\r\n})\r\nexport class ReportViewerComponent implements OnInit {\r\n @ViewChild(DxReportViewerComponent, { static: true }) viewer: DxReportViewerComponent;\r\n\r\n @Output() public callPrint = new EventEmitter();\r\n\r\n @Output() public callDownload = new EventEmitter();\r\n\r\n // The URL of a report to open in the Report Designer when the application starts.\r\n @Input() public reportUrl: string = null;\r\n\r\n // URI of your backend project.\r\n @Input() public hostUrl: string;\r\n\r\n @Input() public isNetCore: boolean;\r\n\r\n private firstRun: boolean = true;\r\n\r\n // ASP.NET Core backend ???\r\n public invokeAction: string = \"DXXRDV.axd\";\r\n public isDocumentExist = true;\r\n\r\n public get isMobile(): boolean {\r\n return window.innerWidth < 788;\r\n }\r\n\r\n constructor(@Inject(\"AuthService\") auth: IAuthService) {\r\n ajaxSetup.ajaxSettings = {\r\n headers: { Authorization: \"Bearer \" + auth.Token }\r\n };\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.firstRun = true;\r\n if (this.isNetCore) {\r\n this.invokeAction = \"DXXRDV\";\r\n }\r\n this.callPrint.emit(() => {\r\n this.viewer.bindingSender.Print();\r\n });\r\n this.callDownload.emit(() => {\r\n this.viewer.bindingSender.ExportTo(\"pdf\", false);\r\n });\r\n }\r\n\r\n public print(): void {\r\n this.viewer.bindingSender.Print();\r\n }\r\n\r\n public download(): void {\r\n this.viewer.bindingSender.ExportTo(\"pdf\", false);\r\n }\r\n\r\n public CustomizeMenuActions(event): void {\r\n if (this.firstRun) {\r\n this.firstRun = false;\r\n const zoomAction = event.args.GetById(ActionId.ZoomSelector);\r\n if (zoomAction) {\r\n zoomAction.zoom(1);\r\n }\r\n\r\n const multipageAction = event.args.GetById(ActionId.MultipageToggle);\r\n if (multipageAction) {\r\n multipageAction.clickAction();\r\n }\r\n }\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n","export enum SalesOrderStatus {\r\n Cancelled = 0,\r\n Pending = 100,\r\n Quoted = 125,\r\n Placed = 150,\r\n PartiallyDispatched = 200,\r\n PartExO = 680,\r\n InvoicingReq = 700,\r\n InvoiceMarked = 720,\r\n Complete = 800,\r\n Archived = 900\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { IODataService } from \"./interfaces/iodata.service\";\r\nimport { IAppConfig, APP_CONFIG } from \"../models/app-config.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class SalesOrderService {\r\n\r\n constructor(\r\n @Inject(\"ODataService\") protected odataService: IODataService,\r\n @Inject(APP_CONFIG) protected config: IAppConfig) { }\r\n\r\n public GetDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.SalesOrdersOData}SalesOrderList`,\r\n key: \"SalesId\",\r\n keyType: \"String\",\r\n pageSize: 50,\r\n paging: true\r\n });\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { SalesOrderStatus } from \"../enums/sales-order-status.enum\";\r\n\r\n@Pipe({\r\n name: \"salesOrderStatusBar\"\r\n})\r\nexport class SalesOrderStatusBarPipe implements PipeTransform {\r\n private readonly status = {\r\n [SalesOrderStatus.Cancelled]: \"bggraystatus\",\r\n [SalesOrderStatus.Pending]: \"bgredstatusshort\",\r\n [SalesOrderStatus.Placed]: \"bgyellowstatuslong\",\r\n [SalesOrderStatus.PartiallyDispatched]: \"bggreenstatusshort\",\r\n [SalesOrderStatus.Complete]: \"bggreenstatuslong\"\r\n };\r\n\r\n private readonly bgcolors = {\r\n [SalesOrderStatus.Cancelled]: \"clrred\",\r\n [SalesOrderStatus.Pending]: \"clrred\",\r\n [SalesOrderStatus.Placed]: \"clryellow\",\r\n [SalesOrderStatus.PartiallyDispatched]: \"clrgreen\",\r\n [SalesOrderStatus.Complete]: \"clrgreen\"\r\n };\r\n\r\n private readonly stringValueMapping = {\r\n Cancelled: SalesOrderStatus.Cancelled,\r\n Pending: SalesOrderStatus.Pending,\r\n Placed: SalesOrderStatus.Placed,\r\n PartiallyDispatched: SalesOrderStatus.PartiallyDispatched,\r\n Complete: SalesOrderStatus.Complete\r\n };\r\n\r\n transform(value: SalesOrderStatus | number | string, args?: any): string {\r\n if (value) {\r\n let safeValue = Number(value);\r\n if (isNaN(safeValue)) {\r\n safeValue = this.stringValueMapping[value];\r\n }\r\n\r\n const colors = {\r\n bg: this.bgcolors[safeValue],\r\n bar: this.status[safeValue]\r\n };\r\n\r\n return colors[args];\r\n }\r\n\r\n return null;\r\n }\r\n\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { SalesOrderStatus } from \"../enums/sales-order-status.enum\";\r\n\r\n@Pipe({\r\n name: \"salesOrderStatus\"\r\n})\r\nexport class SalesOrderStatusPipe implements PipeTransform {\r\n\r\n private readonly salesOrderStatus = {\r\n [SalesOrderStatus.Cancelled]: \"salesorder.status.cancelled\",\r\n [SalesOrderStatus.Pending]: \"salesorder.status.pending\",\r\n [SalesOrderStatus.Placed]: \"salesorder.status.placed\",\r\n [SalesOrderStatus.PartiallyDispatched]: \"salesorder.status.partial\",\r\n [SalesOrderStatus.Complete]: \"salesorder.status.complete\",\r\n };\r\n\r\n private readonly stringValueMapping = {\r\n Cancelled: SalesOrderStatus.Cancelled,\r\n Pending: SalesOrderStatus.Pending,\r\n Placed: SalesOrderStatus.Placed,\r\n PartiallyDispatched: SalesOrderStatus.PartiallyDispatched,\r\n Complete: SalesOrderStatus.Complete\r\n };\r\n\r\n transform(value: number | string | SalesOrderStatus): string {\r\n let safeValue = Number(value);\r\n if (isNaN(safeValue)) {\r\n safeValue = this.stringValueMapping[value];\r\n }\r\n\r\n return this.salesOrderStatus[safeValue];\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'salesorder.list.title' | translate }}

\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n
\r\n
{{ 'generic.yes' | translate }}
\r\n
{{ 'generic.no' | translate }}
\r\n
\r\n\r\n
\r\n
\r\n
{{ item.value | salesOrderStatus | translate }}
\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n {{ data.value | customCurrency: baseCurrencyCode }}\r\n
\r\n \r\n
\r\n","import { Component, Inject, OnInit, ViewChild } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { EdmLiteral } from \"devextreme/data/odata/utils\";\r\nimport { GridKind } from \"../../enums/grid-kind.enum\";\r\nimport { Module } from \"../../enums/module.enum\";\r\nimport { SalesOrderStatus } from \"../../enums/sales-order-status.enum\";\r\nimport { SalesOrdersType } from \"../../enums/sales-orders-type.enum\";\r\nimport { UICustomisation } from \"../../enums/ui-customisation.enum\";\r\nimport { GridExportService } from \"../../services/grid-export.service\";\r\nimport { GridService } from \"../../services/grid.service\";\r\nimport { IAuthService } from \"../../services/interfaces/iauth.service\";\r\nimport { IRouterLinkService } from \"../../services/interfaces/irouter-link.service\";\r\nimport { IShowCustomerName } from \"../../services/interfaces/ishow-customer.service\";\r\nimport { ModuleService } from \"../../services/module/module.service\";\r\nimport { PermissionsService } from \"../../services/permissions-service.service\";\r\nimport { SalesOrderService } from \"../../services/sales-order.service\";\r\nimport { UserReferenceService } from \"../../services/user-reference.service\";\r\n\r\n@Component({\r\n selector: \"lib-sales-orders-list\",\r\n templateUrl: \"./sales-orders-list.component.html\",\r\n styleUrls: [\r\n \"./sales-orders-list.component.scss\",\r\n \"../../styles/global.scss\",\r\n \"../../styles/backgrounds.scss\",\r\n \"../../styles/servicesight-shared.scss\"\r\n ]\r\n})\r\n\r\nexport class SalesOrdersListComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n\r\n public readonly isPortal: boolean;\r\n public IsProEnabled: boolean = false;\r\n public showCustomerName: boolean;\r\n public dataSource: DataSource;\r\n public SearchText: string = \"\";\r\n public isAllowedCreate = false;\r\n public baseLink: string;\r\n\r\n public filters: any = {\r\n 1: [\"Status\", \"=\", new EdmLiteral(\"ServiceSight.Shared.Enums.SalesOrderStatus'Cancelled'\")],\r\n 2: [[\"Status\", \">\", new EdmLiteral(\"ServiceSight.Shared.Enums.SalesOrderStatus'Cancelled'\")],\r\n \"and\", [\"Status\", \"<\", new EdmLiteral(\"ServiceSight.Shared.Enums.SalesOrderStatus'Complete'\")]],\r\n 3: [\"Status\", \"=\", new EdmLiteral(\"ServiceSight.Shared.Enums.SalesOrderStatus'Complete'\")],\r\n };\r\n\r\n public ynDataSource = [\r\n { id: false, name: \"No\" },\r\n { id: true, name: \"Yes\" }\r\n ];\r\n\r\n public exportOptions: { id: number; label: string }[] = [\r\n { id: 1, label: \"Export data as xlsx\" },\r\n { id: 2, label: \"Export data as csv\" },\r\n { id: 3, label: \"Export data as pdf\" }\r\n ];\r\n\r\n public salesOrdersTypes: { id: SalesOrdersType; value: string }[] = [\r\n { id: SalesOrdersType.Equipment, value: \"Equipment\" },\r\n { id: SalesOrdersType.Parts, value: \"Parts\" },\r\n { id: SalesOrdersType.Materials, value: \"Materials\" },\r\n ];\r\n\r\n public orderStatus = SalesOrderStatus;\r\n public baseCurrencyCode = JSON.parse(localStorage.getItem(\"ls.BaseCurrencyCode\"));\r\n\r\n public userRefSales1Label: string;\r\n public userRefSales2Label: string;\r\n\r\n private gridState: any = { };\r\n\r\n constructor(\r\n private permissionsService: PermissionsService,\r\n private salesOrderService: SalesOrderService,\r\n private gridService: GridService,\r\n private router: Router,\r\n private gridExportService: GridExportService,\r\n private translate: TranslateService,\r\n private userRefsService: UserReferenceService,\r\n private moduleService: ModuleService,\r\n @Inject(\"AuthService\") authService: IAuthService,\r\n @Inject(\"RouterLinkService\") private routerLink: IRouterLinkService,\r\n @Inject(\"ShowCustomerName\") private showCustomerNameService: IShowCustomerName) {\r\n this.isPortal = authService.isPortalUser;\r\n this.routerLink.baseLink.subscribe(\r\n link => {\r\n this.baseLink = link;\r\n }\r\n );\r\n this.calculateStatusFilter = this.calculateStatusFilter.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.showCustomerNameService.ShowCustomerName().subscribe(res => this.showCustomerName = res);\r\n if (this.isPortal) {\r\n this.Load();\r\n } else {\r\n this.permissionsService.CurrentUserHasPermission(\"SalesOrderAdd\").subscribe(val => this.isAllowedCreate = val);\r\n this.permissionsService.CurrentUserHasPermission(\"SalesOrderView\").subscribe(isAllowedView => {\r\n if (isAllowedView) {\r\n this.Load();\r\n }\r\n });\r\n }\r\n this.moduleService.GetEnabledModules().subscribe(modules => {\r\n this.IsProEnabled = modules.includes(Module.Pro);\r\n });\r\n this.getUserReferenceLabels();\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public FilterChanged($event): void {\r\n const filterValue = $event.currentTarget.value;\r\n if (filterValue === \"0\") {\r\n this.dataGrid.instance.clearFilter();\r\n } else {\r\n this.dataGrid.instance.filter(this.filters[filterValue]);\r\n }\r\n }\r\n\r\n public SaveLayout(): void {\r\n const state = this.dataGrid.instance.state();\r\n this.gridService.SaveLayout(state, GridKind.SalesOrder);\r\n }\r\n\r\n public calculateStatusFilter(filterValue, selectedFilterOperation, filterType) {\r\n const column = this as any;\r\n\r\n if (filterValue === SalesOrdersType.Equipment) {\r\n return [[\"Type\", \"=\", SalesOrdersType.Equipment], \"or\", [\"Type\", \"=\", SalesOrdersType.EquipmentAndParts], \"or\",\r\n [\"Type\", \"=\", SalesOrdersType.EquipmentAndParts], \"or\", [\"Type\", \"=\", SalesOrdersType.All]];\r\n }\r\n else if (filterValue === SalesOrdersType.Parts) {\r\n return [[\"Type\", \"=\", SalesOrdersType.Parts], \"or\", [\"Type\", \"=\", SalesOrdersType.EquipmentAndParts], \"or\",\r\n [\"Type\", \"=\", SalesOrdersType.PartsAndMaterials], \"or\", [\"Type\", \"=\", SalesOrdersType.All]];\r\n }\r\n else if (filterValue === SalesOrdersType.Materials) {\r\n return [[\"Type\", \"=\", SalesOrdersType.Materials], \"or\", [\"Type\", \"=\", SalesOrdersType.EquipmentAndMaterials],\r\n \"or\", [\"Type\", \"=\", SalesOrdersType.PartsAndMaterials], \"or\", [\"Type\", \"=\", SalesOrdersType.All]];\r\n }\r\n\r\n return column.defaultCalculateFilterExpression(filterValue, selectedFilterOperation, filterType);\r\n }\r\n\r\n public ResetLayout(): void {\r\n this.gridService.ResetLayout(GridKind.SalesOrder);\r\n this.dataGrid.instance.state(null);\r\n this.gridState = null;\r\n }\r\n\r\n public OpenColumnChooser(): void {\r\n this.dataGrid.instance.showColumnChooser();\r\n }\r\n\r\n public onExportItemClick(e: any): void {\r\n const title = this.translate.instant(\"label.salesOrder\");\r\n switch (e.itemData.id) {\r\n case 1:\r\n this.gridExportService.exportGridAsXlsx(this.dataGrid.instance, title, this.salesOrderExcelCustomCellFunction);\r\n break;\r\n case 2:\r\n this.gridExportService.exportGridAsCsv(this.dataGrid.instance, title, this.salesOrderExcelCustomCellFunction);\r\n break;\r\n case 3:\r\n this.gridExportService.exportGridAsPdf(this.dataGrid.instance, title, { orientation: \"l\" }, this.salesOrderPdfCustomCellFunction);\r\n break;\r\n default:\r\n throw new Error(\"Unhandled export type: \" + e.itemData.id);\r\n }\r\n }\r\n\r\n public columnVisible(name: string, defaultValue: boolean): boolean {\r\n if (this.gridState && this.gridState.columns) {\r\n const column = this.gridState.columns.find(x => x.name === name);\r\n\r\n if (column) {\r\n return column.visible;\r\n }\r\n }\r\n\r\n return defaultValue;\r\n }\r\n\r\n public GoToSalesOrder(id: string): void {\r\n this.router.navigate([\"/sales-orders\", \"detail\", id]);\r\n }\r\n\r\n public get UseRouterLink() {\r\n return !this.baseLink.includes(\"#\");\r\n }\r\n\r\n public onInitialized(e): void {\r\n e.component.option(\"syncLookupFilterValues\", false);\r\n }\r\n\r\n private getUserReferenceLabels(): void {\r\n this.userRefSales1Label = this.userRefsService.getLabel(UICustomisation.SALES_REF1);\r\n this.userRefSales2Label = this.userRefsService.getLabel(UICustomisation.SALES_REF2);\r\n }\r\n\r\n private GetDataSources(): void {\r\n this.dataSource = this.salesOrderService.GetDataSource();\r\n }\r\n\r\n private Load() {\r\n this.gridService.GetLayout(GridKind.SalesOrder).subscribe(value => {\r\n if (value) {\r\n value.searchText = \"\";\r\n this.gridState = value;\r\n this.dataGrid.instance.state(value);\r\n }\r\n this.GetDataSources();\r\n }, () => this.GetDataSources());\r\n }\r\n\r\n private salesOrderExcelCustomCellFunction = ({ gridCell, excelCell }): void => {\r\n if (gridCell.rowType === \"data\" && gridCell.value) {\r\n if (gridCell.column.dataField === \"Type\") {\r\n excelCell.value = this.getSalesOrderTypeText(gridCell.data);\r\n }\r\n }\r\n };\r\n\r\n private salesOrderPdfCustomCellFunction = ({ gridCell, pdfCell }): void => {\r\n if (gridCell.rowType === \"data\" && gridCell.value) {\r\n if (gridCell.column.dataField === \"Type\") {\r\n pdfCell.text = this.getSalesOrderTypeText(gridCell.data);\r\n }\r\n }\r\n };\r\n\r\n private getSalesOrderTypeText(salesOrderData: any): string {\r\n let typeValue = \"\";\r\n if (salesOrderData.IncludeEquipment) {\r\n typeValue += \"Equipment\";\r\n }\r\n if (salesOrderData.IncludeParts) {\r\n if (typeValue) {\r\n typeValue += \", \";\r\n }\r\n typeValue += \"Parts\";\r\n }\r\n if (salesOrderData.IncludeMaterials) {\r\n if (typeValue) {\r\n typeValue += \", \";\r\n }\r\n typeValue += \"Materials\";\r\n }\r\n\r\n return typeValue;\r\n }\r\n}\r\n","\r\n","import { Location } from \"@angular/common\";\r\nimport { Component, Inject, Input, OnDestroy, OnInit } from \"@angular/core\";\r\nimport { combineLatest, Subscription } from \"rxjs\";\r\nimport { Module } from \"../../enums/module.enum\";\r\nimport { SecondLevelNavItemModel } from \"../../models/second-level-nav-item.model\";\r\nimport { TopLevelNavItem } from \"../../models/top-level-nav-item.model\";\r\nimport { IAuthService } from \"../../services/interfaces/iauth.service\";\r\nimport { ModuleService } from \"../../services/module/module.service\";\r\nimport { PermissionsService } from \"../../services/permissions-service.service\";\r\n\r\n@Component({\r\n selector: \"lib-second-level-navigation\",\r\n templateUrl: \"./second-level-navigation.component.html\",\r\n styleUrls: [\"./second-level-navigation.component.scss\"]\r\n})\r\nexport class SecondLevelNavigationComponent implements OnInit, OnDestroy {\r\n @Input() public hasAnyDevice: boolean = false;\r\n\r\n public navTree: TopLevelNavItem[] = [{\r\n Id: \"dashboard\",\r\n MatchingRootPath: /^$|\\#\\/$|insights/,\r\n Items: [{\r\n translationKey: \"menu.dashboard\",\r\n jsRoute: \"/#/\",\r\n routeSegments: [\"/\"],\r\n get isActive() {\r\n return window.location.hash === \"/\" || window.location.hash === \"#/\";\r\n }\r\n }, {\r\n translationKey: \"menu.insights\",\r\n routeSegments: [\"/insights\", \"dashboard\"],\r\n enabled: () => this.powerBiEnabled\r\n }]\r\n }, {\r\n Id: \"customers\",\r\n MatchingRootPath: /customers|contacts|quotes|sales-campaigns|sales-opportunities|surveys/,\r\n Items: [\r\n {\r\n translationKey: \"menu.customers\",\r\n jsRoute: \"/#/customers/list\",\r\n routeSegments: [\"/customers\", \"list\"],\r\n get isActive() {\r\n return window.location.hash.includes(\"customers/list\");\r\n }\r\n },\r\n {\r\n translationKey: \"menu.contacts\",\r\n jsRoute: \"/#/contacts/list\",\r\n routeSegments: [\"/contacts\", \"list\"],\r\n get isActive() {\r\n return window.location.hash.includes(\"contacts/list\");\r\n },\r\n enabled: () => this.customerContactsPermission\r\n },\r\n {\r\n translationKey: \"sales-campaigns.list.title\",\r\n routeSegments: [\"/sales-campaigns\", \"list\"],\r\n enabled: () => this.salesCampaignsEnabled\r\n },\r\n {\r\n translationKey: \"sales-opportunity.list.title\",\r\n routeSegments: [\"/sales-opportunities\", \"list\"],\r\n enabled: () => this.salesOpportunityEnabled\r\n },\r\n {\r\n translationKey: \"quotes.list.title\",\r\n routeSegments: [\"/quotes\", \"list\"],\r\n tag: \"quotes\",\r\n enabled: () => this.quotesPermission\r\n },\r\n {\r\n translationKey: \"surveys.list.title\",\r\n routeSegments: [\"/surveys\", \"list\"],\r\n tag: \"surveys\",\r\n enabled: () => this.surveysEnabled\r\n }\r\n ]\r\n }, {\r\n Id: \"jobs\",\r\n MatchingRootPath: /jobs|inspections|planner|plannerboard/,\r\n Items: [\r\n {\r\n translationKey: \"menu.jobs\",\r\n routeSegments: [\"/jobs\", \"list\"],\r\n tag: \"jobs\"\r\n },\r\n {\r\n translationKey: \"menu.inspections\",\r\n routeSegments: [\"/inspections\", \"list\"],\r\n tag: \"inspections\",\r\n enabled: () => this.inspectionViewPermission\r\n },\r\n {\r\n translationKey: \"menu.planner\",\r\n routeSegments: [\"/planner\", \"calendar\"],\r\n tag: \"planner\",\r\n enabled: () => this.plannerBoardPermission\r\n },\r\n {\r\n translationKey: \"menu.recurringjobs\",\r\n routeSegments: [\"/jobs\", \"recurringjobs\"],\r\n tag: \"recurringjobs\",\r\n enabled: () => this.recurringJobsEnabled && this.proEnabled\r\n },\r\n {\r\n translationKey: \"menu.projects\",\r\n routeSegments: [\"/jobs\", \"projects\"],\r\n tag: \"projects\",\r\n enabled: () => this.projectsEnabled\r\n }\r\n ]\r\n }, {\r\n Id: \"equipment\",\r\n MatchingRootPath: /equipment/,\r\n Items: [\r\n {\r\n translationKey: \"equipment.title\",\r\n routeSegments: [\"/equipment\", \"list\"],\r\n tag: \"equipment\",\r\n enabled: () => this.equipmentEnabled\r\n },\r\n {\r\n translationKey: \"devices.title\",\r\n routeSegments: [\"/equipment\", \"devices\"],\r\n tag: \"devices\",\r\n enabled: () => this.hasAnyDevice\r\n },\r\n {\r\n translationKey: \"equipment.stock.title\",\r\n routeSegments: [\"/equipment\", \"stock\"],\r\n tag: \"equipmentStock\",\r\n enabled: () => this.equipmentEnabled && this.proEnabled\r\n },\r\n {\r\n translationKey: \"equipment.reordering.title\",\r\n routeSegments: [\"/equipment\", \"reordering\"],\r\n tag: \"reordering\",\r\n enabled: () => this.equipmentEnabled && this.proEnabled\r\n }\r\n ]\r\n }, {\r\n Id: \"stock\",\r\n MatchingRootPath: /stock/,\r\n Items: [\r\n {\r\n translationKey: \"stock.list.heading\",\r\n routeSegments: [\"/stock\", \"list\"],\r\n tag: \"stock\"\r\n },\r\n {\r\n translationKey: \"stock.stock.adjustments\",\r\n routeSegments: [\"/stock\", \"adjustment-list\"],\r\n tag: \"stockAdjustments\",\r\n enabled: () => this.stockAdjustmentPermission\r\n },\r\n {\r\n translationKey: \"stock.reordering\",\r\n routeSegments: [\"/stock\", \"reordering\"],\r\n tag: \"stockReordering\",\r\n enabled: () => this.proEnabled && this.purchaseOrdersEnabled\r\n }\r\n ]\r\n }, {\r\n Id: \"fgas\",\r\n MatchingRootPath: /f-gas/,\r\n Items: [\r\n {\r\n translationKey: \"f-gas.log\",\r\n routeSegments: [\"/f-gas\", \"log\"],\r\n tag: \"f-gas\"\r\n },\r\n {\r\n translationKey: \"f-gas.cylinders\",\r\n routeSegments: [\"/f-gas\", \"cylinders\", \"list\"],\r\n tag: \"f-gas\"\r\n },\r\n {\r\n translationKey: \"f-gas.waste-transfer-notes\",\r\n routeSegments: [\"/f-gas\", \"waste-transfer-notes\", \"list\"],\r\n tag: \"f-gas\"\r\n }\r\n ]\r\n }, {\r\n Id: \"purchases\",\r\n MatchingRootPath: /purchase-orders|goods-received|suppliers|purchase-notes|returns/,\r\n Items: [\r\n {\r\n translationKey: \"purchase-orders.list.title\",\r\n routeSegments: [\"/purchase-orders\", \"list\"],\r\n tag: \"purchaseorders\"\r\n },\r\n {\r\n translationKey: \"goods-received.list.title\",\r\n routeSegments: [\"/goods-received\", \"list\"],\r\n tag: \"goodsreceived\"\r\n },\r\n {\r\n translationKey: \"returns-note.list.title\",\r\n routeSegments: [\"/returns\", \"list\"],\r\n tag: \"returns\",\r\n enabled: () => this.proEnabled\r\n },\r\n {\r\n translationKey: \"purchase-notes.list.title\",\r\n routeSegments: [\"/purchase-notes\", \"list\"],\r\n tag: \"purchaseNotes\",\r\n enabled: () => this.proEnabled && this.purchaseOrdersEnabled\r\n },\r\n {\r\n translationKey: \"suppliers.list.title\",\r\n routeSegments: [\"/suppliers\", \"list\"],\r\n tag: \"suppliers\",\r\n enabled: () => this.purchaseOrdersEnabled\r\n }\r\n ]\r\n }, {\r\n Id: \"sales\",\r\n MatchingRootPath: /sales-orders|despatch-notes/,\r\n Items: [\r\n {\r\n translationKey: \"salesorder.list.title\",\r\n routeSegments: [\"/sales-orders\", \"list\"],\r\n tag: \"salesorders\"\r\n },\r\n {\r\n translationKey: \"despatch-notes.list.title\",\r\n routeSegments: [\"/despatch-notes\", \"list\"],\r\n tag: \"despatchnotes\"\r\n }\r\n ]\r\n }, {\r\n Id: \"contracts\",\r\n MatchingRootPath: /contracts/,\r\n Items: []\r\n }, {\r\n Id: \"invoicing\",\r\n MatchingRootPath: /invoices|credit-notes/,\r\n Items: [\r\n {\r\n translationKey: \"menu.invoices\",\r\n routeSegments: [\"/invoices\", \"list\"],\r\n jsRoute: \"/#/invoices/list\",\r\n tag: \"invoices\",\r\n get isActive() {\r\n return window.location.hash.includes(\"invoices/list\");\r\n }\r\n },\r\n {\r\n translationKey: \"batch-invoices.list.title\",\r\n routeSegments: [\"/invoices\", \"batch-list\"],\r\n tag: \"invoices/batch-list\",\r\n enabled: () => this.proEnabled\r\n },\r\n {\r\n translationKey: \"creditNotes.list.title\",\r\n routeSegments: [\"/credit-notes\", \"list\"],\r\n tag: \"credit-notes\",\r\n enabled: () => this.proEnabled\r\n }\r\n ]\r\n }, {\r\n Id: \"reminders\",\r\n MatchingRootPath: /tasks/,\r\n Items: []\r\n }, {\r\n Id: \"messages\",\r\n MatchingRootPath: /messages/,\r\n Items: []\r\n }, {\r\n Id: \"helpdesk\",\r\n MatchingRootPath: /helpdesk/,\r\n Items: [\r\n {\r\n translationKey: \"menu.helpdesk.dashboard\",\r\n routeSegments: [\"/helpdesk\", \"dashboard\"],\r\n tag: \"helpdesk/dashboard\"\r\n },\r\n {\r\n translationKey: \"menu.helpdesk.tickets\",\r\n routeSegments: [\"/helpdesk\", \"list\"],\r\n tag: \"helpdesk/list\",\r\n }\r\n ]\r\n }];\r\n\r\n public items: SecondLevelNavItemModel[] = [];\r\n public isMarketing: boolean;\r\n public showItems: boolean = false;\r\n\r\n private salesCampaignsEnabled: boolean;\r\n private salesOpportunityEnabled: boolean;\r\n private proEnabled: boolean;\r\n private purchaseOrdersEnabled: boolean;\r\n private recurringJobsEnabled: boolean;\r\n private equipmentEnabled: boolean;\r\n private powerBiEnabled: boolean;\r\n private surveysEnabled: boolean;\r\n private projectsEnabled: boolean;\r\n\r\n private inspectionViewPermission: boolean;\r\n private plannerBoardPermission: boolean;\r\n private stockAdjustmentPermission: boolean;\r\n private quotesPermission: boolean;\r\n private customerContactsPermission: boolean;\r\n\r\n private authSub: Subscription;\r\n private dataSub: Subscription;\r\n private onUrlChangeUnsubscribe: VoidFunction;\r\n\r\n constructor(\r\n private location: Location,\r\n private moduleService: ModuleService,\r\n private permissionService: PermissionsService,\r\n @Inject(\"AuthService\") private authService: IAuthService) {\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.authSub = this.authService.IsAuthenticated.subscribe(isAuthenticated => {\r\n\r\n if (!isAuthenticated) {\r\n return;\r\n }\r\n\r\n if (this.dataSub) {\r\n this.dataSub.unsubscribe();\r\n }\r\n\r\n this.dataSub = combineLatest([\r\n this.moduleService.GetEnabledModules(),\r\n this.permissionService.CurrentUserHasPermissions(\"InspectionView\", \"JobPlannerboard\", \"StockAdjustmentView\", \"QuoteView\", \"CustomerContactView\")\r\n ]).subscribe(([modules, permissions]) => {\r\n this.salesCampaignsEnabled = modules.includes(Module.SalesCampaigns);\r\n this.salesOpportunityEnabled = modules.includes(Module.SalesOpportunity);\r\n this.proEnabled = modules.includes(Module.Pro);\r\n this.purchaseOrdersEnabled = modules.includes(Module.PurchaseOrders);\r\n this.recurringJobsEnabled = modules.includes(Module.RecurringJobs);\r\n this.powerBiEnabled = modules.includes(Module.PowerBI);\r\n this.surveysEnabled = modules.includes(Module.CustomerFeedback);\r\n this.equipmentEnabled = modules.includes(Module.Equipment);\r\n this.projectsEnabled = modules.includes(Module.Projects);\r\n\r\n this.inspectionViewPermission = permissions.InspectionView;\r\n this.plannerBoardPermission = permissions.JobPlannerboard;\r\n this.stockAdjustmentPermission = permissions.StockAdjustmentView;\r\n this.quotesPermission = permissions.QuoteView;\r\n this.customerContactsPermission = permissions.CustomerContactView;\r\n\r\n this.LocationChanged();\r\n });\r\n });\r\n\r\n this.onUrlChangeUnsubscribe = this.location.onUrlChange(this.LocationChanged.bind(this));\r\n addEventListener(\"hashchange\", this.LocationChanged.bind(this));\r\n addEventListener(\"popstate\", this.LocationChanged.bind(this));\r\n\r\n this.LocationChanged();\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n if (this.authSub) {\r\n this.authSub.unsubscribe();\r\n this.authSub = null;\r\n }\r\n\r\n if (this.dataSub) {\r\n this.dataSub.unsubscribe();\r\n this.dataSub = null;\r\n }\r\n\r\n if (this.onUrlChangeUnsubscribe) {\r\n this.onUrlChangeUnsubscribe();\r\n this.onUrlChangeUnsubscribe = null;\r\n }\r\n\r\n removeEventListener(\"hashchange\", this.LocationChanged.bind(this));\r\n removeEventListener(\"popstate\", this.LocationChanged.bind(this));\r\n }\r\n\r\n private LocationChanged() {\r\n this.SetItems(window.location.href);\r\n }\r\n\r\n private SetItems(url: string): void {\r\n this.isMarketing = url.endsWith(\"marketing\");\r\n let matchFound = false;\r\n for (const nav of this.navTree) {\r\n if (nav.MatchingRootPath.test(url)) {\r\n this.items = nav.Items;\r\n matchFound = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!matchFound) {\r\n this.items = [];\r\n }\r\n\r\n this.showItems = this.items.filter(n => !n.enabled || n.enabled()).length > 1;\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Injectable, Inject } from \"@angular/core\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"../models/app-config.model\";\r\nimport { JobVisitListItem } from \"../models/job-visit\";\r\nimport { IODataService } from \"./interfaces/iodata.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class JobVisitDataService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(\"ODataService\") private odataService: IODataService,\r\n @Inject(APP_CONFIG) private config: IAppConfig) { }\r\n\r\n public GetDataStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: this.config.apiLocations.ServiceSightOData + \"JobVisitOD\",\r\n key: \"CompositeKey\",\r\n keyType: \"String\"\r\n });\r\n }\r\n\r\n //TODO: move to Jobs service\r\n public GetJobsDataStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: this.config.apiLocations.ServiceSightOData + \"JobOD\",\r\n key: \"JobID\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetJobVisits(jobId: number): Observable {\r\n return this.http.get(this.config.apiLocations.ServiceSight + \"JobVisit/GetJobVisits?jobId=\" + jobId);\r\n }\r\n}\r\n","import { Component, EventEmitter, Input, Output } from \"@angular/core\";\r\nimport { JobVisitDataService } from \"../../services/job-visit-data.service\";\r\nimport { JobVisitListItem } from \"../../models/job-visit\";\r\nimport { JobSessionModel } from \"../../models/job-session.model\";\r\n\r\n@Component({\r\n selector: \"lib-select-job-visit\",\r\n templateUrl: \"./select-job-visit.component.html\",\r\n styleUrls: [\"./select-job-visit.component.scss\"]\r\n})\r\nexport class SelectJobVisitComponent {\r\n\r\n @Input() jobId: number;\r\n @Input() siteId: number;\r\n @Input() formName: string;\r\n @Output() selected: EventEmitter = new EventEmitter();\r\n\r\n public jobVisitCollection: JobVisitListItem[] = [];\r\n public selectedVisit: JobSessionModel[] = [];\r\n public showDialog: boolean = false;\r\n\r\n public get IsJobSessionSelected(): boolean {\r\n return this.selectedVisit.length > 0;\r\n }\r\n\r\n public constructor(\r\n private service: JobVisitDataService) {\r\n }\r\n\r\n public Show(): void {\r\n this.selectedVisit = [];\r\n this.service.GetJobVisits(this.jobId).subscribe(visits => {\r\n this.jobVisitCollection = visits;\r\n });\r\n this.showDialog = true;\r\n }\r\n\r\n public Cancel(): void {\r\n this.showDialog = false;\r\n }\r\n\r\n public SelectItem(): void {\r\n if (this.IsJobSessionSelected) {\r\n this.selected.emit(this.selectedVisit[0].SessionID);\r\n }\r\n this.showDialog = false;\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n","export enum ServiceContractStatus {\r\n Cancelled = 0,\r\n Entry = 100,\r\n Quoted = 150,\r\n Requested = 190,\r\n Active = 300,\r\n ActiveInvoice = 350,\r\n TerminatedAwaitingReadings = 700,\r\n Terminated = 710,\r\n InvoiceMarked = 720,\r\n Completed = 800,\r\n Archived = 900\r\n}\r\n\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { ServiceContractStatus } from \"../../enums/service-contract-status.enum\";\r\n\r\n/**\r\n * Converts a service contract status (string or number) to its translated string\r\n */\r\n@Pipe({\r\n name: \"serviceContractStatus\"\r\n})\r\nexport class ServiceContractStatusPipe implements PipeTransform {\r\n /**\r\n * Returns the string value of a service contract enum\r\n * @param value The numerical value of the status\r\n */\r\n private static transformFromEnum(value: number): string {\r\n return ServiceContractStatus[value];\r\n }\r\n\r\n /**\r\n * Transforms the string or numerical value representing service contract status to its translation key\r\n * @param value The service contract status as a string or number\r\n */\r\n transform(value: string | number): string {\r\n let stringVal = value;\r\n\r\n if (typeof value === \"number\") {\r\n stringVal = ServiceContractStatusPipe.transformFromEnum(value);\r\n }\r\n\r\n return stringVal ? `service.contract.status.${stringVal}` : \"\";\r\n }\r\n}\r\n\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { BehaviorSubject } from \"rxjs\";\r\nimport { ServiceContractPermissions } from \"../models/service-contract-permissions\";\r\nimport { IAppConfig, APP_CONFIG } from \"../models/app-config.model\";\r\n\r\n/**\r\n * Service Contract Permissions\r\n * todo: potential improvement reload is called excessively\r\n */\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class ServiceContractPermissionService {\r\n /**\r\n * Can Add a Contract Type\r\n */\r\n public AddContractTypePermission: BehaviorSubject = new BehaviorSubject(false);\r\n /**\r\n * Can Add a Contract\r\n */\r\n public AddContractPermission: BehaviorSubject = new BehaviorSubject(false);\r\n /**\r\n * Can View Contracts\r\n */\r\n public ViewContractPermission: BehaviorSubject = new BehaviorSubject(false);\r\n constructor(private http: HttpClient,\r\n @Inject(APP_CONFIG) protected config: IAppConfig) {\r\n this.Reload();\r\n }\r\n\r\n /**\r\n * Fetches the permissions and emits permission values\r\n */\r\n public Reload() {\r\n this.http.get(`${this.config.apiLocations.ServiceContracts}Permissions`)\r\n .subscribe(p => {\r\n this.AddContractTypePermission.next(p.ContractTypeAdd);\r\n this.AddContractPermission.next(p.ContractAdd);\r\n this.ViewContractPermission.next(p.ContractView);\r\n });\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { Observable } from \"rxjs\";\r\nimport { map } from \"rxjs/operators\";\r\nimport { IODataService } from \"./interfaces/iodata.service\";\r\nimport { PageableDatastoreService } from \"./pageable-datastore.service\";\r\nimport { IAppConfig, APP_CONFIG } from \"../models/app-config.model\";\r\n\r\n/**\r\n * Service to manage service contract data\r\n */\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class ServiceContractsService extends PageableDatastoreService {\r\n private static readonly odataKey: string = \"MaintContractId\";\r\n\r\n constructor(\r\n @Inject(\"ODataService\") private odataService: IODataService,\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) protected config: IAppConfig\r\n ) {\r\n super(ServiceContractsService.odataKey);\r\n }\r\n\r\n /**\r\n * Returns the OData source for contracts\r\n */\r\n protected GetDataSourceObject(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url : this.config.apiLocations.ServiceContractsOData + \"ContractOData\",\r\n key: ServiceContractsService.odataKey,\r\n keyType: \"String\",\r\n paging: true,\r\n pageSize: 50,\r\n fieldTypes: {\r\n MaintContractId: \"String\",\r\n Customer: \"Int32\",\r\n }\r\n });\r\n }\r\n\r\n public GetEquipmentContractDataSource(equipmentId: number): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.ServiceContractsOData}EquipmentContractOData(${equipmentId})`,\r\n key: ServiceContractsService.odataKey,\r\n keyType: \"String\",\r\n paging: true,\r\n pageSize: 50,\r\n fieldTypes: {\r\n MaintContractId: \"String\",\r\n Customer: \"Int32\",\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Gets The view permission for the page\r\n * @param actionName The action being performed (MaintContractView)\r\n */\r\n public GetViewPermission(actionName: string): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Dashboard/GetWidgetViewPermission?securityActionName=${actionName}`)\r\n .pipe(map((res: any) => res.IsAllowedView));\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { ServiceContractStatus } from \"../enums/service-contract-status.enum\";\r\n\r\n@Pipe({\r\n name: \"serviceContractStatusColour\"\r\n})\r\nexport class ServiceContractStatusColourPipe implements PipeTransform {\r\n\r\n private readonly cssClass = {\r\n [ServiceContractStatus.Cancelled]: \"\",\r\n [ServiceContractStatus.Entry]: \"clrred\",\r\n [ServiceContractStatus.Quoted]: \"clrred\",\r\n [ServiceContractStatus.Requested]: \"clrred\",\r\n [ServiceContractStatus.Active]: \"clrgreen\",\r\n [ServiceContractStatus.ActiveInvoice]: \"clrgreen\",\r\n [ServiceContractStatus.TerminatedAwaitingReadings]: \"clryellow\",\r\n [ServiceContractStatus.Terminated]: \"clryellow\",\r\n [ServiceContractStatus.InvoiceMarked]: \"\",\r\n [ServiceContractStatus.Completed]: \"\",\r\n [ServiceContractStatus.Archived]: \"\"\r\n };\r\n transform(value: string | number): any {\r\n let numericValue = value;\r\n\r\n if (typeof value === \"string\") {\r\n numericValue = ServiceContractStatus[value];\r\n }\r\n\r\n return this.cssClass[numericValue];\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'service.contract.list.service.contract.list' | translate }}

\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n
\r\n
{{ item.data.Status | serviceContractStatus | translate }}
\r\n
\r\n
\r\n \r\n
\r\n
\r\n {{ data.value | customDate: 'shortDate' }}\r\n
\r\n
\r\n
\r\n","import { Component, Inject, OnInit, ViewChild } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { EdmLiteral } from \"devextreme/data/odata/utils\";\r\nimport { GridKind } from \"../../enums/grid-kind.enum\";\r\nimport { Module } from \"../../enums/module.enum\";\r\nimport { ServiceContractStatus } from \"../../enums/service-contract-status.enum\";\r\nimport { UICustomisation } from \"../../enums/ui-customisation.enum\";\r\nimport { IUserReferences } from \"../../models/user-references.model\";\r\nimport { CurrencyPipe } from \"../../pipes/currency.pipe\";\r\nimport { ServiceContractStatusPipe } from \"../../pipes/enums/service-contract-status.pipe\";\r\nimport { GridExportService } from \"../../services/grid-export.service\";\r\nimport { GridService } from \"../../services/grid.service\";\r\nimport { IAuthService } from \"../../services/interfaces/iauth.service\";\r\nimport { IRouterLinkService } from \"../../services/interfaces/irouter-link.service\";\r\nimport { ModuleService } from \"../../services/module/module.service\";\r\nimport { ServiceContractPermissionService } from \"../../services/service-contract-persmission.service\";\r\nimport { ServiceContractsService } from \"../../services/service-contracts.service\";\r\n\r\n/**\r\n * Controls the Service Contracts List\r\n */\r\n@Component({\r\n selector: \"lib-service-contracts-list\",\r\n templateUrl: \"./service-contracts-list.component.html\",\r\n styleUrls: [\r\n \"./service-contracts-list.component.scss\",\r\n \"../../styles/global.scss\",\r\n \"../../styles/backgrounds.scss\",\r\n \"../../styles/servicesight-shared.scss\"\r\n ],\r\n})\r\nexport class ServiceContractsListComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) private grid: DxDataGridComponent;\r\n private readonly baseCurrencyCode: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencyCode\"));\r\n isPortal: boolean = false;\r\n public isProEnabled = false;\r\n isAllowedCreateContract: boolean = false;\r\n SearchText: string = \"\";\r\n baseLink: string;\r\n serviceContractDataSource: DataSource = null;\r\n filters: any = {\r\n 1: [\r\n [\"Status\", \"=\", ServiceContractStatus.Active],\r\n \"or\", [\"Status\", \"=\", ServiceContractStatus.ActiveInvoice]\r\n ], // default filter\r\n 2: [\r\n [\"Status\", \"=\", ServiceContractStatus.Quoted],\r\n \"or\", [\"Status\", \"=\", ServiceContractStatus.Requested],\r\n \"or\", [\"Status\", \"=\", ServiceContractStatus.Entry]\r\n ],\r\n 3: [\r\n [\"Status\", \"=\", ServiceContractStatus.Terminated],\r\n \"or\", [\"Status\", \"=\", ServiceContractStatus.TerminatedAwaitingReadings]\r\n ],\r\n };\r\n customers: any = [];\r\n\r\n public uploadEnabled: boolean = false;\r\n public uploads: { value: string; name: string }[];\r\n public UICustomisations: IUserReferences;\r\n public UserRef1Label: string;\r\n public UserRef2Label: string;\r\n public ynDataSource = [{ id: false, name: \"No\" }, { id: true, name: \"Yes\" }];\r\n private gridState: any = {};\r\n\r\n constructor(\r\n @Inject(\"RouterLinkService\") private routerLinkService: IRouterLinkService,\r\n @Inject(\"AuthService\") authService: IAuthService,\r\n private moduleService: ModuleService,\r\n private serviceContractsService: ServiceContractsService,\r\n private serviceContractsPermissionService: ServiceContractPermissionService,\r\n private gridService: GridService,\r\n private currencyPipe: CurrencyPipe,\r\n private statusPipe: ServiceContractStatusPipe,\r\n private translator: TranslateService,\r\n public gridExportService: GridExportService,\r\n private router: Router\r\n ) {\r\n this.isPortal = authService.isPortalUser;\r\n this.uploadEnabled = !authService.isPortalUser;\r\n this.StatusToText = this.StatusToText.bind(this);\r\n this.FormatCurrency = this.FormatCurrency.bind(this);\r\n this.CalculateSearchFilterForMaintContactId = this.CalculateSearchFilterForMaintContactId.bind(this);\r\n }\r\n\r\n /**\r\n * ngOnInit:\r\n * - Performs a permission check to see if the user can add a new contract\r\n * - Performs a permission check to see if the user can view contract data\r\n * - Loads the data sources\r\n */\r\n ngOnInit() {\r\n this.routerLinkService.serviceContractDetailsBaseLink.subscribe(link => this.baseLink = link);\r\n this.GetUserReferences();\r\n this.moduleService.GetEnabledModules().subscribe(o => {\r\n this.isProEnabled = o.includes(Module.Pro);\r\n\r\n if (o.includes(Module.ServiceContract)) {\r\n this.GetDataSources();\r\n }\r\n });\r\n // hide button while we are waiting for the permissions to load\r\n this.isAllowedCreateContract = false;\r\n this.serviceContractsPermissionService.Reload();\r\n this.serviceContractsPermissionService.AddContractPermission\r\n .subscribe(permission => this.isAllowedCreateContract = permission);\r\n\r\n this.uploads = [\r\n {\r\n value: \"contracts\",\r\n name: this.translator.instant(\"service.contract.list.upload.contracts\")\r\n },\r\n {\r\n value: \"site\",\r\n name: this.translator.instant(\"service.contract.list.upload.sites\")\r\n },\r\n {\r\n value: \"equipment\",\r\n name: this.translator.instant(\"service.contract.list.upload.equipment\")\r\n }\r\n ];\r\n }\r\n\r\n /**\r\n * Loads the required data sources for this view\r\n */\r\n GetDataSources() {\r\n this.gridService.GetLayout(GridKind.Contracts).subscribe(value => {\r\n if (value) {\r\n this.gridState = value;\r\n this.grid.instance.state(value);\r\n }\r\n });\r\n this.serviceContractDataSource = this.serviceContractsService.GetDataSource(true);\r\n }\r\n\r\n /**\r\n * Called when the search text is changed\r\n */\r\n public SearchTextChanged(): void {\r\n this.grid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n /**\r\n * Called when the filter is changed\r\n * @param $event The event object\r\n */\r\n public OnFilterChange($event): void {\r\n const filterValue = $event.currentTarget.value;\r\n if (filterValue === \"0\") {\r\n this.grid.instance.clearFilter(\"dataSource\");\r\n } else {\r\n this.grid.instance.filter(this.filters[filterValue]);\r\n }\r\n }\r\n\r\n /**\r\n * Saves the grid layout\r\n */\r\n SaveLayout() {\r\n const state = this.grid.instance.state();\r\n this.gridService.SaveLayout(state, GridKind.Contracts);\r\n }\r\n\r\n /**\r\n * Resets the grid layout\r\n */\r\n ResetLayout() {\r\n this.gridService.ResetLayout(GridKind.Contracts);\r\n this.grid.instance.state(null);\r\n this.gridState = null;\r\n }\r\n\r\n\r\n StatusToText(rowData) {\r\n const { Status } = rowData;\r\n const piped = this.statusPipe.transform(Status);\r\n const translated = this.translator.instant(piped);\r\n return translated;\r\n }\r\n\r\n public FormatCurrency(rowData: any): string {\r\n const { AnnualCharge } = rowData;\r\n return this.currencyPipe.transform(AnnualCharge, this.baseCurrencyCode);\r\n }\r\n\r\n public UploadSelected(value: string): void {\r\n switch (value) {\r\n case \"contracts\":\r\n this.router.navigate([\"/contracts/upload\"]);\r\n break;\r\n case \"site\":\r\n this.router.navigate([\"/contracts/upload/sites\"]);\r\n break;\r\n case \"equipment\":\r\n this.router.navigate([\"/contracts/upload/equipment\"]);\r\n break;\r\n default:\r\n throw new Error(\"Unhandled upload type\");\r\n }\r\n }\r\n\r\n public viewDetails(event) {\r\n this.router.navigate([this.baseLink, event.data.MaintContractId]);\r\n }\r\n\r\n public CalculateSearchFilterForMaintContactId(filterValue: string, selectedFilterOperation: string, target: string): EdmLiteral[] {\r\n return this.CalculateSearchFilter(\"MaintContractId\", filterValue, selectedFilterOperation, target);\r\n }\r\n\r\n public exportOptions: { id: number; label: string }[] = [\r\n { id: 1, label: \"Export data as xlsx\" },\r\n { id: 2, label: \"Export data as csv\" },\r\n { id: 3, label: \"Export data as pdf\" }\r\n ];\r\n\r\n public onExportItemClick(e: any): void {\r\n switch (e.itemData.id) {\r\n case 1:\r\n this.gridExportService.exportGridAsXlsx(this.grid.instance, \"Contracts\");\r\n break;\r\n case 2:\r\n this.gridExportService.exportGridAsCsv(this.grid.instance, \"Contracts\");\r\n break;\r\n case 3:\r\n this.gridExportService.exportGridAsPdf(this.grid.instance, \"Contracts\", { orientation: \"l\" });\r\n break;\r\n default:\r\n throw new Error(\"Unhandled export type: \" + e.itemData.id);\r\n }\r\n }\r\n\r\n public OpenColumnChooser(): void {\r\n this.grid.instance.showColumnChooser();\r\n }\r\n\r\n public columnVisible(name: string, defaultValue: boolean): boolean {\r\n if (this.gridState && this.gridState.columns) {\r\n const column = this.gridState.columns.find(x => x.name === name);\r\n\r\n if (column) {\r\n return column.visible;\r\n }\r\n }\r\n\r\n return defaultValue;\r\n }\r\n\r\n private CalculateSearchFilter(column: string, filterValue: string, selectedFilterOperation: string, target: string): EdmLiteral[] {\r\n if (target === \"search\") {\r\n return [\r\n new EdmLiteral(`cast(${column}, 'Edm.String')`),\r\n \"contains\",\r\n `${filterValue}`,\r\n ];\r\n }\r\n return [\r\n column,\r\n selectedFilterOperation,\r\n filterValue\r\n ];\r\n }\r\n\r\n private GetUserReferences(): void {\r\n this.UICustomisations = JSON.parse(localStorage.getItem(\"ls.userReferences\"));\r\n if (this.UICustomisations) {\r\n const userRefCylinder1 = this.UICustomisations.list.filter((i) => i.UICustomisationID === UICustomisation.MAINT_CONTRACT_REF1)[0];\r\n this.UserRef1Label = userRefCylinder1.CustomText || userRefCylinder1.OriginalText;\r\n const userRefCylinder2 = this.UICustomisations.list.filter((i) => i.UICustomisationID === UICustomisation.MAINT_CONTRACT_REF2)[0];\r\n this.UserRef2Label = userRefCylinder2.CustomText || userRefCylinder2.OriginalText;\r\n }\r\n }\r\n}\r\n","export enum ServicePartsSorting {\r\n Default,\r\n PartNo,\r\n Description\r\n}\r\n","export enum ServicingComponentUsageEnum {\r\n Customers,\r\n Equipments,\r\n MakeModelSettings,\r\n ServiceGroups\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"../models/app-config.model\";\r\nimport { StockUserRef } from \"../models/stock-user-ref.model\";\r\nimport { OdataService } from \"../services/odata.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class StockService {\r\n\r\n constructor(\r\n private odataService: OdataService,\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private config: IAppConfig) {\r\n }\r\n\r\n public GetStockParts(removePaging?: boolean): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.StockOData}StockPartsOData`,\r\n key: \"StockHeaderId\",\r\n keyType: \"Int32\",\r\n paging: removePaging ? false : true,\r\n pageSize: removePaging ? null : 50\r\n });\r\n }\r\n\r\n public GetStockStoreParts(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.StockOData}StockStorePartsOData`,\r\n key: [ \"StockHeaderId\", \"StoreId\" ],\r\n keyType: {\r\n StockHeaderId: \"Int32\",\r\n StoreId: \"Int32\"\r\n },\r\n paging: true,\r\n pageSize: 50\r\n });\r\n }\r\n\r\n public GetUserRef1Stock(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}UserReferences/GetUserRef1Stock`);\r\n }\r\n\r\n public GetUserRef2Stock(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}UserReferences/GetUserRef2Stock`);\r\n }\r\n\r\n public ODataStockTypeServiceLevels(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.config.apiLocations.StockOData}StockTypesOData`,\r\n key: \"StockTypeId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n}\r\n","export enum ObsoleteOption {\r\n AllParts = 1,\r\n ActiveParts = 2,\r\n Obsolete = 3\r\n}\r\n","import { TranslateService } from \"@ngx-translate/core\";\r\nimport { ObsoleteOption } from \"../../enums/obsolete-option.enum\";\r\n\r\nexport abstract class AddPartsBaseComponent {\r\n public selectedPartName: string;\r\n public showEquivalentsFilter: boolean = false;\r\n public obsoleteOptions: { id: number; label: string }[];\r\n public obsoleteSelectedOption = ObsoleteOption.ActiveParts;\r\n public supersededPartsIds: number[] = [];\r\n\r\n protected filterEquivalences: any;\r\n protected obsoleteFilter = [\"Obsolete\", \"=\", false];\r\n\r\n constructor(\r\n protected translator: TranslateService\r\n ) {\r\n }\r\n\r\n public OnStockListRowPrepared(e): void {\r\n if (e.data && e.rowType === \"data\") {\r\n if (e.data.Obsolete) {\r\n e.rowElement.className += \" obsolete-text\";\r\n }\r\n\r\n if (this.filterEquivalences && this.supersededPartsIds.includes(e.data.StockHeaderId)) {\r\n e.rowElement.className += \" superceded-background\";\r\n }\r\n }\r\n }\r\n\r\n public ShowEquivalent(data): void {\r\n this.ClearSearchText();\r\n this.showEquivalentsFilter = true;\r\n this.filterEquivalences = [[\"EquivalencyId\", \"=\", data.EquivalencyId],\r\n \"or\", [\"SupercededById\", \"=\", data.StockHeaderId]];\r\n this.selectedPartName = data.PartNo;\r\n this.SetFilters();\r\n }\r\n\r\n public ClearEquivalencesFilters(): void {\r\n this.filterEquivalences = null;\r\n this.showEquivalentsFilter = false;\r\n this.SetFilters();\r\n }\r\n\r\n public ObsoleteOptionChanged($event): void {\r\n switch ($event.value) {\r\n case ObsoleteOption.AllParts:\r\n this.obsoleteFilter = null;\r\n break;\r\n case ObsoleteOption.ActiveParts:\r\n this.obsoleteFilter = [\"Obsolete\", \"=\", false];\r\n break;\r\n case ObsoleteOption.Obsolete:\r\n this.obsoleteFilter = [\"Obsolete\", \"=\", true];\r\n break;\r\n }\r\n\r\n this.SetFilters();\r\n }\r\n\r\n protected abstract ClearSearchText(): void;\r\n public abstract SetFilters(): void;\r\n\r\n protected setObsoleteOptions(): void {\r\n this.translator.get(\r\n [\r\n \"stock.list.obsolete.all-parts\",\r\n \"stock.list.obsolete.active-parts\",\r\n \"stock.list.obsolete.obsolete-parts\"\r\n ]).subscribe(translations => {\r\n this.obsoleteOptions = [\r\n { id: ObsoleteOption.AllParts, label: translations[\"stock.list.obsolete.all-parts\"] },\r\n { id: ObsoleteOption.ActiveParts, label: translations[\"stock.list.obsolete.active-parts\"] },\r\n { id: ObsoleteOption.Obsolete, label: translations[\"stock.list.obsolete.obsolete-parts\"] }\r\n ];\r\n });\r\n }\r\n}\r\n","
\r\n

{{ 'service.parts' | translate }} {{jobTypeName}}

\r\n \r\n \r\n\r\n
\r\n
\r\n
\r\n \r\n
\r\n
{{ 'service.parts.part-no' | translate }}
\r\n
{{ 'service.parts.description' | translate }}
\r\n
{{ 'servicing.parts.quantity' | translate }}
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
{{part.Description}}
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n {{ 'stock.list.equivalents' | translate }}: {{selectedPartName}}\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n\r\n \r\n\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { Module } from \"../../enums/module.enum\";\r\nimport { ServicePartsSorting } from \"../../enums/service-parts-sorting.enum\";\r\nimport { ServicingComponentUsageEnum } from \"../../enums/servicing-component-usage.enum\";\r\nimport { SelectedServicePart } from \"../../models/selected-service-part.model\";\r\nimport { ServiceParts } from \"../../models/service-parts.model\";\r\nimport { ServicingItem } from \"../../models/servicing-item.model\";\r\nimport { StockTypes } from \"../../models/stock-types.model\";\r\nimport { StockUserRef } from \"../../models/stock-user-ref.model\";\r\nimport { ModuleService } from \"../../services/module/module.service\";\r\nimport { StockService } from \"../../services/stock.service\";\r\nimport { AddPartsBaseComponent } from \"./add-parts-base.component\";\r\n\r\n@Component({\r\n selector: \"lib-service-parts\",\r\n templateUrl: \"./service-parts.component.html\",\r\n styleUrls: [\"./service-parts.component.scss\"]\r\n})\r\n\r\nexport class ServicePartsComponent extends AddPartsBaseComponent implements OnInit, OnChanges {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n @Output() serviceParts = new EventEmitter>();\r\n @Input() servicingSource: Array;\r\n @Input() serviceLevelId: string;\r\n @Input() isDisplayedOn: ServicingComponentUsageEnum;\r\n @Input() jobTypeName: string;\r\n public UserRef1Stock: Array = [];\r\n public UserRef2Stock: Array = [];\r\n public stockPartsDataSource: DataSource;\r\n public availableParts: DataSource;\r\n public stockTypeOData: Array = [];\r\n public selectedServiceParts: Array = [];\r\n public ServicePartsItems: Array = [];\r\n public showAddPartsDialog: boolean = false;\r\n public newStockPartSearchText: string = \"\";\r\n public selectedPartTypes: Array = [];\r\n public isStockEnabled: boolean = false;\r\n public sortingType = ServicePartsSorting;\r\n public allCheckboxValue: boolean = false;\r\n public componentUsedOn = ServicingComponentUsageEnum;\r\n\r\n public isProEnabled = false;\r\n\r\n private storeIdFilter = [\"StoreId\", \"=\", 1];\r\n private stockTypeIdFilter: any;\r\n\r\n private indeterminateCheckboxValue: boolean;\r\n private sortingDescending: boolean = false;\r\n\r\n constructor(\r\n private stockService: StockService,\r\n translator: TranslateService,\r\n private moduleService: ModuleService) {\r\n super(translator);\r\n this.OnStockListRowPrepared = this.OnStockListRowPrepared.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.stockPartsDataSource = this.stockService.GetStockStoreParts();\r\n this.setInitFilters();\r\n this.stockService.GetUserRef1Stock().subscribe((response) => this.UserRef1Stock = response);\r\n this.stockService.GetUserRef2Stock().subscribe((response) => this.UserRef2Stock = response);\r\n this.stockService.ODataStockTypeServiceLevels().load().then( result => {\r\n this.stockTypeOData = result;\r\n });\r\n this.moduleService.GetEnabledModules().subscribe(x => {\r\n this.isStockEnabled = x.includes(Module.Stock);\r\n this.isProEnabled = x.includes(Module.Pro);\r\n });\r\n\r\n this.setObsoleteOptions();\r\n }\r\n\r\n public ngOnChanges(): void {\r\n if (this.servicingSource) {\r\n const servicingSourceEl = this.servicingSource.find(servicingEl => servicingEl.ServiceLevelId === this.serviceLevelId);\r\n if (servicingSourceEl && servicingSourceEl.ServiceParts) {\r\n this.ServicePartsItems = servicingSourceEl.ServiceParts;\r\n this.ServicePartsItems.forEach((item) => this.selectedServiceParts.push({\r\n StockHeaderId: item.StockHeaderId,\r\n Value: false\r\n }));\r\n }\r\n }\r\n }\r\n\r\n public Cancel() {\r\n this.showAddPartsDialog = false;\r\n }\r\n\r\n public NewStockPartSearchTextChanged() {\r\n this.dataGrid.instance.searchByText(encodeURI(this.newStockPartSearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public NewStockPartsFilterChanged($event) {\r\n const filterValue = $event.currentTarget.value;\r\n if (filterValue === \"0\") {\r\n this.stockTypeIdFilter = null;\r\n } else {\r\n this.stockTypeIdFilter = [\"StockTypeId\", \"=\", Number(filterValue)];\r\n }\r\n\r\n this.SetFilters();\r\n }\r\n\r\n public DeleteParts() {\r\n if (this.selectedServiceParts && this.selectedServiceParts.length) {\r\n this.ServicePartsItems = this.ServicePartsItems.filter(item => {\r\n const searchedItem = this.selectedServiceParts.find(el => el.StockHeaderId === item.StockHeaderId);\r\n return searchedItem.Value === false;\r\n });\r\n this.selectedServiceParts.map((id, index) => {\r\n if (id.Value) {\r\n this.selectedServiceParts.splice(index, 1);\r\n }\r\n });\r\n this.allCheckboxValue = false;\r\n }\r\n this.EmitStockParts();\r\n }\r\n\r\n public OpenAddPartsDialog(): void {\r\n const filter: any[] = [this.storeIdFilter];\r\n\r\n const usedStockHeaderIds = [];\r\n this.ServicePartsItems.map(item => usedStockHeaderIds.push(item.StockHeaderId));\r\n\r\n usedStockHeaderIds.forEach(id => {\r\n filter.push(\"and\");\r\n filter.push([\"StockHeaderId\", \"<>\", id]);\r\n });\r\n\r\n this.stockPartsDataSource.filter(filter);\r\n this.SetPartsToHighlight();\r\n\r\n this.selectedPartTypes = [];\r\n this.showAddPartsDialog = true;\r\n }\r\n\r\n public AddStockParts() {\r\n this.showAddPartsDialog = false;\r\n this.selectedPartTypes.forEach(id => {\r\n this.stockPartsDataSource.store().byKey({ StockHeaderId: id.StockHeaderId, StoreId: 1 }).then(selectedPart => {\r\n if (selectedPart) {\r\n this.ServicePartsItems.push({\r\n PartNo: selectedPart.PartNo,\r\n Description: selectedPart.Description,\r\n Qty: 1,\r\n StockHeaderId: selectedPart.StockHeaderId\r\n });\r\n this.selectedServiceParts.push({ StockHeaderId: selectedPart.StockHeaderId, Value: false});\r\n }\r\n\r\n this.EmitStockParts();\r\n });\r\n });\r\n }\r\n\r\n public EmitStockParts() {\r\n this.serviceParts.emit(this.ServicePartsItems);\r\n }\r\n\r\n public InputChanged(stockHeaderId: number, index: number) {\r\n this.selectedServiceParts[index] = { StockHeaderId: stockHeaderId, Value: this.selectedServiceParts[index].Value};\r\n const selectedItemsQuantity = this.selectedServiceParts.filter(item => item.Value).length;\r\n if (this.selectedServiceParts[index].Value && selectedItemsQuantity === this.ServicePartsItems.length) {\r\n this.allCheckboxValue = true;\r\n } else if (!this.selectedServiceParts[index].Value && selectedItemsQuantity < this.ServicePartsItems.length\r\n && selectedItemsQuantity || this.selectedServiceParts[index].Value && selectedItemsQuantity) {\r\n this.allCheckboxValue = this.indeterminateCheckboxValue;\r\n } else if (!this.selectedServiceParts[index].Value && !selectedItemsQuantity) {\r\n this.allCheckboxValue = false;\r\n }\r\n }\r\n\r\n public ParentInputChanged() {\r\n if (this.allCheckboxValue != null) {\r\n this.selectedServiceParts.map(item => item.Value = this.allCheckboxValue);\r\n }\r\n }\r\n\r\n public RemoveButtonDisabled() {\r\n return !this.selectedServiceParts.length;\r\n }\r\n\r\n public Sort(sortCol: ServicePartsSorting) {\r\n this.sortingDescending = !this.sortingDescending;\r\n this.ServicePartsItems.sort((s1: ServiceParts, s2: ServiceParts) => {\r\n switch (sortCol) {\r\n case ServicePartsSorting.Default:\r\n return this.compare(s1, s2, \"StockHeaderId\", false);\r\n case ServicePartsSorting.PartNo:\r\n if (this.sortingDescending) {\r\n return this.compare(s1, s2, \"PartNo\", true);\r\n } else {\r\n return this.compare(s1, s2, \"PartNo\", false);\r\n }\r\n case ServicePartsSorting.Description:\r\n if (this.sortingDescending) {\r\n return this.compare(s1, s2, \"Description\", true);\r\n } else {\r\n return this.compare(s1, s2, \"Description\", false);\r\n }\r\n }\r\n });\r\n }\r\n\r\n public allowIntegersOnly(index: number) {\r\n const quantity = this.ServicePartsItems[index].Qty;\r\n if (!quantity || quantity < 1) {\r\n this.ServicePartsItems[index].Qty = 1;\r\n } else {\r\n this.ServicePartsItems[index].Qty = Math.round(quantity);\r\n }\r\n }\r\n\r\n public SetFilters(): void {\r\n const filters = [];\r\n filters.push(this.storeIdFilter);\r\n\r\n if (this.stockTypeIdFilter) {\r\n filters.push(\"and\");\r\n filters.push(this.stockTypeIdFilter);\r\n }\r\n\r\n if (this.obsoleteFilter) {\r\n filters.push(\"and\");\r\n filters.push(this.obsoleteFilter);\r\n }\r\n\r\n if (this.filterEquivalences) {\r\n filters.push(\"and\");\r\n filters.push(this.filterEquivalences);\r\n }\r\n\r\n this.dataGrid.instance.clearFilter();\r\n this.dataGrid.instance.filter(filters);\r\n }\r\n\r\n private compare(s1: ServiceParts, s2: ServiceParts, propName: string, desc: boolean) {\r\n const compareCondition = desc ? s1[propName] < s2[propName] : s1[propName] > s2[propName];\r\n if (compareCondition) {\r\n return 1;\r\n } else if (s1[propName] === s2[propName]) {\r\n return 0;\r\n } else {\r\n return -1;\r\n }\r\n }\r\n\r\n protected ClearSearchText(): void {\r\n this.newStockPartSearchText = \"\";\r\n this.NewStockPartSearchTextChanged();\r\n }\r\n\r\n private setInitFilters(): void {\r\n const filters = [];\r\n filters.push(this.storeIdFilter);\r\n filters.push(\"and\");\r\n filters.push(this.obsoleteFilter);\r\n this.stockPartsDataSource.filter(filters);\r\n }\r\n\r\n private SetPartsToHighlight(): void {\r\n this.stockPartsDataSource.items().forEach(x => {\r\n if (x.SupercededById) {\r\n this.supersededPartsIds.push(x.SupercededById);\r\n }\r\n });\r\n }\r\n}\r\n","export enum VisualizerModuleType {\r\n Equipment = 1,\r\n Customers = 2,\r\n ServiceGroup = 3\r\n}\r\n","export class ServiceGroupCustomerModel {\r\n Id: number;\r\n Name: string;\r\n CustomerId: number;\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport { BehaviorSubject, Observable, Subject, of, switchMap } from \"rxjs\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { IAppConfig, APP_CONFIG } from \"../models/app-config.model\";\r\nimport { ServicingVisualizerBox } from \"../models/servicing-visualizer-box.model\";\r\nimport { VisualizerModuleType } from \"../enums/visualizer-module-type.enum\";\r\nimport { VisualizerMinMaxYear } from \"../models/visualizer-min-max-year.model\";\r\nimport { ServicingItem } from \"../models/servicing-item.model\";\r\nimport { JobTypeNamesModel } from \"../models/job-type-names.model\";\r\n\r\ninterface ResponseModel {\r\n ModelCollection: JobTypeNamesModel[];\r\n}\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class RecurringJobsService {\r\n public jobTypesQuantity = new BehaviorSubject(0);\r\n public reload = new BehaviorSubject(false);\r\n public servicingData = new Subject>();\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) protected config: IAppConfig) { }\r\n\r\n public GetJobForSite(year: number, siteId: number): Observable> {\r\n return this.http.get>(`${this.config.apiLocations.RecurringJob}SiteRecurringJobs/${year}/${siteId}`);\r\n }\r\n\r\n public GetJobForEquipment(year: number, equipmentId: number): Observable> {\r\n return this.http.get>(`${this.config.apiLocations.RecurringJob}Equipment/${year}/${equipmentId}`);\r\n }\r\n\r\n public GetJobForServiceGroup(year: number, serviceGroupId: number): Observable> {\r\n return this.http.get>(`${this.config.apiLocations.RecurringJob}ServiceGroup/${year}/${serviceGroupId}`);\r\n }\r\n\r\n public GetMinMaxYear(moduleType: VisualizerModuleType, itemId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.RecurringJob}ServiceLevel/${moduleType}/${itemId}`);\r\n }\r\n\r\n public Reload(shouldReload: boolean) {\r\n this.reload.next(shouldReload);\r\n }\r\n\r\n public GetServiceJobTypes(): Observable {\r\n return this.http.get(this.config.apiLocations.ServiceSight + \"JobType/GetServiceJobTypes\")\r\n .pipe(switchMap(d => of(d.ModelCollection)));\r\n }\r\n\r\n public SaveTempVisualizerData(\r\n year: number,\r\n usedOn: VisualizerModuleType,\r\n searchedId: number,\r\n visualizerData: Array): Observable>> {\r\n return this.http.post>>(`${this.config.apiLocations.RecurringJob}Equipment/${year}/${searchedId}/${usedOn}`, visualizerData);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n {{headerName}} {{headerDetails}} {{ 'servicing.visualizer.serviceSchedule' | translate }}\r\n

\r\n \r\n {{ 'servicing.visualizer.serviceSchedule' | translate }}\r\n

\r\n
\r\n {{year}}\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n

{{month.name}}

\r\n
{{ 'servicing.visualizer.configure' | translate }}
\r\n \r\n \r\n
\r\n
\r\n
\r\n {{jobs.SingleBoxData.Name}}\r\n
\r\n
\r\n {{ 'servicing.visualizer.plannedDate' | translate }}\r\n {{jobs.SingleBoxData.PlannedDate | date: \"shortDate\"}}\r\n -\r\n
\r\n
\r\n {{ 'servicing.visualizer.actualDate' | translate }}\r\n {{jobs.SingleBoxData.LastService | date: \"shortDate\"}}\r\n -\r\n
\r\n
\r\n {{ 'servicing.visualizer.jobNo' | translate }}\r\n {{jobs.SingleBoxData.JobId}}\r\n -\r\n
\r\n
\r\n
\r\n \r\n 1 && tooltipVisible[index]\"\r\n target=\"#job-{{year}}-{{index}}-{{innerIndex}}\"\r\n id=\"multiple-toolip-{{year}}-{{index}}-{{innerIndex}}\"\r\n [(visible)]=\"tooltipVisible[index][innerIndex]\"\r\n [hideOnOutsideClick]=\"true\"\r\n position=\"top\">\r\n
\r\n
\r\n
\r\n {{jobs.SingleBoxData.Name}}\r\n
\r\n
\r\n
\r\n {{ 'servicing.visualizer.plannedDates' | translate }}\r\n \r\n \r\n
\r\n
\r\n {{ 'servicing.visualizer.actualDates' | translate }}\r\n \r\n
\r\n
\r\n
\r\n

{{ 'servicing.visualizer.jobNo' | translate }} {{jobNumber(cell.date, jobs.JobIds)}}.

\r\n

{{ 'servicing.visualizer.clickDate' | translate }}

\r\n
\r\n
\r\n
\r\n {{cell.text}}\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n {{jobs.SingleBoxData.PlannedDate | date: \"shortDate\" }}\r\n

\r\n \r\n {{jobs.SingleBoxData.LastService | date: \"shortDate\" }}\r\n

\r\n 1 || jobs.LastServices.length > 1\">\r\n {{ 'servicing.visualizer.multipleDates' | translate }}\r\n

\r\n
\r\n
\r\n
\r\n\r\n","import { DatePipe } from \"@angular/common\";\r\nimport { Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport moment from \"moment\";\r\nimport { combineLatest, Observable, Subscription } from \"rxjs\";\r\nimport { JobTypeNamesModel } from \"../../models/job-type-names.model\";\r\nimport { ServicingComponentUsageEnum } from \"../../enums/servicing-component-usage.enum\";\r\nimport { VisualizerModuleType } from \"../../enums/visualizer-module-type.enum\";\r\nimport { ServiceGroupCustomerModel } from \"../../models/service-group-customer-model\";\r\nimport { ServicingItem } from \"../../models/servicing-item.model\";\r\nimport { ServicingVisualizerBox } from \"../../models/servicing-visualizer-box.model\";\r\nimport { ServicingVisualizerJobIds } from \"../../models/servicing-visualizer-job-ids.model\";\r\nimport { RecurringJobsService } from \"../../services/recurring-jobs.service\";\r\n\r\n@Component({\r\n selector: \"lib-servicing-visualiser\",\r\n templateUrl: \"./servicing-visualiser.component.html\",\r\n styleUrls: [\"./servicing-visualiser.component.scss\"]\r\n})\r\nexport class ServicingVisualiserComponent implements OnInit, OnChanges, OnDestroy {\r\n @Input() headerName: string;\r\n @Input() headerDetails?: string;\r\n @Input() genericId: number; // it could be customer/site/equipment or service group id dependent on usedOn property\r\n @Input() usedOn: ServicingComponentUsageEnum;\r\n @Input() serviceGroupData?: ServiceGroupCustomerModel | null;\r\n public servicingVisualiserModel: Array> = [\r\n [], // January\r\n [], // February\r\n [], // March\r\n [], // April\r\n [], // May\r\n [], // June\r\n [], // July\r\n [], // August\r\n [], // September\r\n [], // October\r\n [], // November\r\n [] // December\r\n ];\r\n public year = new Date().getFullYear();\r\n public Months = [\r\n { name: this.translate.instant(\"servicing.visualizer.january\") },\r\n { name: this.translate.instant(\"servicing.visualizer.february\") },\r\n { name: this.translate.instant(\"servicing.visualizer.march\") },\r\n { name: this.translate.instant(\"servicing.visualizer.april\") },\r\n { name: this.translate.instant(\"servicing.visualizer.may\") },\r\n { name: this.translate.instant(\"servicing.visualizer.june\") },\r\n { name: this.translate.instant(\"servicing.visualizer.july\") },\r\n { name: this.translate.instant(\"servicing.visualizer.august\") },\r\n { name: this.translate.instant(\"servicing.visualizer.september\") },\r\n { name: this.translate.instant(\"servicing.visualizer.october\") },\r\n { name: this.translate.instant(\"servicing.visualizer.november\") },\r\n { name: this.translate.instant(\"servicing.visualizer.december\") }\r\n ];\r\n public tooltipVisible: Array> = new Array(this.Months.length);\r\n public buttonDisabled = {\r\n prev: false,\r\n next: false\r\n };\r\n public nowDate = new Date(Date.now()).toISOString();\r\n public maxDateValue: string;\r\n public jobTypesQuantity: number;\r\n\r\n public lastServiceType: string = \"\";\r\n public lastServiceDate: string = \"\";\r\n public nextServiceType: string = \"\";\r\n public nextServiceDate: string = \"\";\r\n\r\n private tempServicingData: Array;\r\n private isTempData: boolean = false;\r\n private usedOnComponent: VisualizerModuleType;\r\n private cachedGenericId: number;\r\n private readonly currentYear = new Date().getFullYear();\r\n private minYear: number = new Date().getFullYear();\r\n private maxYear: number = new Date().getFullYear();\r\n private subscription: Subscription;\r\n private jobTypeItems: JobTypeNamesModel[];\r\n\r\n public get isCompletelyEmpty(): boolean {\r\n return this.servicingVisualiserModel.every(month => month.length === 0);\r\n }\r\n\r\n constructor(\r\n private datePipe: DatePipe,\r\n private recurringJobsService: RecurringJobsService,\r\n private router: Router,\r\n private translate: TranslateService) {\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.recurringJobsService.jobTypesQuantity.next(0);\r\n this.recurringJobsService.servicingData.subscribe(data => {\r\n if (this.usedOn != null && this.genericId != null) {\r\n this.saveTempData(data);\r\n }\r\n });\r\n\r\n const main = document.getElementById(\"main\");\r\n if (main) {\r\n main.classList.add(\"customer-details\");\r\n }\r\n\r\n this.recurringJobsService.GetServiceJobTypes().subscribe((result) => {\r\n this.jobTypeItems = result;\r\n });\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (this.genericId && !this.cachedGenericId) {\r\n this.cachedGenericId = this.genericId;\r\n }\r\n\r\n if (changes.serviceGroupData && changes.serviceGroupData.currentValue) {\r\n this.usedOn = ServicingComponentUsageEnum.ServiceGroups;\r\n this.genericId = this.serviceGroupData.Id;\r\n this.load();\r\n } else if (changes.serviceGroupData && !changes.serviceGroupData.currentValue) {\r\n this.usedOn = ServicingComponentUsageEnum.Equipments;\r\n if (this.cachedGenericId) {\r\n this.genericId = this.cachedGenericId;\r\n } else {\r\n this.genericId = 0;\r\n }\r\n this.load();\r\n }\r\n\r\n if (this.usedOn != null) {\r\n switch (this.usedOn) {\r\n case ServicingComponentUsageEnum.Equipments:\r\n this.usedOnComponent = VisualizerModuleType.Equipment;\r\n break;\r\n case ServicingComponentUsageEnum.ServiceGroups:\r\n this.usedOnComponent = VisualizerModuleType.ServiceGroup;\r\n break;\r\n default:\r\n this.usedOnComponent = VisualizerModuleType.Customers;\r\n }\r\n\r\n if (this.genericId && this.year) {\r\n this.load();\r\n this.tearDownSubscriptions();\r\n this.subscription = this.recurringJobsService.reload.subscribe(x => {\r\n if (x) {\r\n this.load();\r\n }\r\n });\r\n }\r\n }\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n const main = document.getElementById(\"main\");\r\n if (main) {\r\n main.classList.remove(\"customer-details\");\r\n }\r\n this.tearDownSubscriptions();\r\n }\r\n\r\n public getDataForYear(isNextYear: boolean) {\r\n if (isNextYear) {\r\n ++this.year;\r\n } else {\r\n --this.year;\r\n }\r\n if (this.isTempData) {\r\n this.disableButton(this.year);\r\n this.recurringJobsService.SaveTempVisualizerData(this.year, this.usedOnComponent, this.genericId, this.tempServicingData)\r\n .subscribe(x => {\r\n this.servicingVisualiserModel = x;\r\n this.handleBoxesBackgroundAndDates();\r\n });\r\n } else {\r\n this.recurringJobsService.Reload(true);\r\n }\r\n }\r\n\r\n public goToJobs(id: number) {\r\n this.router.navigate([`/jobs/job/${id}`]);\r\n }\r\n\r\n public toggleTooltip(index: number, innerIndex: number) {\r\n this.tooltipVisible[index][innerIndex] = !this.tooltipVisible[index][innerIndex];\r\n }\r\n\r\n private load() {\r\n this.getMinAndMaxYear();\r\n this.disableButton(this.year);\r\n\r\n combineLatest([\r\n this.recurringJobsService.jobTypesQuantity,\r\n this.GetDataSource(this.year)\r\n ]).subscribe(([jobTypesQuantity, result]) => {\r\n this.jobTypesQuantity = jobTypesQuantity;\r\n this.servicingVisualiserModel = result;\r\n this.handleBoxesBackgroundAndDates();\r\n this.initializeTooltips();\r\n });\r\n\r\n this.nextAndLastData();\r\n this.recurringJobsService.Reload(false);\r\n }\r\n\r\n private GetDataSource(year: number): Observable> {\r\n let data: Observable>;\r\n if (this.usedOn === ServicingComponentUsageEnum.Equipments) {\r\n data = this.recurringJobsService.GetJobForEquipment(year, this.genericId);\r\n } else if (this.usedOn === ServicingComponentUsageEnum.Customers) {\r\n data = this.recurringJobsService.GetJobForSite(year, this.genericId);\r\n } else if (this.usedOn === ServicingComponentUsageEnum.ServiceGroups) {\r\n data = this.recurringJobsService.GetJobForServiceGroup(year, this.genericId);\r\n } else {\r\n throw new Error(\"Unhandled ServicingComponentUsageEnum: \" + this.usedOn);\r\n }\r\n\r\n return data;\r\n }\r\n\r\n private nextAndLastData(): void {\r\n if(this.tempServicingData) {\r\n // If we have temp servicing data then user is updating the configuration.\r\n // Pull prev/next servicing out of there instead.\r\n const nextService = this.tempServicingData.filter(tsd => tsd.NextDue != null).sort((a,b) => new Date(a.NextDue).getTime() - new Date(b.NextDue).getTime());\r\n const lastService = this.tempServicingData.filter(tsd => tsd.LastService != null).sort((a,b) => b.LastService.getTime() - a.LastService.getTime());\r\n if (nextService) {\r\n this.nextServiceDate = this.datePipe.transform(nextService[0].NextDue, \"shortDate\");\r\n this.nextServiceType = this.jobTypeItems.find(x => x.JobTypeID === nextService[0].DefaultJobType).Name;\r\n }\r\n if (lastService) {\r\n this.lastServiceDate = this.datePipe.transform(lastService[0].LastService, \"shortDate\");\r\n this.lastServiceType = this.jobTypeItems.find(x => x.JobTypeID === lastService[0].DefaultJobType).Name;\r\n }\r\n }\r\n else {\r\n combineLatest([\r\n this.GetDataSource(this.currentYear - 1),\r\n this.GetDataSource(this.currentYear),\r\n this.GetDataSource(this.currentYear + 1),\r\n ]).subscribe(([prevYear, currentYear, nextYear]) => {\r\n // try to get last done from currentYear, start from the index of the current month and loop backwards\r\n const currentMonthIndex = new Date().getMonth();\r\n for (let i = currentMonthIndex; i >= 0; i--) {\r\n if (this.SetLastServiceDate(currentYear[i])) {\r\n break;\r\n }\r\n }\r\n\r\n // if we didn't find anything in the current year, try the previous year\r\n if (!this.lastServiceType) {\r\n for (let i = 11; i >= 0; i--) {\r\n if (this.SetLastServiceDate(prevYear[i])) {\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // try to get next due from currentYear, start from the index of the current month and loop forwards\r\n for (let i = currentMonthIndex; i < 12; i++) {\r\n if (this.SetNextServiceDate(currentYear[i])) {\r\n break;\r\n }\r\n }\r\n\r\n // if we didn't find anything in the current year, try the next year\r\n if (!this.nextServiceType) {\r\n for (let i = 0; i < 12; i++) {\r\n if (this.SetNextServiceDate(nextYear[i])) {\r\n break;\r\n }\r\n }\r\n }\r\n });\r\n }\r\n }\r\n\r\n private SetLastServiceDate(visualizerBoxes: ServicingVisualizerBox[]): boolean {\r\n const lastDone = visualizerBoxes.find(x => x.LastServices?.length > 0);\r\n if (lastDone) {\r\n this.lastServiceType = lastDone.SingleBoxData.Name;\r\n const date = moment(lastDone.LastServices[0]);\r\n this.lastServiceDate = this.datePipe.transform(date.toDate(), \"shortDate\");\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n private SetNextServiceDate(visualizerBoxes: ServicingVisualizerBox[]): boolean {\r\n const nextDue = visualizerBoxes.find(x => x.PlannedDates?.length > 0 && (x.LastServices?.length ?? 0) === 0);\r\n if (nextDue) {\r\n this.nextServiceType = nextDue.SingleBoxData.Name;\r\n const date = moment(nextDue.PlannedDates[0]);\r\n this.nextServiceDate = this.datePipe.transform(date.toDate(), \"shortDate\");\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n private initializeTooltips() {\r\n for (let outerIndex = 0; outerIndex < this.Months.length; outerIndex++) {\r\n this.tooltipVisible[outerIndex] = new Array(this.jobTypesQuantity);\r\n }\r\n }\r\n\r\n private handleBoxesBackgroundAndDates() {\r\n this.servicingVisualiserModel.map(monthJobList => monthJobList.map(jobList => {\r\n jobList.DisablePlannedDates = this.disabledDates(jobList.PlannedDates);\r\n jobList.DisableLastServices = this.disabledDates(jobList.LastServices);\r\n }));\r\n }\r\n\r\n private disabledDates(dates: Array) {\r\n const disableDates = [];\r\n\r\n if (dates.length) {\r\n const newDate = new Date();\r\n this.maxDateValue = new Date(newDate.setDate(newDate.getDate() - 1)).toISOString();\r\n\r\n const momentDates = dates.map(x => moment(x, \"YYYY-MM-DD\"));\r\n let startDate: moment.Moment = momentDates[0].clone();\r\n const endDate: moment.Moment = momentDates[dates.length - 1];\r\n\r\n while (startDate <= endDate) {\r\n if (startDate && !momentDates.find(x => x.dayOfYear() === startDate.dayOfYear())) {\r\n disableDates.push(startDate.toDate());\r\n }\r\n startDate = startDate.add(1, \"day\");\r\n }\r\n } else {\r\n this.maxDateValue = this.nowDate;\r\n }\r\n\r\n return disableDates;\r\n }\r\n\r\n private disableButton(year: number) {\r\n this.buttonDisabled.prev = year <= this.minYear;\r\n this.buttonDisabled.next = year >= this.maxYear;\r\n }\r\n\r\n private getMinAndMaxYear(): void {\r\n let visualizerModuleType: VisualizerModuleType;\r\n\r\n switch (this.usedOn) {\r\n case ServicingComponentUsageEnum.Equipments:\r\n visualizerModuleType = VisualizerModuleType.Equipment;\r\n break;\r\n case ServicingComponentUsageEnum.Customers:\r\n visualizerModuleType = VisualizerModuleType.Customers;\r\n break;\r\n case ServicingComponentUsageEnum.ServiceGroups:\r\n visualizerModuleType = VisualizerModuleType.ServiceGroup;\r\n break;\r\n default:\r\n throw new Error(\"Unhandled ServicingComponentUsageEnum: \" + this.usedOn);\r\n }\r\n\r\n this.recurringJobsService.GetMinMaxYear(visualizerModuleType, this.genericId).subscribe(x => {\r\n this.minYear = x.MinDate;\r\n this.maxYear = x.MaxDate;\r\n\r\n this.disableButton(this.year);\r\n });\r\n }\r\n\r\n public valueChanged(event: any, jobIds: Array): void {\r\n const jobId = this.jobNumber(event.value, jobIds);\r\n this.router.navigate([\"jobs/job/\", jobId]);\r\n }\r\n\r\n public toggleVisibility(actualDates: Array, selectedDate: Date): string {\r\n const convertedDate = this.handleDateFormat(selectedDate);\r\n if (actualDates.length === 0) {\r\n return \"not-display\";\r\n }\r\n const isDisplayed = actualDates.find(item => item.split(\"T\")[0] === convertedDate);\r\n return isDisplayed ? \"display\" : \"not-display\";\r\n }\r\n\r\n public handleDateFormat(date: Date): string {\r\n const year = date.getFullYear();\r\n let month: number | string = date.getMonth() + 1;\r\n let day: number | string = date.getDate();\r\n if (date.getDate() < 10) {\r\n day = \"0\" + date.getDate();\r\n }\r\n if (date.getMonth() < 10) {\r\n month = \"0\" + (date.getMonth() + 1);\r\n }\r\n return `${year}-${month}-${day}`;\r\n }\r\n\r\n jobNumber(date: Date, jobIds: Array) {\r\n const convertedDate = this.handleDateFormat(date);\r\n if (jobIds) {\r\n const foundJob = jobIds.find(item => {\r\n if (item.LastService) {\r\n return item.LastService.split(\"T\")[0] === convertedDate;\r\n } else {\r\n return false;\r\n }\r\n });\r\n return foundJob ? foundJob.JobId : \"\";\r\n }\r\n }\r\n\r\n private saveTempData(data: Array) {\r\n this.tempServicingData = data;\r\n this.recurringJobsService.SaveTempVisualizerData(this.year, this.usedOnComponent, this.genericId, data)\r\n .subscribe(x => {\r\n this.servicingVisualiserModel = x;\r\n this.handleBoxesBackgroundAndDates();\r\n this.nextAndLastData();\r\n this.isTempData = true;\r\n });\r\n }\r\n\r\n private tearDownSubscriptions() {\r\n if (this.subscription) {\r\n this.subscription.unsubscribe();\r\n this.subscription = null;\r\n }\r\n }\r\n}\r\n","import { AfterViewInit, Component, EventEmitter, Inject, Input, Output } from \"@angular/core\";\r\nimport { IAppConfig, APP_CONFIG } from \"../../models/app-config.model\";\r\nimport { BillingAddress } from \"../../models/payments/billing-address.model\";\r\nimport { IPaymentForm } from \"../../models/payments/i.payment-form.model\";\r\nimport { PaymentRequest } from \"../../models/payments/payment-request.model\";\r\nimport { PaymentResponse } from \"../../models/payments/payment-response.model\";\r\n\r\n// eslint-disable-next-line no-var\r\ndeclare var Stripe: any;\r\n\r\n@Component({\r\n selector: \"lib-stripe-card-form\",\r\n templateUrl: \"./stripe-card-form.component.html\",\r\n styleUrls: [\"./stripe-card-form.component.scss\"]\r\n})\r\nexport class StripeCardFormComponent implements AfterViewInit, IPaymentForm {\r\n @Input() public billingAddress: BillingAddress = null;\r\n\r\n @Input() public amount: number = null;\r\n @Input() public currencyCode: string = null;\r\n @Input() public invoiceId: number = null;\r\n @Input() public userId: string = null;\r\n\r\n @Input() public clientSecret: string = null;\r\n\r\n @Output() public showError = new EventEmitter();\r\n @Output() public processPayment = new EventEmitter();\r\n @Output() public paymentSuccessful = new EventEmitter();\r\n\r\n private stripe: any;\r\n private card: any;\r\n\r\n constructor(@Inject(APP_CONFIG) private config: IAppConfig) { }\r\n\r\n public ngAfterViewInit(): void {\r\n if (this.userId) {\r\n this.stripe = Stripe(this.config.stripe.PublicKey, {\r\n stripeAccount: this.userId\r\n });\r\n } else {\r\n this.stripe = Stripe(this.config.stripe.PublicKey);\r\n }\r\n\r\n const elements = this.stripe.elements();\r\n\r\n const style = {\r\n base: {\r\n color: \"#32325d\",\r\n fontFamily: `\"PT Sans\", Arial, sans-serif`,\r\n fontSize: \"15px\",\r\n padding: \"1em\"\r\n }\r\n };\r\n\r\n this.card = elements.create(\"card\", { style, hidePostalCode: true });\r\n this.card.mount(\"#card-element\");\r\n\r\n this.card.addEventListener(\"change\", ({ error }) => {\r\n if (error) {\r\n this.showError.emit(error);\r\n }\r\n });\r\n }\r\n\r\n public MakePayment(): void {\r\n if (this.clientSecret) {\r\n // Create payment method and confirm payment intent.\r\n this.stripe.confirmCardPayment(this.clientSecret, {\r\n payment_method: {\r\n card: this.card,\r\n billing_details: this.getBilling(),\r\n }\r\n }).then((result) => {\r\n if (result.error) {\r\n this.showError.emit(result.error.message);\r\n } else {\r\n // Successful subscription payment\r\n this.paymentSuccessful.emit(true);\r\n }\r\n });\r\n } else {\r\n this.stripe.createPaymentMethod({\r\n type: \"card\",\r\n card: this.card,\r\n billing_details: this.getBilling(),\r\n }).then((result) => {\r\n if (result.error) {\r\n // Show error in payment form\r\n this.showError.emit(result.error);\r\n } else {\r\n // Otherwise send paymentMethod.id to your server (see Step 4)\r\n this.processPayment.emit({\r\n Nonce: null,\r\n Amount: this.amount,\r\n InvoiceId: this.invoiceId,\r\n PaymentMethodId: result.paymentMethod.id,\r\n VerificationToken: null,\r\n PaymentIntentId: null\r\n });\r\n }\r\n });\r\n }\r\n }\r\n\r\n public CardAction(response: PaymentResponse): void {\r\n this.stripe.handleCardAction(\r\n response.PaymentIntentClientSecret\r\n ).then((result) => {\r\n if (result.error) {\r\n // Show error in payment form\r\n this.showError.emit(result.error.message);\r\n } else {\r\n // The card action has been handled\r\n // The PaymentIntent can be confirmed again on the server\r\n this.processPayment.emit({\r\n Amount: this.amount,\r\n InvoiceId: this.invoiceId,\r\n PaymentIntentId: result.paymentIntent.id,\r\n Nonce: null,\r\n VerificationToken: null,\r\n PaymentMethodId: null\r\n });\r\n }\r\n });\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/ban-types\r\n private getBilling(): object {\r\n const ba = this.billingAddress;\r\n\r\n if (ba.AddressLine1) {\r\n return {\r\n address: {\r\n city: ba.City,\r\n country: ba.Country,\r\n line1: ba.AddressLine1,\r\n line2: ba.AddressLine2,\r\n postal_code: ba.PostCode,\r\n state: ba.State\r\n },\r\n email: ba.Email,\r\n name: `${ba.FirstName} ${ba.LastName}`\r\n };\r\n } else {\r\n return {\r\n email: ba.Email,\r\n name: `${ba.FirstName} ${ba.LastName}`\r\n };\r\n }\r\n }\r\n\r\n}\r\n","
\r\n \r\n
\r\n","
\r\n
\r\n = idx, 'step-first': steps.indexOf(step) === 0, 'last-step': steps.indexOf(step) === steps.length - 1}\"\r\n *ngFor=\"let step of steps; let idx = index;\">\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n\r\n","import { Component, OnInit, Input } from \"@angular/core\";\r\n\r\n@Component({\r\n selector: \"lib-wizard-step\",\r\n templateUrl: \"./wizard-step.component.html\",\r\n styleUrls: [\"./wizard-step.component.scss\"]\r\n})\r\nexport class WizardStepComponent implements OnInit {\r\n\r\n @Input() steps: Array;\r\n @Input() currentStep: number;\r\n //@Output() stepChanged = new EventEmitter();\r\n public get progress(): number {\r\n return this.steps ? (this.currentStep / (this.steps.length - 1)) * 100 : 0;\r\n }\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n this.currentStep = this.currentStep || 0;\r\n }\r\n\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { DomSanitizer } from \"@angular/platform-browser\";\r\n\r\n@Pipe({\r\n name: \"bypassSecurityTrustResourceUrl\"\r\n})\r\nexport class BypassSecurityTrustResourceUrlPipe implements PipeTransform {\r\n\r\n constructor(private sanitizer: DomSanitizer) {\r\n }\r\n\r\n transform(value: string): any {\r\n return this.sanitizer.bypassSecurityTrustResourceUrl(\"data:image/bmp;charset=utf-8;base64,\" + value);\r\n }\r\n\r\n}\r\n","export enum CustomerStatus {\r\n PROSPECT = 100,\r\n ACTIVE = 300,\r\n MANAGING_AGENT = 400,\r\n CLOSED = 900\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { CustomerStatus } from \"../../enums/customer-status.enum\";\r\n\r\n@Pipe({\r\n name: \"customerStatus\"\r\n})\r\nexport class CustomerStatusPipe implements PipeTransform {\r\n private readonly status = {\r\n [CustomerStatus.PROSPECT]: \"customer.status.prospect\",\r\n [CustomerStatus.ACTIVE]: \"customer.status.active\",\r\n [CustomerStatus.MANAGING_AGENT]: \"customer.status.managing-agent\",\r\n [CustomerStatus.CLOSED]: \"customer.status.closed\",\r\n };\r\n\r\n private readonly colours = {\r\n [CustomerStatus.PROSPECT]: \"clryellow\",\r\n [CustomerStatus.ACTIVE]: \"clrgreen\",\r\n [CustomerStatus.MANAGING_AGENT]: \"clrnavy\",\r\n [CustomerStatus.CLOSED]: \"clrred\"\r\n };\r\n\r\n private readonly stringValueMapping = {\r\n Active: CustomerStatus.ACTIVE,\r\n Closed: CustomerStatus.CLOSED,\r\n Prospect: CustomerStatus.PROSPECT,\r\n ManagingAgent: CustomerStatus.MANAGING_AGENT\r\n };\r\n\r\n transform(value: number | string | CustomerStatus, args?: any): string {\r\n let safeValue = Number(value);\r\n\r\n if (isNaN(safeValue)) {\r\n safeValue = this.stringValueMapping[value];\r\n }\r\n\r\n const customerStatus = {\r\n colour: this.colours[safeValue],\r\n text: this.status[safeValue]\r\n };\r\n return customerStatus[args];\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { InspectionStatus } from \"../../enums/inspection-status.enum\";\r\n\r\n@Pipe({\r\n name: \"inspectionStatusValue\"\r\n})\r\nexport class InspectionStatusValuePipe implements PipeTransform {\r\n transform(value: any): any {\r\n const status = InspectionStatus[value];\r\n return status ? \"inspections.status.\" + status : null;\r\n }\r\n}\r\n","export enum SurveyQuestionType {\r\n Text = 1,\r\n TextArea = 2,\r\n Rating = 3,\r\n Thumbs = 4,\r\n Smiles = 5\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { SurveyQuestionType } from \"../../enums/survey-question-type.enum\";\r\n\r\n@Pipe({\r\n name: \"questionType\"\r\n})\r\nexport class QuestionTypePipe implements PipeTransform {\r\n\r\n private readonly questionTypes = {\r\n [SurveyQuestionType.Text]: \"customer-feedback.survey.question-type.text\",\r\n [SurveyQuestionType.TextArea]: \"customer-feedback.survey.question-type.text-area\",\r\n [SurveyQuestionType.Smiles]: \"customer-feedback.survey.question-type.smiles\",\r\n [SurveyQuestionType.Rating]: \"customer-feedback.survey.question-type.rating\",\r\n [SurveyQuestionType.Thumbs]: \"customer-feedback.survey.question-type.thumbs\"\r\n };\r\n\r\n private readonly stringValueMapping = {\r\n Text: SurveyQuestionType.Text,\r\n TextArea: SurveyQuestionType.TextArea,\r\n Smiles: SurveyQuestionType.Smiles,\r\n Rating: SurveyQuestionType.Rating,\r\n Thumbs: SurveyQuestionType.Thumbs,\r\n };\r\n\r\n transform(value: any): any {\r\n let safeValue = Number(value);\r\n if (isNaN(safeValue)) {\r\n safeValue = this.stringValueMapping[value];\r\n }\r\n\r\n return this.questionTypes[safeValue];\r\n }\r\n\r\n}\r\n","export enum SystemSalesOpportunityStatus {\r\n Won = 1,\r\n Lost = 2,\r\n Canncelled = 3\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { SystemSalesOpportunityStatus } from \"../enums/system-sales-opportunity-status.enum\";\r\n\r\n@Pipe({\r\n name: \"salesOpportunityStatus\"\r\n})\r\nexport class SalesOpportunityStatusPipe implements PipeTransform {\r\n\r\n private readonly salesOrderStatus = {\r\n [SystemSalesOpportunityStatus.Won]: \"sales-opportunity.status.won\",\r\n [SystemSalesOpportunityStatus.Lost]: \"sales-opportunity.status.lost\",\r\n [SystemSalesOpportunityStatus.Canncelled]: \"sales-opportunity.status.cancelled\"\r\n };\r\n\r\n private readonly stringValueMapping = {\r\n Won: SystemSalesOpportunityStatus.Won,\r\n Lost: SystemSalesOpportunityStatus.Lost,\r\n Canncelled: SystemSalesOpportunityStatus.Canncelled\r\n };\r\n\r\n transform(value: number | string | SystemSalesOpportunityStatus): string {\r\n let safeValue = Number(value);\r\n if (isNaN(safeValue)) {\r\n safeValue = this.stringValueMapping[value];\r\n }\r\n\r\n return this.salesOrderStatus[safeValue];\r\n }\r\n}\r\n","import { CommonModule } from \"@angular/common\";\r\nimport { NgModule } from \"@angular/core\";\r\nimport { ActiveJobsCountPipe } from \"./active-jobs-count-pipe\";\r\nimport { BypassSecurityTrustResourceUrlPipe } from \"./bypass-security-trust-resource-url.pipe\";\r\nimport { CreditNoteStatusBarPipe } from \"./credit-note-status-bar.pipe\";\r\nimport { CurrencyPipe } from \"./currency.pipe\";\r\nimport { CustomDatePipe } from \"./custom-date.pipe\";\r\nimport { DespatchNoteStatusBarPipe } from \"./despatch-note-status-bar.pipe\";\r\nimport { DespatchNoteStatusPipe } from \"./despatch-note-status.pipe\";\r\nimport { DocumentTypePipe } from \"./document-type.pipe\";\r\nimport { CreditNoteStatusPipe } from \"./enums/credit-note-status.pipe\";\r\nimport { CustomerStatusPipe } from \"./enums/customer-status-pipe\";\r\nimport { InspectionStatusValuePipe } from \"./enums/inspection-status-value.pipe\";\r\nimport { InspectionStatusPipe } from \"./enums/inspection-status.pipe\";\r\nimport { JobStatusPipe } from \"./enums/job-status.pipe\";\r\nimport { QuestionTypePipe } from \"./enums/question-type.pipe\";\r\nimport { QuoteStatusPipe } from \"./enums/quote-status.pipe\";\r\nimport { ServiceContractStatusPipe } from \"./enums/service-contract-status.pipe\";\r\nimport { EquipmentStatusPipe } from \"./equipment-status.pipe\";\r\nimport { ErrorMessagePipe } from \"./error-message.pipe\";\r\nimport { JobEquipmentPipe } from \"./job-equipment.pipe\";\r\nimport { JobStatusBarPortalPipe } from \"./job-status-bar-portal.pipe\";\r\nimport { JobStatusBarPipe } from \"./job-status-bar.pipe\";\r\nimport { QuoteStatusBarPipe } from \"./quote-status-bar.pipe\";\r\nimport { RefrigerantTransactionTypePipe } from \"./refrigerant-transaction-type.pipe\";\r\nimport { SalesOpportunityStatusPipe } from \"./sales-opportunity-status.pipe\";\r\nimport { SalesOrderStatusBarPipe } from \"./sales-order-status-bar.pipe\";\r\nimport { SalesOrderStatusPipe } from \"./sales-order-status.pipe\";\r\nimport { SelectedTypePipe } from \"./selected-type.pipe\";\r\nimport { ServiceContractStatusColourPipe } from \"./service-contract-status-color.pipe\";\r\nimport { ShortNumberPipe } from \"./short-number.pipe\";\r\n\r\n@NgModule({\r\n declarations: [\r\n ErrorMessagePipe,\r\n JobStatusBarPipe,\r\n JobStatusBarPortalPipe,\r\n JobStatusPipe,\r\n CustomDatePipe,\r\n QuoteStatusBarPipe,\r\n QuoteStatusPipe,\r\n InspectionStatusPipe,\r\n InspectionStatusValuePipe,\r\n ShortNumberPipe,\r\n EquipmentStatusPipe,\r\n ActiveJobsCountPipe,\r\n SelectedTypePipe,\r\n CurrencyPipe,\r\n JobEquipmentPipe,\r\n BypassSecurityTrustResourceUrlPipe,\r\n ServiceContractStatusPipe,\r\n ServiceContractStatusColourPipe,\r\n DocumentTypePipe,\r\n CreditNoteStatusPipe,\r\n CreditNoteStatusBarPipe,\r\n SalesOrderStatusBarPipe,\r\n SalesOrderStatusPipe,\r\n DespatchNoteStatusBarPipe,\r\n DespatchNoteStatusPipe,\r\n RefrigerantTransactionTypePipe,\r\n QuestionTypePipe,\r\n CustomerStatusPipe,\r\n SalesOpportunityStatusPipe\r\n ],\r\n exports: [\r\n ErrorMessagePipe,\r\n JobStatusBarPipe,\r\n JobStatusPipe,\r\n JobStatusBarPortalPipe,\r\n CustomDatePipe,\r\n QuoteStatusBarPipe,\r\n QuoteStatusPipe,\r\n InspectionStatusPipe,\r\n InspectionStatusValuePipe,\r\n ShortNumberPipe,\r\n EquipmentStatusPipe,\r\n ActiveJobsCountPipe,\r\n SelectedTypePipe,\r\n CurrencyPipe,\r\n JobStatusBarPortalPipe,\r\n JobEquipmentPipe,\r\n BypassSecurityTrustResourceUrlPipe,\r\n ServiceContractStatusPipe,\r\n ServiceContractStatusColourPipe,\r\n DocumentTypePipe,\r\n CreditNoteStatusPipe,\r\n CreditNoteStatusBarPipe,\r\n SalesOrderStatusBarPipe,\r\n SalesOrderStatusPipe,\r\n DespatchNoteStatusBarPipe,\r\n DespatchNoteStatusPipe,\r\n RefrigerantTransactionTypePipe,\r\n QuestionTypePipe,\r\n CustomerStatusPipe,\r\n SalesOpportunityStatusPipe\r\n ],\r\n providers: [\r\n ServiceContractStatusPipe,\r\n DocumentTypePipe,\r\n JobStatusPipe,\r\n CurrencyPipe,\r\n RefrigerantTransactionTypePipe,\r\n QuestionTypePipe,\r\n CustomerStatusPipe\r\n ],\r\n imports: [\r\n CommonModule\r\n ]\r\n})\r\nexport class SharedPipesModule {\r\n}\r\n","import { LOCALE_ID } from \"@angular/core\";\r\nimport { SettingsService } from \"../services/setting/settings.service\";\r\n\r\n// eslint-disable-next-line prefer-arrow/prefer-arrow-functions\r\nexport function LocaleFactory(service: SettingsService) {\r\n return service.getLocale();\r\n}\r\n\r\nexport const LocaleFactoryProvider = {\r\n provide: LOCALE_ID,\r\n deps: [SettingsService],\r\n useFactory: LocaleFactory\r\n};\r\n","export enum CustomerSelectInfo {\r\n ExceededLimit,\r\n OnHold,\r\n Status\r\n}\r\n","\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
{{customer.Customer}}
\r\n
{{customer.Address}}
\r\n \r\n
{{ 'customer.information.exceeded-limit' | translate }}
\r\n
{{ 'customer.information.on-stop' | translate }}
\r\n
{{customer.Status | customerStatus: 'text' | translate }}
\r\n
\r\n
\r\n
\r\n\r\n","import { Component, EventEmitter, Input, OnInit, Output, forwardRef } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { CustomerService } from \"../../services/customer.service\";\r\nimport { SettingId } from \"../../enums/setting-id.enum\";\r\nimport { SettingData } from \"../../models/setting-data.model\";\r\nimport { SettingsService } from \"../../services/setting/settings.service\";\r\nimport { CustomerStatus } from \"../../enums/customer-status.enum\";\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from \"@angular/forms\";\r\nimport { CustomerSelectInfo } from \"../../enums/customer-select-info.enum\";\r\nimport { CustomerSelect } from \"../../models/customer-select.model\";\r\n\r\n@Component({\r\n selector: \"lib-customers-select-box\",\r\n templateUrl: \"./customers-select-box.component.html\",\r\n styleUrls: [\"./customers-select-box.component.scss\"],\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => CustomersSelectBoxComponent),\r\n multi: true\r\n }\r\n ]\r\n})\r\nexport class CustomersSelectBoxComponent implements OnInit, ControlValueAccessor {\r\n @Input() id: string = \"\";\r\n @Input() targetElementId: string = \"\";\r\n @Input() name: string = \"\";\r\n @Input() value: number;\r\n @Input() disabled: boolean = false;\r\n @Input() class: string = \"\";\r\n @Input() dataFieldName: string = \"\";\r\n @Input() searchExpr: string = \"Customer\";\r\n @Input() valueExpr: string = \"CustomerId\";\r\n @Input() displayExpr: string = \"Customer\";\r\n @Input() dataSource: DataSource;\r\n @Input() includeSites: boolean = false;\r\n @Input() includeProspects: boolean = false;\r\n @Output() customerChanged = new EventEmitter();\r\n @Output() selectBoxOpened = new EventEmitter();\r\n\r\n public isValid: boolean = true;\r\n public customerSelectInfo = CustomerSelectInfo;\r\n\r\n private managingAgentsEnabled: boolean = false;\r\n private get customerActiveStatuses(): CustomerStatus[] {\r\n const statuses: CustomerStatus[] = [\r\n CustomerStatus.ACTIVE\r\n ];\r\n if (this.managingAgentsEnabled) {\r\n statuses.push(CustomerStatus.MANAGING_AGENT);\r\n }\r\n if (this.includeProspects) {\r\n statuses.push(CustomerStatus.PROSPECT);\r\n }\r\n return statuses;\r\n }\r\n\r\n constructor(\r\n private customerService: CustomerService,\r\n private settingsService: SettingsService\r\n ) {\r\n this.calculateDropdownWidth = this.calculateDropdownWidth.bind(this);\r\n }\r\n\r\n onChange: (v: number) => void;\r\n onTouched: () => void;\r\n\r\n public registerOnChange(fn: (v: number) => void): void {\r\n this.onChange = fn;\r\n }\r\n\r\n public writeValue(initialValue: number): void {\r\n this.value = initialValue;\r\n }\r\n\r\n public registerOnTouched(fn: () => void): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n public ngOnInit(): void {\r\n if (!this.dataSource) {\r\n this.dataSource = this.customerService.GetCustomersDataSource();\r\n\r\n this.settingsService.getSetting(SettingId.CustomerManagingAgents)\r\n .subscribe((setting: SettingData) => {\r\n this.managingAgentsEnabled = setting.ValueBool;\r\n const filter = [];\r\n const statusFilter = [];\r\n this.customerActiveStatuses.forEach((el, index) => {\r\n if (this.customerActiveStatuses.length > 1) {\r\n statusFilter.push([\"Status\", \"=\", el]);\r\n if (index < this.customerActiveStatuses.length - 1) {\r\n statusFilter.push(\"or\");\r\n }\r\n } else {\r\n statusFilter.push(\"Status\", \"=\", el);\r\n }\r\n });\r\n\r\n filter.push(statusFilter);\r\n\r\n if (!this.includeSites) {\r\n filter.push(\"and\");\r\n filter.push([\"IsCustomer\", \"=\", true]);\r\n }\r\n\r\n this.dataSource.filter(filter);\r\n this.dataSource.reload();\r\n });\r\n }\r\n }\r\n\r\n public ChangeCustomer(e): void {\r\n this.value = e.value;\r\n if (e.event) {\r\n this.onTouched();\r\n this.onChange(this.value);\r\n\r\n this.isValid = !!this.value;\r\n }\r\n this.customerChanged.emit(e);\r\n }\r\n\r\n public OpenSelectBox(e): void {\r\n this.selectBoxOpened.emit(e);\r\n }\r\n\r\n public IsSite(customer: any): boolean {\r\n return customer.CustomerId !== customer.InvoiceId;\r\n }\r\n\r\n public calculateDropdownWidth(): number {\r\n if (this.id && this.targetElementId) {\r\n const currentElement = document.getElementById(this.id);\r\n const targetElement = document.getElementById(this.targetElementId);\r\n\r\n if (currentElement && targetElement) {\r\n const currentBoundingClientRect = currentElement.getBoundingClientRect();\r\n const targetBoundingClientRect = targetElement.getBoundingClientRect();\r\n\r\n if (currentBoundingClientRect.left < targetBoundingClientRect.left) {\r\n return targetBoundingClientRect.right - currentBoundingClientRect.left;\r\n } else {\r\n return currentBoundingClientRect.right - targetBoundingClientRect.left;\r\n }\r\n }\r\n } else if (this.id) {\r\n const currentElement = document.getElementById(this.id);\r\n const currentBoundingClientRect = currentElement.getBoundingClientRect();\r\n\r\n return currentBoundingClientRect.width;\r\n }\r\n\r\n return 0;\r\n }\r\n\r\n public GetCustomerInformation(customer: CustomerSelect): CustomerSelectInfo {\r\n if (customer.CreditHold) {\r\n return CustomerSelectInfo.OnHold;\r\n }\r\n\r\n if (customer.ExceededLimit) {\r\n return CustomerSelectInfo.ExceededLimit;\r\n }\r\n\r\n return CustomerSelectInfo.Status;\r\n }\r\n}\r\n","import { CommonModule } from \"@angular/common\";\r\nimport { HttpClientModule } from \"@angular/common/http\";\r\nimport { ModuleWithProviders, NgModule } from \"@angular/core\";\r\nimport { FormsModule } from \"@angular/forms\";\r\nimport { RouterModule } from \"@angular/router\";\r\nimport { TranslateModule } from \"@ngx-translate/core\";\r\nimport { DxReportViewerModule } from \"devexpress-reporting-angular\";\r\nimport {\r\n DxButtonGroupModule,\r\n DxCalendarModule,\r\n DxChartModule,\r\n DxCheckBoxModule,\r\n DxDataGridModule,\r\n DxDateBoxModule,\r\n DxDropDownBoxModule,\r\n DxDropDownButtonModule,\r\n DxNumberBoxModule,\r\n DxPopoverModule,\r\n DxPopupModule,\r\n DxProgressBarModule,\r\n DxScrollViewModule,\r\n DxSelectBoxModule,\r\n DxSwitchModule,\r\n DxTextAreaModule,\r\n DxTextBoxModule,\r\n DxTooltipModule,\r\n DxTreeViewModule\r\n} from \"devextreme-angular\";\r\nimport { registerPalette } from \"devextreme/viz/palette\";\r\nimport { RecaptchaFormsModule, RecaptchaModule } from \"ng-recaptcha\";\r\nimport { ActivitiesSelectBoxComponent } from \"./components/activities-select-box/activities-select-box.component\";\r\nimport { AddEquipmentComponent } from \"./components/add-equipment/add-equipment.component\";\r\nimport { AttributeListComponent } from \"./components/attribute-list/attribute-list.component\";\r\nimport { ButtonWithHelpComponent } from \"./components/button-with-help/button-with-help.component\";\r\nimport { ChartsModule } from \"./components/charts/charts.module\";\r\nimport { ColourDropdownComponent } from \"./components/colour-dropdown/colour-dropdown.component\";\r\nimport { CreditNotesListComponent } from \"./components/credit-notes-list/credit-notes-list.component\";\r\nimport { DespatchNotesListComponent } from \"./components/despatch-notes-list/despatch-notes-list.component\";\r\nimport { EngineerSelectorComponent } from \"./components/engineer-selector/engineer-selector.component\";\r\nimport { EquipmentListComponent } from \"./components/equipment-list/equipment-list.component\";\r\nimport { EquipmentRefrigerantComponent } from \"./components/equipment-refrigerant/equipment-refrigerant.component\";\r\nimport { AddVisitComponent } from \"./components/equipment/equipment-job-list/add-visit/add-visit.component\";\r\nimport { EquipmentJobListComponent } from \"./components/equipment/equipment-job-list/equipment-job-list.component\";\r\nimport { MoveToJobDialogComponent } from \"./components/equipment/equipment-job-list/move-to-job-dialog/move-to-job-dialog.component\";\r\nimport { EquipmentQuoteListComponent } from \"./components/equipment/equipment-quote-list/equipment-quote-list.component\";\r\nimport { Sfg20ScheduleSelectBoxComponent } from \"./components/equipment/sfg20-schedule-select-box/sfg20-schedule-select-box.component\";\r\nimport { FGasLogComponent } from \"./components/f-gas-log/f-gas-log.component\";\r\nimport { ForgotPasswordComponent } from \"./components/forgot-password/forgot-password.component\";\r\nimport { GenericFormMessagesComponent } from \"./components/form-messages/form-messages.component\";\r\nimport { FormMesssageService } from \"./components/form-messages/form-messsage.service\";\r\nimport { GenericAttributesComponent } from \"./components/generic-attributes/generic-attributes.component\";\r\nimport { HelpModalComponent } from \"./components/help-modal/help-modal.component\";\r\nimport { InspectionsListComponent } from \"./components/inspections-list/inspections-list.component\";\r\nimport { InvoiceListComponent } from \"./components/invoice-list/invoice-list.component\";\r\nimport { JobsListComponent } from \"./components/jobs-list/jobs-list.component\";\r\nimport { LeavingFormMessageComponent } from \"./components/leaving-form-message/leaving-form-message.component\";\r\nimport { LoginPageComponent } from \"./components/login-page/login-page.component\";\r\nimport { MakeModelListComponent } from \"./components/make-model-list/make-model-list.component\";\r\nimport { MultipleSelectionComponent } from \"./components/multiple-selection/multiple-selection.component\";\r\nimport { NavBarComponent } from \"./components/nav-bar/nav-bar.component\";\r\nimport { PaymentsListComponent } from \"./components/payments-list/payments-list.component\";\r\nimport { PhraseBookModule } from \"./components/phrase-book/phrase-book.module\";\r\nimport { QuotesListComponent } from \"./components/quotes-list/quotes-list.component\";\r\nimport { ReportViewerComponent } from \"./components/report-viewer/report-viewer.component\";\r\nimport { SalesOrdersListComponent } from \"./components/sales-orders-list/sales-orders-list.component\";\r\nimport { SecondLevelNavigationComponent } from \"./components/second-level-navigation/second-level-navigation.component\";\r\nimport { SelectJobVisitComponent } from \"./components/select-job-visit/select-job-visit.component\";\r\nimport { ServiceContractsListComponent } from \"./components/service-contracts-list/service-contracts-list.component\";\r\nimport { ServicePartsComponent } from \"./components/service-parts/service-parts.component\";\r\nimport { ServicingVisualiserComponent } from \"./components/servicing-visualiser/servicing-visualiser.component\";\r\nimport { SpinnerComponent } from \"./components/spinner/spinner.component\";\r\nimport { StripeCardFormComponent } from \"./components/stripe-card-form/stripe-card-form.component\";\r\nimport { TilesComponent } from \"./components/tiles/tiles.component\";\r\nimport { VideoModalComponent } from \"./components/video-modal/video-modal.component\";\r\nimport { WizardStepComponent } from \"./components/wizard-step/wizard-step.component\";\r\nimport { WorkRequiredComponent } from \"./components/work-required/work-required.component\";\r\nimport { SharedPipesModule } from \"./pipes/pipes.module\";\r\nimport { LocaleFactoryProvider } from \"./providers/locale.provider\";\r\nimport { OdataService } from \"./services/odata.service\";\r\nimport { ServicesightSharedComponent } from \"./servicesight-shared.component\";\r\nimport { OnChangeDebouncedDirective } from \"./directives/form/on-change-debounced.directive\";\r\nimport { Sfg20ScheduleIntervalSelectBoxComponent } from \"./components/equipment/sfg20-schedule-interval-select-box/sfg20-schedule-interval-select-box.component\";\r\nimport { CustomersSelectBoxComponent } from \"./components/customers-select-box/customers-select-box.component\";\r\n\r\nconst components: any[] = [\r\n ServicesightSharedComponent,\r\n WizardStepComponent,\r\n LoginPageComponent,\r\n GenericFormMessagesComponent,\r\n GenericAttributesComponent,\r\n NavBarComponent,\r\n TilesComponent,\r\n JobsListComponent,\r\n QuotesListComponent,\r\n InvoiceListComponent,\r\n InspectionsListComponent,\r\n PaymentsListComponent,\r\n ForgotPasswordComponent,\r\n EquipmentListComponent,\r\n AddVisitComponent,\r\n SelectJobVisitComponent,\r\n AttributeListComponent,\r\n MoveToJobDialogComponent,\r\n EquipmentJobListComponent,\r\n ReportViewerComponent,\r\n SpinnerComponent,\r\n WorkRequiredComponent,\r\n AddEquipmentComponent,\r\n EquipmentQuoteListComponent,\r\n ServiceContractsListComponent,\r\n ServicingVisualiserComponent,\r\n MultipleSelectionComponent,\r\n ServicePartsComponent,\r\n CreditNotesListComponent,\r\n SecondLevelNavigationComponent,\r\n SalesOrdersListComponent,\r\n LeavingFormMessageComponent,\r\n DespatchNotesListComponent,\r\n StripeCardFormComponent,\r\n FGasLogComponent,\r\n EquipmentRefrigerantComponent,\r\n EngineerSelectorComponent,\r\n VideoModalComponent,\r\n HelpModalComponent,\r\n ButtonWithHelpComponent,\r\n ActivitiesSelectBoxComponent,\r\n ColourDropdownComponent,\r\n Sfg20ScheduleSelectBoxComponent,\r\n MakeModelListComponent,\r\n OnChangeDebouncedDirective,\r\n Sfg20ScheduleIntervalSelectBoxComponent,\r\n CustomersSelectBoxComponent\r\n];\r\n\r\n@NgModule({\r\n declarations: components,\r\n imports: [\r\n CommonModule,\r\n DxProgressBarModule,\r\n TranslateModule,\r\n FormsModule,\r\n HttpClientModule,\r\n SharedPipesModule,\r\n RouterModule,\r\n DxDataGridModule,\r\n DxTreeViewModule,\r\n DxChartModule,\r\n DxPopupModule,\r\n DxSelectBoxModule,\r\n DxDropDownButtonModule,\r\n DxDateBoxModule,\r\n ChartsModule,\r\n DxTextBoxModule,\r\n DxTextAreaModule,\r\n ChartsModule,\r\n RecaptchaModule,\r\n RecaptchaFormsModule,\r\n DxReportViewerModule,\r\n DxPopoverModule,\r\n DxDropDownBoxModule,\r\n DxTooltipModule,\r\n DxCalendarModule,\r\n DxCheckBoxModule,\r\n PhraseBookModule,\r\n DxSwitchModule,\r\n DxNumberBoxModule,\r\n DxButtonGroupModule,\r\n DxPopupModule,\r\n DxScrollViewModule\r\n ],\r\n providers: [\r\n FormMesssageService,\r\n LocaleFactoryProvider,\r\n { provide: \"ODataService\", useClass: OdataService }\r\n ],\r\n exports: components\r\n})\r\nexport class ServicesightSharedModule {\r\n static forRoot(): ModuleWithProviders {\r\n const serviceSightPalette = {\r\n // Applies in the BarGauge, Chart, Funnel, PieChart, PolarChart, Sankey, and TreeMap with a discrete colorizer\r\n simpleSet: [\"#002987\", \"#0052cc\", \"#00aa3c\", \"#fa9c03\", \"#424242\"],\r\n // Applies in the CircularGauge and LinearGauge\r\n indicatingSet: [\"#90ba58\", \"#eeba69\", \"#a37182\"],\r\n // Applies in the VectorMap and TreeMap with a gradient or range colorizer\r\n gradientSet: [\"#78b6d9\", \"#eeba69\"]\r\n };\r\n\r\n const profitabilityPalette = {\r\n simpleSet: [\"#002987\", \"#0052cc\", \"#00aa3c\", \"#fa9c03\", \"#ff3232\"]\r\n };\r\n\r\n registerPalette(\"ServiceSightPalette\", serviceSightPalette);\r\n registerPalette(\"ProfitabilityPalette\", profitabilityPalette);\r\n\r\n return {\r\n ngModule: ServicesightSharedModule,\r\n providers: [\r\n LocaleFactoryProvider,\r\n FormMesssageService\r\n ]\r\n };\r\n }\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { IODataService } from \"./interfaces/iodata.service\";\r\nimport { IAppConfig, APP_CONFIG } from \"../models/app-config.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class ContactService {\r\n\r\n constructor(\r\n @Inject(\"ODataService\") private odataService: IODataService,\r\n @Inject(APP_CONFIG) private config: IAppConfig) {\r\n }\r\n\r\n public GetAllContactsDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: this.config.apiLocations.ServiceSightOData + \"AllContactOD\",\r\n key: \"ContactId\",\r\n keyType: \"Int32\",\r\n paging: true,\r\n pageSize: 50\r\n });\r\n }\r\n\r\n public GetContactsDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: this.config.apiLocations.ServiceSightOData + \"ContactOD\",\r\n key: \"ContactId\",\r\n keyType: \"Int32\",\r\n paging: true,\r\n pageSize: 50\r\n });\r\n }\r\n\r\n public GetContactsDataStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: this.config.apiLocations.ServiceSightOData + \"ContactOD\",\r\n key: \"ContactId\",\r\n keyType: \"Int32\",\r\n paging: true,\r\n pageSize: 50\r\n });\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport notify from \"devextreme/ui/notify\";\r\nimport { ToastType } from \"../enums/toast-type.enum\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class ToasterService {\r\n\r\n constructor(private translate: TranslateService) { }\r\n\r\n /**\r\n * Show toast\r\n * @param bread translation key for the message\r\n * @param colour colour of the toast\r\n * @params interpolateParams value for string interpolate Params\r\n * @param time time left in the toaster in milliseconds\r\n */\r\n private popMessage(bread: string, interpolateParams: any, colour: ToastType, time: number = 50000): void {\r\n let translated: any;\r\n if (interpolateParams == null) {\r\n translated = this.translate.instant(bread);\r\n } else {\r\n translated = this.translate.instant(bread, interpolateParams);\r\n }\r\n notify({\r\n message: translated,\r\n type: colour,\r\n displayTime: time,\r\n closeOnClick: true,\r\n width: \"auto\",\r\n minWidth: \"250px\",\r\n position: { at: \"right top\", my: \"right top\", offset: \"-20 20\" },\r\n animation: {\r\n show: {\r\n type: \"slide\",\r\n from: {\r\n position: { at: \"right top\", my: \"right top\", offset: { x: 20 } },\r\n }\r\n },\r\n hide: {\r\n type: \"fadeOut\"\r\n }\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Show toast\r\n * @param bread translation key for the message\r\n * @param colour colour of the toast\r\n * @param time time left in the toaster in milliseconds\r\n */\r\n public pop(bread: string, colour: ToastType, time: number = 50000): void {\r\n this.popMessage(bread, null, colour, time);\r\n }\r\n\r\n /**\r\n * Show toast\r\n * @param bread translation key for the message\r\n * @interpolateParams interpolateParams\r\n * @param colour colour of the toast\r\n * @param time time left in the toaster in milliseconds\r\n */\r\n public popParams(bread: string, interpolateParams: any, colour: ToastType, time: number = 50000): void {\r\n this.popMessage(bread, interpolateParams, colour, time);\r\n }\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { AccountsLinkModel } from \"../models/accounts-link.model\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { IAppConfig, APP_CONFIG } from \"../models/app-config.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class AccountingService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private config: IAppConfig) { }\r\n\r\n public GetAccountsInfo(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}AccountsLink/GetAccountsInfo`);\r\n }\r\n\r\n public IsUsaTaxSystem(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}AccountsLink/IsUsaTaxSystem`);\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { Subject } from \"rxjs\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class LabourService {\r\n public labourChanged = new Subject();\r\n\r\n constructor() {\r\n }\r\n\r\n public LabourChanged() {\r\n this.labourChanged.next(true);\r\n }\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport { IODataService } from \"./interfaces/iodata.service\";\r\nimport { IAppConfig, APP_CONFIG } from \"../models/app-config.model\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { Region } from \"../models/region.model\";\r\nimport { Observable } from \"rxjs\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class CountryService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(\"ODataService\") private odataService: IODataService,\r\n @Inject(APP_CONFIG) private config: IAppConfig) {\r\n }\r\n\r\n public GetAllCountriesStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.config.apiLocations.ServiceSightOData}AllCountriesOD`,\r\n key: \"ID\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetRegions(countryId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Customer/GetRegions?countryCode=${countryId}`);\r\n }\r\n}\r\n","import { EquipmentStatus } from \"../../../enums/equipment-status.enum\";\r\nimport { InstallLineTypeEnum } from \"../../../enums/install-line-type.enum\";\r\nimport { GenericAttribute } from \"../../generic-attribute.model\";\r\nimport { RefrigerantData } from \"../../refrigerant/refrigerant-data.model\";\r\nimport { ServicingItem } from \"../../servicing-item.model\";\r\nimport { EquipmentCfts } from \"../equipment-cfts.model\";\r\n\r\nexport class Equipment extends RefrigerantData {\r\n LineId: string;\r\n EquipId: number;\r\n Equip: string;\r\n MakeModelId: number;\r\n MakeModelInstallId: number;\r\n Status: EquipmentStatus;\r\n SerialNo: string;\r\n CustomerId: number;\r\n SiteId: number;\r\n ContactId?: number;\r\n SalesWarrantyLength?: number;\r\n SalesWarrantyLengthMeterUnits?: number;\r\n SalesWarrantyStart: Date;\r\n CustomersEquipNo: string;\r\n UserRef1EquipId?: number;\r\n UserRef2Equip: string;\r\n UserRef3Equip: string;\r\n MakeModelImage: string;\r\n LocationId?: number;\r\n Notes: string;\r\n Attributes: Array = [];\r\n Servicing: Array = [];\r\n EquipItemId: number;\r\n Inspections: Array;\r\n WorkRequired: string;\r\n ReasonNotDone: string;\r\n Make: string;\r\n Model: string;\r\n Timestamp?: number;\r\n AddedToJobId?: number;\r\n FurtherWork: boolean;\r\n WarningNotes: string;\r\n WarrantyStatus: boolean;\r\n Value: number;\r\n SiteEquipId: string;\r\n EquipmentSystemId: number;\r\n MeterUnits?: number;\r\n Cfts?: EquipmentCfts;\r\n Price?: number;\r\n ConditionId: number;\r\n ConditionColour: string;\r\n ConditionName: string;\r\n ConditionDescription: string;\r\n StoreId?: number;\r\n MarkAsOutOfAction: boolean = false;\r\n Sfg20ScheduleId: number;\r\n Sfg20FrequencyInterval?: number;\r\n Sfg20FrequencyPeriod?: string;\r\n InstallLineType?: InstallLineTypeEnum;\r\n Qty?: number;\r\n Cost?: number;\r\n IsInstall: boolean = false;\r\n}\r\n","import { ServiceParts } from \"./service-parts.model\";\r\nimport { ServicingComponentUsageEnum } from \"../enums/servicing-component-usage.enum\";\r\n\r\nexport class ServicingItem {\r\n public ServiceLevelId: string;\r\n public DefaultJobType: number;\r\n public Priority: number;\r\n public MakeModelId: number;\r\n public NextDue: Date | string;\r\n public LastService: Date;\r\n public Price: number;\r\n public IntervalUnits: number;\r\n public Interval: number;\r\n public MeterUnits: number;\r\n public NextDueCalcTypeId: number;\r\n public LabourBudgetHours: number;\r\n public InspectTemplateId?: number;\r\n public JobInspectionId?: number;\r\n public BackgroundColor: number;\r\n public IsNew: boolean;\r\n public ComponentUsedOn: ServicingComponentUsageEnum;\r\n public ServiceParts: ServiceParts[] = [];\r\n public WorkDescription: string;\r\n public Sfg20FrequencyInterval?: number;\r\n public Sfg20FrequencyPeriod?: string;\r\n}\r\n","export class CustomerContact {\r\n public FirstName: string;\r\n public LastName: string;\r\n public Telephone: string;\r\n public Email: string;\r\n}\r\n","import { CustomerTypeModel } from \"./customer-type.model\";\r\nimport { CustomerStatus } from \"../enums/customer-status.enum\";\r\nimport { CustomerContact } from \"./customer-contact.model\";\r\n\r\nexport class CustomerModel {\r\n constructor() {\r\n this.CustomerContactDetails = new CustomerContact();\r\n }\r\n\r\n public CustomerID: number;\r\n public InvoiceID: number;\r\n public Status: CustomerStatus;\r\n public get IsCustomer(): boolean {\r\n return this.CustomerID === this.InvoiceID;\r\n }\r\n public Name: string;\r\n public Alpha: string;\r\n public ManagingAgentID: number;\r\n public Address1: string;\r\n public Address2: string;\r\n public Address3: string;\r\n public Address4: string;\r\n public PostCode: string;\r\n public CountryID: number;\r\n public CountryList: { Id: number; Name: string }[];\r\n public OrderNoRequired: number;\r\n public InvGroupingID: number;\r\n public Type: CustomerTypeModel;\r\n public WhatThreeWords: string;\r\n public W3Wupdated: boolean;\r\n public CustomerContactDetails: CustomerContact;\r\n}\r\n","export enum TransactionItem {\r\n Cylinder = 1,\r\n Equipment = 2,\r\n System = 3\r\n}\r\n","import { TransactionStatus } from \"../../enums/transaction-status.enum\";\r\nimport { RefrigerantTransactionType } from \"../../pipes/enums/refrigerant-transaction-type.enum\";\r\nimport { TransactionItem } from \"../transaction-item\";\r\n\r\nexport class RefrigerantTransaction {\r\n TransactionId: number;\r\n LogDate: Date;\r\n CreatedDate: Date;\r\n Weight: number;\r\n CorrectedWeight: number;\r\n Employee: string;\r\n Engineer: string;\r\n TransactionType: RefrigerantTransactionType;\r\n Refrigerant: string;\r\n SrcTypeId: TransactionItem;\r\n DestTypeId: TransactionItem;\r\n SrcDisplayId: string;\r\n DestDisplayId: string;\r\n SrcLinkId: number;\r\n DestLinkId: number;\r\n SrcSerialNumber: string;\r\n DestSerialNumber: string;\r\n Make: string;\r\n Model: string;\r\n Reference: number;\r\n ReferenceStr: string;\r\n Notes: string;\r\n GlobalWarmingPotential: number;\r\n WorkDesc: string;\r\n Customer: string;\r\n Site: string;\r\n CertificateNumber: string;\r\n GroupId: number;\r\n RefrigerantTypeId: number;\r\n SrcId: number;\r\n DestId: number;\r\n EngineerId: number;\r\n EmployeeId: number;\r\n LoggedFromMobile: boolean;\r\n LinkedDocumentTypeId?: number;\r\n LinkedDocId?: number;\r\n LinkedSubDocId?: number;\r\n Status?: TransactionStatus;\r\n CustomerId?: number;\r\n SiteId?: number;\r\n ManagingAgentId?: number;\r\n}\r\n","import { RefrigerantData } from \"../../refrigerant/refrigerant-data.model\";\r\n\r\nexport class CustomerEquipmentSystemModel extends RefrigerantData {\r\n EquipmentSystemId: number;\r\n CustomerId: number;\r\n SystemName: string;\r\n SystemDescription: string;\r\n}\r\n","import { CylinderIdentificationStyle } from \"servicesight-components\";\r\nimport { SupplierPricesModel } from \"../supplier-prices.model\";\r\n\r\nexport class RefrigerantTypeModel {\r\n RefrigerantTypeId: number;\r\n Name: string;\r\n ChemicalName: string;\r\n GlobalWarmingPotential: number;\r\n OzoneDepletionPotential?: number;\r\n Status: boolean = true;\r\n CylinderStyle: CylinderIdentificationStyle;\r\n Colour1: string;\r\n Colour2: string;\r\n Colour3: string;\r\n SupplierPrices: SupplierPricesModel[];\r\n ProductTaxCodeId: number;\r\n SellingPrice: number;\r\n SaleAccount: string;\r\n SaleDepartment: string;\r\n CostAccount: string;\r\n CostDepartment: string;\r\n ValuationAccount: string;\r\n}\r\n","import { FormMessage } from \"../../components/form-messages/models/form-message.model\";\r\nimport { Validatable } from \"../i-validatable\";\r\nimport { ViewModelBase } from \"./view-mode-base.interface\";\r\n\r\nexport abstract class ViewModel implements Validatable, ViewModelBase {\r\n\r\n private model: T;\r\n\r\n public get Model(): T {\r\n return this.model;\r\n };\r\n\r\n public ModelChanged: () => void;\r\n\r\n constructor(private Data: T) {\r\n this.model = new Proxy(this.Data, {\r\n get: (obj, name) => {\r\n return obj[name];\r\n },\r\n set: (obj, name, value) => {\r\n obj[name] = value;\r\n this.changed();\r\n return true;\r\n },\r\n });\r\n }\r\n\r\n private changed(): void {\r\n if (this.ModelChanged) {\r\n this.ModelChanged();\r\n }\r\n }\r\n\r\n abstract Validate(): FormMessage[];\r\n}\r\n","import { EventEmitter, SimpleChanges } from \"@angular/core\";\r\nimport { ViewModelBase } from \"./view-mode-base.interface\";\r\n\r\nexport abstract class ViewModelComponent, T2 extends object> {\r\n public Model: T;\r\n\r\n abstract ModelChanged: EventEmitter;\r\n\r\n public onChanges(changes: SimpleChanges) {\r\n if (changes.Model) {\r\n this.Model.ModelChanged = () => this.ModelChanged.emit(this.Model);\r\n }\r\n };\r\n}\r\n","export class CollectionProxy extends Array {\r\n\r\n public ModelChanged: () => void;\r\n\r\n constructor(private data: Array) {\r\n super();\r\n\r\n super.push(...this.data);\r\n\r\n // Set the prototype explicitly.\r\n Object.setPrototypeOf(this, CollectionProxy.prototype);\r\n\r\n return new Proxy(this, {\r\n get: (obj, key) => {\r\n const result = obj[key];\r\n return this.isObject(result) ? this.getProperty(result) : result;\r\n },\r\n\r\n set: (obj, key, value) => {\r\n // throws an error if value is null (result is null => falsish)\r\n obj[key] = value;\r\n this.changed();\r\n return true;\r\n }\r\n });\r\n }\r\n\r\n public push(...items: T[]): number {\r\n const result = super.push(...items);\r\n this.changed();\r\n return result;\r\n }\r\n\r\n public pop(): T {\r\n const result = super.pop();\r\n this.changed();\r\n return result;\r\n }\r\n\r\n public remove(func: (model: T) => boolean): void {\r\n let index: number = 0;\r\n\r\n while(index < this.length) {\r\n if (func(this[index])) {\r\n this.splice(index, 1);\r\n } else {\r\n index++;\r\n }\r\n }\r\n\r\n this.changed();\r\n }\r\n\r\n private isObject(value: any) {\r\n return value !== null && typeof(value) === \"object\";\r\n }\r\n\r\n private getProperty(property) {\r\n return new Proxy(property, {\r\n get: (obj, name) => {\r\n return obj[name];\r\n },\r\n set: (obj, name, value) => {\r\n obj[name] = value;\r\n this.changed();\r\n return true;\r\n },\r\n });\r\n }\r\n\r\n private changed(): void {\r\n if (this.ModelChanged) {\r\n this.ModelChanged();\r\n }\r\n }\r\n\r\n // identifies this as an array - allows the contents to be iterated over\r\n static get [Symbol.species](): ArrayConstructor {\r\n return Array;\r\n }\r\n}\r\n","import { FormMessage } from \"../../components/form-messages/models/form-message.model\";\r\nimport { Validatable } from \"../i-validatable\";\r\nimport { CollectionProxy } from \"./collection-proxy.class\";\r\nimport { ViewModelBase } from \"./view-mode-base.interface\";\r\n\r\nexport abstract class CollectionViewModel implements Validatable, ViewModelBase> {\r\n\r\n private model: CollectionProxy;\r\n\r\n public get Model(): CollectionProxy {\r\n return this.model;\r\n }\r\n\r\n public ModelChanged: () => void;\r\n\r\n constructor(private data: Array) {\r\n this.model = new CollectionProxy(this.data);\r\n this.model.ModelChanged = () => this.Changed();\r\n }\r\n\r\n private Changed(): void {\r\n if (this.ModelChanged) {\r\n this.ModelChanged();\r\n }\r\n }\r\n\r\n abstract Validate(): FormMessage[];\r\n}\r\n","export class EngineerType {\r\n TypeId: number;\r\n Name: string;\r\n Description: string;\r\n}\r\n","export class JobGroupModel {\r\n JobGroupID: number;\r\n JobGroup: string;\r\n Description: string;\r\n}\r\n","export class EquipmentConditionModel {\r\n ConditionId: number;\r\n SortOrder: number;\r\n Name: string;\r\n Description: string;\r\n Colour: string;\r\n Ooa: boolean;\r\n}\r\n","export enum ToastType {\r\n burnt = \"error\",\r\n dark = \"warning\",\r\n medium = \"success\",\r\n light = \"info\"\r\n}\r\n","export enum CreditElementTypeEnum {\r\n FlatCharge = 0,\r\n Labour = 1,\r\n Misc = 2,\r\n Parts = 3,\r\n Equipments = 4,\r\n Refrigerant = 5\r\n}\r\n","export enum CreditTypeEnum {\r\n Hire =\t1,\r\n Maintenance = 2,\r\n EquipmentSales = 3,\r\n MiscSales = 4,\r\n PartsSales = 5,\r\n Job = 6,\r\n SalesOrder = 7\r\n}\r\n","export enum StoreType {\r\n Store = 1,\r\n Van = 2,\r\n Consignment = 3\r\n}\r\n","export enum AccountType {\r\n Customer = 1,\r\n Site = 2,\r\n Prospect = 3,\r\n ManagingAgent = 4\r\n}\r\n","import { TranslateHttpLoader } from \"@ngx-translate/http-loader\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\n\r\n// eslint-disable-next-line prefer-arrow/prefer-arrow-functions\r\nexport function HttpLoaderFactory(httpClient: HttpClient) {\r\n return new TranslateHttpLoader(httpClient, \"assets/i18n/\", \".json\");\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { CanDeactivate } from \"@angular/router\";\r\nimport { Observable } from \"rxjs\";\r\nimport { first } from \"rxjs/operators\";\r\nimport { ComponentCanDeactivate } from \"./interfaces/component-can-deactivate.interface\";\r\nimport { LeavingFormMessageService } from \"../services/leaving-form-message.service\";\r\n\r\n@Injectable()\r\nexport class CanDeactivateGuard implements CanDeactivate {\r\n\r\n public constructor(private leavingFormMessageService: LeavingFormMessageService) { }\r\n\r\n public canDeactivate(component: ComponentCanDeactivate): Observable | boolean {\r\n return true; // todo - hack: to turn off this feature whilst its really broken\r\n\r\n if (component.canDeactivate()) {\r\n return true;\r\n }\r\n\r\n if (component.canDeactivateCallback === undefined) {\r\n this.leavingFormMessageService.ShowInfoMessage(true);\r\n return this.leavingFormMessageService.Result.pipe(first());\r\n } else {\r\n return component.canDeactivateCallback();\r\n }\r\n }\r\n}\r\n","import { Injectable, Injector } from \"@angular/core\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class Ng1ReminderService {\r\n private $injector: any;\r\n\r\n private get $Injector(): any {\r\n if (!this.$injector) {\r\n this.$injector = this.injector.get(\"$injector\");\r\n }\r\n return this.$injector;\r\n }\r\n\r\n private get reminderService(): any {\r\n return this.$Injector.get(\"ng1reminderService\");\r\n }\r\n\r\n constructor(private injector: Injector) { }\r\n\r\n public CreateQuoteReminder(salesQuotationId: number, revisionId: number, contactId: number, salesOpportunityId: number, customerId: number): any {\r\n return this.reminderService.CreateQuoteReminder(salesQuotationId, revisionId, contactId, salesOpportunityId, customerId);\r\n }\r\n\r\n public CreateJobReminder(jobId: number, contactId: number): any {\r\n return this.reminderService.CreateJobReminder(jobId, contactId);\r\n }\r\n\r\n public CreateEquipmentReminder(equipmentId: number, contactId: number, equipName: string): any {\r\n return this.reminderService.CreateEquipmentReminder(equipmentId, contactId, equipName);\r\n }\r\n\r\n public CreateContractReminder(contractId: number, customerId: number): any {\r\n return this.reminderService.CreateContractReminder(contractId, customerId);\r\n }\r\n\r\n public CreateStockPartReminder(id: number, partNo: string): any {\r\n return this.reminderService.CreateStockPartReminder(id, partNo);\r\n }\r\n\r\n public CreatePurchaseOrderReminder(purchaseOrderNumber: number, contactId: number): any {\r\n return this.reminderService.CreatePurchaseOrderReminder(purchaseOrderNumber, contactId);\r\n }\r\n\r\n public CreateGoodsReceivedNoteReminder(goodsReceivedNumber: number, contactId: number): any {\r\n return this.reminderService.CreateGoodsReceivedNoteReminder(goodsReceivedNumber, contactId);\r\n }\r\n\r\n public CreateStockAdjustmentReminder(adjustmentId: number): any {\r\n return this.reminderService.CreateStockAdjustmentReminder(adjustmentId);\r\n }\r\n\r\n public CreateSupplierReminder(supplierId: number): any {\r\n return this.reminderService.CreateSupplierReminder(supplierId);\r\n }\r\n\r\n public CreateCreditNotesReminder(creditId: number): any {\r\n return this.reminderService.CreateCreditNotesReminder(creditId);\r\n }\r\n\r\n public CreateSalesOrderReminder(salesId: number, contactId: number): any {\r\n return this.reminderService.CreateSalesOrderReminder(salesId, contactId);\r\n }\r\n\r\n public CreateDespatchNotesReminder(despatchId: number, customerId: number): any {\r\n return this.reminderService.CreateDespatchNotesReminder(despatchId, customerId);\r\n }\r\n\r\n public CreateSalesOpportunityReminder(salesOppId: number, customerId: number, contactId: number): any {\r\n return this.reminderService.CreateSalesOpportunityReminder(salesOppId, customerId, contactId);\r\n }\r\n\r\n public CreateReturnsNoteReminder(returnsNoteNumber: number, supplierId: number): any {\r\n return this.reminderService.CreateReturnsNoteReminder(returnsNoteNumber, supplierId);\r\n }\r\n\r\n public CreateCylinderReminder(cylinderId: number, cylinderNo: string): any {\r\n return this.reminderService.CreateCylinderReminder(cylinderId, cylinderNo);\r\n }\r\n\r\n public CreateFGasLogReminder(transactionId: number, refrigerantTransactionType: number, transactionReference: string): any {\r\n return this.reminderService.CreateFGasLogReminder(transactionId, transactionId, refrigerantTransactionType, transactionReference);\r\n }\r\n\r\n public CreatePurchaseNoteReminder(purchaseNoteId: number, description: string, reference: string, customerId: number): any {\r\n return this.reminderService.CreatePurchaseNoteReminder(purchaseNoteId, description, reference, customerId);\r\n }\r\n}\r\n","import { HttpClient, HttpParams } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { MessageDocTypeIds } from \"../../../shared/enums/messages/message-doc-type-ids.enum\";\r\nimport { MessageTypes } from \"../../../shared/enums/messages/message-types.enum\";\r\nimport { MessageDetailsModel } from \"../../../shared/models/messages/message-details.model\";\r\nimport { MessageList } from \"../../../shared/models/messages/message-list.model\";\r\nimport { MessageNavList } from \"../../../shared/models/messages/message-nav-list.model\";\r\nimport { MessagesResponse } from \"../../../shared/models/messages/messages-response.model\";\r\nimport { NewMessageParameters } from \"../../../shared/models/messages/new-message-parameters.model\";\r\nimport { RecipientCollectionModel } from \"../../../shared/models/messages/recipient-collection.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class MessageService {\r\n private newMessageParameters = {\r\n id: 0,\r\n type: null,\r\n docTypeId: null,\r\n docId: null,\r\n editDraft: null,\r\n reference: null\r\n };\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) { }\r\n\r\n public NewMessage(): Observable {\r\n return this.http.get(`${this.appConfig.apiLocations.ServiceSight}Messaging/NewMessage`);\r\n }\r\n\r\n public GetReplyForMessageId(messageId: number): Observable {\r\n return this.http.get(`${this.appConfig.apiLocations.ServiceSight}Messaging/GetReplyForMessageId?messageId=${messageId}`);\r\n }\r\n\r\n public GetReplyAllForMessageId(messageId: number): Observable {\r\n return this.http.get(`${this.appConfig.apiLocations.ServiceSight}Messaging/GetReplyAllForMessageId?messageId=${messageId}`);\r\n }\r\n\r\n public SendMessage(model: MessageDetailsModel, files: any): Observable {\r\n const formData = new FormData();\r\n for (let i = 0; i < files.length; i++) {\r\n formData.append(\"File\" + i, files[i], files[i].name);\r\n }\r\n formData.append(\"model\", JSON.stringify(model));\r\n return this.http.post(`${this.appConfig.apiLocations.ServiceSight}Messaging/SendMessageAsync`, formData);\r\n }\r\n\r\n public SaveDraft(model: MessageDetailsModel, files: any): Observable {\r\n const formData = new FormData();\r\n for (let i = 0; i < files.length; i++) {\r\n formData.append(\"File\" + i, files[i]);\r\n }\r\n formData.append(\"model\", JSON.stringify(model));\r\n return this.http.post(`${this.appConfig.apiLocations.ServiceSight}Messaging/SaveDraftAsync`, formData);\r\n }\r\n\r\n public Forward(messageId: number): Observable {\r\n return this.http.get(`${this.appConfig.apiLocations.ServiceSight}Messaging/Forward?messageId=${messageId}`);\r\n }\r\n\r\n public GetDraftMessageId(messageId: number): Observable {\r\n return this.http.get(`${this.appConfig.apiLocations.ServiceSight}Messaging/GetDraftForMessageId?messageId=${messageId}`);\r\n }\r\n\r\n public DeleteMessage(messageId: number): Observable {\r\n return this.http.get(`${this.appConfig.apiLocations.ServiceSight}Messaging/DeleteMessageAsync?messageId=${messageId}`);\r\n }\r\n\r\n public GetConversationList(): Observable {\r\n return this.http.get(`${this.appConfig.apiLocations.ServiceSight}Messaging/GetConversationsList`);\r\n }\r\n\r\n public GetConversationDetail(messageId: number): Observable {\r\n return this.http.get(`${this.appConfig.apiLocations.ServiceSight}Messaging/GetConversationDetail?messageId=${messageId}`);\r\n }\r\n\r\n public GetMessagesNavigation(): Observable {\r\n return this.http.get(`${this.appConfig.apiLocations.ServiceSight}Messaging/GetMessagesNavigation`);\r\n }\r\n\r\n public Archive(message: MessageDetailsModel): Observable {\r\n return this.http.post(`${this.appConfig.apiLocations.ServiceSight}Messaging/ArchiveAsync`, message);\r\n }\r\n\r\n public GetRecipientListPhotoFaces(messageId: number): Observable {\r\n return this.http.get(`${this.appConfig.apiLocations.ServiceSight}Messaging/GetRecipientListPhotoFaces?messageId=${messageId}`);\r\n }\r\n\r\n public GetRecipientsCollection(): Observable> {\r\n return this.http.get>(`${this.appConfig.apiLocations.ServiceSight}Messaging/GetRecipientsCollection`);\r\n }\r\n\r\n public GetRefMessageForTypeAndID(entityTypeAndId: number | string, reference?: string): Observable {\r\n let params = new HttpParams().append(\"entityTypeAndId\", entityTypeAndId);\r\n if (reference !== undefined) {\r\n params = params.append(\"reference\", reference);\r\n }\r\n\r\n return this.http.get(`${this.appConfig.apiLocations.ServiceSight}Messaging/GetRefMessageForTypeAndId`, { params });\r\n }\r\n\r\n public DownloadDocument(file: any): Observable {\r\n return this.http.get(`${this.appConfig.apiLocations.ServiceSight}Document/DownloadDocumentAsync?file=${file}`,\r\n { observe: \"response\", responseType: \"blob\" as \"json\" });\r\n }\r\n\r\n public SetNewMessageParameters(id, type: MessageTypes, editDraft, docTypeId?: MessageDocTypeIds, docId?: number | string, reference?: string): void {\r\n this.newMessageParameters.id = id;\r\n this.newMessageParameters.type = type;\r\n this.newMessageParameters.editDraft = editDraft;\r\n this.newMessageParameters.reference = reference;\r\n if (docTypeId != null) {\r\n this.newMessageParameters.docTypeId = docTypeId;\r\n }\r\n if (docId != null) {\r\n this.newMessageParameters.docId = docId;\r\n }\r\n }\r\n\r\n public GetNewMessageParameters(): NewMessageParameters {\r\n return this.newMessageParameters;\r\n }\r\n}\r\n","export enum MessageDocTypeIds {\r\n Stock = 2,\r\n ServiceContract = 3,\r\n Job = 4,\r\n Invoice = 5,\r\n Equip = 6,\r\n SalesOrder = 8,\r\n PurchaseOrder = 9,\r\n DespatchNote = 10,\r\n GoodsReceived = 11,\r\n StockAdjustment = 12,\r\n Credit = 15,\r\n ReturnsNote = 16,\r\n PurchaseNote = 17,\r\n Customer = 18,\r\n SalesOpportunity = 19,\r\n Supplier = 20,\r\n Reminders = 26,\r\n Contact = 28,\r\n Quotes = 31,\r\n Batch = 34,\r\n Cylinder = 36,\r\n FGasLog = 37\r\n}\r\n","export enum MessageTypes {\r\n NewMessage,\r\n Draft,\r\n Forward,\r\n RefMessage,\r\n RefEmail,\r\n ReplyAll,\r\n Reply,\r\n ClearForm,\r\n ReplyFromNotification\r\n}\r\n","import { DocumentRateModel } from \"./document-rate.model\";\r\n\r\nexport class CreditNotesFormData {\r\n CreditId: number;\r\n\r\n CustomerId: number;\r\n\r\n SiteId: number;\r\n\r\n CreditedDate: Date = new Date();\r\n\r\n InvoiceDate: Date;\r\n\r\n Status: number;\r\n\r\n NoteId: number;\r\n\r\n Notes: string = \"\";\r\n\r\n InternalNotes: string = \"\";\r\n\r\n DocValue: number;\r\n\r\n ReverseFlatChargeSelected: boolean;\r\n\r\n CreditTypeId: number;\r\n\r\n InvoiceNoteId: number;\r\n\r\n ExchangeRate: DocumentRateModel[];\r\n\r\n CurrencySymbol: string;\r\n\r\n Elements: { LineId: number; IsSelected: boolean; SalesValue: number; DocumentId: number }[];\r\n}\r\n","\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n {{ 'system.type.job' | translate }} {{ data.value }}\r\n
\r\n\r\n
\r\n {{ data.value }}\r\n {{ data.value | number: '1.5-5' }}\r\n -\r\n
\r\n\r\n
\r\n {{ data.value | currency: baseCurrencySymbol }}\r\n -\r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{baseCurrencySymbol}}\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{baseCurrencySymbol}}\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{baseCurrencySymbol}}\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{baseCurrencySymbol}}\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n {{'credit-note.credit-total' | translate}}\r\n \r\n
{{totalCredit | currency: baseCurrencySymbol}}
\r\n
{{totalCreditInCustomerCurrrency | currency: customerCurrencySymbol}}
\r\n \r\n \r\n \r\n \r\n
\r\n","import { Component, EventEmitter, Input, OnChanges, Output, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport { CreditElementTypeEnum, CreditNoteStatus, CurrencyPipe } from \"servicesight-shared\";\r\nimport { CreditNotesFormData } from \"../../shared/models/credit-notes-form-data\";\r\nimport { CreditNotesGridForJobModel } from \"../../shared/models/credit-notes-grid-for-job.model\";\r\n\r\n@Component({\r\n selector: \"app-credit-notes-grid\",\r\n templateUrl: \"./credit-notes-grid-for-job.component.html\",\r\n styleUrls: [\"./credit-notes-grid-for-job.component.scss\"]\r\n})\r\nexport class CreditNotesGridForJobComponent implements OnChanges {\r\n @ViewChild(\"grid\") public grid: DxDataGridComponent;\r\n @Input() dataSource: Array;\r\n @Input() status: number;\r\n @Input() creditNotesDataForm: CreditNotesFormData;\r\n @Output() public makeFormDirty = new EventEmitter();\r\n private readonly baseCurrencyCode: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencyCode\"));\r\n public baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n public customerCurrencySymbol: string;\r\n public totalCredit: number = 0;\r\n public totalCreditInCustomerCurrrency: number = 0;\r\n public showTotalCreditInCustomerCurrrency: boolean = false;\r\n public CreditNoteStatus = CreditNoteStatus;\r\n public CreditElementTypeEnum = CreditElementTypeEnum;\r\n public selectedInvoiceItems: Array = [];\r\n public isQtyEditable: boolean;\r\n public isCostEditable: boolean;\r\n public isRateEditable: boolean;\r\n public isMultiplierEditable: boolean;\r\n public isUnitsEditable: boolean;\r\n public isChargeEditable: boolean;\r\n public isUnitPriceVisible: boolean;\r\n\r\n constructor(private currencyPipe: CurrencyPipe) {\r\n this.customiseValue = this.customiseValue.bind(this);\r\n }\r\n\r\n ngOnChanges() {\r\n if (this.dataSource) {\r\n this.dataSource.map(x => {\r\n if (x.IsSelected) {\r\n this.selectedInvoiceItems.push(x.LineId);\r\n }\r\n\r\n if (x.CreditElementType === CreditElementTypeEnum.Parts) {\r\n x.PricePerItem = x.SalesValue;\r\n x.SalesValue = x.PricePerItem * x.Qty;\r\n }\r\n });\r\n }\r\n\r\n if (this.creditNotesDataForm) {\r\n this.customerCurrencySymbol = this.creditNotesDataForm.CurrencySymbol;\r\n this.showTotalCreditInCustomerCurrrency = this.customerCurrencySymbol !== this.baseCurrencySymbol;\r\n }\r\n }\r\n\r\n editRow(data): void {\r\n this.isCostEditable = data.data.CreditElementType !== CreditElementTypeEnum.FlatCharge && data.data.IsReversedRow;\r\n this.isQtyEditable = data.data.CreditElementType !== CreditElementTypeEnum.FlatCharge\r\n && data.data.CreditElementType !== CreditElementTypeEnum.Misc && data.data.CreditElementType !== CreditElementTypeEnum.Labour;\r\n this.isMultiplierEditable = data.data.CreditElementType === CreditElementTypeEnum.Labour;\r\n this.isRateEditable = data.data.CreditElementType === CreditElementTypeEnum.Labour;\r\n this.isUnitsEditable = data.data.CreditElementType === CreditElementTypeEnum.Labour;\r\n this.isChargeEditable = data.data.CreditElementType !== CreditElementTypeEnum.Labour &&\r\n data.data.CreditElementType !== CreditElementTypeEnum.Parts;\r\n this.isUnitPriceVisible = data.data.CreditElementType === CreditElementTypeEnum.Parts;\r\n this.grid.instance.cancelEditData();\r\n setTimeout(() => this.grid.instance.editRow(data.rowIndex), 0); // setTimeout is used for proper loading editing form type\r\n }\r\n\r\n handleSelectionChange(): void {\r\n this.handleTotalCredit();\r\n this.handleCheckboxes();\r\n this.handleDataChange();\r\n }\r\n\r\n private handleCheckboxes(): void {\r\n if (this.selectedInvoiceItems.length) {\r\n this.dataSource.map(x => x.IsSelected = this.selectedInvoiceItems.includes(x.LineId));\r\n } else {\r\n this.dataSource.forEach(e => { e.IsSelected = false; });\r\n }\r\n }\r\n\r\n public rowUpdated(): void {\r\n this.dataSource.map(x => {\r\n if (x.CreditElementType === CreditElementTypeEnum.Labour) {\r\n x.SalesValue = x.Rate * x.Multiplier * x.Units;\r\n } else if (x.CreditElementType === CreditElementTypeEnum.Parts) {\r\n x.SalesValue = x.PricePerItem * x.Qty;\r\n }\r\n });\r\n this.handleTotalCredit();\r\n this.handleDataChange();\r\n }\r\n\r\n public handleDataChange(): void {\r\n this.makeFormDirty.emit(true);\r\n }\r\n\r\n private handleTotalCredit(): void {\r\n const selectedRows = [];\r\n this.totalCredit = 0;\r\n this.totalCreditInCustomerCurrrency = 0;\r\n this.selectedInvoiceItems.map(id => selectedRows.push(this.dataSource.find(x => x.LineId === id)));\r\n selectedRows.map(x => this.totalCredit += x.SalesValue);\r\n selectedRows.map(x => this.totalCreditInCustomerCurrrency += (x.SalesValue * (this.creditNotesDataForm.ExchangeRate.find(i => i.DocumentId === x.DocumentId).ExchangeRate)));\r\n }\r\n\r\n public customiseValue(data): string {\r\n return this.currencyPipe.transform(data.value, this.baseCurrencyCode);\r\n }\r\n}\r\n","\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n \r\n \r\n\r\n
\r\n {{ 'system.type.service' | translate }} {{ data.value }}\r\n
\r\n\r\n
\r\n {{ data.value | currency: baseCurrencySymbol }}\r\n -\r\n
\r\n\r\n
\r\n {{'credit-note.equip-no' | translate}} {{data.data.Narrative1}}\r\n
\r\n\r\n
\r\n {{'credit-note.maintenance-cover' | translate}}\r\n {{data.data.FromDate | date: 'shortDate'}}\r\n {{'label.to.lower' | translate}}\r\n {{data.data.ToDate | date: 'shortDate'}}\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n \r\n {{'credit-note.total' | translate}}\r\n \r\n
{{totalCredit | currency: baseCurrencySymbol}}
\r\n
{{totalCreditInCustomerCurrrency | currency: customerCurrencySymbol}}
\r\n \r\n \r\n \r\n
\r\n","import { Component, EventEmitter, Input, OnChanges, Output, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport { CreditNoteStatus, CurrencyPipe } from \"servicesight-shared\";\r\nimport { CreditNotesFormData } from \"../../shared/models/credit-notes-form-data\";\r\nimport { CreditNotesGridForMaintenanceModel } from \"../../shared/models/credit-notes-grid-for-maintenance.model\";\r\n\r\n@Component({\r\n selector: \"app-credit-notes-grid-for-maintenance\",\r\n templateUrl: \"./credit-notes-grid-for-maintenance.component.html\",\r\n styleUrls: [\"./credit-notes-grid-for-maintenance.component.scss\"]\r\n})\r\nexport class CreditNotesGridForMaintenanceComponent implements OnChanges {\r\n @ViewChild(\"grid\") public grid: DxDataGridComponent;\r\n @Input() dataSource: Array;\r\n @Input() status: number;\r\n @Input() creditNotesDataForm: CreditNotesFormData;\r\n @Output() public makeFormDirty = new EventEmitter();\r\n public baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n private readonly baseCurrencyCode: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencyCode\"));\r\n public customerCurrencySymbol: string;\r\n public totalCredit: number = 0;\r\n public totalCreditInCustomerCurrrency: number = 0;\r\n public showTotalCreditInCustomerCurrrency: boolean = false;\r\n public CreditNoteStatus = CreditNoteStatus;\r\n public selectedInvoiceItems: Array = [];\r\n\r\n constructor(private currencyPipe: CurrencyPipe) {\r\n this.customiseValue = this.customiseValue.bind(this);\r\n }\r\n\r\n ngOnChanges() {\r\n if (this.dataSource) {\r\n this.dataSource.map(x => {\r\n if (x.IsSelected) {\r\n this.selectedInvoiceItems.push(x.LineId);\r\n }\r\n });\r\n }\r\n\r\n if (this.creditNotesDataForm) {\r\n this.customerCurrencySymbol = this.creditNotesDataForm.CurrencySymbol;\r\n this.showTotalCreditInCustomerCurrrency = this.customerCurrencySymbol !== this.baseCurrencySymbol;\r\n }\r\n }\r\n\r\n public editRow(data): void {\r\n this.grid.instance.editRow(data.rowIndex);\r\n }\r\n\r\n public rowUpdated() {\r\n this.handleTotalCredit();\r\n this.handleDataChange();\r\n }\r\n\r\n public handleSelectionChange() {\r\n this.handleTotalCredit();\r\n this.handleCheckboxes();\r\n this.handleDataChange();\r\n }\r\n\r\n public handleDataChange(): void {\r\n this.makeFormDirty.emit(true);\r\n }\r\n\r\n public customiseValue(data): string {\r\n return this.currencyPipe.transform(data.value, this.baseCurrencyCode);\r\n }\r\n\r\n private handleTotalCredit(): void {\r\n const selectedRows = [];\r\n this.totalCredit = 0;\r\n this.selectedInvoiceItems.map(id => selectedRows.push(this.dataSource.find(x => x.LineId === id)));\r\n selectedRows.map(x => this.totalCredit += x.SalesValue);\r\n selectedRows.map(x => this.totalCreditInCustomerCurrrency += (x.SalesValue * (this.creditNotesDataForm.ExchangeRate.find(i => i.DocumentId === x.DocumentId).ExchangeRate)));\r\n }\r\n\r\n private handleCheckboxes(): void {\r\n if (this.selectedInvoiceItems) {\r\n this.dataSource.map(x => x.IsSelected = this.selectedInvoiceItems.includes(x.LineId));\r\n }\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG, IODataService, IProteanResponse, ProteanResponse } from \"servicesight-shared\";\r\nimport { CreditNotesEditingJobDataModel } from \"../shared/models/credit-notes-editing-job-data.model\";\r\nimport { CreditNotesEditingMaintDataModel } from \"../shared/models/credit-notes-editing-maint-data.model\";\r\nimport { CreditNotesFormData } from \"../shared/models/credit-notes-form-data\";\r\nimport { Email } from \"../shared/models/email.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class CreditNotesService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(\"ODataService\") private odataService: IODataService,\r\n @Inject(APP_CONFIG) private config: IAppConfig) { }\r\n\r\n public GetCreditNoteElementsForJobOD(creditId: number): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.ServiceSightOData}CreditNoteElementsForJobOD`,\r\n key: \"LineId\",\r\n keyType: \"Int32\",\r\n paging: false,\r\n queryStringParams: {\r\n creditId\r\n }\r\n });\r\n }\r\n\r\n public GetCreditNoteElementsForMaintenanceOD(creditId: number): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.ServiceSightOData}CreditNoteElementsForMaintenanceOD`,\r\n key: \"LineId\",\r\n keyType: \"Int32\",\r\n paging: false,\r\n queryStringParams: {\r\n creditId\r\n }\r\n });\r\n }\r\n\r\n public GetCreditNoteFormData(id: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}CreditNotes/GetCreditNoteFormData?creditId=${id}`);\r\n }\r\n\r\n public EditCreditNotesData(editingData: CreditNotesEditingJobDataModel | CreditNotesEditingMaintDataModel): Observable {\r\n return this.http.post(`${this.config.apiLocations.ServiceSight}CreditNotes/EditCreditNoteData`, editingData);\r\n }\r\n\r\n public DeleteCreditNote(id: number): Observable {\r\n return this.http.delete(`${this.config.apiLocations.ServiceSight}CreditNotes/DeleteCreditNote?creditId=${id}`);\r\n }\r\n\r\n public CreditCreditNote(creditId: number): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}CreditNotes/Credit?creditId=${creditId}`;\r\n return this.http.post(url, { });\r\n }\r\n\r\n public IsFullyCredited(creditId: number): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}CreditNotes/IsFullyCredited?creditId=${creditId}`;\r\n return this.http.get(url);\r\n }\r\n\r\n public AddCreditNote(invoiceId: number): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}CreditNotes/AddCreditNote`;\r\n return this.http.post(url, invoiceId);\r\n }\r\n\r\n public GetCreditNoteEmailData(creditId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Email/GetCreditNoteEmailData?creditId=${creditId}`);\r\n }\r\n public SendCreditNoteEmail(emailData: Email): Observable {\r\n return this.http.post(`${this.config.apiLocations.ServiceSight}Email/SendCreditNoteEmail`, emailData);\r\n }\r\n}\r\n","import { QueuedEmailType } from \"../enums/queued-email-type.enum\";\r\n\r\nexport class Email {\r\n public Id: number;\r\n public InspectionId: number;\r\n public QuoteId: number;\r\n public RevisionId: number;\r\n public ContractId: number;\r\n public Emails: string[];\r\n public ReplyTo: string;\r\n public To: string;\r\n public Cc: string;\r\n public Bcc: string;\r\n public Subject: string;\r\n public Body: string;\r\n public ReadReceipt: boolean;\r\n public MarkAsSent: boolean;\r\n public Attachments: string[];\r\n public InspectionsAttachments: string[];\r\n public AttachInspectionPhotos: boolean;\r\n public CustomerID?: number;\r\n public ContactID?: number;\r\n public JobSheetID?: number;\r\n public JobSheetIds?: number[];\r\n public CompanyName: string;\r\n public Language: string;\r\n public ReportType: number;\r\n public IncludeFiles: boolean;\r\n public DataFilter: string;\r\n public EmailType: QueuedEmailType;\r\n public SenderEmployeeId: number;\r\n public TemplateId?: number;\r\n}\r\n","export enum QueuedEmailType {\r\n JobSheet = 0,\r\n Quote = 1,\r\n Inspection = 2,\r\n PurchaseOrder = 3,\r\n SalesOrder = 4,\r\n ServiceContract = 5,\r\n CreditNote = 6,\r\n GoodsReceived = 7,\r\n ReturnsNote = 8,\r\n DespatchNote = 9,\r\n Invoice = 10,\r\n InvoiceWithDocuments = 11,\r\n FGasLog = 12,\r\n WasteTransferNote = 13,\r\n StockPreview = 14,\r\n StockTake = 15,\r\n PickingNote = 16\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Injectable, Injector } from \"@angular/core\";\r\nimport { HttpCacheManager } from \"@ngneat/cashew\";\r\nimport * as JwtDecode from \"jwt-decode\";\r\nimport { BehaviorSubject, firstValueFrom, Observable, of, Subject, throwError } from \"rxjs\";\r\nimport { catchError, distinctUntilChanged, map } from \"rxjs/operators\";\r\nimport { IAuthService, APP_CONFIG } from \"servicesight-shared\";\r\nimport { AccessToken } from \"../../models/auth/access-token.model\";\r\nimport { AuthData } from \"../../models/auth/auth-data.model\";\r\nimport { LoginResponse } from \"../../models/auth/login-response.model\";\r\nimport { VersionInfo } from \"../../models/auth/version-info.model\";\r\nimport { WebAppConfig } from \"../../models/web-app-config.model\";\r\n\r\n// eslint-disable-next-line no-var\r\ndeclare var window: any;\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class AuthService implements IAuthService {\r\n private readonly AUTH_DATA_KEY: string = \"ls.authorizationData\";\r\n private tokenSubject: Subject = new Subject();\r\n private config: WebAppConfig;\r\n\r\n public deployHotJar: BehaviorSubject = new BehaviorSubject(false);\r\n\r\n public get GateKeeperUrl(): string {\r\n if (!this.config) {\r\n this.config = this.injector.get(APP_CONFIG);\r\n }\r\n\r\n return this.config.apiLocations.GateKeeper;\r\n }\r\n\r\n public get TokenUrl(): string {\r\n return this.GateKeeperUrl + \"token\";\r\n }\r\n\r\n clearToken(): void {\r\n //Nothing\r\n }\r\n\r\n constructor(\r\n private injector: Injector,\r\n private http: HttpClient,\r\n private cacheManager: HttpCacheManager) {\r\n this.IsAuthenticated.subscribe(() => {\r\n this.cacheManager.clear();\r\n });\r\n }\r\n\r\n public IsAuthenticatedSubject: BehaviorSubject = new BehaviorSubject(this.isAuthenticated);\r\n\r\n public get IsAuthenticated(): Observable {\r\n return this.IsAuthenticatedSubject.pipe(distinctUntilChanged());\r\n }\r\n\r\n public get Username(): string {\r\n return this.AuthorizationData ? this.AuthorizationData.userName : \"\";\r\n }\r\n\r\n public get CompanyId(): string {\r\n return this.AuthorizationData ? this.AuthorizationData.defaultcompanyid : \"\";\r\n }\r\n\r\n public get Token(): string {\r\n return this.AuthorizationData ? this.AuthorizationData.token : \"\";\r\n }\r\n\r\n public get IsSupportLogin(): boolean {\r\n if (this.Token && this.Token.length > 0) {\r\n const decoded = JwtDecode(this.Token);\r\n\r\n if (decoded) {\r\n return decoded.Protean_IsSupportLogin;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n public get AuthorizationData(): AuthData {\r\n return JSON.parse(localStorage.getItem(this.AUTH_DATA_KEY));\r\n }\r\n\r\n public set AuthorizationData(val: AuthData) {\r\n localStorage.setItem(this.AUTH_DATA_KEY, JSON.stringify(val));\r\n }\r\n\r\n public get UniqueUserId(): string {\r\n if (this.Token && this.Token.length > 0) {\r\n const decoded = JwtDecode(this.Token) as AccessToken;\r\n\r\n if (decoded && decoded.uid) {\r\n return decoded.uid;\r\n\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n public get EmployeeId(): number {\r\n if (this.decodedToken && this.decodedToken.Protean_EmployeeId) {\r\n return Number(this.decodedToken.Protean_EmployeeId);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n public get IsExpired(): boolean {\r\n if (this.decodedToken) {\r\n if (this.decodedToken.TrackUser === \"true\") {\r\n this.deployHotJar.next(true);\r\n }\r\n // subtract 5 minutes from expiry to account for clock skew\r\n return (this.decodedToken.exp - 300) <= Math.floor(new Date().getTime() / 1000);\r\n }\r\n\r\n return true;\r\n }\r\n\r\n\r\n public get refreshToken(): string {\r\n if (this.AuthorizationData) {\r\n return this.AuthorizationData.refreshToken;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n public get isAuthenticated(): boolean {\r\n return !!this.Token && !this.IsExpired;\r\n }\r\n\r\n public get isPortalUser(): boolean {\r\n return false;\r\n }\r\n\r\n private get decodedToken(): AccessToken {\r\n if (this.Token && this.Token.length > 0) {\r\n const decoded = JwtDecode(this.Token) as AccessToken;\r\n return decoded;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n public XeroSignIn(token: string, verificationCode: string): Observable {\r\n const form = `grant_type=password&client_id=xero&userName=${token}&password=${verificationCode}&defaultcompanyid=null&support_login=false`;\r\n const options = { headers: { \"Content-Type\": \"application/x-www-form-urlencoded\" } };\r\n\r\n return this.http.post(this.TokenUrl, form, options).pipe(catchError(e => {\r\n console.error(e);\r\n return of(null as LoginResponse);\r\n }), map(x => {\r\n if (x) {\r\n this.AuthorizationData = {\r\n token: x.access_token,\r\n userName: x.userName,\r\n refreshToken: x.refresh_token,\r\n useRefreshTokens: true,\r\n multi_company: x.multicompanyUser,\r\n defaultcompanyid: x.defaultcompanyid\r\n };\r\n\r\n localStorage.setItem(\"defaultcompanyname\", x.defaultcompanyname);\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n }));\r\n }\r\n\r\n public getVersionInfo(): Observable {\r\n return this.http.get(`${window.PROTEAN_API_SITE_URL}api/Utility/VersionInfo`);\r\n }\r\n\r\n public currentToken(): Observable {\r\n let tokenPromise: Observable;\r\n if (!this.Token) {\r\n tokenPromise = new Observable((t) => {\r\n t.next(null);\r\n t.complete();\r\n });\r\n }\r\n\r\n if (!this.IsExpired) {\r\n // hasn't expired, return token\r\n tokenPromise = new Observable((t) => {\r\n t.next(this.Token);\r\n t.complete();\r\n });\r\n } else {\r\n // get refresh\r\n tokenPromise = this.getRefresh();\r\n }\r\n\r\n return tokenPromise;\r\n }\r\n\r\n public getRefresh(): Observable {\r\n if (!this.refreshToken) {\r\n return new Observable(subscriber => {\r\n subscriber.next(null);\r\n subscriber.complete();\r\n });\r\n }\r\n\r\n return new Observable(subscriber => {\r\n const currentToken = this.Token;\r\n navigator.locks.request(\"servicesight_refresh\", async () => {\r\n const innerToken = this.Token;\r\n\r\n if (innerToken !== currentToken) {\r\n subscriber.next(innerToken);\r\n subscriber.complete();\r\n } else {\r\n try {\r\n const refresh = await firstValueFrom(this.CallRefresh());\r\n this.AuthorizationData = {\r\n token: refresh.access_token,\r\n userName: refresh.userName,\r\n refreshToken: refresh.refresh_token,\r\n useRefreshTokens: true,\r\n multi_company: refresh.multicompanyUser,\r\n defaultcompanyid: refresh.defaultcompanyid\r\n };\r\n\r\n subscriber.next(refresh.access_token);\r\n subscriber.complete();\r\n this.tokenSubject.next(refresh.access_token);\r\n this.IsAuthenticatedSubject.next(true);\r\n } catch (err) {\r\n // eslint-disable-next-line no-console\r\n console.error(\"refresh failed\");\r\n this.tokenSubject.error(err);\r\n subscriber.error(err);\r\n subscriber.complete();\r\n }\r\n }\r\n });\r\n });\r\n }\r\n\r\n private CallRefresh(): Observable {\r\n const form = `grant_type=refresh_token&client_id=Protean UI&refresh_token=${this.refreshToken}`;\r\n const options = { headers: { \"Content-Type\": \"application/x-www-form-urlencoded\" } };\r\n\r\n return this.http.post(this.TokenUrl, form, options).pipe(catchError((error) => {\r\n error.isRefreshToken = true;\r\n return throwError(() => error);\r\n }));\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG, IProteanResponse } from \"servicesight-shared\";\r\nimport { QueuedEmailType } from \"../../enums/queued-email-type.enum\";\r\nimport { Email } from \"../../models/email.model\";\r\nimport { AuthService } from \"src/app/shared/services/auth/auth.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class EmailService {\r\n private readonly quotesBaseUrl: string;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private authService: AuthService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) {\r\n this.quotesBaseUrl = this.appConfig.apiLocations.Quotes.substr(0, this.appConfig.apiLocations.Quotes.indexOf(\"api/\") + 4);\r\n }\r\n\r\n public GetEmailData(inspectionId: number): Observable {\r\n return this.http.get(this.appConfig.apiLocations.Inspections + \"Email/\" + inspectionId);\r\n }\r\n\r\n public SendEmail(emailData: Email): Observable {\r\n emailData.EmailType = QueuedEmailType.Inspection;\r\n emailData.SenderEmployeeId = this.authService.EmployeeId;\r\n return this.http.post(this.appConfig.apiLocations.ServiceSight + \"Email/QueueEmail\", emailData);\r\n }\r\n\r\n public GetQuoteEmailData(quoteId: number, revisionId: number, templateId: number): Observable {\r\n return this.http.get(this.quotesBaseUrl + `Email/${quoteId}/${revisionId}/${templateId}`);\r\n }\r\n\r\n public SendQuoteEmail(emailData: Email): Observable {\r\n return this.http.post(this.appConfig.apiLocations.ServiceSight + \"Email/SendQuoteEmail\", emailData);\r\n }\r\n\r\n public GetGeneralEmailData(entityId: number): Observable {\r\n return this.http.get(this.appConfig.apiLocations.ServiceSight + `Email/GetEmailData/${entityId}`);\r\n }\r\n\r\n public SendGeneralEmail(emailData: Email): Observable {\r\n return this.http.post(this.appConfig.apiLocations.ServiceSight + \"Email/SendEmail\", emailData);\r\n }\r\n\r\n public IncludeQuoteFiles(email: Email): Observable {\r\n return this.http.post(`${this.quotesBaseUrl}Email/IncludeFilesAsync`, email);\r\n }\r\n\r\n public GetInvoiceEmailData(invoiceId: number, templateId: number): Observable {\r\n const url = this.appConfig.apiLocations.ServiceSight + `Email/GetInvoiceEmailDataAsync?id=${invoiceId}&templateId=${templateId}`;\r\n return this.http.get(url);\r\n }\r\n\r\n public SendInvoiceEmail(emailData: Email): Observable {\r\n return this.http.post(this.appConfig.apiLocations.ServiceSight + \"Email/SendInvoiceEmail\", emailData);\r\n }\r\n\r\n public SendInvoiceWithJobDocumentsEmail(emailData: Email): Observable {\r\n return this.http.post(this.appConfig.apiLocations.ServiceSight + \"Email/SendInvoiceWithJobDocumentsEmailAsync\", emailData);\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable, Subject } from \"rxjs\";\r\nimport { AccordionCreditNoteDataModel } from \"./models/accordion-credit-note-data.model\";\r\nimport { AccordionCreditRaisedDataModel } from \"./models/accordion-credit-raised-data.model\";\r\nimport { AccordionSupplierModel } from \"./models/accordion-supplier.model\";\r\nimport { AccordionCancelReasonModel } from \"./models/cancel-reason-model\";\r\nimport { AccordionContactModel } from \"./models/contact-model\";\r\nimport { CustomerAndEngineerLocationModel } from \"./models/customer-and-engineer-location-model\";\r\nimport { CustomerEquipmentSystemModel } from \"./models/customer-equipment-system.model\";\r\nimport { AccordionCustomerJobDetailsModel } from \"./models/customer-job-details-model\";\r\nimport { AccordionCustomerModel } from \"./models/customer-model\";\r\nimport { AccordionEmployeeModel } from \"./models/employee-model\";\r\nimport { AccordionEquipmentDetailsModel } from \"./models/equipment-details-model\";\r\nimport { EquipmentMeterModel } from \"./models/equipment-meter.model\";\r\nimport { EquipmentPurchasingDetails } from \"./models/equipment-purchasing-details.model\";\r\nimport { EquipmentSalesDetails } from \"./models/equipment-sales-details.model\";\r\nimport { AccordionInspectionModel } from \"./models/inspection-model\";\r\nimport { JobDetailsAcoordionModel } from \"./models/job-details-accordion-model\";\r\nimport { OpenPurchaseOrderModel } from \"./models/open-purchase-order-model\";\r\nimport { OrderDetailsModel } from \"./models/order-details.model\";\r\nimport { OrderReceiptModel } from \"./models/order-receipt.model\";\r\nimport { AccordionQuoteDetailsModel } from \"./models/quote-details-model\";\r\nimport { AccordionQuoteRevisionModel } from \"./models/quote-revision-model\";\r\nimport { ReturnsDetailsDataModel } from \"./models/returns-details-data.model\";\r\nimport { SalesOpportunityDetails } from \"./models/sales-opportunity-details.model\";\r\nimport { StockPurchaseModel } from \"./models/stock-purchase.model\";\r\nimport { AccordionWarningNotesModel } from \"./models/warning-notes-model\";\r\nimport { JobPartsModel } from \"../../models/job-parts.model\";\r\nimport { SalesOrderPartsModel } from \"../../models/sales-order-part.model\";\r\nimport { AccordionStoreModel } from \"./models/accordion-store.model\";\r\nimport { AccordionEngineerModel } from \"./models/accordion-engineer.model\";\r\nimport { AccordionRemidnerModel } from \"./models/accordion-reminder.model\";\r\nimport { ReminderStatus } from \"./models/reminder-status.model\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class AccordionDataService {\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) { }\r\n\r\n public jobCancelledChanged = new Subject();\r\n\r\n public getCustomerData(customerId: number): Observable {\r\n const url = `Accordion/GetCustomerDetailAsync?customerID=${customerId}`;\r\n return this.http.get(this.appConfig.apiLocations.ServiceSight + url);\r\n }\r\n\r\n public getSupplierData(supplierId: number): Observable {\r\n const url = `Accordion/GetSupplierDetail?supplierId=${supplierId}`;\r\n return this.http.get(this.appConfig.apiLocations.ServiceSight + url);\r\n }\r\n\r\n public getContactData(contactId: number): Observable {\r\n const url = `Accordion/GetContactDetailAsync?contactID=${contactId}`;\r\n return this.http.get(this.appConfig.apiLocations.ServiceSight + url);\r\n }\r\n\r\n public getInspectionData(inspectionId: number): Observable {\r\n const url = `Inspection/${inspectionId}`;\r\n return this.http.get(this.appConfig.apiLocations.Inspections + url);\r\n }\r\n\r\n public getQuoteDetailsData(quoteId: number, revisionId: number): Observable {\r\n const url = `${quoteId}/${revisionId}/details`;\r\n return this.http.get(this.appConfig.apiLocations.Quotes + url);\r\n }\r\n\r\n public getQuoteRevisionsData(quoteId: number): Observable {\r\n const url = `${quoteId}/revisions`;\r\n return this.http.get(this.appConfig.apiLocations.Quotes + url);\r\n }\r\n\r\n public getEmployeeName(employeeId: number): Observable {\r\n const url = `Employee/Get?employeeid=${employeeId}`;\r\n return this.http.get(this.appConfig.apiLocations.ServiceSight + url);\r\n }\r\n\r\n public getWarningNotes(customerId: number): Observable {\r\n const url = `Accordion/GetPopUpNotesAccordion?id=${customerId}&isSupplier=false`;\r\n return this.http.get(this.appConfig.apiLocations.ServiceSight + url);\r\n }\r\n\r\n public getSupplierWarningNotes(supplierId: number): Observable {\r\n const url = `Accordion/GetPopUpNotesAccordion?id=${supplierId}&isSupplier=true`;\r\n return this.http.get(this.appConfig.apiLocations.ServiceSight + url);\r\n }\r\n\r\n public getCustomerJobDetailsData(customerId: number, siteId: number): Observable {\r\n const url = `Job/GetCustomerAccordionDetail?customerId=${customerId}&siteId=${siteId}`;\r\n return this.http.get(this.appConfig.apiLocations.ServiceSight + url);\r\n }\r\n\r\n public getCancelReasonName(cancelReasonId: number): Observable {\r\n const url = `CancelReasons/Get?entityId=${cancelReasonId}`;\r\n return this.http.get(this.appConfig.apiLocations.ServiceSight + url);\r\n }\r\n\r\n public getCategoryTypeSubtypeByMakeModel(makeModelId: number): Observable {\r\n const url = `Category/${makeModelId}`;\r\n return this.http.get(this.appConfig.apiLocations.Equipment + url);\r\n }\r\n\r\n public getEquipmentMeterReading(equipmentId: number): Observable {\r\n const url = `Equipment/${equipmentId}/Meter`;\r\n return this.http.get(this.appConfig.apiLocations.Equipment + url);\r\n }\r\n\r\n public getEquipmentSystem(equipmentId: number): Observable {\r\n const url = `Equipment/${equipmentId}/System`;\r\n return this.http.get(this.appConfig.apiLocations.Equipment + url);\r\n }\r\n\r\n public getCustomerLocationViewModel(customerId: number): Observable {\r\n const url = `Employee/GetCustomerLocationViewModel?customerID=${customerId}`;\r\n return this.http.get(this.appConfig.apiLocations.ServiceSight + url);\r\n }\r\n\r\n public getSupplierLocationViewModel(supplierId: number): Observable {\r\n const url = `Employee/GetSupplierLocationViewModel?supplierId=${supplierId}`;\r\n return this.http.get(this.appConfig.apiLocations.ServiceSight + url);\r\n }\r\n\r\n public getJobDetail(jobId: number): Observable {\r\n const url = `Accordion/GetJobDetailAsync?jobID=${jobId}`;\r\n return this.http.get(this.appConfig.apiLocations.ServiceSight + url);\r\n }\r\n\r\n public JobCancelledChanged() {\r\n this.jobCancelledChanged.next(true);\r\n }\r\n\r\n public getJobsByPartId(partId: number): Observable {\r\n const url = `Accordion/GetJobsByPartId?partId=${partId}`;\r\n return this.http.get(this.appConfig.apiLocations.ServiceSight + url);\r\n }\r\n\r\n public getSalesOrdersByPartId(stockHeaderId: number): Observable {\r\n const url = `StockSalesOrder/GetStockSalesOrders/${stockHeaderId}`;\r\n return this.http.get(this.appConfig.apiLocations.SalesOrders + url);\r\n }\r\n\r\n public GetStockPurchases(stockHeaderId: number): Observable {\r\n const url = `StockPurchase/GetStockPurchases/${stockHeaderId}`;\r\n return this.http.get(this.appConfig.apiLocations.PurchaseOrders + url);\r\n }\r\n\r\n public getCreditNoteData(creditId: number): Observable {\r\n const url = `Accordion/GetCreditNoteData?creditId=${creditId}`;\r\n return this.http.get(this.appConfig.apiLocations.ServiceSight + url);\r\n }\r\n\r\n public getCreditRaisedData(invoiceNoteIds: Array): Observable> {\r\n const url = `Accordion/GetCreditRaisedData`;\r\n return this.http.post>(this.appConfig.apiLocations.ServiceSight + url, invoiceNoteIds);\r\n }\r\n\r\n public GetEquipmentPurchasingDetails(equipmentId: number): Observable {\r\n const url = `EquipmentPurchase/${equipmentId}`;\r\n return this.http.get(this.appConfig.apiLocations.PurchaseOrders + url);\r\n }\r\n\r\n public GetEquipmentSalesDetails(equipmentId: number): Observable {\r\n const url = `EquipmentSales/${equipmentId}`;\r\n return this.http.get(this.appConfig.apiLocations.SalesOrders + url);\r\n }\r\n\r\n public GetPurchaseOrderDetails(purchaseOrderId: number): Observable {\r\n const url = `PurchaseOrders/${purchaseOrderId}/details`;\r\n return this.http.get(this.appConfig.apiLocations.PurchaseOrders + url);\r\n }\r\n\r\n public GetPurchaseOrderReceipts(purchaseOrderId: number): Observable {\r\n const url = `PurchaseOrders/${purchaseOrderId}/receipts`;\r\n return this.http.get(this.appConfig.apiLocations.PurchaseOrders + url);\r\n }\r\n\r\n public GetSalesOpportunityDetails(salesOpportunityId: number): Observable {\r\n const url = `SalesOpportunity/${salesOpportunityId}/details`;\r\n return this.http.get(this.appConfig.apiLocations.SalesOpportunity + url);\r\n }\r\n\r\n public GetReturnsDetail(returnsId: number): Observable {\r\n const url = `ReturnsNote/${returnsId}/details`;\r\n return this.http.get(this.appConfig.apiLocations.PurchaseOrders + url);\r\n }\r\n\r\n public GetOpenPurchaseOrders(supplierId: number, purchaseOrderId: number): Observable {\r\n const url = `PurchaseOrders/${purchaseOrderId}/${supplierId}/pending`;\r\n return this.http.get(this.appConfig.apiLocations.PurchaseOrders + url);\r\n }\r\n\r\n public GetStoreDetails(storeId: number): Observable {\r\n const url = `StockStore/${storeId}`;\r\n return this.http.get(this.appConfig.apiLocations.Stock + url);\r\n }\r\n\r\n public GetEngineerDetails(employeeId: number): Observable {\r\n const url = `Engineer/GetEngineerWtnDetails/${employeeId}`;\r\n return this.http.get(this.appConfig.apiLocations.ServiceSight + url);\r\n }\r\n\r\n public GetRemindersByDocument(documentId: number, docTypeId: number): Observable {\r\n const url = `Task/GetLinkedTasks?documentId=${documentId}&docTypeId=${docTypeId}`;\r\n return this.http.get(this.appConfig.apiLocations.ServiceSight + url);\r\n }\r\n\r\n public GetReminderStatuses(): Observable {\r\n const url = `Task/GetTaskStatuses`;\r\n return this.http.get(this.appConfig.apiLocations.ServiceSight + url);\r\n }\r\n}\r\n","\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n   {{attachment}}    \r\n \r\n \r\n   {{ 'job.sheet' | translate }} {{EmailData.JobSheetID}}    \r\n \r\n \r\n   {{attachment}}    \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n 0\"\r\n [(value)]=\"attachInspectionPhotos\"\r\n [elementAttr]=\"{ id: 'readreceipt', name: 'readreceipt', class: 'mgt1' }\"\r\n text=\"{{'inspection.email.attachInspectionPhotos' | translate}}\">\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
{{ 'messages.error.genericError' | translate }}
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { SettingId, SettingsService } from \"servicesight-shared\";\r\nimport { Email } from \"../../models/email.model\";\r\n\r\n@Component({\r\n selector: \"app-email\",\r\n templateUrl: \"./email.component.html\",\r\n styleUrls: [\"./email.component.scss\"]\r\n})\r\nexport class EmailComponent implements OnInit {\r\n public showTemplateDialog: boolean = true;\r\n public showSuccessMessage: boolean = false;\r\n public isPopupVisible: boolean = true;\r\n public attachInspectionPhotos: boolean = false;\r\n\r\n constructor(\r\n private settingsService: SettingsService\r\n ) { }\r\n @Input() EmailData: Email;\r\n @Input() showErrorSendMessage: boolean;\r\n @Input() isProEnabled: boolean = false;\r\n @Input() showMarkAsSentCheckBox: boolean = false;\r\n @Output() includeFiles: EventEmitter = new EventEmitter();\r\n @Output() sendEmail = new EventEmitter();\r\n @Output() cancel = new EventEmitter();\r\n @ViewChild(\"emailform\", { static: true }) form: NgForm;\r\n\r\n public includeFilesDisabled: boolean = false;\r\n\r\n ngOnInit() {\r\n this.includeFilesDisabled = this.EmailData.IncludeFiles;\r\n\r\n if (this.EmailData.InspectionsAttachments && this.EmailData.InspectionsAttachments.length > 0) {\r\n this.settingsService\r\n .getSetting(SettingId.IncludeInspectionPhotosAsEmailAttachments)\r\n .subscribe(setting => this.attachInspectionPhotos = setting.ValueBool);\r\n }\r\n\r\n if (this.showMarkAsSentCheckBox) {\r\n this.EmailData.MarkAsSent = true; // Default to checked if shown.\r\n }\r\n }\r\n\r\n closeDialog(): void {\r\n return this.cancel.emit();\r\n }\r\n\r\n send(): void {\r\n this.EmailData.AttachInspectionPhotos = this.attachInspectionPhotos;\r\n return this.sendEmail.emit(this.EmailData);\r\n }\r\n\r\n public IsFilesIncluded($event: boolean) {\r\n this.includeFiles.emit($event);\r\n }\r\n}\r\n","{{'accordion.customerNotProvided' | translate}}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ 'accordion.customer.AccountNumber' | translate }}\r\n \r\n {{customer.Alpha}}\r\n
{{ 'accordion.customer.Name' | translate }}{{customer.Name}}
{{ 'accordion.customer.Address' | translate }}{{customer.Address}}
{{ 'accordion.customer.Phone' | translate }}\r\n {{customer.Phone}}\r\n
{{ 'accordion.customer.Email' | translate }}\r\n {{customer.EmailGeneral}}\r\n
{{ 'accordion.customer.Website' | translate }}\r\n {{customer.WebGeneral}}\r\n
{{ 'accordion.customer.Status' | translate }}{{ 'customer.information.exceeded-limit' | translate }}{{ 'customer.information.on-stop' | translate }}{{ customer.StatusName }}
\r\n\r\n","import { Component, Input, OnChanges, SimpleChanges } from \"@angular/core\";\r\nimport { Email } from \"src/app/shared/models/email.model\";\r\nimport { EmailService } from \"src/app/shared/services/email/email.service\";\r\nimport { AccordionDataService } from \"../accordion-data.service\";\r\nimport { AccordionCustomerModel } from \"../models/customer-model\";\r\nimport { CustomerSelectInfo } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-customer-accordion-item\",\r\n templateUrl: \"./customer-accordion-item.component.html\",\r\n styleUrls: [\"./customer-accordion-item.component.scss\"]\r\n})\r\nexport class CustomerAccordionItemComponent implements OnChanges {\r\n @Input() customerId: number;\r\n public customer: AccordionCustomerModel;\r\n public showTemplateDialog: boolean = false;\r\n public emailData: Email = new Email();\r\n public showErrorSendMessage: boolean = false;\r\n public customerSelectInfoEnum = CustomerSelectInfo;\r\n\r\n public get customerSelectInfo(): CustomerSelectInfo {\r\n return this.getCustomerInformation(this.customer);\r\n }\r\n\r\n constructor(\r\n private dataService: AccordionDataService,\r\n private emailService: EmailService) { }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n this.customerId = changes.customerId.currentValue;\r\n\r\n if (this.customerId) {\r\n this.dataService.getCustomerData(this.customerId).subscribe(x => {\r\n this.customer = x;\r\n });\r\n } else {\r\n this.customer = null;\r\n }\r\n }\r\n\r\n public openEmailDialog(): void {\r\n this.emailService.GetGeneralEmailData(this.customerId)\r\n .subscribe(x => {\r\n this.emailData = x;\r\n this.emailData.To = this.customer.EmailGeneral;\r\n this.emailData.CustomerID = this.customerId;\r\n }, () => { }, () => {\r\n this.showErrorSendMessage = false;\r\n this.showTemplateDialog = true;\r\n });\r\n }\r\n\r\n public send(): void {\r\n this.emailService.SendGeneralEmail(this.emailData).subscribe((res) => {\r\n if (res.IsSuccess) {\r\n this.showTemplateDialog = false;\r\n } else {\r\n this.showErrorSendMessage = true;\r\n }\r\n }, () => {\r\n this.showErrorSendMessage = true;\r\n });\r\n }\r\n\r\n public closeDialog(): void {\r\n this.showTemplateDialog = false;\r\n }\r\n\r\n // TODO: Remove that and use routerLink when migration to angular 7 is finished\r\n public goToCustomer(customerId): void {\r\n location.href = \"#/customers/customer/\" + customerId;\r\n }\r\n\r\n private getCustomerInformation(customer: AccordionCustomerModel): CustomerSelectInfo {\r\n if (customer.OnStop) {\r\n return CustomerSelectInfo.OnHold;\r\n }\r\n\r\n if (customer.ExceededLimit) {\r\n return CustomerSelectInfo.ExceededLimit;\r\n }\r\n\r\n return CustomerSelectInfo.Status;\r\n }\r\n}\r\n","import { Component, OnInit, Input, Inject } from \"@angular/core\";\r\nimport { DomSanitizer, SafeResourceUrl } from \"@angular/platform-browser\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-help-accordion-item\",\r\n templateUrl: \"./help-accordion-item.component.html\",\r\n styleUrls: [\"./help-accordion-item.component.scss\"]\r\n})\r\nexport class HelpAccordionItemComponent implements OnInit {\r\n @Input() helpUri: string;\r\n public fullUri: SafeResourceUrl;\r\n\r\n constructor(\r\n private sanitizer: DomSanitizer,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) {\r\n }\r\n\r\n ngOnInit() {\r\n // todo - localStorageService.get('UserBrowserLocale') === 'en-US') ? 'us/' : ''\r\n this.fullUri = this.sanitizer.bypassSecurityTrustResourceUrl(this.appConfig.helpSite + this.helpUri);\r\n }\r\n\r\n}\r\n","\r\n
\r\n

{{ message | translate }}

\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n","","import { Component, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\r\n\r\n@Component({\r\n selector: \"app-confirmation-dialogue\",\r\n templateUrl: \"./confirmation-dialogue.component.html\",\r\n styleUrls: [\"./confirmation-dialogue.component.scss\"]\r\n})\r\nexport class ConfirmationDialogueComponent implements OnInit {\r\n\r\n @Input() title: string;\r\n @Input() okText: string;\r\n @Input() cancelText: string;\r\n @Input() message: string;\r\n @Input() visibleNo: boolean;\r\n @Input() visibleCancelBtn: boolean = true;\r\n @Input() show: boolean = true;\r\n @Input() data: any;\r\n @Input() callbackFunction: Function;\r\n @Output() confirmed = new EventEmitter();\r\n\r\n constructor() { }\r\n\r\n ngOnInit() { }\r\n\r\n public Ok() {\r\n this.confirmed.emit(true);\r\n if (this.callbackFunction) {\r\n this.callbackFunction(this.data);\r\n }\r\n }\r\n\r\n public Cancel() {\r\n if (this.visibleNo) {\r\n this.confirmed.emit(undefined);\r\n } else {\r\n this.confirmed.emit(false);\r\n }\r\n }\r\n\r\n public No() {\r\n this.confirmed.emit(false);\r\n }\r\n}\r\n","import { AccordionCreditNoteDocumentDataModel } from \"./accordion-creddit-note-document-data.model\";\r\n\r\nexport class AccordionCreditNoteDataModel {\r\n public InvoiceNo: number;\r\n\r\n public InvoiceId: number;\r\n\r\n public InvoiceDate: Date;\r\n\r\n public InvoiceNetValue: number;\r\n\r\n public AvailableToCredit: number;\r\n\r\n public Documents: AccordionCreditNoteDocumentDataModel[];\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ 'accordion.credit-note.invoice-no' | translate }}\r\n \r\n {{ CreditNotesAccordionData.InvoiceNo }}\r\n \r\n
{{ 'accordion.credit-note.invoice-date' | translate }}\r\n {{ CreditNotesAccordionData.InvoiceDate | date: 'shortDate' }}\r\n
{{ 'accordion.credit-note.invoice-net-value' | translate }}\r\n {{ CreditNotesAccordionData.InvoiceNetValue | currency: currencySymbol }}\r\n
0\">{{ 'accordion.credit-note.available-to-credit' | translate }}{{ 'accordion.credit-note.invoice-fully-credited' | translate }}\r\n {{ CreditNotesAccordionData.AvailableToCredit | currency: currencySymbol }}\r\n
{{ 'accordion.credit-note.job-no' | translate }}\r\n \r\n {{doc.DocumentNo}}\r\n \r\n
{{ 'accordion.credit-note.contract-no' | translate }}\r\n \r\n {{doc.DocumentNo}}\r\n \r\n
{{ 'accordion.credit-note.sales-order' | translate }}\r\n \r\n {{doc.DocumentNo}}\r\n \r\n
{{ 'accordion.credit-note.despatch-no' | translate }}\r\n \r\n {{doc.SecondaryDocumentNo}}\r\n \r\n
\r\n","import { Component, Input, OnChanges, OnInit } from \"@angular/core\";\r\nimport { ProteanSystem } from \"servicesight-shared\";\r\nimport { AccordionDataService } from \"../accordion-data.service\";\r\nimport { AccordionCreditNoteDataModel } from \"../models/accordion-credit-note-data.model\";\r\n\r\n@Component({\r\n selector: \"app-credit-notes-accordion-item\",\r\n templateUrl: \"./credit-notes-accordion-item.component.html\",\r\n styleUrls: [\"./credit-notes-accordion-item.component.scss\"]\r\n})\r\nexport class CreditNotesAccordionItemComponent implements OnInit, OnChanges {\r\n @Input() creditId: number;\r\n @Input() reducedInfo: boolean = false;\r\n public CreditNotesAccordionData: AccordionCreditNoteDataModel = new AccordionCreditNoteDataModel();\r\n public ProteanSystem = ProteanSystem;\r\n public currencySymbol: string;\r\n\r\n constructor(private dataService: AccordionDataService) { }\r\n\r\n public ngOnInit(): void {\r\n this.currencySymbol = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n }\r\n\r\n public ngOnChanges(): void {\r\n if (this.creditId) {\r\n this.dataService.getCreditNoteData(this.creditId).subscribe(x => this.CreditNotesAccordionData = x);\r\n }\r\n }\r\n\r\n public goToInvoice(): void {\r\n if (this.CreditNotesAccordionData.InvoiceId) {\r\n location.href = `/#/invoices/invoice/${this.CreditNotesAccordionData.InvoiceId}`;\r\n }\r\n }\r\n\r\n public goToJob(id: number): void {\r\n if (id) {\r\n location.href = `/#/jobs/job/${id}`;\r\n }\r\n }\r\n\r\n public goToContract(id: number): void {\r\n if (id) {\r\n location.href = `/#/contracts/detail/${id}`;\r\n }\r\n }\r\n\r\n public goToSalesOrder(id: number): void {\r\n if (id) {\r\n location.href = `/#/sales-orders/detail/${id}`;\r\n }\r\n }\r\n\r\n public goToDespatch(id: number): void {\r\n if (id) {\r\n location.href = `/#/despatch-notes/detail/${id}`;\r\n }\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n {{item.CreditId}}\r\n \r\n \r\n {{ item.CreditedDate | date: 'shortDate' }}\r\n \r\n {{ item.CreditedValue | currency: currencySymbol }}\r\n
{{ 'accordion.credit-note.credits-raised' | translate }}
\r\n","import { Component, EventEmitter, Input, OnChanges, OnInit, Output } from \"@angular/core\";\r\nimport { AccordionDataService } from \"../accordion-data.service\";\r\nimport { AccordionCreditRaisedDataModel } from \"../models/accordion-credit-raised-data.model\";\r\n\r\n@Component({\r\n selector: \"app-credit-raised-accordion-item\",\r\n templateUrl: \"./credit-raised-accordion-item.component.html\",\r\n styleUrls: [\"./credit-raised-accordion-item.component.scss\"]\r\n})\r\nexport class CreditRaisedAccordionItemComponent implements OnInit, OnChanges {\r\n @Input() noteIds: Array;\r\n @Output() raisedCreditsExists = new EventEmitter();\r\n public CreditRaisedAccordionData: Array;\r\n public currencySymbol: string;\r\n\r\n constructor(private dataService: AccordionDataService) { }\r\n\r\n public ngOnInit(): void {\r\n this.currencySymbol = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n }\r\n\r\n public ngOnChanges(): void {\r\n if (this.noteIds && this.noteIds.length && this.noteIds[0]) {\r\n this.dataService.getCreditRaisedData(this.noteIds).subscribe(x => {\r\n this.CreditRaisedAccordionData = x;\r\n if (this.CreditRaisedAccordionData && this.CreditRaisedAccordionData.length) {\r\n this.raisedCreditsExists.emit(true);\r\n } else {\r\n this.raisedCreditsExists.emit(false);\r\n }\r\n });\r\n } else {\r\n this.raisedCreditsExists.emit(false);\r\n }\r\n }\r\n\r\n public goToCreditNote(creditNoteId: number): void {\r\n if (creditNoteId) {\r\n location.href = `/#/credit-notes/credit-note/${creditNoteId}`;\r\n }\r\n }\r\n}\r\n","
\r\n \r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
{{ 'accordion.reminder.no-reminders' | translate }}
\r\n {{ item.TaskID }}\r\n \r\n {{ item.TaskType }}\r\n \r\n {{ statusesDictionary[item.Status] | translate }}\r\n \r\n {{ item.Due | date: shortDateFormat }}\r\n
","import { Component, Input, OnChanges, OnInit } from \"@angular/core\";\r\nimport { AccordionDataService } from \"../accordion-data.service\";\r\nimport { AccordionRemidnerModel } from \"../models/accordion-reminder.model\";\r\n\r\n@Component({\r\n selector: \"app-reminders-accordion-item\",\r\n templateUrl: \"./reminders-accordion-item.component.html\",\r\n styleUrls: [\"./reminders-accordion-item.component.scss\"]\r\n})\r\nexport class RemindersAccordionItemComponent implements OnInit, OnChanges {\r\n @Input() documentId: number;\r\n @Input() docTypeId: number;\r\n public accordionItems: AccordionRemidnerModel[];\r\n public showEye = false;\r\n public showReminders = false;\r\n public statusesDictionary: { [key: number]: string } = {};\r\n public shortDateFormat: string;\r\n\r\n constructor(\r\n private accordionDataService: AccordionDataService\r\n ) {}\r\n\r\n ngOnInit(): void {\r\n this.shortDateFormat = this.getCustomShortDateTimeFormat();\r\n this.accordionDataService.GetReminderStatuses().subscribe(statuses => {\r\n this.statusesDictionary = Object.assign({}, ...statuses.map((x) => ({[x.Status]: `accordion.reminder.status.${x.Description.toLowerCase()}`})));\r\n });\r\n }\r\n\r\n ngOnChanges(): void {\r\n if (this.documentId && this.docTypeId) {\r\n this.accordionDataService.GetRemindersByDocument(this.documentId, this.docTypeId).subscribe(items => {\r\n this.showEye = items.some(x => x.Status === 300);\r\n this.showReminders = items.length > 0;\r\n items.forEach(e => {\r\n e.Due = this.getLocaleDate(e.Due);\r\n });\r\n this.accordionItems = this.sortReminders(items);\r\n });\r\n }\r\n }\r\n\r\n private sortReminders(reminders: AccordionRemidnerModel[]): AccordionRemidnerModel[] {\r\n return reminders.sort((a, b) => {\r\n const statusDiff = a.Status - b.Status;\r\n if (statusDiff === 0) {\r\n return a.Due.getTime() - b.Due.getTime();\r\n }\r\n return statusDiff;\r\n });\r\n }\r\n\r\n private getLocaleDate(value: Date): Date {\r\n const date = new Date(value);\r\n const timezoneOffset = new Date().getTimezoneOffset();\r\n return new Date(date.getTime() + timezoneOffset * 60000);\r\n }\r\n\r\n private getCustomShortDateTimeFormat(): string {\r\n if (navigator.language === \"en-US\") {\r\n return \"M/d/yy - h:mm a\";\r\n }\r\n return \"dd/MM/yyyy - HH:mm\";\r\n }\r\n}\r\n","import { Component, Input, OnChanges } from \"@angular/core\";\r\nimport { ControlContainer, NgForm } from \"@angular/forms\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { CustomerService } from \"servicesight-shared\";\r\nimport { CreditNotesFormData } from \"../../shared/models/credit-notes-form-data\";\r\n\r\n@Component({\r\n selector: \"app-credit-notes-form\",\r\n templateUrl: \"./credit-notes-form.component.html\",\r\n styleUrls: [\"./credit-notes-form.component.scss\"],\r\n viewProviders: [ { provide: ControlContainer, useExisting: NgForm } ]\r\n})\r\nexport class CreditNotesFormComponent implements OnChanges {\r\n @Input() creditFormData: CreditNotesFormData = new CreditNotesFormData();\r\n public sitesDataSource: DataSource;\r\n public creditNotesFormData = new CreditNotesFormData();\r\n public selectedCustomer: string = \"\";\r\n public Today = new Date();\r\n private customerId: number;\r\n\r\n constructor(private customerODataService: CustomerService) { }\r\n\r\n ngOnChanges() {\r\n if (this.creditFormData) {\r\n this.customerId = this.creditFormData.CustomerId ? this.creditFormData.CustomerId : this.creditFormData.SiteId;\r\n this.creditNotesFormData = this.creditFormData;\r\n\r\n if (this.customerId) {\r\n this.sitesDataSource = this.customerODataService.GetCustomersDataSource();\r\n const store = this.sitesDataSource.store() as ODataStore;\r\n store.byKey(this.customerId).then((v) => {\r\n this.selectedCustomer = v.Customer;\r\n });\r\n }\r\n\r\n if (!this.creditFormData.CreditedDate) {\r\n this.creditFormData.CreditedDate = new Date();\r\n }\r\n }\r\n }\r\n\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n","
\r\n
\r\n
\r\n
\r\n

\r\n {{ 'credit-note.header' | translate }}\r\n {{creditNotesDataForm.CreditId}}\r\n

\r\n
\r\n

{{ creditNotesDataForm.Status | creditNoteStatus | translate }}

\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n\r\n
\r\n {{ 'system.type.despatchNote' | translate }} {{ data.value }}\r\n
\r\n\r\n
\r\n {{ data.value | currency: baseCurrencySymbol }}\r\n -\r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n","import { AfterViewInit, Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { DxAccordionComponent, DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { Subject } from \"rxjs\";\r\nimport {\r\n CreditElementTypeEnum,\r\n CreditNoteStatus,\r\n CreditTypeEnum,\r\n CurrencyPipe,\r\n DocumentTypeEnum,\r\n FormMesssageService,\r\n ProteanResponse\r\n} from \"servicesight-shared\";\r\nimport { Ng1ReminderService } from \"src/app/shared/services/ng1-reminder.service\";\r\nimport { MessageService } from \"../../messages/services/message/message.service\";\r\nimport { MessageDocTypeIds } from \"../../shared/enums/messages/message-doc-type-ids.enum\";\r\nimport { MessageTypes } from \"../../shared/enums/messages/message-types.enum\";\r\nimport { CreditNotesFormData } from \"../../shared/models/credit-notes-form-data\";\r\nimport { CreditNotesGridForJobModel } from \"../../shared/models/credit-notes-grid-for-job.model\";\r\nimport { CreditNotesGridForMaintenanceModel } from \"../../shared/models/credit-notes-grid-for-maintenance.model\";\r\nimport { CreditNotesGridForJobComponent } from \"../credit-notes-grid-for-job/credit-notes-grid-for-job.component\";\r\nimport { CreditNotesGridForMaintenanceComponent } from \"../credit-notes-grid-for-maintenance/credit-notes-grid-for-maintenance.component\";\r\nimport { CreditNotesService } from \"../credit-notes.service\";\r\n\r\n@Component({\r\n selector: \"app-credit-notes-detail\",\r\n templateUrl: \"./credit-notes-detail.component.html\",\r\n styleUrls: [\"./credit-notes-detail.component.scss\"]\r\n})\r\nexport class CreditNotesDetailComponent implements OnInit, AfterViewInit {\r\n @ViewChild(\"creditNoteForm\") form: NgForm;\r\n @ViewChild(\"accordionComponent\") accordionComponent: DxAccordionComponent;\r\n @ViewChild(CreditNotesGridForJobComponent) public creditNoteJobChild;\r\n @ViewChild(CreditNotesGridForMaintenanceComponent) public creditNoteMaintenanceChild;\r\n @ViewChild(\"grid\") public grid: DxDataGridComponent;\r\n public readonly formName: string = \"creditNoteForm\";\r\n private readonly baseCurrencyCode: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencyCode\"));\r\n public baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n public dataSource: DataSource;\r\n public creditNotesDataForm: CreditNotesFormData = new CreditNotesFormData();\r\n public creditNoteElements: Array;\r\n public showCreditDialogue: boolean = false;\r\n public isCredited: boolean;\r\n public creditNoteElementsForJob: Array;\r\n public creditNoteElementsForMaintenance: Array;\r\n public selectedInvoiceItems: Array = [];\r\n public CreditTypeEnum = CreditTypeEnum;\r\n public CreditNoteStatus = CreditNoteStatus;\r\n public CreditElementTypeEnum = CreditElementTypeEnum;\r\n public showCreditRaisedEye: boolean = false;\r\n public isAnyRowSelected: boolean = false;\r\n public docType = DocumentTypeEnum;\r\n\r\n public get allowCredit() {\r\n switch (this.creditNotesDataForm.CreditTypeId) {\r\n case CreditTypeEnum.Job:\r\n return this.creditNotesDataForm.Status === CreditNoteStatus.Entry && this.CheckIsAnyRowSelected();\r\n case CreditTypeEnum.Maintenance:\r\n return this.creditNotesDataForm.Status === CreditNoteStatus.Entry && this.CheckIsAnyRowSelected();\r\n case CreditTypeEnum.SalesOrder:\r\n return this.creditNotesDataForm.Status === CreditNoteStatus.Entry && this.CheckIsAnyRowSelected();\r\n }\r\n }\r\n\r\n public get TotalText(): string {\r\n let val = 0;\r\n this.creditNotesDataForm.Elements.forEach(item => val += item.SalesValue);\r\n return `${this.baseCurrencySymbol} ${val.toFixed(2)}`;\r\n }\r\n\r\n constructor(\r\n private creditNotesService: CreditNotesService,\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private formMessageService: FormMesssageService,\r\n private messageService: MessageService,\r\n private ng1reminderService: Ng1ReminderService,\r\n private currencyPipe: CurrencyPipe) {\r\n this.customiseValue = this.customiseValue.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.route.params.subscribe(x => {\r\n this.creditNotesService.GetCreditNoteFormData(x.id).subscribe(dataForm => {\r\n this.creditNotesDataForm = dataForm;\r\n\r\n if (this.creditNotesDataForm.Elements) {\r\n this.creditNotesDataForm.Elements.forEach(item => {\r\n if (item.IsSelected) {\r\n this.selectedInvoiceItems.push(item.LineId);\r\n }\r\n });\r\n\r\n this.isAnyRowSelected = this.CheckIsAnyRowSelected();\r\n }\r\n this.handleCreditedStatus();\r\n if (this.creditNotesDataForm.CreditTypeId === CreditTypeEnum.Job) {\r\n this.dataSource = this.creditNotesService.GetCreditNoteElementsForJobOD(x.id);\r\n this.dataSource.load().then(res => {\r\n this.creditNoteElementsForJob = res;\r\n this.isAnyRowSelected = this.CheckIsAnyRowSelected();\r\n });\r\n } else if (this.creditNotesDataForm.CreditTypeId === CreditTypeEnum.Maintenance) {\r\n this.dataSource = this.creditNotesService.GetCreditNoteElementsForMaintenanceOD(x.id);\r\n this.dataSource.load().then(res => {\r\n this.creditNoteElementsForMaintenance = res;\r\n this.isAnyRowSelected = this.CheckIsAnyRowSelected();\r\n });\r\n }\r\n });\r\n });\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n if (this.accordionComponent && this.accordionComponent.instance) {\r\n this.accordionComponent.instance.collapseItem(0);\r\n this.accordionComponent.instance.expandItem(1);\r\n }\r\n }\r\n\r\n Save(): Subject {\r\n const creditNoteElements = this.assignProperObject();\r\n let creditNoteData;\r\n\r\n if (this.creditNotesDataForm.CreditTypeId === CreditTypeEnum.Job) {\r\n creditNoteData = {\r\n creditNoteFormData: this.creditNotesDataForm,\r\n JobCreditNoteElements: creditNoteElements,\r\n };\r\n } else if (this.creditNotesDataForm.CreditTypeId === CreditTypeEnum.Maintenance) {\r\n creditNoteData = {\r\n creditNoteFormData: this.creditNotesDataForm,\r\n MaintenanceCreditNoteElements: creditNoteElements,\r\n };\r\n } else {\r\n if (this.creditNotesDataForm.Elements) {\r\n this.creditNotesDataForm.Elements.map(x => x.IsSelected = this.selectedInvoiceItems.includes(x.LineId));\r\n }\r\n\r\n creditNoteData = {\r\n creditNoteFormData: this.creditNotesDataForm,\r\n };\r\n }\r\n\r\n return this.formMessageService\r\n .RegisterObservable(this.creditNotesService.EditCreditNotesData(creditNoteData), this.formName);\r\n }\r\n\r\n Cancel(): void {\r\n this.router.navigate([\"credit-notes/list\"]);\r\n }\r\n\r\n CreditButtonClicked(): void {\r\n this.creditNotesService.IsFullyCredited(this.creditNotesDataForm.CreditId).subscribe((fullyCredited) => {\r\n if (fullyCredited) {\r\n this.showCreditDialogue = true;\r\n } else {\r\n this.Credit(true);\r\n }\r\n });\r\n }\r\n\r\n public ViewCreditButtonClicked(): void {\r\n const creditPrintOutUrl = `/#/credit-notes/credit-note/${this.creditNotesDataForm.CreditId}/layout`;\r\n if (this.form.form.dirty && this.creditNotesDataForm.Status === CreditNoteStatus.Entry) {\r\n this.Save().subscribe(() => {\r\n location.href = creditPrintOutUrl;\r\n });\r\n } else {\r\n location.href = creditPrintOutUrl;\r\n }\r\n }\r\n\r\n public onExistingRaisedCredits(areItemsExists: boolean): void {\r\n this.showCreditRaisedEye = areItemsExists;\r\n }\r\n\r\n public refreshGridAndMakeFormDirty($event: boolean): void {\r\n this.grid.instance.refresh();\r\n this.makeFormDirty($event);\r\n }\r\n\r\n public makeFormDirty($event: boolean): void {\r\n this.isAnyRowSelected = this.CheckIsAnyRowSelected();\r\n if ($event) {\r\n this.form.form.markAsDirty();\r\n }\r\n }\r\n\r\n Credit(confirmed: boolean): void {\r\n if (confirmed) {\r\n this.Save().subscribe(() =>\r\n this.formMessageService\r\n .RegisterObservable(\r\n this.creditNotesService.CreditCreditNote(this.creditNotesDataForm.CreditId), this.formName)\r\n .subscribe(() => location.href = `/#/credit-notes/credit-note/${this.creditNotesDataForm.CreditId}/layout`));\r\n } else {\r\n this.showCreditDialogue = false;\r\n }\r\n }\r\n\r\n CreateNewReminder() {\r\n this.ng1reminderService.CreateCreditNotesReminder(this.creditNotesDataForm.CreditId);\r\n }\r\n\r\n CreateNewMessage() {\r\n this.messageService.SetNewMessageParameters(0, MessageTypes.RefMessage, false, MessageDocTypeIds.Credit, this.creditNotesDataForm.CreditId);\r\n this.router.navigate([\"messages/newmessage\"]);\r\n }\r\n\r\n DeleteCreditNote() {\r\n this.creditNotesService.DeleteCreditNote(this.creditNotesDataForm.CreditId).subscribe(() => {\r\n this.router.navigate([\"credit-notes/list\"]);\r\n });\r\n }\r\n\r\n public editRow(data): void {\r\n this.grid.instance.editRow(data.rowIndex);\r\n }\r\n\r\n public startEditing(e: any): void {\r\n this.grid.instance.columnOption(\"Qty\", \"allowEditing\", e.data.CreditElementType === CreditElementTypeEnum.Parts);\r\n }\r\n\r\n private handleCreditedStatus() {\r\n this.isCredited = this.creditNotesDataForm.Status >= CreditNoteStatus.Credited;\r\n }\r\n\r\n assignProperObject() {\r\n switch (this.creditNotesDataForm.CreditTypeId) {\r\n case CreditTypeEnum.Maintenance:\r\n return JSON.parse(JSON.stringify(this.creditNoteElementsForMaintenance));\r\n case CreditTypeEnum.Job:\r\n return JSON.parse(JSON.stringify(this.creditNoteElementsForJob));\r\n }\r\n }\r\n\r\n private CheckIsAnyRowSelected(): boolean {\r\n switch (this.creditNotesDataForm.CreditTypeId) {\r\n case CreditTypeEnum.Job:\r\n return this.creditNoteJobChild && this.creditNoteJobChild.selectedInvoiceItems.length > 0;\r\n case CreditTypeEnum.Maintenance:\r\n return this.creditNoteMaintenanceChild && this.creditNoteMaintenanceChild.selectedInvoiceItems.length > 0;\r\n case CreditTypeEnum.SalesOrder:\r\n return this.selectedInvoiceItems.length > 0;\r\n default:\r\n return false; // handles protean migration\r\n }\r\n }\r\n\r\n public customiseValue(data): string {\r\n return this.currencyPipe.transform(data.value, this.baseCurrencyCode);\r\n }\r\n\r\n public calculateSelectedRow(options) {\r\n if (options.name === \"CreditTotalSummary\") {\r\n if (options.summaryProcess === \"start\") {\r\n options.totalValue = 0;\r\n } else if (options.summaryProcess === \"calculate\") {\r\n if (options.component.isRowSelected(options.value.LineId)) {\r\n options.totalValue += options.value.SalesValue;\r\n }\r\n }\r\n }\r\n }\r\n\r\n}\r\n","
\r\n
\r\n
\r\n

\r\n {{ 'creditNotes.detail.header' | translate }}\r\n {{ creditNoteId }}\r\n

\r\n

\r\n {{ 'creditNotes.detail.header-preview' | translate }}\r\n

\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n
{{ 'label.email.sendMessage' | translate }}
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n","import { Component, OnInit, Inject, ViewChild } from \"@angular/core\";\r\nimport { ActivatedRoute } from \"@angular/router\";\r\nimport { IAppConfig, APP_CONFIG, ReportViewerComponent } from \"servicesight-shared\";\r\nimport { CreditNotesService } from \"../credit-notes.service\";\r\nimport { Email } from \"src/app/shared/models/email.model\";\r\nimport { CreditNoteStatus } from \"servicesight-shared\";\r\nimport { CreditNotesFormData } from \"../../shared/models/credit-notes-form-data\";\r\n\r\n@Component({\r\n selector: \"app-credit-notes-layout\",\r\n templateUrl: \"./credit-notes-layout.component.html\",\r\n styleUrls: [\"./credit-notes-layout.component.scss\"]\r\n})\r\nexport class CreditNotesLayoutComponent implements OnInit {\r\n @ViewChild(\"report\") report: ReportViewerComponent;\r\n public creditNoteId: number;\r\n public creditNoteUrl: string;\r\n public hostUrl: string;\r\n public creditNotesDataForm: CreditNotesFormData = new CreditNotesFormData();\r\n\r\n public showTemplateDialog: boolean = false;\r\n public emailData: Email = new Email();\r\n public showSuccessSendMessage: boolean = false;\r\n public showErrorSendMessage: boolean = false;\r\n public isCredited: boolean = false;\r\n\r\n constructor(\r\n private route: ActivatedRoute,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig,\r\n private creditNotesService: CreditNotesService) {\r\n this.creditNoteId = Number(this.route.snapshot.paramMap.get(\"id\"));\r\n this.hostUrl = this.appConfig.apiLocations.ServiceSightReports;\r\n }\r\n\r\n ngOnInit() {\r\n this.creditNoteUrl = \"creditnote/\" + this.creditNoteId;\r\n\r\n this.creditNotesService.GetCreditNoteFormData(this.creditNoteId).subscribe(dataForm => {\r\n this.creditNotesDataForm = dataForm;\r\n this.isCredited = dataForm.Status === CreditNoteStatus.Credited;\r\n });\r\n }\r\n\r\n public CallPrint(): void {\r\n this.report.print();\r\n }\r\n\r\n public OpenEmailDialog(): void {\r\n this.send();\r\n }\r\n\r\n public OpenDialog(): void {\r\n this.creditNotesService\r\n .GetCreditNoteEmailData(this.creditNoteId)\r\n .subscribe((emailData) => {\r\n this.emailData = emailData;\r\n },\r\n () => { },\r\n () => {\r\n this.showErrorSendMessage = false;\r\n this.showTemplateDialog = true;\r\n }\r\n );\r\n }\r\n\r\n public send(): void {\r\n this.creditNotesService.SendCreditNoteEmail(this.emailData)\r\n .subscribe(() => {\r\n this.showTemplateDialog = false;\r\n this.showSuccessSendMessage = true;\r\n },\r\n () => {\r\n this.showErrorSendMessage = true;\r\n }\r\n );\r\n }\r\n\r\n public CloseDialog(): void {\r\n this.showTemplateDialog = false;\r\n }\r\n}\r\n","import { NgModule } from \"@angular/core\";\r\nimport { RouterModule, Routes } from \"@angular/router\";\r\nimport { CreditNotesListComponent } from \"servicesight-shared\";\r\nimport { CreditNotesDetailComponent } from \"./credit-notes-detail/credit-notes-detail.component\";\r\nimport { CreditNotesLayoutComponent } from \"./credit-notes-layout/credit-notes-layout.component\";\r\n\r\nconst routes: Routes = [\r\n { path: \"list\", component: CreditNotesListComponent },\r\n { path: \"credit-note/:id\", component: CreditNotesDetailComponent },\r\n { path: \"credit-note/:id/layout\", component: CreditNotesLayoutComponent },\r\n { path: \"\", redirectTo: \"list\", pathMatch: \"full\" },\r\n { path: \"**\", redirectTo: \"list\" }\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\n\r\nexport class CreditNotesRoutingModule {\r\n public static readonly Routes: Routes = routes;\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG, IProteanResponse } from \"servicesight-shared\";\r\nimport { QueuedEmailType } from \"src/app/shared/enums/queued-email-type.enum\";\r\nimport { Email } from \"src/app/shared/models/email.model\";\r\nimport { AuthService } from \"src/app/shared/services/auth/auth.service\";\r\nimport { DespatchNoteInvoice } from \"../models/despatch-note-invoice.model\";\r\nimport { DespatchNoteJob } from \"../models/despatch-note-job.model\";\r\nimport { DespatchNote } from \"../models/despatch-note.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class DespatchNotesService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private authService: AuthService,\r\n @Inject(APP_CONFIG) protected config: IAppConfig\r\n ) { }\r\n\r\n public Get(id: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.SalesOrders}DespatchNote/${id}`);\r\n }\r\n\r\n public GetDespatchNotesForSalesOrder(salesOrderId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.SalesOrders}DespatchNote/GetDespatchNotesForSalesOrder/${salesOrderId}`);\r\n }\r\n\r\n public Create(id: number): Observable {\r\n return this.http.post(`${this.config.apiLocations.SalesOrders}DespatchNote/${id}`, null);\r\n }\r\n\r\n public Update(model: DespatchNote): Observable {\r\n return this.http.put(`${this.config.apiLocations.SalesOrders}DespatchNote`, model);\r\n }\r\n\r\n public Cancel(model: DespatchNote): Observable {\r\n return this.http.put(`${this.config.apiLocations.SalesOrders}DespatchNote/Cancel`, model);\r\n }\r\n\r\n public Despatch(model: DespatchNote): Observable {\r\n return this.http.put(`${this.config.apiLocations.SalesOrders}DespatchNote/Despatch`, model);\r\n }\r\n\r\n public Invoice(model: DespatchNoteInvoice): Observable {\r\n return this.http.post(`${this.config.apiLocations.ServiceSight}Sales/Invoice`, model);\r\n }\r\n\r\n public GetDespatchEmailData(id: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.SalesOrders}DespatchNoteEmail/${id}`);\r\n }\r\n\r\n public SendDespatchEmailData(emailData: Email): Observable {\r\n emailData.EmailType = QueuedEmailType.DespatchNote;\r\n emailData.SenderEmployeeId = this.authService.EmployeeId;\r\n return this.http.post(`${this.config.apiLocations.ServiceSight}Email/QueueEmail`, emailData);\r\n }\r\n\r\n public OkToInvoiceDespatch(despatchId: number): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Sales/CheckOrderNoRequired?despatchId=${despatchId}`;\r\n return this.http.get(url);\r\n }\r\n\r\n public PrepareForSale(model: DespatchNoteJob): Observable {\r\n return this.http.post(`${this.config.apiLocations.SalesOrders}DespatchNote/PrepareForSale/`, model);\r\n }\r\n\r\n public InstallationDelivery(model: DespatchNoteJob): Observable {\r\n return this.http.post(`${this.config.apiLocations.SalesOrders}DespatchNote/InstallationDelivery/`, model);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n

{{ 'despatch-note.title' | translate }} {{id}}

\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
{{ 'label.email.sendMessage' | translate }}
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { Location } from \"@angular/common\";\r\nimport { Component, Inject, OnInit, ViewChild } from \"@angular/core\";\r\nimport { ActivatedRoute } from \"@angular/router\";\r\nimport { IAppConfig, APP_CONFIG, ReportViewerComponent } from \"servicesight-shared\";\r\nimport { Email } from \"src/app/shared/models/email.model\";\r\nimport { DespatchNotesService } from \"../services/despatch-notes.service\";\r\n\r\n@Component({\r\n selector: \"app-despatch-note-preview\",\r\n templateUrl: \"./despatch-note-preview.component.html\",\r\n styleUrls: [\"./despatch-note-preview.component.scss\"]\r\n})\r\nexport class DespatchNotePreviewComponent implements OnInit {\r\n\r\n @ViewChild(\"report\", { static: true }) report: ReportViewerComponent;\r\n\r\n public url: string;\r\n public hostUrl: string;\r\n public id: number;\r\n public isPreviewLoaded: boolean;\r\n public showTemplateDialog: boolean = false;\r\n public emailData: Email = new Email();\r\n public showSuccessSendMessage: boolean = false;\r\n public showErrorSendMessage: boolean = false;\r\n\r\n constructor(\r\n private despatchNoteService: DespatchNotesService,\r\n private route: ActivatedRoute,\r\n private location: Location,\r\n @Inject(APP_CONFIG) protected config: IAppConfig) {\r\n this.id = Number(this.route.snapshot.paramMap.get(\"id\"));\r\n this.url = `despatch-note/${this.id}`;\r\n }\r\n\r\n ngOnInit() {\r\n this.hostUrl = this.config.apiLocations.SalesOrders.substr(0, this.config.apiLocations.SalesOrders.lastIndexOf(\"/api/\") + 1);\r\n }\r\n\r\n public CallPrint() {\r\n this.report.print();\r\n }\r\n\r\n public CallDownload() {\r\n this.report.download();\r\n }\r\n\r\n public GoBack(): void {\r\n this.location.back();\r\n }\r\n\r\n public OpenEmailDialog(): void {\r\n this.send();\r\n }\r\n\r\n public OpenDialog(): void {\r\n this.despatchNoteService\r\n .GetDespatchEmailData(this.id)\r\n .subscribe(x => this.emailData = x, () => { }, () => {\r\n this.showErrorSendMessage = false;\r\n this.showTemplateDialog = true;\r\n });\r\n }\r\n\r\n public send(): void {\r\n this.despatchNoteService\r\n .SendDespatchEmailData(this.emailData).subscribe(() => {\r\n this.showTemplateDialog = false;\r\n this.showSuccessSendMessage = true;\r\n }, () => {\r\n this.showErrorSendMessage = true;\r\n });\r\n }\r\n\r\n public CloseDialog(): void {\r\n this.showTemplateDialog = false;\r\n }\r\n\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { LoadOptions } from \"devextreme/data\";\r\nimport CustomStore from \"devextreme/data/custom_store\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { DataSourceOptions, IODataService } from \"servicesight-shared\";\r\nimport { AuthService } from \"../auth/auth.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class ODataService implements IODataService {\r\n\r\n constructor(private authService: AuthService) { }\r\n\r\n public GetDataSourceWithLookups(\r\n sourceData: T,\r\n sourceKey: string,\r\n lookupMapping: { store: ODataStore; dataKey: string; lookupKey: string; displayExprs: string[] | { original: string; target: string }[] }[]\r\n ): DataSource {\r\n const store = new CustomStore({\r\n key: sourceKey,\r\n update: (key: any, data: any) => {\r\n let update: Promise;\r\n let index: number = 0;\r\n if (typeof (sourceData as ODataStore).update === \"function\") {\r\n const odata = sourceData as ODataStore;\r\n update = odata.update(key, data);\r\n } else {\r\n const array = sourceData as any[];\r\n index = array.findIndex(p => p[sourceKey] === key);\r\n const sourceItem = array[index];\r\n Object.assign(sourceItem, data);\r\n\r\n update = Promise.resolve(sourceItem);\r\n }\r\n\r\n return update.then(sourceItem => {\r\n const promises = lookupMapping.map(lookup => {\r\n return lookup.store.byKey(sourceItem[lookup.dataKey]).then(itemData => {\r\n lookup.displayExprs.forEach(displayExpr => {\r\n sourceItem[displayExpr] = itemData ? itemData[displayExpr] : null;\r\n });\r\n });\r\n });\r\n\r\n return Promise.all(promises).then(() => {\r\n if (typeof (sourceData as ODataStore).update !== \"function\") {\r\n const array = sourceData as any[];\r\n array[index] = sourceItem;\r\n }\r\n return sourceItem;\r\n });\r\n });\r\n },\r\n remove: (key: any) => {\r\n if (typeof (sourceData as ODataStore).remove === \"function\") {\r\n const odata = sourceData as ODataStore;\r\n return odata.remove(key);\r\n } else {\r\n const array = sourceData as any[];\r\n array.splice(array.findIndex(p => p[sourceKey] === key), 1);\r\n }\r\n return Promise.resolve();\r\n },\r\n insert: (data: any) => {\r\n let insert: Promise;\r\n if (typeof (sourceData as ODataStore).insert === \"function\") {\r\n const odata = sourceData as ODataStore;\r\n insert = odata.insert(data);\r\n } else {\r\n insert = Promise.resolve(data);\r\n }\r\n\r\n return insert.then(insertedData => {\r\n const promises = lookupMapping.map(lookup => {\r\n return lookup.store.byKey(insertedData[lookup.dataKey]).then(itemData => {\r\n lookup.displayExprs.forEach(displayExpr => {\r\n insertedData[displayExpr] = itemData ? itemData[displayExpr] : null;\r\n });\r\n });\r\n });\r\n\r\n return Promise.all(promises).then(() => {\r\n if (typeof (sourceData as ODataStore).insert !== \"function\") {\r\n sourceData.push(insertedData);\r\n }\r\n\r\n return data;\r\n });\r\n });\r\n },\r\n load: (options: LoadOptions): Promise => {\r\n if (typeof (sourceData as ODataStore).load === \"function\") {\r\n const odata = sourceData as ODataStore;\r\n return odata.load(options).then(data => {\r\n return this.loadLookup(data, lookupMapping);\r\n }, error => {\r\n return Promise.reject(error);\r\n });\r\n } else {\r\n return this.loadLookup(sourceData as any[], lookupMapping);\r\n }\r\n }\r\n });\r\n\r\n return new DataSource({\r\n store,\r\n paginate: false\r\n });\r\n }\r\n\r\n public GetDataSource(options: DataSourceOptions): DataSource {\r\n return new DataSource(this.GetDataSourceObject(options));\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/ban-types\r\n public GetDataSourceObject(options: DataSourceOptions): object {\r\n const paging = options.paging ?? true;\r\n let pageSize;\r\n\r\n if (options.pageSize) {\r\n pageSize = options.pageSize;\r\n } else if (paging) {\r\n pageSize = 50;\r\n }\r\n\r\n return {\r\n store: this.GetStore(options),\r\n paginate: paging,\r\n pageSize,\r\n sort: options.sortSelector ? { selector: options.sortSelector, desc: options.sortDesc || false } : undefined,\r\n filter: options.filter\r\n // Other DataSource options go here\r\n };\r\n }\r\n\r\n public GetStore(options: DataSourceOptions): ODataStore {\r\n return new ODataStore({\r\n version: 4,\r\n url: options.url,\r\n key: options.key,\r\n keyType: options.keyType,\r\n deserializeDates: true,\r\n beforeSend: (e) => {\r\n e.timeout = 120000;\r\n\r\n if (e.params) {\r\n Object.assign(e.params, options.queryStringParams);\r\n } else {\r\n e.params = options.queryStringParams;\r\n }\r\n\r\n e.headers = {\r\n Authorization: `Bearer ${this.authService.Token}`\r\n };\r\n\r\n if (e.method === \"PATCH\") {\r\n e.method = \"PUT\";\r\n }\r\n\r\n if (options.beforeSend) {\r\n options.beforeSend(e);\r\n }\r\n }\r\n });\r\n }\r\n\r\n private loadLookup(\r\n data: any[],\r\n lookupMapping: { store: ODataStore; dataKey: string; lookupKey: string; displayExprs: string[] | { original: string; target: string }[] }[]): Promise {\r\n if (data && data.length > 0) {\r\n const promises = lookupMapping.map(lookup => {\r\n let allValues = new Set(data.map(x => x[lookup.dataKey]));\r\n const preFilter = [...allValues].map(x => [lookup.lookupKey, \"=\", x]);\r\n allValues = undefined;\r\n\r\n const promiseArray: Promise[] = [];\r\n let filter: any[] = [];\r\n\r\n for (let i = 0; i < preFilter.length; i++) {\r\n filter.push(preFilter[i]);\r\n filter.push(\"or\");\r\n\r\n if ((i !== 0 && i % 30 === 0) || i + 1 === preFilter.length) {\r\n filter.pop();\r\n const dataSource = new DataSource({\r\n store: lookup.store,\r\n filter: JSON.parse(JSON.stringify(filter)), // clone, not reference\r\n paginate: false\r\n });\r\n\r\n promiseArray.push(dataSource.load());\r\n filter = [];\r\n }\r\n }\r\n\r\n return Promise.all(promiseArray).then(lookupDataParts => {\r\n const lookupData = [].concat.apply([], lookupDataParts);\r\n\r\n data.forEach(sourceDataItem => {\r\n lookup.displayExprs.forEach(displayExpr => {\r\n const lookupDataItem = lookupData.find(l => l[lookup.lookupKey] === sourceDataItem[lookup.dataKey]);\r\n\r\n if (typeof displayExpr === \"object\") {\r\n sourceDataItem[displayExpr.target] = lookupDataItem ? lookupDataItem[displayExpr.original] : null;\r\n } else {\r\n sourceDataItem[displayExpr] = lookupDataItem ? lookupDataItem[displayExpr] : null;\r\n }\r\n });\r\n });\r\n });\r\n });\r\n\r\n return Promise.all(promises).then(() => {\r\n return data;\r\n });\r\n } else {\r\n return Promise.resolve([]);\r\n }\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable } from \"rxjs\";\r\nimport { map } from \"rxjs/operators\";\r\nimport { IAppConfig, APP_CONFIG, IProteanResponse, SelectOptionModel } from \"servicesight-shared\";\r\nimport { Customer } from \"../../models/customer\";\r\nimport { ICustomerGridData } from \"../../models/customer-grid-data-model\";\r\nimport { CustomerLocation } from \"../../models/customer-location.model\";\r\nimport { ICurrency } from \"../../models/icurrency.model\";\r\nimport { ICustomerService } from \"../interfaces/ICustomerService\";\r\nimport { ODataService } from \"../odata/odata.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class CustomerService implements ICustomerService {\r\n\r\n constructor(\r\n private odataService: ODataService,\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) protected config: IAppConfig\r\n ) { }\r\n\r\n public GetCustomers(): Observable {\r\n const queryModel = {\r\n EnquiryName: \"Customers\"\r\n };\r\n\r\n return this.http.post(this.config.apiLocations.ServiceSight + \"GlobalEnquiry/GetGridDataAsync\", queryModel)\r\n .pipe(map(x => {\r\n x.Rows.forEach((item) => {\r\n item.CustomerID = Number(item.CustomerID);\r\n item.InvoiceID = Number(item.InvoiceID);\r\n item.CustomerName = (item.CustomerName as any).replaceAll(\"&\", \"&\");\r\n });\r\n return x;\r\n }));\r\n }\r\n\r\n public GetCustomerCurrency(customerId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Customer/GetCustomerCurrencyModel?customerId=${customerId}`);\r\n }\r\n\r\n public GetCustomerLocation(customerId: number): Observable {\r\n return this.http.get<{CustomerLocation: CustomerLocation}>(`${this.config.apiLocations.ServiceSight}Employee/GetCustomerLocationViewModel?customerID=${customerId}`)\r\n .pipe(map(x => x.CustomerLocation));\r\n }\r\n\r\n public GetCustomerTaxCodesStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.config.apiLocations.ServiceSightOData}CustomerTaxCodeOD`,\r\n key: \"ID\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetDoesAccountNumberAvailable(alpha: string): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Customer/checkAlphaUniqueAsync?alpha=${alpha}`;\r\n return this.http.get(url);\r\n }\r\n\r\n public updateStatusAndAccountNumber(model: Customer): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Customer/Activate`;\r\n return this.http.post(url, model);\r\n }\r\n\r\n public GetRegions(countryCode: number): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Customer/GetRegions?countryCode=${countryCode}`;\r\n return this.http.get(url);\r\n }\r\n\r\n public GetAllCountriesStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.config.apiLocations.ServiceSightOData}AllCountriesOD`,\r\n key: \"ID\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n}\r\n","export enum StoreTypesEnum {\r\n MainStore = 1\r\n}\r\n","export class DespatchNoteInvoice {\r\n Id: number;\r\n TaxPoint?: Date;\r\n Proforma?: boolean;\r\n Preview?: boolean;\r\n}\r\n","import { DespatchNoteStatus } from \"servicesight-shared\";\r\nimport { StoreTypesEnum } from \"src/app/shared/enums/store-types.enum\";\r\nimport { DespatchNoteInvoice } from \"./despatch-note-invoice.model\";\r\nimport { DespatchNoteMakeModel } from \"./despatch-note-make-model.model\";\r\nimport { DespatchMaterial } from \"./despatch-note-material.model\";\r\nimport { DespatchNotePart } from \"./despatch-note-part.model\";\r\n\r\nexport class DespatchNote extends DespatchNoteInvoice {\r\n constructor() {\r\n super();\r\n\r\n this.Status = DespatchNoteStatus.Pending;\r\n this.IncludeEquipment = true;\r\n this.IncludeMaterials = true;\r\n this.IncludeParts = true;\r\n this.Materials = [];\r\n this.MakeModels = [];\r\n this.Parts = [];\r\n this.DefaultStoreId = StoreTypesEnum.MainStore;\r\n }\r\n\r\n SalesId: number;\r\n DefaultStoreId: number;\r\n CustomerId: number;\r\n DeliveryId: number;\r\n DespatchDate: Date;\r\n DespatchDateUI: Date;\r\n EstimatedDeliveryDate: Date;\r\n EstimatedDeliveryDateUI: Date;\r\n Carriage: number;\r\n CarriageFc: number;\r\n IsBaseCurrency: boolean;\r\n ExchangeRate: number;\r\n InternalNotes: string;\r\n Instructions: string;\r\n CarrierId: number;\r\n CarrierRef: number;\r\n CarrierContactId: number;\r\n Status: DespatchNoteStatus;\r\n TotalValue: number;\r\n IncludeParts: boolean;\r\n IncludeEquipment: boolean;\r\n IncludeMaterials: boolean;\r\n MakeModels: DespatchNoteMakeModel[];\r\n Materials: DespatchMaterial[];\r\n Parts: DespatchNotePart[];\r\n InvoiceNo?: number;\r\n EmployeeId?: number;\r\n ReverseChargeVAT: boolean;\r\n InvGroupingId: number;\r\n}\r\n","import { DocumentTypeEnum } from \"servicesight-shared\";\r\n\r\nexport class JobUploadModel {\r\n JobID: number;\r\n File: File[] = [];\r\n VisibleToCustomer = false;\r\n VisibleToEngineer = false;\r\n Description: string;\r\n DocumentType: DocumentTypeEnum;\r\n ActivityId?: number;\r\n AttachmentId?: number;\r\n\r\n public createNew(): JobUploadModel {\r\n const model = new JobUploadModel();\r\n model.JobID = this.JobID;\r\n model.DocumentType = this.DocumentType;\r\n\r\n return model;\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { EventEmitter, Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG, ToastType } from \"servicesight-shared\";\r\nimport { NewNotification } from \"../../models/new-notification.model\";\r\nimport { NotificationItem } from \"../../models/notification-item.model\";\r\nimport { NotificationResponse } from \"../../models/notification-response.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class NotificationsService {\r\n public newNotificationRecieved: EventEmitter = new EventEmitter();\r\n\r\n private currentData: NotificationResponse = null;\r\n private localNotifications: NotificationItem[] = [];\r\n\r\n private get totalCount(): number {\r\n return (this.currentData?.Count) + this.localNotifications.filter(x => !x.NotificationSeen).length;\r\n }\r\n\r\n constructor(\r\n @Inject(APP_CONFIG) private config: IAppConfig,\r\n private http: HttpClient\r\n ) {\r\n setInterval(() => {\r\n this.GetNotifications().subscribe(x => {\r\n if (this.currentData && x.Count > 0) {\r\n let newNotifications = x.Notifications.filter(item =>\r\n this.currentData.Notifications.findIndex(n => n.TaskID === item.TaskID) < 0);\r\n\r\n if (this.currentData.CacheNotifications?.length > 0) {\r\n newNotifications = newNotifications.concat(this.currentData.CacheNotifications.map(item => {\r\n return {\r\n Description: item.Text,\r\n TaskID: -1,\r\n FullDescription: null,\r\n NotificationSeen: false\r\n };\r\n }));\r\n }\r\n\r\n if (newNotifications.length > 0) {\r\n newNotifications.forEach(item => {\r\n let text = item.Description;\r\n\r\n if (item.FullDescription) {\r\n text += ` - ${item.FullDescription}`;\r\n }\r\n\r\n this.newNotificationRecieved.emit({\r\n Message: text,\r\n Count: this.totalCount\r\n });\r\n });\r\n }\r\n }\r\n\r\n this.currentData = x;\r\n });\r\n }, 5000);\r\n }\r\n\r\n public LocalNotification(category: string, description: string, toastType: ToastType = ToastType.light): void {\r\n this.localNotifications.push({\r\n Description: category,\r\n FullDescription: description,\r\n NotificationSeen: false,\r\n TaskID: -1 // todo\r\n });\r\n\r\n this.newNotificationRecieved.emit({\r\n Message: `${category} - ${description}`,\r\n Count: this.totalCount,\r\n ToastType: toastType\r\n });\r\n }\r\n\r\n public GetNotifications(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}ui/getnotifications`);\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { catchError, combineLatest, map, mergeMap, Observable, of, Subject, tap } from \"rxjs\";\r\nimport { IProteanResponse, DocumentTypeEnum, IAppConfig, APP_CONFIG, ToastType } from \"servicesight-shared\";\r\nimport { JobFileListModel } from \"../models/job-file-list\";\r\nimport { PrimaryDocumentModel } from \"../../shared/models/primary-document.model\";\r\nimport { JobUploadModel } from \"../models/job-upload\";\r\nimport { AuthService } from \"src/app/shared/services/auth/auth.service\";\r\nimport { NotificationsService } from \"src/app/shared/services/notifications/notifications.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class JobDocumentDataService {\r\n public OpenUploadFileModal = new Subject();\r\n public SubmitFormData: boolean = false;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private authService: AuthService,\r\n private notificationService: NotificationsService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) {\r\n }\r\n\r\n public DownloadDocument(file: string): Observable {\r\n const url = `${this.appConfig.apiLocations.ServiceSight}Document/GetDownloadUrl?fileGuid=${file}`;\r\n return this.http.get(url).pipe(mergeMap(downloadUrl => {\r\n return this.http.get(downloadUrl, { observe: \"response\", responseType: \"blob\" as \"json\" });\r\n }));\r\n }\r\n\r\n public GetDocuments(documentType: DocumentTypeEnum, jobId): Observable {\r\n const url = `${this.appConfig.apiLocations.ServiceSight}Document/GetDocuments?documentType=${documentType}&entityId=${jobId}`;\r\n return this.http.get(url);\r\n }\r\n\r\n private getUploadUrl(\r\n name: string,\r\n description: string,\r\n contentType: string,\r\n docTypeId: DocumentTypeEnum,\r\n docId: string,\r\n subDocId: string,\r\n activityId: string,\r\n visibleToCustomer: boolean,\r\n visibleToEngineer: boolean,\r\n source: string): Observable {\r\n return this.http.get(`${this.appConfig.apiLocations.ServiceSight}Document/GetUploadUrl?` +\r\n `filename=${encodeURIComponent(name)}` +\r\n `&contentType=${contentType}` +\r\n `&documentType=${docTypeId}` +\r\n `&docId=${docId}` +\r\n `&subDocId=${subDocId}` +\r\n (activityId ? `&activityId=${activityId}` : \"\") +\r\n `&description=${description}` +\r\n `&visibleToCustomer=${visibleToCustomer}` +\r\n `&visibleToEngineer=${visibleToEngineer}` +\r\n `&source=${source}`);\r\n }\r\n\r\n public UploadJobDocuments(model: JobUploadModel): Observable {\r\n this.notificationService.LocalNotification(\"File upload\", `Uploading ${model.File.length} file(s)`);\r\n return combineLatest(model.File.map(file => {\r\n // todo handle activity id\r\n return this.getUploadUrl(\r\n file.name,\r\n model.Description,\r\n file.type || \"application/octet-stream\",\r\n model.DocumentType,\r\n model.JobID.toString(),\r\n \"0\",\r\n model.ActivityId?.toString(),\r\n model.VisibleToCustomer,\r\n model.VisibleToEngineer,\r\n \"OfficeApp\").pipe(mergeMap(uploadUrl => {\r\n return this.http.put(uploadUrl, file, {\r\n observe: \"response\",\r\n headers: {\r\n \"content-type\": file.type || \"application/octet-stream\",\r\n \"x-goog-meta-DocTypeId\": model.DocumentType.toString(),\r\n \"x-goog-meta-DocId\": model.JobID.toString(),\r\n \"x-goog-meta-SubDocID\": \"0\",\r\n \"x-goog-meta-ActivityId\": model.ActivityId?.toString() || \"null\",\r\n \"x-goog-meta-Description\": model.Description,\r\n \"x-goog-meta-DisplayName\": file.name,\r\n \"x-goog-meta-EmployeeId\": this.authService.EmployeeId.toString(),\r\n \"x-goog-meta-VisibleToCustomer\": String(model.VisibleToCustomer),\r\n \"x-goog-meta-VisibleToEngineer\": String(model.VisibleToEngineer),\r\n \"x-goog-meta-Source\": \"OfficeApp\",\r\n }\r\n }).pipe(map(x => x.status === 200), catchError(() => of(false)));\r\n }));\r\n })).pipe(tap(result => {\r\n const failCount = result.filter(x => !x).length;\r\n if (failCount > 0) {\r\n this.notificationService.LocalNotification(\r\n \"File upload\",\r\n `${model.File.length} file(s) failed upload`,\r\n ToastType.burnt);\r\n }\r\n }), map(result => {\r\n return result.every(x => x);\r\n }));\r\n }\r\n\r\n public UpdateDocument(model): Observable {\r\n const url = `${this.appConfig.apiLocations.ServiceSight}Document/UpdateDocumentAsync`;\r\n return this.http.post(url, model);\r\n }\r\n\r\n public DeleteDocument(documentType: DocumentTypeEnum, list: JobFileListModel[]): Observable {\r\n list.forEach(x => x.DocTypeID = documentType);\r\n const url = `${this.appConfig.apiLocations.ServiceSight}Document/DeleteDocumentAsync`;\r\n return this.http.post(url, list);\r\n }\r\n\r\n public SetFileAsPrimary(model: PrimaryDocumentModel): Observable {\r\n return this.http.post(`${this.appConfig.apiLocations.ServiceSight}Document/SetFileAsPrimary`, model);\r\n }\r\n\r\n public GetPrimaryImage(entityId: number, docTypeId: DocumentTypeEnum): Observable {\r\n const url = `${this.appConfig.apiLocations.ServiceSight}Document/GetPrimaryImageAsync?entityId=${entityId}&documentType=${docTypeId}`;\r\n return this.http.get(url, { responseType: \"blob\" });\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { JobDocumentDataService } from \"../../jobs/services/job-document-data.service\";\r\nimport { Subject } from \"rxjs\";\r\nimport { DocumentTypeEnum } from \"servicesight-shared\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class PrimaryImageService {\r\n\r\n private subject = new Subject();\r\n public primaryImage = this.subject.asObservable();\r\n public GetPrimaryImage = this.GetStockPrimaryImage.bind(this);\r\n\r\n public constructor(\r\n private jobDocumentService: JobDocumentDataService) { }\r\n\r\n public GetStockPrimaryImage(entityId: number, docType: DocumentTypeEnum = DocumentTypeEnum.Stock) {\r\n this.jobDocumentService.GetPrimaryImage(entityId, docType).subscribe(image => {\r\n if (image) {\r\n const fileReader = new FileReader();\r\n fileReader.onloadend = (e) => {\r\n // @ts-ignore\r\n this.subject.next(e.target.result);\r\n };\r\n fileReader.readAsDataURL(image);\r\n } else {\r\n this.subject.next(null);\r\n }\r\n }, () => this.subject.next(null));\r\n }\r\n}\r\n","\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n NgZone,\r\n OnChanges,\r\n OnDestroy,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { DocumentTypeEnum, FormMesssageService, GenericFormMessagesComponent } from \"servicesight-shared\";\r\nimport { JobUploadModel } from \"../../../jobs/models/job-upload\";\r\nimport { JobDocumentDataService } from \"../../../jobs/services/job-document-data.service\";\r\n\r\n@Component({\r\n selector: \"app-job-file-upload-dialogue\",\r\n templateUrl: \"./job-file-upload-dialogue.component.html\",\r\n styleUrls: [\"./job-file-upload-dialogue.component.scss\"]\r\n})\r\nexport class JobFileUploadDialogueComponent implements OnChanges, OnInit, OnDestroy {\r\n @Input() showPopup: boolean | undefined = undefined;\r\n @Input() entityId: number;\r\n @Input() documentType: DocumentTypeEnum;\r\n @Input() isVisibleToEngineer: boolean;\r\n @Input() isActivityVisible: boolean = false;\r\n @Input() title: string;\r\n @Input() uploadVisibleToCustomerText: string = \"job.files.visible.to.customer\";\r\n @Input() model = new JobUploadModel();\r\n @Input() fileEdited: boolean;\r\n @Output() close: EventEmitter = new EventEmitter();\r\n @Output() dropZoneActive: EventEmitter = new EventEmitter();\r\n @Output() filesUploaded: EventEmitter = new EventEmitter();\r\n\r\n @ViewChild(\"jobdocform\", { static: true }) form: NgForm;\r\n @ViewChild(\"formmessages\", { static: true }) formmessages: GenericFormMessagesComponent;\r\n\r\n private counter: number = 0;\r\n\r\n private dragEnterEvent = (e: Event): void => {\r\n e.preventDefault();\r\n this.ngZone.run(() => {\r\n this.counter++;\r\n this.dropZoneActive.emit(true);\r\n });\r\n };\r\n\r\n private dragLeaveEvent = (e: Event): void => {\r\n e.preventDefault();\r\n this.ngZone.run(() => {\r\n if (--this.counter <= 0) {\r\n this.counter = 0;\r\n this.dropZoneActive.emit(false);\r\n }\r\n });\r\n };\r\n\r\n private dragOverEvent = (e: Event): void => {\r\n e.preventDefault();\r\n };\r\n\r\n private dropEvent = (e: DragEvent): void => {\r\n e.preventDefault();\r\n this.ngZone.run(() => {\r\n this.counter = 0;\r\n this.dropZoneActive.emit(false);\r\n\r\n if ((e.target as any).id === \"dropzone-external\" || (e.target as any).className === \"dx-fileuploader-input\") {\r\n this.model = this.model.createNew();\r\n this.model.File = [];\r\n for (let x = 0; x < e.dataTransfer.files.length; x++) {\r\n this.model.File.push(e.dataTransfer.files.item(x));\r\n }\r\n this.showPopup = true;\r\n }\r\n });\r\n };\r\n\r\n public readonly formName: string = \"jobdocform\";\r\n\r\n public isLoading = true;\r\n public docType = DocumentTypeEnum;\r\n\r\n public get showPopupDialog(): boolean {\r\n return this.showPopup || this.showPopup === undefined;\r\n }\r\n\r\n public get IsVisibleToCustomer(): boolean {\r\n return this.documentType === this.docType.Job\r\n || this.documentType === this.docType.Stock\r\n || this.documentType === this.docType.Quote\r\n || this.documentType === this.docType.SalesOrder\r\n || this.documentType === this.docType.DespatchNote\r\n || this.documentType === this.docType.Customer\r\n || this.documentType === this.docType.MakeModel\r\n || this.documentType === this.docType.Reminder\r\n || this.documentType === this.docType.ServiceContract;\r\n }\r\n\r\n public get SaveButtonDisabled(): boolean {\r\n if (this.fileEdited) {\r\n return !this.form.form.dirty;\r\n }\r\n return this.isLoading || this.model.File.length === 0;\r\n }\r\n\r\n constructor(\r\n private ngZone: NgZone,\r\n private jobDocumentService: JobDocumentDataService,\r\n private formMessageService: FormMesssageService) { }\r\n\r\n public ngOnInit(): void {\r\n window.addEventListener(\"dragenter\", this.dragEnterEvent, false);\r\n window.addEventListener(\"dragleave\", this.dragLeaveEvent, false);\r\n window.addEventListener(\"dragover\", this.dragOverEvent, false);\r\n window.addEventListener(\"drop\", this.dropEvent, false);\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n window.removeEventListener(\"dragenter\", this.dragEnterEvent, false);\r\n window.removeEventListener(\"dragleave\", this.dragLeaveEvent, false);\r\n window.removeEventListener(\"dragover\", this.dragOverEvent, false);\r\n window.removeEventListener(\"drop\", this.dropEvent, false);\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.entityId?.currentValue) {\r\n this.model.JobID = changes.entityId.currentValue;\r\n }\r\n if (changes.documentType?.currentValue) {\r\n this.model.DocumentType = changes.documentType.currentValue;\r\n }\r\n if (this.model.JobID && this.model.DocumentType) {\r\n this.isLoading = false;\r\n }\r\n\r\n if (changes.showPopup?.currentValue && !changes.showPopup?.previousValue) {\r\n this.formMessageService.ClearForm(this.formName);\r\n this.formmessages.ClearFormErrors();\r\n }\r\n }\r\n\r\n public fileSelected(): void {\r\n if (this.showPopup !== undefined) {\r\n this.showPopup = true;\r\n }\r\n }\r\n\r\n public SubmitFileForm(): void {\r\n const validExtensions = /\\.(jpg|jpeg|png|pdf|csv|zip|docx|odt|xlsx|msg)/;\r\n const hasInvalidFiles = this.model.File.some(f => !validExtensions.test(f.name?.toLowerCase()));\r\n if (hasInvalidFiles) {\r\n return;\r\n }\r\n\r\n if (this.fileEdited) {\r\n this.UpdateFileData();\r\n } else {\r\n this.UploadFile();\r\n }\r\n }\r\n\r\n public UploadFile(): void {\r\n this.formMessageService.RegisterObservable(this.jobDocumentService.UploadJobDocuments(this.model), this.formName)\r\n .subscribe((res) => {\r\n if (res) {\r\n this.filesUploaded.emit(this.model);\r\n this.Dismiss(true);\r\n }\r\n });\r\n }\r\n\r\n public UpdateFileData(): void {\r\n this.model.DocumentType = this.documentType;\r\n this.formMessageService.RegisterObservable(this.jobDocumentService.UpdateDocument(this.model), this.formName)\r\n .subscribe(() => {\r\n this.Dismiss(true);\r\n });\r\n }\r\n\r\n public SelectActivity(selectedId: number): void {\r\n this.model.ActivityId = selectedId;\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public Dismiss(changed: boolean): void {\r\n if (this.showPopup === true) {\r\n this.close.emit(changed);\r\n this.showPopup = false;\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n

Drop file here to upload

\r\n
\r\n
\r\n
\r\n \r\n {{ 'job.labour.delete.selected' | translate }}\r\n \r\n \r\n {{ 'job.files.upload.file' | translate }}\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n {{ data. value }}\r\n \r\n \r\n {{ data.value }}\r\n \r\n
\r\n
\r\n {{ GetActivityDescription(data) }}\r\n
\r\n
\r\n {{ GetFileSize(data.data) }}\r\n
\r\n
\r\n {{ data.value }}\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n\r\n
\r\n

{{ \"job.save-job-first.files\" | translate }}

\r\n
\r\n
\r\n \r\n
\r\n\r\n\r\n\r\n\r\n
\r\n {{ tooltipText }}\r\n
\r\n
\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild,\r\n NgZone\r\n} from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent, DxTooltipComponent } from \"devextreme-angular\";\r\nimport { on } from \"devextreme/events\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ArrayStore from \"devextreme/data/array_store\";\r\nimport { Guid } from \"guid-typescript\";\r\nimport {\r\n ActivityModel,\r\n ActivityService,\r\n DocumentTypeEnum,\r\n Equipment,\r\n EquipmentDataService,\r\n FormMesssageService,\r\n JobStatus,\r\n Module,\r\n ModuleService\r\n} from \"servicesight-shared\";\r\nimport { JobUploadModel } from \"src/app/jobs/models/job-upload\";\r\nimport { JobDetail } from \"../../../jobs/models/job-detail\";\r\nimport { JobFileListModel } from \"../../../jobs/models/job-file-list\";\r\nimport { JobDocumentDataService } from \"../../../jobs/services/job-document-data.service\";\r\nimport { PrimaryImageService } from \"../../../stock/services/primary-image.service\";\r\nimport { PrimaryDocumentModel } from \"../../models/primary-document.model\";\r\nimport { SelectionChangedEvent } from \"devextreme/ui/data_grid\";\r\n\r\n@Component({\r\n selector: \"app-job-files\",\r\n templateUrl: \"./job-files.component.html\",\r\n styleUrls: [\"./job-files.component.scss\"]\r\n})\r\nexport class JobFilesComponent implements OnChanges, OnInit {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n @ViewChild(DxTooltipComponent) tooltip: DxTooltipComponent;\r\n @Input() job: JobDetail;\r\n @Input() jobForm: any;\r\n @Input() documentType: DocumentTypeEnum;\r\n @Input() entityId: number;\r\n @Input() formName: string = \"stockForm\";\r\n @Input() isJobNumberEnabled: boolean = false;\r\n @Input() FormSaveEnabled: boolean = false;\r\n @Input() visibleToCustomerText: string = \"job.files.visible.to.customer\";\r\n @Input() visibleToEngineerText: string = \"job.files.visible.to.engineer\";\r\n @Input() uploadVisibleToCustomerText: string = \"job.files.visible.to.customer\";\r\n @Input() showDeleteConfirmationMessage: boolean = false;\r\n @Input() deleteConfirmationMessage: string;\r\n @Output() primaryImageChanged = new EventEmitter();\r\n\r\n public title: string = \"\";\r\n public model = new JobUploadModel();\r\n public fileEdited: boolean = false;\r\n public isDropZoneActive: boolean = false;\r\n\r\n private equipmentModuleEnabled: boolean = false;\r\n\r\n public jobCompleted: boolean;\r\n public dataSource: DataSource;\r\n public documents: JobFileListModel[];\r\n public selectedDocumentIds: Array = [];\r\n public baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n public isLoading = false;\r\n public showUploadFileDialogue = false;\r\n public fileUploadService: any;\r\n public fileFormatsForViewing = [\"png\", \"jpeg\", \"jpg\", \"pdf\", \"gif\", \"bmp\", \"txt\"];\r\n public docType = DocumentTypeEnum;\r\n public showWarning: boolean = false;\r\n public equipment: Equipment[] = [];\r\n public showDeleteMessage: boolean = false;\r\n public isVisibleToEngineer: boolean = false;\r\n public isActivityVisible: boolean = false;\r\n public descriptionDictionary: { [key: number]: string } = {};\r\n public tooltipText: string;\r\n\r\n public get IsVisibleToCustomer(): boolean {\r\n return this.documentType === this.docType.Job ||\r\n this.documentType === this.docType.Stock ||\r\n this.documentType === this.docType.Quote ||\r\n this.documentType === this.docType.SalesOrder ||\r\n this.documentType === this.docType.DespatchNote ||\r\n this.documentType === this.docType.Customer ||\r\n this.documentType === this.docType.MakeModel ||\r\n this.documentType === this.docType.Reminder ||\r\n this.documentType === this.docType.ServiceContract;\r\n }\r\n\r\n public readonly visibilityFilter = [\r\n { text: \"Yes\", value: true },\r\n { text: \"No\", value: false }\r\n ];\r\n\r\n public get FileUploadDisabled(): boolean {\r\n if (this.documentType === DocumentTypeEnum.Job) {\r\n return (!this.job.IsAllowedAddAttachment && !!this.job.JobID) || this.isLoading;\r\n } else if (this.documentType === DocumentTypeEnum.Equipment) {\r\n return this.isLoading;\r\n }\r\n\r\n return this.isLoading;\r\n }\r\n\r\n public get IsPrimaryAvailable(): boolean {\r\n return this.PrimaryImageModules.includes(this.documentType);\r\n }\r\n\r\n public get showEquipColumn(): boolean {\r\n return this.documentType === DocumentTypeEnum.Job && this.equipmentModuleEnabled;\r\n }\r\n\r\n private readonly PrimaryImageModules: DocumentTypeEnum[] = [\r\n DocumentTypeEnum.Equipment,\r\n DocumentTypeEnum.Stock,\r\n DocumentTypeEnum.MakeModel\r\n ];\r\n\r\n constructor(\r\n private ngZone: NgZone,\r\n private jobDocumentService: JobDocumentDataService,\r\n private formMessageService: FormMesssageService,\r\n private primaryImageService: PrimaryImageService,\r\n private equipService: EquipmentDataService,\r\n private activityService: ActivityService,\r\n private translateService: TranslateService,\r\n private moduleService: ModuleService) {\r\n this.GetActivityDescription = this.GetActivityDescription.bind(this);\r\n }\r\n\r\n public SetFileAsPrimary(row, e) {\r\n if (!e.event) {\r\n //only trigger when someone clicks\r\n return;\r\n }\r\n\r\n const fileModel: PrimaryDocumentModel = {\r\n EntityId: this.entityId,\r\n FileGuid: row.data.FileGUID,\r\n DocumentType: this.documentType\r\n };\r\n\r\n this.formMessageService.RegisterObservable(this.jobDocumentService.SetFileAsPrimary(fileModel), this.formName)\r\n .subscribe(() => {\r\n this.documents.forEach(x => x.IsPrimary = false);\r\n this.documents.find(x => x.FileGUID === row.data.FileGUID).IsPrimary = true;\r\n this.primaryImageChanged.emit();\r\n if (this.PrimaryImageModules.includes(this.documentType)) {\r\n this.primaryImageService.GetPrimaryImage(this.entityId, this.documentType);\r\n }\r\n }, () => e.component.option(\"value\", false) );\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.moduleService.GetEnabledModules().subscribe(modules => {\r\n this.equipmentModuleEnabled = modules.includes(Module.Equipment);\r\n const isProEnabled = modules.includes(Module.Pro);\r\n this.isVisibleToEngineer = isProEnabled && (this.documentType === this.docType.Job || this.documentType === this.docType.Equipment);\r\n\r\n if (this.equipmentModuleEnabled && this.documentType === DocumentTypeEnum.Job && this.entityId) {\r\n this.equipService.GetJobEquipment(this.entityId).subscribe(x => {\r\n this.equipment = x;\r\n });\r\n }\r\n\r\n if (this.documentType === DocumentTypeEnum.Quote && isProEnabled) {\r\n this.isActivityVisible = true;\r\n this.activityService.activitiesDataSource.subscribe(activities => {\r\n this.descriptionDictionary = Object.assign({}, ...activities.map((x) => ({ [x.ActivityId]: x.Description })));\r\n if (this.documents) {\r\n this.removeLinkedDocuments(activities);\r\n }\r\n });\r\n }\r\n });\r\n\r\n this.jobDocumentService.OpenUploadFileModal.subscribe(() => {\r\n this.showUploadFileDialogue = true;\r\n });\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.documentType?.currentValue !== changes.documentType?.previousValue ||\r\n changes.entityId?.currentValue !== changes.entityId?.previousValue) {\r\n if (this.documentType === DocumentTypeEnum.Job && changes.job.currentValue.JobID) {\r\n this.jobCompleted = this.job.Status >= JobStatus.COMPLETED;\r\n this.loadDocuments();\r\n } else {\r\n this.loadDocuments();\r\n }\r\n }\r\n }\r\n\r\n public OpenFileUploadModal(): void {\r\n if (this.documentType === DocumentTypeEnum.Job && !this.job.JobID) {\r\n this.showWarning = true;\r\n } else if (this.FormSaveEnabled && !this.entityId) {\r\n this.jobForm.onSubmit();\r\n this.jobDocumentService.SubmitFormData = true;\r\n } else {\r\n this.fileEdited = false;\r\n this.title = this.translateService.instant(\"job.files.upload.file\");\r\n this.model = this.model.createNew();\r\n this.showUploadFileDialogue = true;\r\n }\r\n }\r\n\r\n public onCellPrepared(e: any): void {\r\n if (e.rowType === \"data\") {\r\n if (e.column.name === \"buttons\") {\r\n const cellElement = e.cellElement.children.item(0) as HTMLElement;\r\n on(cellElement.children.item(0), \"mouseover\", arg => {\r\n this.tooltipText = this.translateService.instant(\"job.files.tooltip.download\");\r\n this.tooltip.instance.show(arg.target);\r\n });\r\n\r\n on(cellElement.children.item(0), \"mouseout\", () => {\r\n this.tooltip.instance.hide();\r\n });\r\n\r\n on(cellElement.children.item(1), \"mouseover\", arg => {\r\n this.tooltipText = this.translateService.instant(\"job.files.tooltip.edit\");\r\n this.tooltip.instance.show(arg.target);\r\n });\r\n\r\n on(cellElement.children.item(1), \"mouseout\", () => {\r\n this.tooltip.instance.hide();\r\n });\r\n }\r\n }\r\n }\r\n\r\n public onEditorPreparing(e: any): void {\r\n if (e.type !== \"selection\") {\r\n return;\r\n }\r\n\r\n if (e.parentType === \"dataRow\" && e.row && e.row.data.AttachmentID < 0) {\r\n e.editorOptions.disabled = true;\r\n }\r\n }\r\n\r\n public onSelectionChanged(e: SelectionChangedEvent): void {\r\n const deselectRowKeys: number[] = [];\r\n const dataGrid = e.component;\r\n e.selectedRowsData.forEach((item) => {\r\n if (item.AttachmentID < 0) {\r\n deselectRowKeys.push(dataGrid.keyOf(item));\r\n }\r\n });\r\n\r\n if (deselectRowKeys.length) {\r\n dataGrid.deselectRows(deselectRowKeys);\r\n }\r\n }\r\n\r\n public ShowEditFileDialog(attachmentId: number) {\r\n const editedFile = this.documents.find(x => x.AttachmentID === attachmentId);\r\n this.model = this.MapToJobUploadModel(editedFile);\r\n this.title = editedFile.DisplayName;\r\n this.fileEdited = true;\r\n this.showUploadFileDialogue = true;\r\n }\r\n\r\n public OnUploadClosed(changed: boolean): void {\r\n this.showUploadFileDialogue = false;\r\n\r\n if (this.fileEdited && changed) {\r\n const editedFile = this.documents.find(x => x.AttachmentID === this.model.AttachmentId);\r\n editedFile.VisibleToCustomer = this.model.VisibleToCustomer;\r\n editedFile.VisibleToEngineer = this.model.VisibleToEngineer;\r\n editedFile.Description = this.model.Description;\r\n editedFile.ActivityId = this.model.ActivityId;\r\n }\r\n }\r\n\r\n public DownloadDocument(e: any, item: JobFileListModel): void {\r\n const trueEvent = e.event ?? e;\r\n trueEvent.preventDefault();\r\n\r\n const fileGuid = item?.FileGUID ?? e.row.data.FileGUID;\r\n const displayName = item?.DisplayName ?? e.row.data.DisplayName;\r\n\r\n this.jobDocumentService.DownloadDocument(fileGuid).subscribe((response) => {\r\n const downloadLink = document.createElement(\"a\");\r\n downloadLink.href = URL.createObjectURL(new Blob([response.body], { type: response.type }));\r\n downloadLink.setAttribute(\"download\", displayName);\r\n document.body.appendChild(downloadLink);\r\n downloadLink.click();\r\n downloadLink.remove();\r\n });\r\n }\r\n\r\n public ViewDocument(e: any, item: JobFileListModel): void {\r\n e.preventDefault();\r\n const mimeType = this.getMimeType(item);\r\n this.jobDocumentService.DownloadDocument(item.FileGUID).subscribe((response) => {\r\n const fileURL = URL.createObjectURL(new Blob([response.body], { type: mimeType }));\r\n const newTab = window.open(fileURL, \"_blank\");\r\n newTab.onload = () => newTab.document.title = item.DisplayName;\r\n });\r\n }\r\n\r\n public DeleteSelectedFiles(): void {\r\n if (this.showDeleteConfirmationMessage) {\r\n this.showDeleteMessage = true;\r\n } else {\r\n if (this.selectedDocumentIds && this.selectedDocumentIds.length > 0) {\r\n this.DeleteFiles();\r\n }\r\n }\r\n }\r\n\r\n public ConfirmDeleteAction(confirm: boolean): void {\r\n if (confirm) {\r\n this.DeleteFiles();\r\n }\r\n this.showDeleteMessage = false;\r\n }\r\n\r\n public dropZoneActive(isActive: boolean): void {\r\n this.isDropZoneActive = isActive;\r\n this.title = this.translateService.instant(\"job.files.upload.file\");\r\n }\r\n\r\n public filesUploaded(model: JobUploadModel): void {\r\n let lowestId = Math.min(...this.documents.map(x => x.AttachmentID));\r\n if (lowestId > 0) {\r\n lowestId = 0;\r\n }\r\n\r\n const local = [];\r\n\r\n for (const file of model.File) {\r\n const fileModel: JobFileListModel = {\r\n AttachedDate: new Date(),\r\n AttachmentID: --lowestId,\r\n AttachmentTypeID: 1,\r\n DisplayName: file.name,\r\n Description: model.Description,\r\n FileGUID: Guid.create().toString(),\r\n DocID: this.entityId,\r\n DocTypeID: this.documentType,\r\n FileSize: file.size,\r\n UploadedDate: new Date(),\r\n VisibleToCustomer: model.VisibleToCustomer,\r\n VisibleToEngineer: model.VisibleToEngineer,\r\n ActivityId: model.ActivityId,\r\n IsPrimary: false\r\n };\r\n local.push(fileModel);\r\n }\r\n\r\n this.documents = this.documents.concat(local);\r\n this.ngZone.run(() => {\r\n this.initDataSource();\r\n this.dataGrid.instance.refresh();\r\n });\r\n }\r\n\r\n private DeleteFiles(): void {\r\n this.isLoading = true;\r\n const fileItems = this.documents.filter((i) => this.selectedDocumentIds.indexOf(i.AttachmentID) >= 0);\r\n this.jobDocumentService.DeleteDocument(this.documentType, fileItems).subscribe({\r\n next: () => {\r\n this.primaryImageChanged.emit();\r\n this.documents = this.documents.filter((i) => this.selectedDocumentIds.indexOf(i.AttachmentID) < 0);\r\n this.initDataSource();\r\n this.primaryImageService.GetStockPrimaryImage(this.entityId);\r\n this.isLoading = false;\r\n },\r\n error: () => {\r\n this.isLoading = false;\r\n },\r\n complete: () => {\r\n this.isLoading = false;\r\n }\r\n });\r\n }\r\n\r\n public GetFileSize(file: JobFileListModel): string {\r\n return file.FileSize > 1024 * 1024 ? Math.round(file.FileSize / (1024 * 1024)) + \" MB\" : Math.round(file.FileSize / 1024) + \" KB\";\r\n }\r\n\r\n public GetActivityDescription(data): string {\r\n if (data.value) {\r\n return `${data.value} - ${this.descriptionDictionary[data.value]}`;\r\n }\r\n return \"\";\r\n }\r\n\r\n public IsViewButtonVisible(item: JobFileListModel): boolean {\r\n return (this.fileFormatsForViewing.indexOf(item.DisplayName.split(\".\").pop().toLowerCase()) >= 0);\r\n }\r\n\r\n public SetEquipmentFilter(equipmentId: number) {\r\n this.dataGrid.instance.columnOption(\"EquipId\", \"filterValue\", equipmentId);\r\n }\r\n\r\n private MapToJobUploadModel(file: JobFileListModel): JobUploadModel {\r\n const uploadModel = new JobUploadModel();\r\n uploadModel.AttachmentId = file.AttachmentID;\r\n uploadModel.Description = file.Description;\r\n uploadModel.JobID = this.entityId;\r\n uploadModel.VisibleToCustomer = file.VisibleToCustomer;\r\n uploadModel.VisibleToEngineer = file.VisibleToEngineer;\r\n uploadModel.ActivityId = file.ActivityId;\r\n\r\n return uploadModel;\r\n }\r\n\r\n private getMimeType(item: JobFileListModel): string {\r\n const filetype = item.DisplayName.split(\".\").pop();\r\n switch (filetype.toLowerCase()) {\r\n case \"png\":\r\n return \"image/png\";\r\n case \"jpeg\":\r\n return \"image/jpeg\";\r\n case \"jpg\":\r\n return \"image/jpg\";\r\n case \"gif\":\r\n return \"image/gif\";\r\n case \"bmp\":\r\n return \"image/bmp\";\r\n case \"pdf\":\r\n return \"application/pdf\";\r\n case \"txt\":\r\n return \"text/plain\";\r\n }\r\n }\r\n\r\n private loadDocuments(): void {\r\n if (this.documentType && this.entityId) {\r\n this.isLoading = true;\r\n this.jobDocumentService.GetDocuments(this.documentType, this.entityId).subscribe((res) => {\r\n this.documents = res;\r\n this.initDataSource();\r\n this.isLoading = false;\r\n this.selectedDocumentIds = [];\r\n });\r\n }\r\n }\r\n\r\n private removeLinkedDocuments(newActivities: ActivityModel[]) {\r\n //Delete any files where linked activity no longer exists\r\n const filesToDelete = [];\r\n this.documents.forEach(f => {\r\n if (f.ActivityId && f.AttachmentID !== null && !newActivities.find(a => a.ActivityId === f.ActivityId)) {\r\n filesToDelete.push(f.AttachmentID);\r\n }\r\n });\r\n this.selectedDocumentIds = filesToDelete;\r\n this.DeleteFiles();\r\n }\r\n\r\n private initDataSource(): void {\r\n this.dataSource = new DataSource({\r\n store: new ArrayStore({\r\n key: \"AttachmentID\",\r\n data: this.documents,\r\n })\r\n });\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable, Subject } from \"rxjs\";\r\nimport { DocumentTypeEnum, IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { CostAndPrice } from \"src/app/quotes/models/cost-price.model\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\nimport { SalesOrder } from \"../models/sales-order.model\";\r\nimport { CancellationReasonModel } from \"../../jobs/models/cancellation-reason\";\r\nimport { DespatchNotesAccordionItem } from \"../models/despatch-notes-accordion-item\";\r\nimport { Email } from \"src/app/shared/models/email.model\";\r\nimport { PurchaseOrdersMiscModel } from \"src/app/jobs/models/purchase-orders-misc.model\";\r\nimport { PartPurchaseOrderModel } from \"src/app/shared/models/part-purchase-order.model\";\r\nimport { EquipmentPurchaseOrderModel } from \"../../shared/models/equipment-purchase-order.model\";\r\nimport { QueuedEmailType } from \"src/app/shared/enums/queued-email-type.enum\";\r\nimport { AuthService } from \"src/app/shared/services/auth/auth.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class SalesOrderService {\r\n private navigateToTabObserver = new Subject();\r\n public navigateToTab = this.navigateToTabObserver.asObservable();\r\n\r\n constructor(\r\n private odataService: ODataService,\r\n private http: HttpClient,\r\n private authService: AuthService,\r\n @Inject(APP_CONFIG) protected config: IAppConfig) { }\r\n\r\n public GetDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.SalesOrdersOData}SalesOrderList`,\r\n key: \"SalesId\",\r\n keyType: \"String\"\r\n });\r\n }\r\n\r\n public GetSiteDataStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: this.config.apiLocations.ServiceSightOData + \"SiteOD\",\r\n key: \"SiteId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public Get(id: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.SalesOrders}SalesOrder/${id}`);\r\n }\r\n\r\n public Create(model: SalesOrder): Observable {\r\n if (model.Materials) {\r\n this.RecalculateLineIds(model);\r\n }\r\n return this.http.post(`${this.config.apiLocations.SalesOrders}SalesOrder`, model);\r\n }\r\n\r\n public Update(model: SalesOrder): Observable {\r\n if (model.Materials || model.Equipment) {\r\n this.RecalculateLineIds(model);\r\n }\r\n return this.http.put(`${this.config.apiLocations.SalesOrders}SalesOrder`, model);\r\n }\r\n\r\n public Place(model: SalesOrder): Observable {\r\n if (model.Materials || model.Equipment) {\r\n this.RecalculateLineIds(model);\r\n }\r\n return this.http.put(`${this.config.apiLocations.SalesOrders}SalesOrder/Place`, model);\r\n }\r\n\r\n public Cancel(model: SalesOrder): Observable {\r\n if (model.Materials || model.Equipment) {\r\n this.RecalculateLineIds(model);\r\n }\r\n return this.http.put(`${this.config.apiLocations.SalesOrders}SalesOrder/Cancel`, model);\r\n }\r\n\r\n public Outstanding(id: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.SalesOrders}SalesOrder/${id}/Outstanding`);\r\n }\r\n\r\n public GetCancelReasonById(id: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}CancelReasons/Get?entityId=${id}`);\r\n }\r\n\r\n public GetSalesOrderDespatchNotes(id: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.SalesOrders}SalesOrder/${id}/DespatchNotes`);\r\n }\r\n\r\n public NavigateToTab(index: number) {\r\n this.navigateToTabObserver.next(index);\r\n }\r\n\r\n public GetPrice(stockHeaderId: number, customerId?: number): Observable {\r\n customerId = customerId ? customerId : 0;\r\n const url = `${this.config.apiLocations.ServiceSight}Customer/GetPrice?id=${customerId}&stockHeaderId=${stockHeaderId}`;\r\n return this.http.get(url);\r\n }\r\n\r\n public GetSalesOrderEmailData(saleOrderId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.SalesOrders}Email/Acknowledgement/${saleOrderId}`);\r\n }\r\n\r\n public SendSalesOrderEmailData(emailData: Email): Observable {\r\n emailData.EmailType = QueuedEmailType.SalesOrder;\r\n emailData.SenderEmployeeId = this.authService.EmployeeId;\r\n return this.http.post(`${this.config.apiLocations.ServiceSight}Email/QueueEmail`, emailData);\r\n }\r\n\r\n public Recall(salesOrderId: number): Observable {\r\n return this.http.put(`${this.config.apiLocations.SalesOrders}SalesOrder/${salesOrderId}/Recall`, null);\r\n }\r\n\r\n public GetSalesOrderMiscPurchaseOrders(docId: number): Observable {\r\n const url = `${this.config.apiLocations.PurchaseOrders}MaterialPurchase/${docId}/${DocumentTypeEnum.SalesOrder}/Materials`;\r\n return this.http.get(url);\r\n }\r\n\r\n public GetSalesOrderEquipmentPurchaseOrders(docId: number): Observable {\r\n const url = `${this.config.apiLocations.PurchaseOrders}EquipmentPurchase/${docId}/${DocumentTypeEnum.SalesOrder}/Equip`;\r\n return this.http.get(url);\r\n }\r\n\r\n public GetSalesOrderPartsPurchaseOrders(docId: number): Observable {\r\n const url = `${this.config.apiLocations.PurchaseOrders}StockPurchase/${docId}/${DocumentTypeEnum.SalesOrder}/Parts`;\r\n return this.http.get(url);\r\n }\r\n\r\n public UpdateSalesOrderCustomer(salesOrderId: number, customerId: number): Observable {\r\n return this.http.put(`${this.config.apiLocations.SalesOrders}SalesOrder/UpdateCustomer/${salesOrderId}/${customerId}`, null);\r\n }\r\n\r\n private RecalculateLineIds(model: SalesOrder) {\r\n // null temp line ids before sending to server\r\n model.Materials.forEach(material => {\r\n const id = Number(material.LineId);\r\n if (isNaN(id)) {\r\n material.LineId = 0;\r\n }\r\n });\r\n model.Equipment.forEach(equip => {\r\n const id = Number(equip.LineId);\r\n if (isNaN(id)) {\r\n equip.LineId = 0;\r\n }\r\n });\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG, StoreModel } from \"servicesight-shared\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class StoreService {\r\n private readonly storeBaseUrl: string;\r\n private readonly storeODataBaseUrl: string;\r\n\r\n constructor(\r\n private odataService: ODataService,\r\n private httpClient: HttpClient,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig\r\n ) {\r\n this.storeBaseUrl = this.appConfig.apiLocations.Stock + \"StockStore\";\r\n this.storeODataBaseUrl = this.appConfig.apiLocations.StockOData + \"StockStoreOData\";\r\n }\r\n\r\n public GetDataStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.storeODataBaseUrl}`,\r\n key: \"StoreId\",\r\n keyType: \"Int32\",\r\n });\r\n }\r\n\r\n public GetDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.storeODataBaseUrl}`,\r\n key: \"StoreId\",\r\n keyType: \"Int32\",\r\n });\r\n }\r\n\r\n\r\n public Get(id: number): Observable {\r\n return this.httpClient.get(`${this.storeBaseUrl}/${id}`);\r\n }\r\n\r\n public Update(store: StoreModel): Observable {\r\n return this.httpClient.put(this.storeBaseUrl, store);\r\n }\r\n\r\n public Create(store: StoreModel): Observable {\r\n return this.httpClient.post(this.storeBaseUrl, store);\r\n }\r\n\r\n public Delete(id: number): Observable {\r\n return this.httpClient.delete(`${this.storeBaseUrl}/${id}`);\r\n }\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { ODataService } from \"../odata/odata.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class MaterialTypeService {\r\n\r\n constructor(\r\n private odataService: ODataService,\r\n @Inject(APP_CONFIG) protected config: IAppConfig\r\n ) { }\r\n\r\n public GetMaterialTypeStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.config.apiLocations.ServiceSightOData}MaterialTypeOD`,\r\n key: \"MiscTypeId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG, ProteanResponse } from \"servicesight-shared\";\r\nimport { Supplier } from \"src/app/suppliers/models/supplier.model\";\r\nimport { ICurrency } from \"../../models/icurrency.model\";\r\nimport { ODataService } from \"../odata/odata.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class SupplierService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private odataService: ODataService,\r\n @Inject(APP_CONFIG) protected config: IAppConfig\r\n ) { }\r\n\r\n public GetSupplier(supplierId: number): Observable {\r\n return this.http.get(\r\n `${this.config.apiLocations.ServiceSight}Supplier/Get?supplierId=${supplierId}`);\r\n }\r\n\r\n public GetSupplierStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.config.apiLocations.ServiceSightOData}SupplierOD`,\r\n key: \"SupplierId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetSupplierDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.ServiceSightOData}SupplierOD`,\r\n key: \"SupplierId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetSupplierHistory(supplierId: number): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.ServiceSightOData}SupplierHistoryOD`,\r\n key: \"Id\",\r\n keyType: \"String\",\r\n paging: true,\r\n pageSize: 50,\r\n queryStringParams: {\r\n supplierId\r\n }\r\n });\r\n }\r\n\r\n public GetSupplierCurrency(supplierId: number): Observable {\r\n return this.http.get(\r\n `${this.config.apiLocations.ServiceSight}Supplier/GetSupplierCurrencyModel?supplierId=${supplierId}`);\r\n }\r\n\r\n public Upsert(supplier: Supplier): Observable {\r\n return this.http.post(\r\n `${this.config.apiLocations.ServiceSight}Supplier/Upsert`, supplier);\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable, of } from \"rxjs\";\r\nimport { concatMap, map } from \"rxjs/operators\";\r\nimport { IAppConfig, APP_CONFIG, PageableDatastoreService, SettingId, SettingsService } from \"servicesight-shared\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\nimport { StockAdjustmentAutoFillOptionsModel } from \"../models/stock-adjustment-auto-fill-options.model\";\r\nimport { StockPartStoreData } from \"../models/stock-part-store-data.model\";\r\nimport { StockPartStoreLine } from \"../models/stock-part-store-line-model\";\r\nimport { StockPart } from \"../models/stock-part.model\";\r\nimport { StockSerialItemModel } from \"../models/stock-serial-item.model\";\r\nimport { StockUserRef } from \"../models/stock-user-ref.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class StockService extends PageableDatastoreService {\r\n\r\n private static readonly odataKey: string = \"StockHeaderId\";\r\n\r\n private additionalStoresEnabledValue: boolean = null;\r\n\r\n constructor(\r\n private odataService: ODataService,\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private config: IAppConfig,\r\n private settingsService: SettingsService\r\n ) {\r\n super(StockService.odataKey);\r\n }\r\n\r\n protected GetDataSourceObject(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.StockOData}StockPartsOData`,\r\n key: StockService.odataKey,\r\n keyType: \"Int32\",\r\n paging: true,\r\n pageSize: 50\r\n });\r\n }\r\n\r\n public GetStockHeaders(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.config.apiLocations.StockOData}StockHeadersOData`,\r\n key: \"StockHeaderId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetStockParts(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.StockOData}StockPartsOData`,\r\n key: \"StockHeaderId\",\r\n keyType: \"Int32\",\r\n paging: true,\r\n pageSize: 50\r\n });\r\n }\r\n\r\n public GetStores(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.StockOData}StockStoreOData`,\r\n key: \"StoreId\",\r\n keyType: \"Int32\",\r\n paging: true,\r\n pageSize: 50\r\n });\r\n }\r\n\r\n public GetStoresStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.config.apiLocations.StockOData}StockStoreOData`,\r\n key: \"StoreId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetStockHistory(partId: number): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.ServiceSightOData}StockHistoryOD`,\r\n key: \"Id\",\r\n keyType: \"String\",\r\n paging: true,\r\n pageSize: 50,\r\n queryStringParams: {\r\n partId\r\n }\r\n });\r\n }\r\n\r\n public GetStockPartsForStore(lookupData: { StockHeaderId: number; StoreId: number }[]): Observable {\r\n return this.http.post(`${this.config.apiLocations.Stock}StockPart/GetStockPartData`, lookupData);\r\n }\r\n\r\n public GetBinLocations(): Observable {\r\n return this.http.get(`${this.config.apiLocations.Stock}StockPart/BinLocations`);\r\n }\r\n\r\n public GetPartIdsForAutoFill(options: StockAdjustmentAutoFillOptionsModel): Observable {\r\n return this.http.post(`${this.config.apiLocations.Stock}StockPart/PartIdsForAutoFill`, options);\r\n }\r\n\r\n public GetActiveStoreIds(id: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.Stock}StockPart/GetActiveStoreIds/${id}`);\r\n }\r\n\r\n public GetStockStorePartsStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.config.apiLocations.StockOData}StockStorePartsOData`,\r\n key: [ \"StockHeaderId\", \"StoreId\" ],\r\n keyType: {\r\n StockHeaderId: \"Int32\",\r\n StoreId: \"Int32\"\r\n }\r\n });\r\n }\r\n\r\n public GetStockStorePartsDataSource(enablePaging: boolean = true): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.StockOData}StockStorePartsOData`,\r\n key: [ \"StockHeaderId\", \"StoreId\" ],\r\n paging: enablePaging,\r\n keyType: {\r\n StockHeaderId: \"Int32\",\r\n StoreId: \"Int32\"\r\n }\r\n });\r\n }\r\n\r\n public GetStockPartsStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.config.apiLocations.StockOData}StockPartsOData`,\r\n key: \"StockHeaderId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetStockPart(id: string | number): Observable {\r\n return this.http.get(`${this.config.apiLocations.Stock}StockPart/${id}`)\r\n .pipe(map(part => this.MapFromPartWithStores(part)));\r\n }\r\n\r\n public GetNewStockPart(): Observable {\r\n return this.http.get(`${this.config.apiLocations.Stock}StockPart/0?createNew=true`).pipe(map(x => {\r\n x.StockTypeId = null;\r\n return x;\r\n }));\r\n }\r\n\r\n public SaveStockPart(model: StockPart, replaceMainStore: boolean = true): Observable {\r\n return this.MapToPartWithStores(model, replaceMainStore)\r\n .pipe(\r\n concatMap(modelWithStores => {\r\n if (!model.Id) {\r\n return this.http.post(`${this.config.apiLocations.Stock}StockPart`, modelWithStores);\r\n } else {\r\n return this.http.put(`${this.config.apiLocations.Stock}StockPart`, modelWithStores);\r\n }\r\n }));\r\n }\r\n\r\n public GetUserRef1Stock(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}UserReferences/GetUserRef1Stock`);\r\n }\r\n\r\n public GetUserRef2Stock(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}UserReferences/GetUserRef2Stock`);\r\n }\r\n\r\n public GetViewPermission(actionName: string): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Dashboard/GetWidgetViewPermission?securityActionName=${actionName}`)\r\n .pipe(map((res: any) => res.IsAllowedView));\r\n }\r\n\r\n public GetStockSerialItems(stockHeaderId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.Stock}StockSerialItem/${stockHeaderId}`);\r\n }\r\n\r\n public UpdateSellingPrice(stockId: number, sellingPrice: number): Observable {\r\n return this.http.put(`${this.config.apiLocations.Stock}StockPart/${stockId}/SellingPrice`, {\r\n SellingPrice: sellingPrice\r\n });\r\n }\r\n\r\n public UpdateBuyingPrice(stockId: number, supplierId: number, sellingPrice: number): Observable {\r\n return this.http.put(`${this.config.apiLocations.Stock}StockPart/${stockId}/BuyingPrice`, {\r\n BuyingPrice: sellingPrice,\r\n SupplierId: supplierId\r\n });\r\n }\r\n\r\n public GetEstimatedCost(stockHeaderId: number, storeId: number, quantity: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.Stock}StockPart/EstimatedCost/${stockHeaderId}/${storeId}/${quantity}`);\r\n }\r\n\r\n public GetPastCost(stockHeaderId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.Stock}StockPart/PastCost/${stockHeaderId}`);\r\n }\r\n\r\n public GetSupplierPrice(stockHeaderId: number, supplierId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.Stock}StockPart/${stockHeaderId}/SupplierCost/${supplierId}`);\r\n }\r\n\r\n public UpdateServiceParts(stockHeaderId: number): Observable {\r\n return this.http.post(`${this.config.apiLocations.Stock}StockPart/${stockHeaderId}/UpdateServiceParts/`, null);\r\n }\r\n\r\n public GetReplacementPart(id: string | number): Observable {\r\n return this.http.get(`${this.config.apiLocations.Stock}StockPart/${id}/GetReplacementPart`)\r\n .pipe(map(part => this.MapFromPartWithStores(part)));\r\n }\r\n\r\n // maps a part with stores to the internal representation where the\r\n // main store details are also represented as properties of the part object\r\n // this is to maintain compatibility when stores is disabled\r\n private MapFromPartWithStores(part: StockPart): StockPart {\r\n if (part.StoreLines) {\r\n const mainStoreStock: StockPartStoreLine = part.StoreLines.find(line => line.StoreId === 1);\r\n\r\n if (mainStoreStock) {\r\n part.BinLocation = mainStoreStock.BinLocation;\r\n part.InStock = mainStoreStock.InStock;\r\n part.Demand = mainStoreStock.Demand;\r\n part.Available = mainStoreStock.Available;\r\n part.Valuation = mainStoreStock.Valuation;\r\n part.UnitValue = mainStoreStock.UnitValue;\r\n part.OnPO = mainStoreStock.OnPo;\r\n }\r\n }\r\n\r\n return part;\r\n }\r\n\r\n // maps the internal representation of a part (main store in object)\r\n // this sets up the store collection - if there is already a main store in the collection\r\n // and the app is not using stores then the main store will be overwritten with the values in the part\r\n // unless replaceMainStore is set to false\r\n // this is to maintain compatibility when stores is disabled\r\n private MapToPartWithStores(part: StockPart, replaceMainStore: boolean = true): Observable {\r\n // create main stock item from part object\r\n const mainStoreStock: StockPartStoreLine = {\r\n StoreId: 1,\r\n BinLocation: part.BinLocation,\r\n InStock: part.InStock,\r\n Demand: part.Demand,\r\n Available: part.Available,\r\n Valuation: part.Valuation,\r\n UnitValue: part.UnitValue,\r\n OnPo: part.OnPO,\r\n Min: 0,\r\n Max: 0\r\n };\r\n\r\n // if no store lines at all\r\n if (!part.StoreLines) {\r\n // use the main store built from the part\r\n part.StoreLines = [ mainStoreStock ];\r\n } else if (part.StoreLines.length === 0) {\r\n part.StoreLines.push(mainStoreStock);\r\n } else {\r\n // see if there is already a main store in the store lines\r\n const mainStoreIndex: number = part.StoreLines.findIndex(line => line.StoreId === 1);\r\n\r\n // if there is no main store\r\n if (mainStoreIndex < 0) {\r\n part.StoreLines.push(mainStoreStock);\r\n }\r\n else {\r\n // if using the single store implementation and haven't changed the code to use the store lines collection\r\n if (replaceMainStore) {\r\n return this.AdditionalStoresEnabled()\r\n .pipe(\r\n map(enabled => {\r\n if (!enabled) {\r\n part.StoreLines[mainStoreIndex] = mainStoreStock;\r\n }\r\n return part;\r\n }));\r\n }\r\n }\r\n }\r\n return of(part);\r\n }\r\n\r\n private AdditionalStoresEnabled(): Observable {\r\n if (this.additionalStoresEnabledValue === null) {\r\n return this.settingsService.getSetting(SettingId.UseAdditionalStores)\r\n .pipe(map(res => {\r\n this.additionalStoresEnabledValue = res.ValueBool;\r\n return res.ValueBool;\r\n }));\r\n } else {\r\n return of(this.additionalStoresEnabledValue);\r\n }\r\n }\r\n}\r\n","import { formatCurrency } from \"@angular/common\";\r\nimport { Directive } from \"@angular/core\";\r\nimport { OnInit } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { ContactService, CustomerService, DocumentTypeEnum, DocumentTypePipe, JobDataService, JobStatus, MakeModelSharedService } from \"servicesight-shared\";\r\nimport { MaterialTypeService } from \"src/app/shared/services/material-type/material-type.service\";\r\nimport { SupplierService } from \"src/app/shared/services/supplier/supplier.service\";\r\nimport { StockService } from \"src/app/stock/services/stock.service\";\r\n\r\n@Directive() // base classes need to be directive in order to be complied\r\n// eslint-disable-next-line @angular-eslint/directive-class-suffix\r\nexport class BasePopSopDetailComponent implements OnInit {\r\n\r\n public jobsDataSource: DataSource;\r\n public stockHeaderDataStore: ODataStore;\r\n public partsDataSource: DataSource;\r\n public stockPartsDataSource: ODataStore;\r\n public supplierStore: ODataStore;\r\n public materialTypeStore: ODataStore;\r\n public customersStore: ODataStore;\r\n public makeModelStore: ODataStore;\r\n public contactStore: ODataStore;\r\n public userRefStore: ODataStore;\r\n\r\n public linkTypes = [];\r\n public activeLinkType: DocumentTypeEnum = null;\r\n public linkNumberVisible: boolean = false;\r\n\r\n public colCountByScreen: object = {\r\n lg: 4,\r\n md: 3,\r\n sm: 2,\r\n xs: 1\r\n };\r\n\r\n constructor(\r\n protected translate: TranslateService,\r\n protected documentTypePipe: DocumentTypePipe,\r\n private materialType: MaterialTypeService,\r\n protected customerService: CustomerService,\r\n private contactService: ContactService,\r\n protected makeModelSharedService: MakeModelSharedService,\r\n private jobDataService: JobDataService,\r\n protected supplierService: SupplierService,\r\n protected stockService: StockService\r\n ) {\r\n this.onLinkTypeSelectionChanged = this.onLinkTypeSelectionChanged.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.stockPartsDataSource = this.stockService.GetStockStorePartsStore();\r\n this.partsDataSource = this.stockService.GetStockParts();\r\n this.stockHeaderDataStore = this.stockService.GetStockHeaders();\r\n this.supplierStore = this.supplierService.GetSupplierStore();\r\n this.materialTypeStore = this.materialType.GetMaterialTypeStore();\r\n this.customersStore = this.customerService.GetCustomerDataStore();\r\n this.makeModelStore = this.makeModelSharedService.GetMakeModelsDataStore();\r\n this.contactStore = this.contactService.GetContactsDataStore();\r\n this.jobsDataSource = this.jobDataService.GetDataSource(true);\r\n this.jobsDataSource.filter([[\"Status\", \"<\", JobStatus.COMPLETED], \"and\", [\"Status\", \">\", JobStatus.CANCELLED]]);\r\n\r\n this.linkTypes = [\r\n { id: DocumentTypeEnum.Job, name: this.translate.instant(this.documentTypePipe.transform(DocumentTypeEnum.Job)) }\r\n ];\r\n }\r\n\r\n public onLinkTypeSelectionChanged(e: any): void {\r\n if (e.selectedItem) {\r\n this.activeLinkType = e.selectedItem.id;\r\n this.linkNumberVisible = true;\r\n } else {\r\n this.activeLinkType = null;\r\n this.linkNumberVisible = false;\r\n }\r\n }\r\n\r\n public TotalCostFormatter(data: any): string {\r\n return formatCurrency(data.value,\r\n JSON.parse(localStorage.getItem(\"ls.UserBrowserLocale\")),\r\n JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\")));\r\n }\r\n\r\n public GetDocumentLink(documentType: DocumentTypeEnum, documentId: number): string {\r\n switch (documentType) {\r\n case DocumentTypeEnum.Job:\r\n return `/#/jobs/job/${documentId}`;\r\n case DocumentTypeEnum.SalesOrder:\r\n return `/#/sales-orders/detail/${documentId}`;\r\n }\r\n }\r\n}\r\n","export enum ChildContactType {\r\n Customer = 1,\r\n Supplier = 2\r\n}\r\n","export enum ContactStatus {\r\n ACTIVE = 300,\r\n INACTIVE = 900\r\n}\r\n","export enum SupplierStatus {\r\n Active = 300,\r\n OnHold = 600,\r\n Closed = 900\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { ChildContactType } from \"../../components/child-contacts-list/child-contact-type.enum\";\r\nimport { NewContact } from \"../../models/new-contact.model\";\r\nimport { ODataService } from \"../odata/odata.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class ChildContactsService {\r\n\r\n constructor(\r\n private odataService: ODataService,\r\n private httpClient: HttpClient,\r\n @Inject(APP_CONFIG) protected config: IAppConfig\r\n ) { }\r\n\r\n public GetDataSource(type: ChildContactType): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: this.GetUrl(type),\r\n key: \"ContactId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetDataStore(type: ChildContactType): ODataStore {\r\n return this.odataService.GetStore({\r\n url: this.GetUrl(type),\r\n key: \"ContactId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public Create(type: ChildContactType, entityId: number, contact: NewContact): Observable {\r\n return this.httpClient.post(this.GetCreateUrl(type, entityId), contact);\r\n }\r\n\r\n private GetUrl(type: ChildContactType): string {\r\n let urlPart: string = null;\r\n\r\n switch (type) {\r\n case ChildContactType.Customer:\r\n throw new Error(\"Not implemented for customers\");\r\n break;\r\n case ChildContactType.Supplier:\r\n urlPart = \"SupplierContactsOD\";\r\n break;\r\n default:\r\n throw new Error(\"Unsupported contact type\");\r\n }\r\n\r\n return `${this.config.apiLocations.ServiceSightOData}${urlPart}`;\r\n }\r\n\r\n private GetCreateUrl(type: ChildContactType, entityId: number): string {\r\n let urlPart: string = null;\r\n\r\n switch (type) {\r\n case ChildContactType.Customer:\r\n throw new Error(\"Not implemented for customers\");\r\n break;\r\n case ChildContactType.Supplier:\r\n urlPart = `SupplierContact/Create?supplierId=${entityId}`;\r\n break;\r\n default:\r\n throw new Error(\"Unsupported contact type\");\r\n }\r\n\r\n return `${this.config.apiLocations.ServiceSight}${urlPart}`;\r\n }\r\n}\r\n","import {\r\n Component,\r\n EventEmitter,\r\n forwardRef,\r\n HostBinding,\r\n Input,\r\n OnInit,\r\n Output,\r\n Renderer2,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from \"@angular/forms\";\r\n\r\n@Component({\r\n selector: \"app-money\",\r\n templateUrl: \"./money.component.html\",\r\n styleUrls: [\"./money.component.scss\"],\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => MoneyComponent),\r\n multi: true\r\n }\r\n ]\r\n})\r\n\r\n/* Usage with reactive forms\r\n \r\n \r\n\r\n Usage with template forms\r\n \r\n \r\n*/\r\n\r\nexport class MoneyComponent implements OnInit, ControlValueAccessor {\r\n @ViewChild(\"money\", { static: true }) money;\r\n private internalId = \"\";\r\n\r\n constructor(private renderer: Renderer2) { }\r\n\r\n @HostBinding(\"attr.id\")\r\n externalId = \"\";\r\n\r\n @Input()\r\n set id(value: string) {\r\n this.internalId = value;\r\n this.externalId = null;\r\n }\r\n\r\n get id() {\r\n return this.internalId;\r\n }\r\n\r\n @Input() currencySymbol: string;\r\n @Input() showInForeignCurrency: boolean;\r\n @Input() foreignCurrencyValue: string;\r\n @Input() name: string;\r\n @Input() value: string;\r\n @Input() disabled: boolean = false;\r\n @Output() valueChange = new EventEmitter();\r\n\r\n onChange: any = () => { };\r\n onTouched: any = () => { };\r\n\r\n get internalValue() {\r\n return this.value;\r\n }\r\n\r\n set internalValue(val) {\r\n this.value = val;\r\n }\r\n\r\n registerOnChange(fn) {\r\n this.onChange = fn;\r\n }\r\n\r\n writeValue(initialValue: string): void {\r\n this.internalValue = parseFloat(initialValue || \"0\").toFixed(2);\r\n }\r\n\r\n registerOnTouched(fn) {\r\n this.onTouched = fn;\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n this.renderer.setProperty(this.money.nativeElement, \"disabled\", isDisabled);\r\n }\r\n\r\n ngOnInit() {\r\n // Just to pull the locale.\r\n if (!this.currencySymbol) {\r\n this.currencySymbol = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n }\r\n }\r\n\r\n public onValueChanged($event: any): void {\r\n $event.target.value = parseFloat($event.target.value || 0).toFixed(2);\r\n this.internalValue = $event.target.value;\r\n this.valueChange.emit($event.target.value);\r\n this.onTouched($event);\r\n this.onChange(this.internalValue);\r\n }\r\n\r\n // this does block everything other than numbers and delete keys\r\n public onKeydown(e: any): boolean {\r\n if (!(this.isNumeric(e.key) || this.isNavigationKey(e.keyCode) ||\r\n e.key === \".\" ||\r\n e.keyCode === 8 || e.keyCode === 46)) { //backspace and delete\r\n e.preventDefault();\r\n return false;\r\n }\r\n }\r\n\r\n public isNumeric(n: any): boolean {\r\n return !isNaN(Number(n)) && isFinite(n);\r\n }\r\n\r\n public isNavigationKey(keyCode: number): boolean {\r\n // backsapce, tab, end, home, left, up, right, down, delete\r\n const arr = [8, 9, 35, 36, 37, 38, 39, 40, 46];\r\n return arr.indexOf(keyCode) > -1;\r\n }\r\n}\r\n","
\r\n {{currencySymbol}}\r\n \r\n \r\n
\r\n","
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n","import { Component, Input, OnInit, ViewChild } from \"@angular/core\";\r\nimport { ControlContainer, NgForm } from \"@angular/forms\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxSelectBoxComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport {\r\n ContactService,\r\n CustomerService,\r\n CustomerStatus,\r\n DespatchNoteStatus,\r\n DocumentTypePipe,\r\n JobDataService,\r\n MakeModelSharedService,\r\n SettingId,\r\n SettingsService\r\n} from \"servicesight-shared\";\r\nimport { SalesOrderService } from \"src/app/sales-orders/services/sales-order.service\";\r\nimport { StoreService } from \"src/app/settings/services/store.service\";\r\nimport { BasePopSopDetailComponent } from \"src/app/shared-pop-sop/components/base-pop-sop-detail/base-pop-sop-detail.component\";\r\nimport { ChildContactType } from \"src/app/shared/components/child-contacts-list/child-contact-type.enum\";\r\nimport { ContactStatus } from \"src/app/shared/enums/contact-status.eum\";\r\nimport { StoreTypesEnum } from \"src/app/shared/enums/store-types.enum\";\r\nimport { ICurrency } from \"src/app/shared/models/icurrency.model\";\r\nimport { SupplierStatus } from \"src/app/shared/pipes/enums/supplier-status.enum\";\r\nimport { ChildContactsService } from \"src/app/shared/services/child-contacts/child-contracts.service\";\r\nimport { CustomerService as CustomerCurrencyService } from \"src/app/shared/services/customer/customer.service\";\r\nimport { MaterialTypeService } from \"src/app/shared/services/material-type/material-type.service\";\r\nimport { SupplierService } from \"src/app/shared/services/supplier/supplier.service\";\r\nimport { StockService } from \"src/app/stock/services/stock.service\";\r\nimport { DespatchNote } from \"../models/despatch-note.model\";\r\n\r\n@Component({\r\n selector: \"app-despatch-note-general\",\r\n templateUrl: \"./despatch-note-general.component.html\",\r\n styleUrls: [\"./despatch-note-general.component.scss\"],\r\n viewProviders: [ { provide: ControlContainer, useExisting: NgForm } ]\r\n})\r\nexport class DespatchNoteGeneralComponent extends BasePopSopDetailComponent implements OnInit {\r\n\r\n @Input() public despatch: DespatchNote = new DespatchNote();\r\n @Input() public currency: ICurrency;\r\n @ViewChild(\"siteSelectBox\", { static: false }) siteSelectBoxComponent: DxSelectBoxComponent;\r\n @ViewChild(\"supplierContactSelectBox\", { static: false }) supplierContactSelectBoxComponent: DxSelectBoxComponent;\r\n\r\n public customerDataSource: DataSource;\r\n public supplierDataSource: DataSource;\r\n public userRefDataSource: DataSource;\r\n public supplierContactsDataSource: DataSource;\r\n public sitesDataStore: ODataStore;\r\n public supplierContactsDataStore: ODataStore;\r\n public stockStoreDataStore: ODataStore;\r\n\r\n public baseCurrencySymbol: string = null;\r\n public showInForeignCurrency: boolean = false;\r\n public additionalStoresEnabled: boolean = false;\r\n public showStoreWarning: boolean = false;\r\n public oldStoreId: number;\r\n\r\n public get isForeignCustomer(): boolean {\r\n return this.currency && this.currency.IsForeignCustomer;\r\n }\r\n\r\n public get currencySymbol(): string {\r\n return this.showInForeignCurrency ? this.currency.CurrencySymbol : this.baseCurrencySymbol;\r\n }\r\n\r\n public get DespatchDisabled(): boolean {\r\n return !this.despatch || (this.despatch.Status > DespatchNoteStatus.Allocated || this.despatch.Status === DespatchNoteStatus.Cancelled);\r\n }\r\n\r\n public get foreignCurrencyValue(): number {\r\n return this.despatch ? this.despatch.Carriage * this.despatch.ExchangeRate : 0;\r\n }\r\n\r\n constructor(\r\n private salesOrderService: SalesOrderService,\r\n private childContactsService: ChildContactsService,\r\n private customerCurrencyService: CustomerCurrencyService,\r\n translate: TranslateService,\r\n documentTypePipe: DocumentTypePipe,\r\n materialType: MaterialTypeService,\r\n customerService: CustomerService,\r\n contactService: ContactService,\r\n makeModelService: MakeModelSharedService,\r\n jobDataService: JobDataService,\r\n stockService: StockService,\r\n supplierService: SupplierService,\r\n private settingsService: SettingsService,\r\n private storeService: StoreService\r\n ) {\r\n super(\r\n translate,\r\n documentTypePipe,\r\n materialType,\r\n customerService,\r\n contactService,\r\n makeModelService,\r\n jobDataService,\r\n supplierService,\r\n stockService);\r\n }\r\n\r\n ngOnInit(): void {\r\n this.baseCurrencySymbol = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n\r\n this.supplierContactsDataStore = this.childContactsService.GetDataStore(ChildContactType.Supplier);\r\n this.sitesDataStore = this.salesOrderService.GetSiteDataStore();\r\n super.ngOnInit();\r\n this.customerDataSource = new DataSource ({\r\n store: this.customersStore,\r\n filter: [[\"Status\", \"=\", CustomerStatus.ACTIVE], \"and\", [\"IsCustomer\", \"=\", true]]\r\n });\r\n\r\n this.supplierDataSource = new DataSource({\r\n store: this.supplierStore,\r\n filter: [\"Status\", \"=\", SupplierStatus.Active]\r\n });\r\n\r\n this.supplierContactsDataSource = new DataSource({\r\n store: this.supplierContactsDataStore,\r\n filter: [\"Status\", \"=\", ContactStatus.ACTIVE]\r\n });\r\n\r\n this.settingsService.getSetting(SettingId.UseAdditionalStores).subscribe(res => {\r\n this.additionalStoresEnabled = res.ValueBool;\r\n if (res.ValueBool === true) {\r\n this.stockStoreDataStore = this.storeService.GetDataStore();\r\n } else if (!this.despatch.DefaultStoreId) {\r\n this.despatch.DefaultStoreId = StoreTypesEnum.MainStore;\r\n }\r\n });\r\n }\r\n\r\n public toggleCurrency(): void {\r\n this.showInForeignCurrency = !this.showInForeignCurrency;\r\n }\r\n\r\n public onCustomerChanged(e): void {\r\n if (e.value) {\r\n this.customerCurrencyService.GetCustomerCurrency(e.value).subscribe(currency => {\r\n this.currency = currency;\r\n if (this.despatch && !this.despatch.Id || e.event) {\r\n this.despatch.ExchangeRate = currency.ExchangeRateSales;\r\n }\r\n });\r\n const dataSource = this.siteSelectBoxComponent.instance.getDataSource();\r\n dataSource.filter([[\"InvoiceID\", \"=\", e.value], \"and\", [\"Status\", \"=\", CustomerStatus.ACTIVE]]);\r\n dataSource.load().then(() => {\r\n if (e.event) {\r\n this.despatch.DeliveryId = null;\r\n }\r\n });\r\n }\r\n }\r\n\r\n public onSupplierChanged(e): void {\r\n if (e.value) {\r\n const dataSource = this.supplierContactSelectBoxComponent.instance.getDataSource();\r\n dataSource.filter([[\"CustomerId\", \"=\", e.value], \"and\", [\"Status\", \"=\" , ContactStatus.ACTIVE]]);\r\n dataSource.load().then(() => {\r\n if (e.event) {\r\n this.despatch.CarrierContactId = null;\r\n }\r\n });\r\n }\r\n }\r\n\r\n public OnStoreChanged(e): void {\r\n if (e.value && e.event) { // if there is value and it is from user interaction\r\n this.showStoreWarning = true;\r\n this.oldStoreId = e.previousValue;\r\n }\r\n }\r\n\r\n public ConfirmChangeStore(confirmed): void {\r\n if (confirmed) {\r\n this.despatch.Parts.forEach(p => {\r\n p.Allocate = false;\r\n p.Allocated = 0;\r\n });\r\n } else {\r\n this.despatch.DefaultStoreId = this.oldStoreId;\r\n }\r\n\r\n this.showStoreWarning = false;\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ 'despatch-notes.summary.despatch' | translate }}{{ 'purchase-orders.summary.header.items' | translate }}{{ 'despatch-notes.summary.percent-allocated' | translate }}{{ 'despatch-notes.materials.ready-to-despatch' | translate }}{{ 'salesorder.detail.despatched' | translate }}{{ 'salesorder.equipment.os' | translate }}
\r\n
\r\n
\r\n \r\n
\r\n
{{ 'purchase-orders.tab.parts' | translate }}
\r\n
\r\n
{{ partsCount }}{{ partsPercentAllocated | percent }}{{ partsAllocated }}{{ partsDespatched }}{{ partsOutstanding }}
\r\n
\r\n
\r\n \r\n
\r\n
{{ 'purchase-orders.tab.equipment' | translate }}
\r\n
\r\n
{{ equipmentCount }}{{ equipmentPercentAllocated | percent }}{{ equipmentAllocated }}{{ equipmentDespatched }}{{ equipmentOutstanding }}
\r\n
\r\n
\r\n \r\n
\r\n
{{ 'purchase-orders.tab.materials' | translate }}
\r\n
\r\n
{{ materialsCount }}{{ materialsPercentAllocated | percent }}{{ materialsAllocated }}{{ materialsDespatched }}{{ materialsOutstanding }}
{{ 'purchase-orders.summary.combined-order-total' | translate }}{{ itemCount }}{{ totalPercentAllocated | percent }}{{ totalAllocated }}{{ totalDespatched }}{{ totalOutstanding }}
{{ 'purchase-orders.detail.carriage' | translate }}{{ currencyFormat(prepareCurrencyValue(despatch.Carriage)) }}    
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n","import { formatCurrency } from \"@angular/common\";\r\nimport { Component, Input, OnInit } from \"@angular/core\";\r\nimport { ControlContainer, NgForm } from \"@angular/forms\";\r\nimport { DespatchNoteStatus, SettingId, SettingsService } from \"servicesight-shared\";\r\nimport { ICurrency } from \"src/app/shared/models/icurrency.model\";\r\nimport { DespatchNote } from \"../models/despatch-note.model\";\r\n\r\n@Component({\r\n selector: \"app-despatch-note-summary\",\r\n templateUrl: \"./despatch-note-summary.component.html\",\r\n styleUrls: [\"./despatch-note-summary.component.scss\"],\r\n viewProviders: [ { provide: ControlContainer, useExisting: NgForm } ]\r\n})\r\nexport class DespatchNoteSummaryComponent implements OnInit {\r\n @Input() public despatch: DespatchNote = new DespatchNote();\r\n @Input() public currency: ICurrency;\r\n public reverseChargeVatEnabled: boolean = false;\r\n public baseCurrencySymbol: string = null;\r\n public showInForeignCurrency: boolean = false;\r\n\r\n constructor(\r\n private settingService: SettingsService\r\n ) {\r\n this.baseCurrencySymbol = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n }\r\n\r\n public get isForeignCustomer(): boolean {\r\n return this.currency && this.currency.IsForeignCustomer;\r\n }\r\n\r\n public get currencySymbol(): string {\r\n return this.showInForeignCurrency ? this.currency.CurrencySymbol : this.baseCurrencySymbol;\r\n }\r\n\r\n public get foreignCurrencySymbol(): string {\r\n return this.currency ? this.currency.CurrencySymbol : null;\r\n }\r\n\r\n public get despatchDespatched(): boolean {\r\n return this.despatch.Status === DespatchNoteStatus.Despatched;\r\n }\r\n\r\n public get despatchInvoiced(): boolean {\r\n return this.despatch.Status === DespatchNoteStatus.Invoiced;\r\n }\r\n\r\n public get partsCount(): number {\r\n let itemCount = 0;\r\n\r\n if (this.despatch.Parts && this.despatch.IncludeParts) {\r\n itemCount = this.despatch.Parts.length;\r\n }\r\n\r\n return itemCount;\r\n }\r\n\r\n public get equipmentCount(): number {\r\n let itemCount = 0;\r\n\r\n if (this.despatch.MakeModels && this.despatch.IncludeEquipment) {\r\n itemCount = this.despatch.MakeModels.length;\r\n }\r\n\r\n return itemCount;\r\n }\r\n\r\n public get materialsCount(): number {\r\n let itemCount = 0;\r\n\r\n if (this.despatch.Materials && this.despatch.IncludeMaterials) {\r\n itemCount = this.despatch.Materials.length;\r\n }\r\n\r\n return itemCount;\r\n }\r\n\r\n public get itemCount(): number {\r\n return this.partsCount +\r\n this.equipmentCount +\r\n this.materialsCount;\r\n }\r\n\r\n public get partsQtyAllocated(): number {\r\n let partsAllocated = 0;\r\n\r\n if (this.despatch.Parts && this.despatch.IncludeParts) {\r\n partsAllocated = this.despatch.Parts.map(x => x.Allocated).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return partsAllocated;\r\n }\r\n\r\n public get partsQty(): number {\r\n let partsQty = 0;\r\n if (this.despatch.Parts && this.despatch.IncludeParts) {\r\n partsQty = this.despatch.Parts.map(x => x.Demand).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return partsQty;\r\n }\r\n\r\n public get partsPercentAllocated(): number {\r\n return this.partsQty ? this.partsQtyAllocated / this.partsQty : 0;\r\n }\r\n\r\n public get equipmentQtyAllocated(): number {\r\n let equipmentAllocated = 0;\r\n\r\n if (this.despatch.MakeModels && this.despatch.IncludeEquipment) {\r\n equipmentAllocated = this.despatch.MakeModels.map(x => x.Allocated).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return equipmentAllocated;\r\n }\r\n\r\n public get equipmentQty(): number {\r\n let equipmentQty = 0;\r\n if (this.despatch.MakeModels && this.despatch.IncludeEquipment) {\r\n equipmentQty = this.despatch.MakeModels.map(x => x.Demand).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return equipmentQty;\r\n }\r\n\r\n public get equipmentPercentAllocated(): number {\r\n return this.equipmentQty ? this.equipmentQtyAllocated / this.equipmentQty : 0;\r\n }\r\n\r\n public get materialsQtyAllocated(): number {\r\n let materialsAllocated = 0;\r\n\r\n if (this.despatch.Materials && this.despatch.IncludeMaterials) {\r\n materialsAllocated = this.despatch.Materials.filter(x => x.Allocated).length;\r\n }\r\n\r\n return materialsAllocated;\r\n }\r\n\r\n public get materialsQty(): number {\r\n let materialsQty = 0;\r\n if (this.despatch.Materials && this.despatch.IncludeMaterials) {\r\n materialsQty = this.despatch.Materials.length;\r\n }\r\n\r\n return materialsQty;\r\n }\r\n\r\n public get materialsPercentAllocated(): number {\r\n return this.materialsQty ? this.materialsQtyAllocated / this.materialsQty : 0;\r\n }\r\n\r\n public get totalPercentAllocated(): number {\r\n const totalQty = this.partsQty + this.equipmentQty + this.materialsQty;\r\n const totalAllocated = this.partsQtyAllocated + this.equipmentQtyAllocated + this.materialsQtyAllocated;\r\n return totalQty ? totalAllocated / totalQty : 0;\r\n }\r\n\r\n public get partsDespatched(): number {\r\n let partsDespatched = 0;\r\n\r\n if (this.despatch.Parts && this.despatch.IncludeParts) {\r\n partsDespatched = this.despatch.Parts.filter(x => x.Despatched).length;\r\n }\r\n\r\n return partsDespatched;\r\n }\r\n\r\n public get equipmentDespatched(): number {\r\n let equipmentDespatched = 0;\r\n\r\n if (this.despatch.MakeModels && this.despatch.IncludeEquipment) {\r\n equipmentDespatched = this.despatch.MakeModels.filter(x => x.Despatched > 0).length;\r\n }\r\n\r\n return equipmentDespatched;\r\n }\r\n\r\n public get materialsDespatched(): number {\r\n let materialsDespatched = 0;\r\n\r\n if (this.despatch.Materials && this.despatch.IncludeMaterials) {\r\n materialsDespatched = this.despatch.Materials.filter(x => x.Despatched).length;\r\n }\r\n\r\n return materialsDespatched;\r\n }\r\n\r\n public get totalDespatched(): number {\r\n return this.partsDespatched +\r\n this.equipmentDespatched +\r\n this.materialsDespatched;\r\n }\r\n\r\n public get partsAllocated(): number {\r\n let partsAllocated = 0;\r\n\r\n if (this.despatch.Parts && this.despatch.IncludeParts) {\r\n partsAllocated = this.despatch.Parts.filter(x => x.Allocated).length;\r\n }\r\n\r\n return partsAllocated;\r\n }\r\n\r\n public get equipmentAllocated(): number {\r\n let equipmentAllocated = 0;\r\n\r\n if (this.despatch.MakeModels && this.despatch.IncludeEquipment) {\r\n equipmentAllocated = this.despatch.MakeModels.filter(x => x.ReadyToDespatch).length;\r\n }\r\n\r\n return equipmentAllocated;\r\n }\r\n\r\n public get materialsAllocated(): number {\r\n let materialsAllocated = 0;\r\n\r\n if (this.despatch.Materials && this.despatch.IncludeMaterials) {\r\n materialsAllocated = this.despatch.Materials.filter(x => x.Allocated).length;\r\n }\r\n\r\n return materialsAllocated;\r\n }\r\n\r\n public get totalAllocated(): number {\r\n return this.partsAllocated +\r\n this.equipmentAllocated +\r\n this.materialsAllocated;\r\n }\r\n\r\n public get partsOutstanding(): number {\r\n let partsOutstanding = 0;\r\n\r\n if (this.despatch.Parts && this.despatch.IncludeParts) {\r\n partsOutstanding = this.despatch.Parts.filter(x => !x.Despatched).length;\r\n }\r\n\r\n return partsOutstanding;\r\n }\r\n\r\n public get equipmentOutstanding(): number {\r\n let equipmentOutstanding = 0;\r\n\r\n if (this.despatch.MakeModels && this.despatch.IncludeEquipment) {\r\n equipmentOutstanding = this.despatch.MakeModels.filter(x => x.Despatched === 0).length;\r\n }\r\n\r\n return equipmentOutstanding;\r\n }\r\n\r\n public get materialsOutstanding(): number {\r\n let materialOutstanding = 0;\r\n\r\n if (this.despatch.Materials && this.despatch.IncludeMaterials) {\r\n materialOutstanding = this.despatch.Materials.filter(x => !x.Despatched).length;\r\n }\r\n\r\n return materialOutstanding;\r\n }\r\n\r\n public get totalOutstanding(): number {\r\n return this.partsOutstanding +\r\n this.equipmentOutstanding +\r\n this.materialsOutstanding;\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.settingService.getSetting(SettingId.ReverseChargeVat).subscribe((setting) => {\r\n this.reverseChargeVatEnabled = setting.ValueBool;\r\n });\r\n }\r\n\r\n public currencyFormat(value: number): string {\r\n return formatCurrency(value ? value : 0,\r\n JSON.parse(localStorage.getItem(\"ls.UserBrowserLocale\")),\r\n this.currencySymbol);\r\n }\r\n\r\n public toggleCurrency(): void {\r\n this.showInForeignCurrency = !this.showInForeignCurrency;\r\n }\r\n\r\n public prepareCurrencyValue(value: number): number {\r\n return this.showInForeignCurrency ? value * this.currency.ExchangeRateSales : value;\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable } from \"rxjs\";\r\nimport {\r\n AssignableEquipmentListItem,\r\n Equipment,\r\n EquipmentDataService,\r\n IAppConfig, APP_CONFIG,\r\n IODataService,\r\n IProteanResponse,\r\n JobEquipmentMoveToJobModel,\r\n JobEquipmentStatusModel,\r\n JobEquipmentVisitModel,\r\n JobVisitListItem,\r\n WorkRequiredModel\r\n} from \"servicesight-shared\";\r\nimport { DespatchNoteEquipmentDetails } from \"src/app/despatch-notes/models/despatch-note-equipment-details.model\";\r\nimport { CustomerLocationModel } from \"src/app/jobs/models/customer-location\";\r\nimport { EquipmentAttributeInUse } from \"../models/equipment-attribute-in-use.model\";\r\nimport { EquipmentCopyModel } from \"../models/equipment-copy.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class EquipmentService extends EquipmentDataService {\r\n private equipmentUrl = this.config.apiLocations.Equipment + \"Equipment\";\r\n\r\n constructor(\r\n http: HttpClient,\r\n @Inject(\"ODataService\") odataService: IODataService,\r\n @Inject(APP_CONFIG) config: IAppConfig) {\r\n super(http, odataService, config);\r\n }\r\n\r\n public GetAssignedEquipmentJobDataSource(jobId: number): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.EquipmentOData}JobEquipmentOData(${jobId})`,\r\n key: \"EquipId\",\r\n keyType: \"Int32\",\r\n paging: true,\r\n pageSize: 50\r\n });\r\n }\r\n\r\n public GetMakesDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.EquipmentOData}MakeOData`,\r\n key: \"MakeModelId\",\r\n keyType: \"Int32\",\r\n paging: true,\r\n pageSize: 50\r\n });\r\n }\r\n\r\n public GetMakeModelsDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.EquipmentOData}MakeModelOData`,\r\n key: \"MakeModelId\",\r\n keyType: \"Int32\",\r\n paging: true,\r\n pageSize: 50\r\n });\r\n }\r\n\r\n public GetMakeModelsDataStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: this.config.apiLocations.EquipmentOData + \"MakeModelOData\",\r\n key: \"MakeModelId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetLocationsDataSource(customerId: number): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.ServiceSightOData}CustomerLocationOD`,\r\n key: \"LocationId\",\r\n keyType: \"Int32\",\r\n pageSize: 50,\r\n paging: true,\r\n queryStringParams: {\r\n customerId\r\n }\r\n });\r\n }\r\n\r\n public GetJobListDataSource(customerId: number): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.ServiceSightOData}JobOD`,\r\n key: \"JobID\",\r\n keyType: \"String\",\r\n queryStringParams: {\r\n customerId\r\n }\r\n });\r\n }\r\n\r\n public GetJobEquipment(jobId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}JobEquipment/GetJobEquipmentByJobId?jobId=${jobId}`);\r\n }\r\n\r\n public GetJobVisit(jobId: number): Observable {\r\n return this.http.get(this.config.apiLocations.ServiceSight + \"JobVisit/GetJobVisits?jobId=\" + jobId);\r\n }\r\n\r\n public UpdateEquipmentStatus(model: JobEquipmentStatusModel): Observable {\r\n return this.http.put(`${this.config.apiLocations.ServiceSight}JobEquipment/UpdateEquipmentStatus`, model);\r\n }\r\n\r\n public Get(equipId: number): Observable {\r\n return this.http.get(`${this.equipmentUrl}/${equipId}`);\r\n }\r\n\r\n public Save(model: any): Observable {\r\n if (model.EquipId) {\r\n return this.http.put(this.equipmentUrl, model);\r\n } else {\r\n return this.http.post(this.equipmentUrl, model);\r\n }\r\n }\r\n\r\n public GetDefaultContactId(siteId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Job/GetDefaultContactID?customerId=${siteId}`);\r\n }\r\n\r\n public CreateNewLocation(model: CustomerLocationModel): Observable {\r\n return this.http.post(`${this.config.apiLocations.ServiceSight}Customer/CreateLocation`, model);\r\n }\r\n\r\n public GetSerialNoDuplicates(id: number, serialNo: string) {\r\n return this.http.get(`${this.equipmentUrl}/${id}/Duplicates/${serialNo}`);\r\n }\r\n\r\n public EquipDuplicated(id: number, equip: string) {\r\n return this.http.get(`${this.equipmentUrl}/${id}/Duplicated/${equip}`);\r\n }\r\n\r\n public AddVisit(model: JobEquipmentVisitModel): Observable {\r\n return this.http.post(`${this.config.apiLocations.ServiceSight}JobEquipment/AddVisit`, model);\r\n }\r\n\r\n public RemoveJobEquipment(equipmentItemIds: number[]): Observable {\r\n return this.http.request(\"delete\", `${this.config.apiLocations.ServiceSight}JobEquipment/DeleteJobEquipmentItems`, { body: equipmentItemIds });\r\n }\r\n\r\n public MoveEquipmentToJob(model: JobEquipmentMoveToJobModel): Observable {\r\n return this.http.put(`${this.config.apiLocations.ServiceSight}JobEquipment/MoveEquipmentToJob`, model);\r\n }\r\n\r\n public GetAssignableEquipment(jobId: number) {\r\n return this.http.get(`${this.equipmentUrl}/AssignableEquipment/${jobId}`);\r\n }\r\n\r\n public EquipmentAttributeInUse(attributeId: number): Observable {\r\n return this.http.get(`${this.equipmentUrl}/EquipmentAttributesInUse/${attributeId}`);\r\n }\r\n\r\n public GetEquipments(equipIds: number[]) {\r\n return this.http.post(`${this.equipmentUrl}/EquipmentList`, equipIds);\r\n }\r\n\r\n public GetNewEquipment(): Observable {\r\n return this.http.get(this.equipmentUrl);\r\n }\r\n\r\n public UpdateWorkRequired(model: WorkRequiredModel): Observable {\r\n return this.http.put(`${this.config.apiLocations.ServiceSight}JobEquipment/WorkRequired`, model);\r\n }\r\n\r\n public DeleteEquipment(equipmentId: number): Observable {\r\n return this.http.delete(`${this.equipmentUrl}/${equipmentId}`);\r\n }\r\n\r\n public GetEquipmentHistory(equipId: number): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.ServiceSightOData}EquipmentItemHistoryOD`,\r\n key: \"ElementId\",\r\n keyType: \"Int32\",\r\n queryStringParams: {\r\n equipId\r\n }\r\n });\r\n }\r\n\r\n public CloneEquipment(model: EquipmentCopyModel): Observable {\r\n return this.http.post(`${this.config.apiLocations.Equipment}Equipment/Clone`, model);\r\n }\r\n\r\n public GetLocationsDataStore(customerId: number): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.config.apiLocations.ServiceSightOData}CustomerLocationOD`,\r\n key: \"LocationId\",\r\n keyType: \"Int32\",\r\n queryStringParams: {\r\n customerId\r\n }\r\n });\r\n }\r\n\r\n public UnAssignServiceGroup(equipmentId: number): Observable {\r\n return this.http.put(`${this.equipmentUrl}/${equipmentId}/ServiceGroup/UnAssign`, \"\");\r\n }\r\n}\r\n","import { Component, OnInit, Input, Output, EventEmitter } from \"@angular/core\";\r\n\r\n@Component({\r\n selector: \"app-info-message\",\r\n templateUrl: \"./info-message.component.html\",\r\n styleUrls: [\"./info-message.component.scss\"]\r\n})\r\nexport class InfoMessageComponent implements OnInit {\r\n\r\n @Input() title: string;\r\n @Input() message: string;\r\n @Input() showPopup: boolean;\r\n @Input() cssBorders = true;\r\n @Output() close = new EventEmitter();\r\n @Output() showPopupChange = new EventEmitter();\r\n\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n public closeDialog(): void {\r\n this.showPopup = false;\r\n this.showPopupChange.emit(this.showPopup);\r\n this.close.emit();\r\n }\r\n\r\n}\r\n","\r\n
\r\n

{{ message | translate }}

\r\n
\r\n
\r\n \r\n
\r\n
\r\n","
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{ 'despatch-note.equipment.allocate' | translate }}\r\n \r\n
\r\n \r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n {{ 'despatch-note.equipment.not-required' | translate }}\r\n \r\n \r\n {{ 'despatch-note.equipment.pending-request' | translate }}\r\n \r\n \r\n \r\n {{ data.data.PreparationJobId }}\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n {{ 'despatch-note.equipment.not-required' | translate }}\r\n \r\n \r\n {{ 'despatch-note.equipment.pending-request' | translate }}\r\n \r\n \r\n \r\n {{ data.data.InstallationJobId }}\r\n \r\n \r\n
\r\n\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{ GetUserRef1DsiplayValue(data) }}\r\n
\r\n \r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n
{{ data.value | equipmentStatus | translate }}
\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import { Component, Input, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { Router } from \"@angular/router\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { EdmLiteral } from \"devextreme/data/odata/utils\";\r\nimport {\r\n DocumentTypeEnum,\r\n Equipment,\r\n EquipmentStatus,\r\n FormMesssageService,\r\n UICustomisation,\r\n UserReferenceService,\r\n UserRefType,\r\n ModuleService,\r\n MakeModelSharedService\r\n} from \"servicesight-shared\";\r\nimport { EquipmentService } from \"src/app/equipment/services/equipment.service\";\r\nimport { DespatchNoteEquipmentDetails } from \"../models/despatch-note-equipment-details.model\";\r\nimport { DespatchNoteJob } from \"../models/despatch-note-job.model\";\r\nimport { DespatchNote } from \"../models/despatch-note.model\";\r\nimport { DespatchNotesService } from \"../services/despatch-notes.service\";\r\n\r\n@Component({\r\n selector: \"app-despatch-note-equipment\",\r\n templateUrl: \"./despatch-note-equipment.component.html\",\r\n styleUrls: [\"./despatch-note-equipment.component.scss\"]\r\n})\r\nexport class DespatchNoteEquipmentComponent implements OnInit {\r\n @Input() public despatch: DespatchNote = new DespatchNote();\r\n @Input() public form: NgForm;\r\n @Input() public despatchDisabled: boolean = true;\r\n @ViewChild(\"newEquipmentGrid\", { static: true }) public newEquipmentGrid: DxDataGridComponent;\r\n @ViewChild(\"equipmentGrid\", { static: true }) public equipmentGrid: DxDataGridComponent;\r\n\r\n public equipmentDataSource: DataSource;\r\n public equipmentDataStore: ODataStore;\r\n public makeModelStore: ODataStore;\r\n public cachedUserRef1: any[];\r\n public equipmentListDataSource: DespatchNoteEquipmentDetails[] = [];\r\n\r\n public selectedSalesLineIds: any[] = [];\r\n public selectedEquipmentKeys: [];\r\n public formDisabled: boolean = false;\r\n public showDialog: boolean = false;\r\n public showWarning: boolean = false;\r\n public proEnabled: boolean = false;\r\n public installationJobEnabled: boolean = false;\r\n public preparationJobEnabled: boolean = false;\r\n public showInstallationDialog: boolean = false;\r\n public isProcessing: boolean = false;\r\n public allocateMakeModelId: number;\r\n public allocateSearchText: string = \"\";\r\n public jobsCount: number = 0;\r\n public allocatedSalesLineId: number = 0;\r\n\r\n public userRef1Label: string;\r\n public userRef2Label: string;\r\n public userRef3Label: string;\r\n\r\n public readonly formName: string = \"despatchForm\";\r\n component: {};\r\n\r\n constructor(\r\n private equipmentService: EquipmentService,\r\n private makeModelService: MakeModelSharedService,\r\n private userRefService: UserReferenceService,\r\n private despatchNoteService: DespatchNotesService,\r\n private router: Router,\r\n private moduleService: ModuleService,\r\n private formMessageService: FormMesssageService\r\n ) {\r\n this.SetDisplayValue = this.SetDisplayValue.bind(this);\r\n this.Deallocate = this.Deallocate.bind(this);\r\n this.Allocate = this.Allocate.bind(this);\r\n }\r\n\r\n ngOnInit(): void {\r\n this.equipmentDataSource = this.equipmentService.GetDataSource();\r\n this.equipmentDataStore = this.equipmentService.GetEquipmentDataStore();\r\n this.makeModelStore = this.makeModelService.GetMakeModelsDataStore();\r\n this.moduleService.GetEnabledModulesAccess().subscribe((res) =>\r\n this.proEnabled = res.ProEnabled\r\n );\r\n\r\n this.userRef1Label = this.userRefService.getLabel(UICustomisation.EQUIPMENT_REF1);\r\n this.userRef2Label = this.userRefService.getLabel(UICustomisation.EQUIPMENT_REF2);\r\n this.userRef3Label = this.userRefService.getLabel(UICustomisation.EQUIPMENT_REF3);\r\n this.userRefService.getListDataStore(UserRefType.EQUIP_1).load().then(res => this.cachedUserRef1 = res);\r\n this.GetMakeModelEquipmentsDetails();\r\n }\r\n\r\n public RemoveSelectedEquipment(): void {\r\n this.selectedSalesLineIds.forEach(id => {\r\n const index = this.despatch.MakeModels.findIndex(x => x.SalesLineId === id);\r\n this.despatch.MakeModels.splice(index, 1);\r\n this.SetFormDirty();\r\n });\r\n }\r\n\r\n public Allocate(e: any): void {\r\n const equipNested = this.despatch.MakeModels.map(m => m.Equipment.map(i => i.EquipmentId)).reduce((a, b) => a.concat(b));\r\n const equipFilter = equipNested.map(i => [\"EquipId\", \"<>\", i]);\r\n const makeModelFilter = [\"MakeModelId\", \"=\", e.row.data.MakeModelId];\r\n this.allocatedSalesLineId = e.row.data.SalesLineId;\r\n const filter: any = [\r\n [[], \"and\", []],\r\n \"and\",\r\n [\"Status\", \"=\", EquipmentStatus.Stock],\r\n \"and\",\r\n [\"DespatchNoteId\", \"=\", null],\r\n \"and\",\r\n [\r\n [\r\n [\"AllocatedDocumentType\", \"=\", new EdmLiteral(\"ServiceSight.Shared.Enums.DocumentType'SalesOrder'\")],\r\n \"or\",\r\n [\"AllocatedDocumentType\", \"=\", null]\r\n ],\r\n \"and\",\r\n [\r\n [\"AllocatedDocumentId\", \"=\", this.despatch.SalesId],\r\n \"or\",\r\n [\"AllocatedDocumentId\", \"=\", null]\r\n ],\r\n \"and\",\r\n [\r\n [\"AllocatedSubDocumentId\", \"=\", e.row.data.SalesLineId],\r\n \"or\",\r\n [\"AllocatedSubDocumentId\", \"=\", null]\r\n ]\r\n ]\r\n ];\r\n filter[0][0] = makeModelFilter;\r\n equipFilter.forEach(m => {\r\n filter[0][2].push(m);\r\n filter[0][2].push(\"and\");\r\n });\r\n filter[0][2].pop();\r\n this.equipmentDataSource.filter(filter);\r\n this.equipmentDataSource.load().then(() => this.showDialog = true);\r\n }\r\n\r\n public VisibleAllocate(row): boolean {\r\n return row.data.Allocated < row.data.Demand;\r\n }\r\n\r\n public PrepareForSale(): void {\r\n if (this.selectedSalesLineIds.length) {\r\n const request = this.PrepareJobRequest(true);\r\n this.formMessageService.RegisterObservable(this.despatchNoteService.PrepareForSale(request), this.formName).subscribe({\r\n next: (ids) =>\r\n this.NavigateToJobs(ids), error: () => this.isProcessing = false\r\n });\r\n }\r\n }\r\n\r\n public InstallationDelivery(): void {\r\n if (this.selectedSalesLineIds.length) {\r\n const request = this.PrepareJobRequest(false);\r\n this.formMessageService.RegisterObservable(this.despatchNoteService.InstallationDelivery(request), this.formName).subscribe({\r\n next: (ids) =>\r\n this.NavigateToJobs(ids), error: () => this.isProcessing = false\r\n });\r\n }\r\n }\r\n\r\n public AllocateEquipment(): void {\r\n this.GetDetailsForEquipIds(this.selectedEquipmentKeys);\r\n this.selectedEquipmentKeys.forEach(async (id) => {\r\n const equip = await this.equipmentDataStore.byKey(id) as Equipment;\r\n const index = this.despatch.MakeModels.findIndex(m => m.SalesLineId === this.allocatedSalesLineId);\r\n const allocatedIndex = this.despatch.MakeModels[index].Equipment.findIndex(e => !e.EquipmentId);\r\n this.despatch.MakeModels[index].Equipment[allocatedIndex].EquipmentId = equip.EquipId;\r\n this.despatch.MakeModels[index].Equipment[allocatedIndex].Allocated = true;\r\n this.despatch.MakeModels[index].Allocated += 1;\r\n this.despatch.MakeModels[index].ReadyToDespatch = this.despatch.MakeModels[index].Demand === this.despatch.MakeModels[index].Allocated;\r\n this.equipmentGrid.instance.refresh();\r\n this.SetFormDirty();\r\n this.EnableOrDisableJobButtons();\r\n });\r\n\r\n this.selectedEquipmentKeys = [];\r\n this.showDialog = false;\r\n }\r\n\r\n public CancelAllocate(): void {\r\n this.showDialog = false;\r\n }\r\n\r\n public AllocateSearchTextChanged(): void {\r\n this.newEquipmentGrid.instance.searchByText(this.allocateSearchText);\r\n }\r\n\r\n public GetMakeModelDisplayValue(data: any): string {\r\n return `${data.Make} / ${data.Model}`;\r\n }\r\n\r\n public OnContentReady(grid: any): void {\r\n grid.component.filter([\"Allocated\", \"=\", true]);\r\n }\r\n\r\n public OnSelectionChanged(grid: any): void {\r\n const selected = grid.selectedRowsData;\r\n this.EnableOrDisableJobButtonsFromGrid(selected);\r\n }\r\n\r\n public SetDisplayValue(item: any): number {\r\n return item.UserRef1EquipId;\r\n }\r\n\r\n public GetUserRef1DsiplayValue(data): string {\r\n const userRef = this.cachedUserRef1.find(i => i.UserReferenceListItemID === data.displayValue);\r\n return userRef ? userRef.UserReferenceListItem : null;\r\n }\r\n\r\n public Deallocate(item: any): void {\r\n this.equipmentDataStore.byKey(item.row.data.EquipmentId).then((equip) => {\r\n const index = this.despatch.MakeModels.findIndex(m => m.MakeModelId === equip.MakeModelId);\r\n this.despatch.MakeModels[index].Allocated -= 1;\r\n this.despatch.MakeModels[index].ReadyToDespatch = this.despatch.MakeModels[index].Demand === this.despatch.MakeModels[index].Allocated;\r\n item.row.data.EquipmentId = null;\r\n item.row.data.Allocated = false;\r\n this.equipmentGrid.instance.refresh();\r\n this.SetFormDirty();\r\n this.EnableOrDisableJobButtons();\r\n });\r\n }\r\n\r\n public SetFormDirty(): void {\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public ShowInstallationWarning(): void {\r\n const selected = this.equipmentGrid.instance.getSelectedRowsData();\r\n if (selected.length && selected.some((i) => i.PreparationJobTypeId && !i.PreparationJobId)) {\r\n this.showInstallationDialog = true;\r\n } else {\r\n this.InstallationDelivery();\r\n }\r\n }\r\n\r\n public ConfirmInstallation(confirm: boolean): void {\r\n if (confirm) {\r\n this.InstallationDelivery();\r\n }\r\n\r\n this.showInstallationDialog = false;\r\n }\r\n\r\n public SetCssClass(info: any): void {\r\n if (\r\n info.rowType === \"data\" &&\r\n info.data.AllocatedDocumentType === DocumentTypeEnum[DocumentTypeEnum.SalesOrder] &&\r\n info.data.AllocatedDocumentId === this.despatch.SalesId &&\r\n (\r\n info.data.AllocatedSubDocumentId === this.allocatedSalesLineId ||\r\n info.data.AllocatedSubDocumentId === null\r\n )\r\n ) {\r\n info.rowElement.classList.add(\"preferred-row\");\r\n }\r\n }\r\n\r\n private GetMakeModelEquipmentsDetails(): void {\r\n const equipIds: number[] = [];\r\n this.despatch.MakeModels.forEach(make => {\r\n make.Equipment.forEach(e => {\r\n if (e.EquipmentId) {\r\n equipIds.push(e.EquipmentId);\r\n }\r\n });\r\n });\r\n this.GetDetailsForEquipIds(equipIds);\r\n }\r\n\r\n private GetDetailsForEquipIds(ids: number[]): void {\r\n this.equipmentService.GetEquipments(ids).subscribe(equipments => {\r\n this.equipmentListDataSource = this.equipmentListDataSource.concat(equipments);\r\n });\r\n }\r\n\r\n private PrepareJobRequest(fromPreparationJob: boolean): DespatchNoteJob {\r\n const selectedLines = this.despatch.MakeModels.filter(mm => this.selectedSalesLineIds.indexOf(mm.SalesLineId) >= 0);\r\n const allocatedEquipments = selectedLines.map(i => i.Equipment).reduce((m1, m2) => m1.concat(m2));\r\n this.jobsCount = Array.from(new Set(selectedLines.map(i => fromPreparationJob ? i.PreparationJobTypeId : i.InstallationJobTypeId))).length;\r\n this.isProcessing = true;\r\n return { Despatch: this.despatch, EquipmentIds: allocatedEquipments.map(e => e.EquipmentId) };\r\n }\r\n\r\n private NavigateToJobs(jobIds: number[]): void {\r\n if (jobIds.length) {\r\n this.router.navigate([\"/jobs/list\"], { queryParams: { ids: jobIds } });\r\n }\r\n else {\r\n this.isProcessing = false;\r\n }\r\n }\r\n\r\n private EnableOrDisableJobButtons(): void {\r\n const selectedItems: any[] = this.equipmentGrid?.instance?.getSelectedRowsData();\r\n this.EnableOrDisableJobButtonsFromGrid(selectedItems);\r\n }\r\n\r\n private EnableOrDisableJobButtonsFromGrid(selectedItems: any[]): void {\r\n if (selectedItems && selectedItems.length) {\r\n this.installationJobEnabled = selectedItems.every((i) => i.Allocated === i.Demand && i.Allocated > 0 && i.InstallationJobTypeId && !i.InstallationJobId);\r\n this.preparationJobEnabled = selectedItems.every((i) => i.Allocated === i.Demand && i.Allocated > 0 && i.PreparationJobTypeId && !i.PreparationJobId);\r\n } else {\r\n this.installationJobEnabled = false;\r\n this.preparationJobEnabled = false;\r\n }\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { StockSerialItemModel } from \"../models/stock-serial-item.model\";\r\nimport { StockSerialNoAdjustment } from \"../models/stock-serialno-adjustment.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class StockSerailItemsService {\r\n\r\n constructor(\r\n @Inject(APP_CONFIG) protected config: IAppConfig,\r\n private http: HttpClient\r\n ) { }\r\n\r\n public GetPartSerailItems(partId: number, storeId: number = 1): Observable {\r\n return this.http.get(`${this.config.apiLocations.Stock}StockSerialItem?stockHeaderId=${partId}&storeId=${storeId}`);\r\n }\r\n\r\n public GetAllPartSerialItems(partId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.Stock}StockSerialItem/${partId}`);\r\n }\r\n}\r\n","\r\n
\r\n
\r\n

{{ firstColumnLabel | translate }}

\r\n

{{ required }}

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

{{ 'job.parts.serial-number-dialogue.selected' | translate }}

\r\n

\r\n {{ selectedSerialIds.length }}\r\n

\r\n
\r\n
\r\n\r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n
\r\n {{ data.value }}\r\n \r\n {{ data.value }}\r\n \r\n
\r\n\r\n
\r\n {{ getStatus(data.data) | translate }}\r\n
\r\n\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n","import { Component, EventEmitter, Input, Output, Renderer2, ViewEncapsulation } from \"@angular/core\";\r\nimport { Observable } from \"rxjs/internal/Observable\";\r\nimport { StockSerialNoAdjustment } from \"../../../stock/models/stock-serialno-adjustment.model\";\r\nimport { StockSerailItemsService } from \"../../../stock/services/stock-serail-items.service\";\r\n\r\n@Component({\r\n selector: \"app-part-serial-number-dialogue\",\r\n templateUrl: \"./part-serial-number-dialogue.component.html\",\r\n styleUrls: [\"./part-serial-number-dialogue.component.scss\"],\r\n encapsulation: ViewEncapsulation.None\r\n})\r\nexport class PartSerialNumberDialogueComponent {\r\n @Input() storeId: number;\r\n @Input() firstColumnLabel: string = \"job.parts.serial-number-dialogue.required\";\r\n @Output()\r\n public OnUpdate: EventEmitter<{ serialIds: number[]; stockHeaderId: number; uniqueId: number }> = new EventEmitter();\r\n\r\n // serial numbers chosen in the dialog\r\n public selectedSerialIds: number[] = [];\r\n\r\n // serial numbers assigned to the part\r\n public partSerialNumbers: StockSerialNoAdjustment[];\r\n\r\n // serial numbers already assigned to the stock item\r\n private allocatedSerialIds: number[] = [];\r\n\r\n // passed in to identify the part to assign the serial number to\r\n // used in cases where the stock header id is not unique - this value isn't used, its just passed back to the caller\r\n private unavailableSerialNumbers: number[] = [];\r\n\r\n public partNumber: string = \"\";\r\n public showDialog: boolean = false;\r\n public required: number = 0;\r\n\r\n private stockHeaderId: number;\r\n\r\n // passed in to uniquely identify the part\r\n private uniqueId: any;\r\n\r\n public get correctNumberAllocated(): boolean {\r\n return this.selectedSerialIds.length === this.required;\r\n }\r\n\r\n public get allocationChanged(): boolean {\r\n // true if one of the selected ids is not selected on the part\r\n // true if one the the ids on the part is not selected\r\n return (this.selectedSerialIds.some(id => this.allocatedSerialIds.indexOf(id) < 0) || this.allocatedSerialIds.some(id => this.selectedSerialIds.indexOf(id) < 0));\r\n }\r\n\r\n constructor(\r\n private renderer: Renderer2,\r\n private stockSerialItemService: StockSerailItemsService) { }\r\n\r\n public onSelectionChanged(selection: any): void {\r\n this.selectedSerialIds = selection.selectedRowKeys;\r\n selection.component.deselectRows(this.unavailableSerialNumbers);\r\n }\r\n\r\n public onRowPrepared(row: any): void {\r\n if (this.unavailable(row.data)) {\r\n this.renderer.addClass(row.rowElement, \"part-serial-number-dialogue-row-disabled\");\r\n }\r\n }\r\n\r\n public onGridContentReady(grid: any): void {\r\n grid.component.selectRows(this.allocatedSerialIds);\r\n }\r\n\r\n public show( quantityRequired: number,\r\n stockHeaderId: number,\r\n assignedSerialNumbers: number[] = [],\r\n reservedSerialNumbers: number[] = [],\r\n partNumber: string = \"\",\r\n uniqueId: any = null,\r\n filter: number[] = null\r\n ): void {\r\n\r\n this.showDialog = false;\r\n this.partNumber = partNumber;\r\n this.stockHeaderId = stockHeaderId;\r\n this.uniqueId = uniqueId;\r\n\r\n // can only allocate serial numbers to parts that haven't been issued\r\n this.required = quantityRequired; // part.QtyOutStanding;\r\n\r\n this.getPartSerialItems().subscribe(serialNumbers => {\r\n this.partSerialNumbers = serialNumbers;\r\n\r\n if (filter) {\r\n this.partSerialNumbers = this.partSerialNumbers.filter(s => filter.indexOf(s.SerialId) >= 0);\r\n }\r\n // unavailable serial numbers are those that are assigned to another stock item\r\n this.unavailableSerialNumbers = this.partSerialNumbers\r\n .filter(serialNumber => this.allocatedToAnotherStockItem(serialNumber))\r\n .map(serialNumber => serialNumber.SerialId)\r\n .concat(reservedSerialNumbers);\r\n\r\n this.allocatedSerialIds = assignedSerialNumbers;\r\n this.selectedSerialIds = assignedSerialNumbers;\r\n\r\n this.showDialog = true;\r\n });\r\n }\r\n\r\n public onSave(): void {\r\n this.OnUpdate.emit({ serialIds: this.selectedSerialIds, stockHeaderId: this.stockHeaderId, uniqueId: this.uniqueId });\r\n this.showDialog = false;\r\n }\r\n\r\n public onCancel(): void {\r\n this.showDialog = false;\r\n }\r\n\r\n public allocatedToAnotherStockItem(serialNumber: StockSerialNoAdjustment): boolean {\r\n // serial number is allocated to another job if it is allocated but it is not in one of the serial numbers\r\n // allocated to this part\r\n return serialNumber && serialNumber.Allocated && this.allocatedSerialIds.every(sn => sn !== serialNumber.SerialId);\r\n }\r\n\r\n public getStatus(serialNumber: StockSerialNoAdjustment): string {\r\n if (serialNumber && serialNumber.Allocated) {\r\n return this.allocatedSerialIds.every(sn => sn !== serialNumber.SerialId) ? \"job.parts.serial-number-dialogue.allocated\" : \"job.parts.serial-number-dialogue.selected\";\r\n }\r\n return \"job.parts.serial-number-dialogue.inStock\";\r\n }\r\n\r\n public unavailable(serialNumber: StockSerialNoAdjustment): boolean {\r\n return serialNumber && this.unavailableSerialNumbers.some(sn => serialNumber.SerialId === sn);\r\n }\r\n\r\n public linkToStock(): string {\r\n return `#/stock/detail/${this.stockHeaderId}/false/serialno`;\r\n }\r\n\r\n private getPartSerialItems(): Observable {\r\n if (this.storeId) {\r\n return this.stockSerialItemService.GetPartSerailItems(this.stockHeaderId, this.storeId);\r\n } else {\r\n return this.stockSerialItemService.GetPartSerailItems(this.stockHeaderId);\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import { Component, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { EdmLiteral } from \"devextreme/data/odata/utils\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\nimport { PartSerialNumberDialogueComponent } from \"../../shared/components/part-serial-number-dialogue/part-serial-number-dialogue.component\";\r\nimport { StockService } from \"../../stock/services/stock.service\";\r\nimport { DespatchNotePart } from \"../models/despatch-note-part.model\";\r\nimport { DespatchNote } from \"../models/despatch-note.model\";\r\n\r\n@Component({\r\n selector: \"app-despatch-note-parts\",\r\n templateUrl: \"./despatch-note-parts.component.html\",\r\n styleUrls: [\"./despatch-note-parts.component.scss\"]\r\n})\r\nexport class DespatchNotePartsComponent implements OnInit, OnChanges {\r\n @Input() public despatch: DespatchNote = new DespatchNote();\r\n @Input() public form: NgForm;\r\n @Input() public despatchDisabled: boolean = true;\r\n\r\n @ViewChild(\"SerialNoDialog\", { static: true }) serialNumberDialogue: PartSerialNumberDialogueComponent;\r\n\r\n @ViewChild(\"despatchNotePartsGrid\", { static: true }) despatchNotePartsGrid: DxDataGridComponent;\r\n\r\n private sstockDataSource: DataSource;\r\n public get stockDataSource(): DataSource {\r\n if (!this.sstockDataSource) {\r\n this.sstockDataSource = this.stockService.GetStockStorePartsDataSource(false);\r\n }\r\n return this.sstockDataSource;\r\n }\r\n\r\n public selectedSalesLineIds: number[] = [];\r\n\r\n private partsMissingSerialNumbers: boolean = false;\r\n\r\n private selectedPartFullyAllocated: boolean = false;\r\n\r\n public stock: any[] = [];\r\n\r\n public serialNumberedParts: number[] = [];\r\n\r\n public showWarning: boolean = false;\r\n\r\n public partsListDataSource: DataSource;\r\n public stockHeaderDataStore: ODataStore;\r\n\r\n public get AllocateDisabled(): boolean {\r\n return this.partsMissingSerialNumbers || this.selectedPartFullyAllocated || this.despatchDisabled;\r\n }\r\n\r\n constructor(\r\n private stockService: StockService,\r\n private odataService: ODataService) {\r\n this.OnDeallocatePart = this.OnDeallocatePart.bind(this);\r\n this.CanDeallocate = this.CanDeallocate.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.stockHeaderDataStore = this.stockService.GetStockHeaders();\r\n this.setupPartListDataSource();\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.despatch && changes.despatch.currentValue && changes.despatch.currentValue.Parts) {\r\n this.setupPartListDataSource();\r\n\r\n const newParts: DespatchNotePart[] = changes.despatch.currentValue.Parts;\r\n const lastPartIndex = newParts.length;\r\n\r\n if (lastPartIndex > 0) {\r\n const filter: any[] | string = [[\"StoreId\", \"=\", this.despatch.DefaultStoreId.toString()]];\r\n filter.push(\"and\");\r\n\r\n let value: string = \"\";\r\n for (let i: number = 1; i <= lastPartIndex; i++) {\r\n const filterValue = newParts[i - 1].StockHeaderId.toString();\r\n value += filterValue + \",\";\r\n }\r\n\r\n value = value.substring(0, value.length - 1);\r\n\r\n filter.push([new EdmLiteral(`StockHeaderId in (${value}) eq true`), \"=\", true]);\r\n this.stockDataSource.filter(filter);\r\n this.stockDataSource.load().then(stock => { this.stock = stock; });\r\n }\r\n }\r\n }\r\n\r\n public OnRemoveSelectedParts(): void {\r\n this.despatch.Parts = this.despatch.Parts.filter(part => this.selectedSalesLineIds.indexOf(part.SalesLineId) === -1);\r\n this.setupPartListDataSource();\r\n this.SetFormDirty();\r\n }\r\n\r\n public OnCreatePickingNote(): void {\r\n\r\n }\r\n\r\n public OnAllocateParts(): any {\r\n if (this.selectedSalesLineIds.length === 0) {\r\n this.showWarning = true;\r\n } else {\r\n this.despatch.Parts\r\n .filter(part => this.selectedSalesLineIds.indexOf(part.SalesLineId) >= 0)\r\n .forEach(part => {\r\n // don't flag for allocation if there aren't any available\r\n const stock = this.GetStock(part.StockHeaderId);\r\n\r\n if (stock.Available > 0) {\r\n part.Allocate = true;\r\n part.Allocated = part.Demand > stock.Available ? stock.Available : part.Demand;\r\n }\r\n });\r\n\r\n this.RefreshGrid();\r\n this.SetFormDirty();\r\n }\r\n }\r\n\r\n public OnDeallocatePart(event): void {\r\n if (event && event.row && event.row.data) {\r\n const part: DespatchNotePart = event.row.data;\r\n\r\n //Need to adjust it in the collection used for the grid.\r\n const foundPart = this.despatch.Parts.find(p => p.SalesLineId === part.SalesLineId);\r\n foundPart.Allocate = false;\r\n foundPart.Allocated = 0;\r\n\r\n this.RefreshGrid();\r\n this.SetFormDirty();\r\n }\r\n }\r\n\r\n public OnSelectionChanged(): void {\r\n this.RefreshPartsRequiringSerialNumbers();\r\n this.RefreshSelectedPartFullyAllocated();\r\n }\r\n\r\n public OnSelectSerialNumbers(event: any): void {\r\n const lineId = event.data.SalesLineId;\r\n const part = this.GetPartForLine(lineId);\r\n\r\n if (part) {\r\n\r\n // reserve any serial numbers that are added to parts but have not been saved yet\r\n const reserved: number[] = [];\r\n\r\n this.despatch.Parts\r\n .filter(despatchPart => despatchPart.SalesLineId !== lineId)\r\n .forEach(despatchPart => reserved.concat(despatchPart.SerialIds));\r\n\r\n const stock = this.GetStock(event.data.StockHeaderId);\r\n\r\n this.serialNumberDialogue.show(event.data.Demand, event.data.StockHeaderId, part.SerialIds, reserved, stock.PartNumber, lineId);\r\n }\r\n }\r\n\r\n public OnSerialNumberUpdate(event: any): void {\r\n const partToUpdate = this.GetPartForLine(event.uniqueId);\r\n\r\n if (partToUpdate) {\r\n partToUpdate.SerialIds = event.serialIds;\r\n this.RefreshPartsRequiringSerialNumbers();\r\n this.SetFormDirty();\r\n }\r\n }\r\n\r\n public IsSerialNumbered(value: any) {\r\n const stock = this.GetStock(value.data.StockHeaderId);\r\n return stock && stock.SerialNumbered;\r\n }\r\n\r\n public SerialNumbersOutstanding(row: any): boolean {\r\n const stock = this.GetStock(row.data.StockHeaderId);\r\n return stock && stock.SerialNumbered && (row.data.SerialIds ? row.data.SerialIds.length : 0) !== row.data.Demand;\r\n }\r\n\r\n public ReadyToDespatch(data: any): boolean {\r\n return data.data.Demand > 0 && data.data.Allocated === data.data.Demand;\r\n }\r\n\r\n public CanDeallocate(event: any) {\r\n let canDeallocate: boolean = false;\r\n\r\n if (event && event.row && event.row.data) {\r\n const part: DespatchNotePart = event.row.data;\r\n canDeallocate = part.Allocate;\r\n }\r\n\r\n return canDeallocate;\r\n }\r\n\r\n private GetStock(stockHeaderId: number): any {\r\n return this.stock.find(part => part.StockHeaderId === stockHeaderId);\r\n }\r\n\r\n private GetPartForLine(salesLineId: number): DespatchNotePart {\r\n return this.despatch.Parts.find(part => part.SalesLineId === salesLineId);\r\n }\r\n\r\n private RefreshPartsRequiringSerialNumbers(): void {\r\n this.partsMissingSerialNumbers = false;\r\n\r\n if (this.despatch && this.despatch.Parts) {\r\n this.despatch.Parts.forEach(part => {\r\n const stock = this.GetStock(part.StockHeaderId);\r\n // if this part has been selected and it is serial numbered and the serial numbers assigned does not match the demand\r\n if (this.selectedSalesLineIds.indexOf(part.SalesLineId) >= 0 && stock.SerialNumbered && (part.SerialIds ? part.SerialIds.length : 0) !== part.Demand) {\r\n this.partsMissingSerialNumbers = true;\r\n }\r\n });\r\n }\r\n }\r\n\r\n private RefreshSelectedPartFullyAllocated(): void {\r\n this.selectedPartFullyAllocated = this.despatch\r\n && this.despatch.Parts\r\n // all selected parts are allocated if they are not selected or demand equals allocated\r\n && this.despatch.Parts.some(part => this.selectedSalesLineIds.indexOf(part.SalesLineId) >= 0 && part.Demand === part.Allocated);\r\n }\r\n\r\n private RefreshGrid(): void {\r\n this.partsListDataSource.reload();\r\n this.despatchNotePartsGrid.instance.refresh();\r\n }\r\n\r\n private SetFormDirty(): void {\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n private setupPartListDataSource(): void {\r\n this.partsListDataSource = this.odataService.GetDataSourceWithLookups(\r\n this.despatch.Parts,\r\n \"SalesLineId\",\r\n [\r\n {\r\n store: this.stockHeaderDataStore,\r\n dataKey: \"StockHeaderId\",\r\n lookupKey: \"StockHeaderId\",\r\n displayExprs: [\"PartNo\", \"Description\"]\r\n }\r\n ]);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n\r\n ","import { Component, Input, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { MaterialTypeService } from \"src/app/shared/services/material-type/material-type.service\";\r\nimport { DespatchNote } from \"../models/despatch-note.model\";\r\nimport { DespatchNoteStatus } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-despatch-note-materials\",\r\n templateUrl: \"./despatch-note-materials.component.html\",\r\n styleUrls: [\"./despatch-note-materials.component.scss\"]\r\n})\r\nexport class DespatchNoteMaterialsComponent implements OnInit {\r\n\r\n @Input() public despatch: DespatchNote = new DespatchNote();\r\n @Input() public form: NgForm;\r\n @Input() public despatchDisabled: boolean = true;\r\n\r\n @ViewChild(DxDataGridComponent, { static: true }) MaterialsGrid: DxDataGridComponent;\r\n\r\n public selectedMaterialIds: number[] = [];\r\n public miscTypeStore: ODataStore;\r\n public showWarning: boolean = false;\r\n public lookup: any;\r\n\r\n public get formDisabled(): boolean {\r\n return this.despatch.Status === DespatchNoteStatus.Despatched;\r\n }\r\n\r\n public get disableRemove(): boolean {\r\n return this.formDisabled ||\r\n this.selectedMaterialIds.length === 0;\r\n }\r\n\r\n constructor(private materialType: MaterialTypeService) {\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.miscTypeStore = this.materialType.GetMaterialTypeStore();\r\n }\r\n\r\n public DeleteSelectedMaterials(): void {\r\n this.selectedMaterialIds.forEach(id => {\r\n const index = this.despatch.Materials.findIndex(x => x.LineId === id);\r\n this.despatch.Materials.splice(index, 1);\r\n });\r\n this.SetFormDirty();\r\n }\r\n\r\n public Allocate(): void {\r\n if (this.selectedMaterialIds.length === 0) {\r\n this.showWarning = true;\r\n } else {\r\n this.selectedMaterialIds.forEach(id => {\r\n const index = this.despatch.Materials.findIndex(x => x.LineId === id);\r\n this.despatch.Materials[index].Allocated = true;\r\n });\r\n this.RefreshMisc();\r\n this.SetFormDirty();\r\n }\r\n }\r\n\r\n public RefreshMisc(): void {\r\n this.MaterialsGrid.instance.refresh();\r\n }\r\n\r\n public SetFormDirty(): void {\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public MiscTypeSortValue(data: any): string {\r\n return this.lookup.calculateCellValue(data.MaterialTypeId);\r\n }\r\n}\r\n","import { EventEmitter, Input, OnChanges, SimpleChanges, ViewChild } from \"@angular/core\";\r\nimport { Component, Output } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { DateOnlyService, FormMesssageService } from \"servicesight-shared\";\r\nimport { DespatchNote } from \"../models/despatch-note.model\";\r\nimport { DespatchNotesService } from \"../services/despatch-notes.service\";\r\n\r\n@Component({\r\n selector: \"app-despatch-note-invoicing-dialogue\",\r\n templateUrl: \"./despatch-note-invoicing-dialogue.component.html\",\r\n styleUrls: [\"./despatch-note-invoicing-dialogue.component.scss\"]\r\n})\r\nexport class DespatchNoteInvoicingDialogueComponent implements OnChanges {\r\n @Input() despatch: DespatchNote;\r\n @Output() invoicing = new EventEmitter();\r\n\r\n @ViewChild(\"invoicedespatchform\", { static: true }) form: NgForm;\r\n public readonly formName: string = \"invoicedespatchform\";\r\n\r\n public model: Date = new Date();\r\n public isLoading = true;\r\n\r\n constructor(private formMessageService: FormMesssageService,\r\n private despatchService: DespatchNotesService,\r\n private dateOnlyService: DateOnlyService) { }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.despatch.currentValue.Id) {\r\n this.isLoading = false;\r\n this.model = this.dateOnlyService.RecalculateDateOnLoad(this.despatch.DespatchDate);\r\n }\r\n }\r\n\r\n public Save(): void {\r\n this.isLoading = true;\r\n this.despatch.TaxPoint = this.dateOnlyService.RecalculateDateOnSave(this.model);\r\n this.formMessageService\r\n .RegisterObservable(this.despatchService.Invoice(this.despatch), this.formName)\r\n .subscribe((res) => {\r\n this.invoicing.emit(res.EntityId);\r\n });\r\n }\r\n\r\n public Discard(): void {\r\n this.invoicing.emit();\r\n }\r\n}\r\n","\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport * as moment from \"moment\";\r\nimport { Observable } from \"rxjs\";\r\nimport { map } from \"rxjs/operators\";\r\nimport { Employee, IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { EmployeeListData } from \"../../models/employee-list-data.model\";\r\nimport { EmployeeList } from \"../../models/employee-list.model\";\r\nimport { EmployeeLocationData } from \"../../models/employee-location.model\";\r\nimport { ODataService } from \"../odata/odata.service\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class EmployeeService {\r\n\r\n constructor(\r\n @Inject(APP_CONFIG) protected config: IAppConfig,\r\n @Inject(\"ODataService\") private odataService: ODataService,\r\n private http: HttpClient\r\n ) { }\r\n\r\n\r\n public GetEmployeeDataStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.config.apiLocations.ServiceSightOData}EmployeeOD`,\r\n key: \"EmployeeID\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetEmployeesListDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.ServiceSightOData}EmployeesListOD`,\r\n key: \"EmployeeId\",\r\n keyType: \"Int16\"\r\n });\r\n }\r\n\r\n public GetAll(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Employee/GetAll`).pipe(map(x => x.ModelCollection));\r\n }\r\n\r\n public GetEmployeeById(id: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Employee/GetEmployeeById?id=${id}`);\r\n }\r\n\r\n public GetEmployeeBySession(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Employee/GetEmployeeBySession`);\r\n }\r\n\r\n public GetEmployeeLocationData(id: number, date: Date): Observable {\r\n const momentDate = moment(date);\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Employee/${id}/Location?date=` + momentDate.format(\"YYYY-MM-DD\"));\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{'accordion.despatched-by' | translate}}{{employee.Name}}
{{ 'accordion.sales-order-no' | translate }}\r\n {{dp.SalesId}}\r\n
{{ 'accordion.credit-note.invoice-no' | translate }}\r\n {{dp.InvoiceNo}}\r\n
\r\n","import { Component, Input, OnChanges, SimpleChanges } from \"@angular/core\";\r\nimport { Employee } from \"servicesight-shared\";\r\nimport { DespatchNote } from \"../../models/despatch-note.model\";\r\nimport { InvoiceDataService } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-despatch-notes-accordion-detail\",\r\n templateUrl: \"./despatch-notes-accordion-detail.component.html\",\r\n styleUrls: [\"./despatch-notes-accordion-detail.component.scss\"]\r\n})\r\nexport class DespatchNotesAccordionDetailComponent implements OnChanges {\r\n\r\n @Input() employee: Employee;\r\n @Input() dp: DespatchNote;\r\n public invoiceId: number;\r\n\r\n public constructor(private invoiceDataService: InvoiceDataService) { }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes && changes.dp && changes.dp.currentValue !== changes.dp.previousValue) {\r\n this.invoiceDataService.GetInvoiceIdByNumber(this.dp.InvoiceNo).subscribe(x => this.invoiceId = x);\r\n }\r\n }\r\n}\r\n","\r\n \r\n
\r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n","import { Component, Input, OnChanges, SimpleChanges } from \"@angular/core\";\r\nimport { DespatchNote } from \"../models/despatch-note.model\";\r\nimport { EmployeeService } from \"../../shared/services/employee/employee.service\";\r\nimport { DocumentTypeEnum, Employee } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-despatch-note-accordion\",\r\n templateUrl: \"./despatch-note-accordion.component.html\",\r\n styleUrls: [\"./despatch-note-accordion.component.scss\"]\r\n})\r\nexport class DespatchNoteAccordionComponent implements OnChanges {\r\n\r\n @Input() dp: DespatchNote;\r\n public docType = DocumentTypeEnum;\r\n public employee: Employee;\r\n\r\n constructor(\r\n private employeeService: EmployeeService\r\n ) { }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.dp.currentValue.EmployeeId && changes.dp.currentValue !== changes.dp.previousValue) {\r\n this.employeeService.GetEmployeeById(changes.dp.currentValue.EmployeeId).subscribe(x => {\r\n this.employee = x;\r\n });\r\n }\r\n }\r\n\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

{{ 'despatch-note.title' | translate }}  {{ id ? id : null }}

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

{{ despatch.Status | despatchNoteStatus | translate }}

\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { Observable } from \"rxjs\";\r\nimport {\r\n DateOnlyService,\r\n DespatchNoteStatus,\r\n DocumentTypeEnum,\r\n FormMesssageService,\r\n IProteanResponse,\r\n Module,\r\n ModuleService\r\n} from \"servicesight-shared\";\r\nimport { MessageService } from \"src/app/messages/services/message/message.service\";\r\nimport { MessageDocTypeIds } from \"src/app/shared/enums/messages/message-doc-type-ids.enum\";\r\nimport { MessageTypes } from \"src/app/shared/enums/messages/message-types.enum\";\r\nimport { ICurrency } from \"src/app/shared/models/icurrency.model\";\r\nimport { CustomerService } from \"src/app/shared/services/customer/customer.service\";\r\nimport { Ng1ReminderService } from \"src/app/shared/services/ng1-reminder.service\";\r\nimport { DespatchNote } from \"../models/despatch-note.model\";\r\nimport { DespatchNotesService } from \"../services/despatch-notes.service\";\r\n\r\n@Component({\r\n selector: \"app-despatch-note\",\r\n templateUrl: \"./despatch-note.component.html\",\r\n styleUrls: [\"./despatch-note.component.scss\"]\r\n})\r\nexport class DespatchNoteComponent implements OnInit {\r\n\r\n @ViewChild(\"despatchForm\", { static: true }) form: NgForm;\r\n public readonly formName: string = \"despatchForm\";\r\n public despatch: DespatchNote = new DespatchNote();\r\n\r\n public id: number;\r\n\r\n public partsEnabled: boolean = false;\r\n public equipmentEnabled: boolean = false;\r\n public isLoading: boolean = false;\r\n public currency: ICurrency;\r\n public orderStatus = DespatchNoteStatus;\r\n public selectedIndex: number;\r\n public showInvoiceDialogue = false;\r\n public showDespatchWarning = false;\r\n public docType = DocumentTypeEnum;\r\n\r\n\r\n public get isNew(): boolean {\r\n return !this.despatch || !this.despatch.Id;\r\n }\r\n\r\n public get DespatchNoteDisabled(): boolean {\r\n return this.isLoading || !this.despatch || (this.despatch.Status > DespatchNoteStatus.Allocated || this.despatch.Status === DespatchNoteStatus.Cancelled);\r\n }\r\n\r\n public get DespatchButtonHidden(): boolean {\r\n return this.despatch.Status > DespatchNoteStatus.Allocated;\r\n }\r\n\r\n constructor(\r\n private route: ActivatedRoute,\r\n private despatchService: DespatchNotesService,\r\n private router: Router,\r\n private customerService: CustomerService,\r\n private formMessageService: FormMesssageService,\r\n private dateOnlyService: DateOnlyService,\r\n private moduleService: ModuleService,\r\n private messageService: MessageService,\r\n private ng1reminderService: Ng1ReminderService) { }\r\n\r\n public ngOnInit(): void {\r\n this.moduleService.GetEnabledModules().subscribe(x => {\r\n this.partsEnabled = x.includes(Module.Stock);\r\n this.equipmentEnabled = x.includes(Module.Equipment);\r\n });\r\n\r\n this.route.params.subscribe(params => {\r\n this.id = Number(params.id);\r\n if (this.id) {\r\n this.isLoading = true;\r\n this.LoadDespatchNote();\r\n }\r\n });\r\n }\r\n\r\n public Despatch(): void {\r\n this.isLoading = true;\r\n const fullyAllocated = (this.despatch.Materials || []).every(m => m.Allocated) &&\r\n (this.despatch.Parts || []).every(p => p.Demand === p.Allocated) &&\r\n (this.despatch.MakeModels || []).every(mm => mm.Demand === mm.Allocated);\r\n if (!fullyAllocated) {\r\n this.showDespatchWarning = true;\r\n } else {\r\n this.CallDespatch();\r\n }\r\n }\r\n\r\n public ConfirmDespatch(confirmed: boolean): void {\r\n if (confirmed) {\r\n this.CallDespatch();\r\n } else {\r\n this.isLoading = false;\r\n }\r\n this.showDespatchWarning = false;\r\n }\r\n\r\n private CallDespatch(): void {\r\n this.isLoading = true;\r\n this.reclaculateDatesOnSave();\r\n this.save().subscribe(despatch => {\r\n this.despatch = despatch;\r\n this.formMessageService.RegisterObservable(this.despatchService.Despatch(this.despatch), this.formName).subscribe({\r\n next: res => {\r\n if (this.id) {\r\n this.isLoading = false;\r\n this.LoadDespatchNote();\r\n } else {\r\n this.router.navigate([\"/despatch-notes\", \"detail\", res.Id]);\r\n }\r\n },\r\n error: () => this.isLoading = false\r\n });\r\n });\r\n }\r\n\r\n public CancelDespatch(): void {\r\n this.isLoading = true;\r\n this.formMessageService.RegisterObservable(this.despatchService.Cancel(this.despatch), this.formName).subscribe({\r\n next: res => {\r\n if (this.id) {\r\n this.LoadDespatchNote();\r\n } else {\r\n this.router.navigate([\"/despatch-notes\", \"detail\", res.Id]);\r\n }\r\n },\r\n error: () => this.isLoading = false\r\n });\r\n }\r\n\r\n public Discard(): void {\r\n if (this.despatch.Id) {\r\n this.LoadDespatchNote();\r\n } else {\r\n this.router.navigate([\"/despatch-notes\", \"list\"]);\r\n }\r\n }\r\n\r\n public Save(): void {\r\n this.isLoading = true;\r\n this.reclaculateDatesOnSave();\r\n this.save().subscribe({\r\n next: despatch => {\r\n if (this.id) {\r\n this.isLoading = false;\r\n this.LoadDespatchNote();\r\n } else {\r\n this.router.navigate([\"/despatch-notes\", \"detail\", despatch.Id]);\r\n }\r\n },\r\n error: () => this.isLoading = false\r\n });\r\n }\r\n\r\n public ViewDespatch(): void {\r\n this.router.navigate([\"despatch-notes/detail\", this.id, \"document\"]);\r\n }\r\n\r\n public NewReminder(): void {\r\n this.ng1reminderService.CreateDespatchNotesReminder(this.despatch.Id, this.despatch.CustomerId);\r\n }\r\n\r\n public NewMessage(): void {\r\n this.messageService.SetNewMessageParameters(0, MessageTypes.RefMessage, false, MessageDocTypeIds.DespatchNote, this.id);\r\n this.router.navigate([\"messages/newmessage\"]);\r\n }\r\n\r\n public Invoice(): void {\r\n this.formMessageService\r\n .RegisterObservable(this.despatchService.OkToInvoiceDespatch(this.despatch.Id), this.formName)\r\n .subscribe(() => {\r\n this.showInvoiceDialogue = true;\r\n });\r\n }\r\n\r\n public OnCloseInvoiceDialogue(noteId: number): void {\r\n if (noteId) {\r\n location.href = `/#/invoices/invoice/${noteId}`;\r\n }\r\n this.showInvoiceDialogue = false;\r\n }\r\n\r\n public PreviewInvoice(): void {\r\n this.despatchService.Invoice({\r\n Id: this.despatch.Id,\r\n Preview: true,\r\n TaxPoint: new Date()\r\n }).subscribe(data => {\r\n if (data && data.EntityId) {\r\n location.href = `/#/invoices/invoice/${data.EntityId}`;\r\n }\r\n });\r\n }\r\n\r\n private LoadDespatchNote(): void {\r\n this.despatchService.Get(this.id).subscribe({\r\n next: res => {\r\n this.despatch = res;\r\n this.recalculateDatesOnLoad();\r\n this.GetCurrency(this.despatch.CustomerId);\r\n this.isLoading = false;\r\n },\r\n error: () => this.isLoading = false\r\n });\r\n }\r\n\r\n private GetCurrency(customerId: number): void {\r\n this.customerService.GetCustomerCurrency(customerId).subscribe(currency => this.currency = currency);\r\n }\r\n\r\n private reclaculateDatesOnSave(): void {\r\n this.despatch.DespatchDate = this.dateOnlyService.RecalculateDateOnSave(this.despatch.DespatchDateUI);\r\n this.despatch.EstimatedDeliveryDate = this.dateOnlyService.RecalculateDateOnSave(this.despatch.EstimatedDeliveryDateUI);\r\n }\r\n\r\n private recalculateDatesOnLoad(): void {\r\n this.despatch.DespatchDateUI = this.dateOnlyService.RecalculateDateOnLoad(this.despatch.DespatchDate);\r\n this.despatch.EstimatedDeliveryDateUI = this.dateOnlyService.RecalculateDateOnLoad(this.despatch.EstimatedDeliveryDate);\r\n }\r\n\r\n private save(): Observable {\r\n return this.formMessageService.RegisterObservable(this.despatchService.Update(this.despatch), this.formName);\r\n }\r\n}\r\n","import { NgModule } from \"@angular/core\";\r\nimport { RouterModule, Routes } from \"@angular/router\";\r\nimport { DespatchNotePreviewComponent } from \"./despatch-note-preview/despatch-note-preview.component\";\r\nimport { DespatchNoteComponent } from \"./despatch-note/despatch-note.component\";\r\nimport { DespatchNotesListComponent } from \"servicesight-shared\";\r\n\r\nconst routes: Routes = [\r\n { path: \"detail/:id\", component: DespatchNoteComponent },\r\n { path: \"list\", component: DespatchNotesListComponent },\r\n { path: \"detail/:id/document\", component: DespatchNotePreviewComponent },\r\n { path: \"\", redirectTo: \"list\", pathMatch: \"full\" },\r\n { path: \"**\", redirectTo: \"list\" }];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class DespatchNotesRoutingModule {\r\n public static readonly Routes: Routes = routes;\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { ReorderOptions } from \"src/app/shared/models/reorder-options.model\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class EquipmentReorderingService {\r\n\r\n constructor(\r\n @Inject(APP_CONFIG) protected config: IAppConfig,\r\n @Inject(\"ODataService\") private odataService: ODataService) { }\r\n\r\n public GetDataSource(options: ReorderOptions): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.EquipmentOData}MakeModelReorderingOData`,\r\n key: [ \"MakeModelId\", \"StoreId\" ],\r\n paging: false,\r\n keyType: {\r\n ItemId: \"Int32\",\r\n StoreId: \"Int32\"\r\n },\r\n queryStringParams: {\r\n fromDate: options.FromDate.toISOString(),\r\n toDate: options.ToDate.toISOString(),\r\n min: options.Min,\r\n max: options.Max,\r\n demand: options.Demand,\r\n forecast: options.Forecast\r\n }\r\n });\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { ODataService } from \"../../shared/services/odata/odata.service\";\r\nimport { StockManufacturerModel } from \"../models/stock-manufacturer.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class StockManufacturerService {\r\n private readonly serviceSightODataBaseUrl: string;\r\n private readonly serviceSightBaseUrl: string;\r\n\r\n constructor(\r\n private odataService: ODataService,\r\n private httpClient: HttpClient,\r\n @Inject(APP_CONFIG) appConfig: IAppConfig) {\r\n this.serviceSightODataBaseUrl = appConfig.apiLocations.ServiceSightOData;\r\n this.serviceSightBaseUrl = appConfig.apiLocations.ServiceSight;\r\n }\r\n\r\n public StockManufacturerStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.serviceSightODataBaseUrl}StockManufacturersOD`,\r\n key: \"ManufacturerId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public StockManufacturerDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.serviceSightODataBaseUrl}StockManufacturersOD`,\r\n key: \"ManufacturerId\",\r\n keyType: \"Int32\",\r\n pageSize: 50,\r\n paging: true\r\n });\r\n }\r\n\r\n public Get(manufacturerId: number): Observable {\r\n return this.httpClient.get(`${this.serviceSightBaseUrl}StockManufacturer/GetManufacturer?manufacturerId=${manufacturerId}`);\r\n }\r\n\r\n public Update(manufacturer: StockManufacturerModel): Observable {\r\n return this.httpClient.post(`${this.serviceSightBaseUrl}StockManufacturer/UpsertManufacturer`, manufacturer);\r\n }\r\n\r\n public Create(manufacturer: StockManufacturerModel): Observable {\r\n return this.httpClient.post(`${this.serviceSightBaseUrl}StockManufacturer/UpsertManufacturer`, manufacturer);\r\n }\r\n\r\n public Delete(manufacturerId: number): Observable {\r\n return this.httpClient.get(`${this.serviceSightBaseUrl}StockManufacturer/DeleteManufacturer?manufacturerId=${manufacturerId}`);\r\n }\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { ODataService } from \"../../shared/services/odata/odata.service\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { StockTypeModel } from \"../../shared/models/stock-type.model\";\r\nimport { Observable } from \"rxjs\";\r\nimport { StockTypeLinkModel } from \"../../shared/models/stock-type-links.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class StockTypesService {\r\n private readonly stockODataBaseUrl: string;\r\n private readonly serviceSightODataBaseUrl: string;\r\n\r\n constructor(\r\n private odataService: ODataService,\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private config: IAppConfig) {\r\n this.stockODataBaseUrl = config.apiLocations.StockOData;\r\n this.serviceSightODataBaseUrl = config.apiLocations.ServiceSightOData;\r\n }\r\n\r\n public GetDataSource(removePaging?: boolean): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.stockODataBaseUrl}StockTypesOData`,\r\n key: \"StockTypeId\",\r\n keyType: \"Int32\",\r\n paging: removePaging ? false : true\r\n });\r\n }\r\n\r\n public GetDataStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.stockODataBaseUrl}StockTypesOData`,\r\n key: \"StockTypeId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public ODataStockTypeServiceLevels(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.stockODataBaseUrl}StockTypesOData`,\r\n key: \"StockTypeId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public ODataTaxCodeService(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.serviceSightODataBaseUrl}ProductTaxCodeOD`,\r\n key: \"ID\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public Create(model: StockTypeModel): Observable {\r\n return this.http.post(`${this.config.apiLocations.Stock}\\StockTypes`, model);\r\n }\r\n\r\n public CreateUpdate(model: StockTypeModel): Observable {\r\n return (model.StockTypeId && model.StockTypeId > 0) ? this.Update(model) : this.Create(model);\r\n }\r\n\r\n public Get(id: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.Stock}StockTypes/${id}`);\r\n }\r\n\r\n public Update(model: StockTypeModel): Observable {\r\n return this.http.put(`${this.config.apiLocations.Stock}StockTypes`, model);\r\n }\r\n\r\n public IsInUse(id: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.Stock}StockTypes/${id}/InUse`);\r\n }\r\n\r\n public Delete(id: number): Observable {\r\n return this.http.delete(`${this.config.apiLocations.Stock}StockTypes/${id}`);\r\n }\r\n\r\n public GetLinks(): Observable {\r\n return this.http.get(`${this.config.apiLocations.Stock}StockTypes/Links`);\r\n }\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\nimport { ReorderOptions } from \"../../shared/models/reorder-options.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class StockReorderingService {\r\n\r\n constructor(\r\n @Inject(APP_CONFIG) protected config: IAppConfig,\r\n @Inject(\"ODataService\") private odataService: ODataService) { }\r\n\r\n public GetDataSource(options: ReorderOptions): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.StockOData}StockReorderingOData`,\r\n key: [ \"StockHeaderId\", \"StoreId\" ],\r\n paging: false,\r\n keyType: {\r\n StockHeaderId: \"Int32\",\r\n StoreId: \"Int32\"\r\n },\r\n queryStringParams: {\r\n fromDate: options.FromDate.toISOString(),\r\n toDate: options.ToDate.toISOString(),\r\n min: options.Min,\r\n max: options.Max,\r\n demand: options.Demand,\r\n forecast: options.Forecast\r\n }\r\n });\r\n }\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class StockSupplierService {\r\n\r\n constructor(\r\n @Inject(APP_CONFIG) protected config: IAppConfig,\r\n @Inject(\"ODataService\") private odataService: ODataService) { }\r\n\r\n public GetStockSupplierDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.ServiceSightOData}StockSuppliersOD`,\r\n key: \"SupplierId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetStockSuppliersStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.config.apiLocations.ServiceSightOData}StockSuppliersOD`,\r\n key: \"SupplierId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n}\r\n","export enum ReorderItemType {\r\n Stock = 1,\r\n Equipment = 2\r\n}\r\n","export enum ReorderingReason {\r\n Demand = 1,\r\n Forecast = 2,\r\n MinimumStockLevel = 3,\r\n MinimumOrderQuantity = 4,\r\n MaximumStockLevel = 5\r\n}\r\n","import { ReorderItemType } from \"../enums/reorder-item-type.enum\";\r\n\r\nexport class ReorderItem {\r\n ItemId: number;\r\n StoreId: number;\r\n Item: string;\r\n Description: string;\r\n ReasonId: number;\r\n SupplierId: number;\r\n UnitCost: number;\r\n Quantity: number;\r\n Value: number;\r\n ManufacturerId: number;\r\n StockTypeId: number;\r\n CurrencySymbol: string;\r\n ExchangeRate: number;\r\n Type: ReorderItemType;\r\n}\r\n","export class ReorderOptions {\r\n public Min: boolean;\r\n public Max: boolean;\r\n public Demand: boolean;\r\n public Forecast: boolean;\r\n public FromDate: Date;\r\n public ToDate: Date;\r\n\r\n constructor() {\r\n this.Min = true;\r\n this.Max = false;\r\n this.Demand = true;\r\n this.Forecast = true;\r\n this.FromDate = new Date();\r\n this.ToDate = new Date();\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { BulkPartOrder } from \"../../models/bulk-part-order.model\";\r\nimport { Injectable } from \"@angular/core\";\r\nimport { BulkEquipmentOrder } from \"../../models/bulk-equipment-order.model\";\r\nimport { BulkMaterialOrder } from \"../../models/bulk-material-order.model\";\r\nimport { BulkItemOrder } from \"../../models/bulk-item-order.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class BulkPurchaseOrderService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private config: IAppConfig\r\n ) { }\r\n\r\n public RaisePartsPO(model: BulkPartOrder): Observable {\r\n return this.http.post(`${this.config.apiLocations.PurchaseOrders}BulkOrder/Parts`, model);\r\n }\r\n\r\n public RaiseEquipmentPO(model: BulkEquipmentOrder): Observable {\r\n return this.http.post(`${this.config.apiLocations.PurchaseOrders}BulkOrder/Equipment`, model);\r\n }\r\n\r\n public RaiseMaterialPO(model: BulkMaterialOrder): Observable {\r\n return this.http.post(`${this.config.apiLocations.PurchaseOrders}BulkOrder/Materials`, model);\r\n }\r\n\r\n public RaiseCombinedPO(model: BulkItemOrder): Observable {\r\n return this.http.post(`${this.config.apiLocations.PurchaseOrders}BulkOrder/Combined`, model);\r\n }\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class SupplierMakeModelPriceService {\r\n\r\n constructor(\r\n @Inject(APP_CONFIG) private config: IAppConfig,\r\n @Inject(\"ODataService\") private odataService: ODataService\r\n ) { }\r\n\r\n public GetDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.EquipmentOData}MakeModelSupplierPricesOData`,\r\n key: [\"MakeModelId\", \"SupplierId\"],\r\n keyType: {\r\n MakeModelId: \"Int32\",\r\n SupplierId: \"Int32\"\r\n },\r\n paging: true,\r\n pageSize: 50\r\n });\r\n }\r\n\r\n public GetDataStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.config.apiLocations.EquipmentOData}MakeModelSupplierPricesOData`,\r\n key: [\"MakeModelId\", \"SupplierId\"],\r\n keyType: {\r\n MakeModelId: \"Int32\",\r\n SupplierId: \"Int32\"\r\n }\r\n });\r\n }\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class SupplierPartPriceService {\r\n\r\n constructor(\r\n @Inject(APP_CONFIG) private config: IAppConfig,\r\n @Inject(\"ODataService\") private odataService: ODataService\r\n ) { }\r\n\r\n public GetDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.StockOData}StockSupplierPricesOData`,\r\n key: [\"StockHeaderId\", \"SupplierId\"],\r\n keyType: {\r\n StockHeaderId: \"Int32\",\r\n SupplierId: \"Int32\"\r\n },\r\n paging: true,\r\n pageSize: 50\r\n });\r\n }\r\n\r\n public GetDataStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.config.apiLocations.StockOData}StockSupplierPricesOData`,\r\n key: [\"StockHeaderId\", \"SupplierId\"],\r\n keyType: {\r\n StockHeaderId: \"Int32\",\r\n SupplierId: \"Int32\"\r\n }\r\n });\r\n }\r\n}\r\n","export enum StockState {\r\n New = 1,\r\n Refurbished = 2,\r\n Used = 3,\r\n Quarantine = 4\r\n}\r\n","\r\n {{ 'job.parts-po.min-order' | translate }}\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n
\r\n {{ data.displayValue }}*\r\n
\r\n\r\n
{{ data.displayValue | currency: (data.data.currencySymbol || baseCurrencySymbol) }}
\r\n\r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n","import { Component, OnInit } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { DocumentTypeEnum, FormMesssageService, SettingData, SettingId, SettingsService } from \"servicesight-shared\";\r\nimport { BulkPurchaseOrderService } from \"src/app/shared/services/bulk-purchase-order/bulk-purchase-order.service\";\r\nimport { SupplierMakeModelPriceService } from \"src/app/shared/services/supplier-makemodel-price/supplier-makemodel-price.service\";\r\nimport { SupplierPartPriceService } from \"src/app/shared/services/supplier-part-price/supplier-part-price.service\";\r\nimport { SupplierService } from \"src/app/shared/services/supplier/supplier.service\";\r\nimport { StockState } from \"src/app/stock/models/enums/stock-state.enum\";\r\nimport { StockService } from \"src/app/stock/services/stock.service\";\r\nimport { ReorderItemType } from \"../../enums/reorder-item-type.enum\";\r\nimport { BulkItemOrderLine } from \"../../models/bulk-item-order-line.model\";\r\nimport { ReorderItem } from \"../../models/reorder-item.model\";\r\nimport { SupplierMakeModelPrice } from \"../../models/supplier-makemodel-price.model\";\r\nimport { SupplierPartPrice } from \"../../models/supplier-part-price.model\";\r\nimport { SupplierStatus } from \"../../pipes/enums/supplier-status.enum\";\r\n\r\n@Component({\r\n selector: \"app-bulk-order-popup\",\r\n templateUrl: \"./bulk-order-popup.component.html\",\r\n styleUrls: [\"./bulk-order-popup.component.scss\"]\r\n})\r\nexport class BulkOrderPopupComponent implements OnInit {\r\n\r\n public readonly formName: string = \"bulkRaisePoForm\";\r\n public warningIsShowing: boolean = false;\r\n public showDialog: boolean = false;\r\n public orderItems: BulkItemOrderLine[];\r\n\r\n public supplierDataStore: ODataStore;\r\n public supplierPartPriceDataSource: DataSource;\r\n public supplierMakeModelPriceDataSource: DataSource;\r\n public storeDataStore: ODataStore;\r\n public baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n public lookup: any;\r\n public StoresEnabled: boolean = false;\r\n public saveEnabled: boolean = true;\r\n\r\n private linkNumber?: number;\r\n private linkType?: DocumentTypeEnum;\r\n private siteId: number;\r\n\r\n public get disableRaisePurchaseOrders(): boolean {\r\n return (this.orderItems && (this.orderItems.length === 0 || this.orderItems.some(p => !p.SupplierId))) || !this.saveEnabled;\r\n }\r\n\r\n constructor(\r\n private supplierService: SupplierService,\r\n private supplierPartPriceService: SupplierPartPriceService,\r\n private makeModelPriceService: SupplierMakeModelPriceService,\r\n private bulkPurchaseOrderService: BulkPurchaseOrderService,\r\n private settingsService: SettingsService,\r\n private stockService: StockService,\r\n private router: Router,\r\n private formMessageService: FormMesssageService\r\n ) {\r\n this.SetSupplier = this.SetSupplier.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.supplierDataStore = this.supplierService.GetSupplierStore();\r\n this.storeDataStore = this.stockService.GetStoresStore();\r\n\r\n this.settingsService.getSetting(SettingId.UseAdditionalStores).subscribe((setting: SettingData) => {\r\n this.StoresEnabled = setting.ValueBool;\r\n });\r\n\r\n this.getActiveSuppliers = this.getActiveSuppliers.bind(this);\r\n }\r\n\r\n public Open(reorderItems: ReorderItem[], linkNumber: number, linkType: DocumentTypeEnum, siteId: number) {\r\n this.linkNumber = linkNumber;\r\n this.linkType = linkType;\r\n this.siteId = siteId;\r\n this.orderItems = reorderItems.map((p, i): BulkItemOrderLine => {\r\n return {\r\n Id: i,\r\n ItemId: p.ItemId,\r\n ItemType: p.Type,\r\n Quantity: p.Quantity,\r\n LinkItemQuantity: p.Quantity,\r\n StockState: StockState.New,\r\n SupplierId: null,\r\n BuyingPrice: null,\r\n EstimatedDate: null,\r\n SubDocId: null,\r\n ItemDescription: p.Description,\r\n Item: p.Item,\r\n UnitPrice: null,\r\n MinOrderQty: null,\r\n CurrencySymbol: null,\r\n StoreId: p.StoreId,\r\n Attributes: null\r\n };\r\n });\r\n\r\n const chunk = 10;\r\n let loadingCount = 0;\r\n\r\n if (reorderItems.some(ri => ri.Type === ReorderItemType.Stock)) {\r\n const partsArray = reorderItems.filter(ri => ri.Type === ReorderItemType.Stock).map(p => p.ItemId);\r\n for (let i = 0; i < partsArray.length; i += chunk) {\r\n\r\n const temporary = partsArray.slice(i, i + chunk);\r\n const filter = this.buildFilter(temporary, ReorderItemType.Stock);\r\n\r\n this.supplierPartPriceDataSource = this.supplierPartPriceService.GetDataSource();\r\n this.supplierPartPriceDataSource.filter([[filter], \"and\", [\"Preferred\", \"=\", true]]);\r\n\r\n loadingCount++;\r\n this.supplierPartPriceDataSource.load().then((res: SupplierPartPrice[]) => {\r\n // set preferred suppliers\r\n res.forEach(s => {\r\n this.orderItems.filter(p => p.ItemId === s.StockHeaderId && p.ItemType === ReorderItemType.Stock).forEach(part => {\r\n part.SupplierId = s.SupplierId;\r\n part.Quantity = part.LinkItemQuantity > s.MinOrderQty ? part.LinkItemQuantity : s.MinOrderQty;\r\n part.EstimatedDate = s.LeadTime ? this.calcEstimatedDate(s.LeadTime) : null;\r\n part.BuyingPrice = s.UnitPrice;\r\n part.UnitPrice = s.UnitPrice;\r\n part.MinOrderQty = s.MinOrderQty;\r\n this.supplierService.GetSupplierCurrency(part.SupplierId).subscribe(currency => {\r\n part.CurrencySymbol = currency.CurrencySymbol;\r\n });\r\n });\r\n });\r\n\r\n if (--loadingCount === 0) {\r\n this.showWarningMessage();\r\n }\r\n });\r\n }\r\n }\r\n\r\n if (reorderItems.some(ri => ri.Type === ReorderItemType.Equipment)) {\r\n const eqArray = reorderItems.filter(ri => ri.Type === ReorderItemType.Equipment).map(p => p.ItemId);\r\n for (let i = 0; i < eqArray.length; i += chunk) {\r\n const temporary = eqArray.slice(i, i + chunk);\r\n const filter = this.buildFilter(temporary, ReorderItemType.Equipment);\r\n\r\n this.supplierMakeModelPriceDataSource = this.makeModelPriceService.GetDataSource();\r\n this.supplierMakeModelPriceDataSource.filter([[filter], \"and\", [\"Preferred\", \"=\", true]]);\r\n loadingCount++;\r\n this.supplierMakeModelPriceDataSource.load().then((res: SupplierMakeModelPrice[]) => {\r\n // set preferred suppliers\r\n res.forEach(s => {\r\n this.orderItems.filter(p => p.ItemId === s.MakeModelId && p.ItemType === ReorderItemType.Equipment).forEach(part => {\r\n part.SupplierId = s.SupplierId;\r\n part.Quantity = part.LinkItemQuantity > s.MinOrderQty ? part.LinkItemQuantity : s.MinOrderQty;\r\n part.EstimatedDate = s.LeadTime ? this.calcEstimatedDate(s.LeadTime) : null;\r\n part.BuyingPrice = s.Price;\r\n part.UnitPrice = s.Price;\r\n part.MinOrderQty = s.MinOrderQty;\r\n this.supplierService.GetSupplierCurrency(part.SupplierId).subscribe(currency => {\r\n part.CurrencySymbol = currency.CurrencySymbol;\r\n });\r\n });\r\n });\r\n\r\n if (--loadingCount === 0) {\r\n this.showWarningMessage();\r\n }\r\n });\r\n }\r\n }\r\n\r\n this.showDialog = true;\r\n }\r\n\r\n public async SetSupplier(newData: BulkItemOrderLine, value: number, currentRowData: BulkItemOrderLine): Promise {\r\n newData.SupplierId = value;\r\n\r\n this.showWarningMessage();\r\n\r\n this.supplierService.GetSupplierCurrency(newData.SupplierId).subscribe(currency => {\r\n newData.CurrencySymbol = currency.CurrencySymbol;\r\n });\r\n\r\n try {\r\n const supplier = await this.getSupplierPrice(currentRowData.ItemId, value, currentRowData.ItemType);\r\n\r\n newData.Quantity = currentRowData.Quantity > supplier.MinOrderQty ? currentRowData.Quantity : supplier.MinOrderQty;\r\n newData.EstimatedDate = supplier.LeadTime ? this.calcEstimatedDate(supplier.LeadTime) : null;\r\n newData.BuyingPrice = supplier.UnitPrice;\r\n newData.UnitPrice = supplier.UnitPrice;\r\n newData.MinOrderQty = supplier.MinOrderQty;\r\n } catch {\r\n // error loading supplier price combination, not really a problem could just be that combination does not exist\r\n newData.EstimatedDate = null;\r\n newData.BuyingPrice = 0;\r\n newData.UnitPrice = 0;\r\n newData.MinOrderQty = null;\r\n }\r\n }\r\n\r\n public Discard(): void {\r\n this.orderItems.length = 0;\r\n this.supplierPartPriceDataSource = null;\r\n this.linkNumber = null;\r\n this.linkType = null;\r\n this.siteId = null;\r\n this.showDialog = false;\r\n this.warningIsShowing = false;\r\n this.formMessageService.ClearForm(this.formName);\r\n }\r\n\r\n public RaisePO(): void {\r\n if (!this.saveEnabled){\r\n return;\r\n }\r\n this.saveEnabled = false;\r\n this.bulkPurchaseOrderService.RaiseCombinedPO({\r\n LinkNumber: this.linkNumber,\r\n LinkType: this.linkType,\r\n SiteId: this.siteId,\r\n Lines: this.orderItems\r\n }).subscribe(res => {\r\n this.saveEnabled = true;\r\n this.Discard();\r\n if (res.length === 1) {\r\n this.router.navigate([\"/purchase-orders/detail\", res[0]]);\r\n } else {\r\n //GOTO filtered list view\r\n this.router.navigate([\"/purchase-orders/list\"], { queryParams: { ids: res } });\r\n }\r\n }, () => {\r\n this.saveEnabled = true;\r\n });\r\n }\r\n\r\n public SupplierSortValue(data: any): void {\r\n // this here is the grid component\r\n return this.lookup.calculateCellValue(data.SupplierId);\r\n }\r\n\r\n public showWarningMessage(): void {\r\n const showWarning = this.orderItems.some(p => !p.SupplierId);\r\n if (showWarning && !this.warningIsShowing) {\r\n this.warningIsShowing = true;\r\n this.formMessageService.ShowWarning(\"job.parts-po.missing-suppliers\", this.formName);\r\n } else if (!showWarning && this.warningIsShowing) {\r\n this.warningIsShowing = false;\r\n this.formMessageService.ClearForm(this.formName);\r\n }\r\n }\r\n\r\n public getActiveSuppliers(): any {\r\n return {\r\n store: this.supplierDataStore,\r\n filter: [[\"Status\", \"<>\", SupplierStatus.Closed], \"and\", [\"Status\", \"<>\", SupplierStatus.OnHold]]\r\n };\r\n }\r\n\r\n private getSupplierPrice(itemId: number, supplierId: number, itemType: ReorderItemType): Promise {\r\n if (itemType === ReorderItemType.Stock) {\r\n const store = this.supplierPartPriceDataSource.store() as ODataStore;\r\n return store.byKey({ StockHeaderId: itemId, SupplierId: supplierId });\r\n }\r\n else if (itemType === ReorderItemType.Equipment) {\r\n const store = this.supplierMakeModelPriceDataSource.store() as ODataStore;\r\n return store.byKey({ MakeModelId: itemId, SupplierId: supplierId });\r\n }\r\n }\r\n\r\n private buildFilter(ids: number[], itemType: ReorderItemType): any[] {\r\n const filter = [];\r\n ids.forEach(id => {\r\n if (itemType === ReorderItemType.Stock) {\r\n filter.push([\"StockHeaderId\", \"=\", id]);\r\n }\r\n else {\r\n filter.push([\"MakeModelId\", \"=\", id]);\r\n }\r\n filter.push(\"or\");\r\n });\r\n filter.pop();\r\n return filter;\r\n }\r\n\r\n private calcEstimatedDate(daysToAdd: number): Date {\r\n const date = new Date();\r\n let count = 0;\r\n while (count < daysToAdd) {\r\n date.setDate(date.getDate() + 1);\r\n if (date.getDay() !== 0 && date.getDay() !== 6) {\r\n //Date.getDay() gives weekday starting from 0(Sunday) to 6(Saturday)\r\n count++;\r\n }\r\n }\r\n return date;\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

{{ 'reordering.title' | translate }}

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
and
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n {{ 'reordering.equipment-stock' | translate }}\r\n \r\n \r\n
\r\n
\r\n {{ 'reordering.parts-stock' | translate }}\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Reorder options\r\n
\r\n Min\r\n \r\n
\r\n
\r\n Max\r\n \r\n
\r\n
\r\n Demand\r\n \r\n
\r\n
\r\n Forecast\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n
\r\n
\r\n {{ data.value | currency : data.data.CurrencySymbol : 'symbol' : '1.2-2'}}\r\n
\r\n
\r\n\r\n
\r\n
\r\n {{ data.value | currency : data.data.CurrencySymbol : 'symbol' : '1.2-2'}}\r\n
\r\n
\r\n\r\n \r\n\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { Component, EventEmitter, OnDestroy, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { CurrencyPipe, Module, ModuleService, SettingData, SettingId, SettingsService } from \"servicesight-shared\";\r\nimport { Subscription, debounceTime } from \"rxjs\";\r\nimport { EquipmentReorderingService } from \"src/app/equipment/services/equipment-reordering.service\";\r\nimport { StockManufacturerService } from \"src/app/settings/services/stock-manufacturer.service\";\r\nimport { StockTypesService } from \"src/app/settings/services/stock-types.service\";\r\nimport { StockReorderingService } from \"../../../stock/services/stock-reordering.service\";\r\nimport { StockSupplierService } from \"../../../stock/services/stock-supplier.service\";\r\nimport { StockService } from \"../../../stock/services/stock.service\";\r\nimport { ReorderItemType } from \"../../enums/reorder-item-type.enum\";\r\nimport { ReorderingReason } from \"../../enums/reordering-reason.enum\";\r\nimport { ReorderItem } from \"../../models/reorder-item.model\";\r\nimport { ReorderOptions } from \"../../models/reorder-options.model\";\r\nimport { BulkOrderPopupComponent } from \"../bulk-order-popup/bulk-order-popup.component\";\r\n\r\n@Component({\r\n selector: \"app-reordering\",\r\n templateUrl: \"./reordering.component.html\",\r\n styleUrls: [\"./reordering.component.scss\"]\r\n})\r\nexport class ReorderingComponent implements OnInit, OnDestroy {\r\n @ViewChild(\"stockReorder\", { static: true }) form: NgForm;\r\n @ViewChild(\"grid\") private grid: DxDataGridComponent;\r\n @ViewChild(\"poPopup\") poPopup: BulkOrderPopupComponent;\r\n\r\n private loadDataEvent: EventEmitter = new EventEmitter();\r\n private loadDataSubscription: Subscription = null;\r\n\r\n public isLoading: boolean = false;\r\n public dataSource: DataSource;\r\n public filter: Array = [];\r\n public fields: Array = [];\r\n public storeDataStore: ODataStore;\r\n public supplierDataStore: ODataStore;\r\n public baseCurrencyCode: string;\r\n public reasons: Array = [];\r\n public StoresEnabled: boolean = false;\r\n public EndOfToday: Date = new Date();\r\n public Options: ReorderOptions = new ReorderOptions();\r\n public IncludeParts: boolean;\r\n public IncludeEquipment: boolean;\r\n public data: Array = [];\r\n public equipmentEnabled: boolean;\r\n public stockEnabled: boolean;\r\n public ReorderItemType = ReorderItemType;\r\n\r\n public get showTypeColumn(): boolean {\r\n return this.IncludeParts && this.IncludeEquipment;\r\n }\r\n\r\n constructor(\r\n private stockReorderingService: StockReorderingService,\r\n private equipmentReorderingService: EquipmentReorderingService,\r\n private stockService: StockService,\r\n private stockTypesService: StockTypesService,\r\n private stockSupplierService: StockSupplierService,\r\n private stockManufacturerService: StockManufacturerService,\r\n private translateService: TranslateService,\r\n private settingsService: SettingsService,\r\n private currencyPipe: CurrencyPipe,\r\n private moduleService: ModuleService,\r\n private router: Router\r\n ) {\r\n this.customizeTotal = this.customizeTotal.bind(this);\r\n this.calculateTotal = this.calculateTotal.bind(this);\r\n this.Options.FromDate.setFullYear(this.Options.FromDate.getFullYear() - 1);\r\n this.baseCurrencyCode = JSON.parse(localStorage.getItem(\"ls.BaseCurrencyCode\"));\r\n this.EndOfToday.setUTCHours(23, 59, 59, 999);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.ngOnDestroy();\r\n\r\n this.storeDataStore = this.stockService.GetStoresStore();\r\n this.supplierDataStore = this.stockSupplierService.GetStockSuppliersStore();\r\n this.CreateReasonsAndFields();\r\n\r\n this.moduleService.GetEnabledModules().subscribe(o => {\r\n this.equipmentEnabled = o.includes(Module.Equipment);\r\n this.stockEnabled = o.includes(Module.Stock);\r\n });\r\n\r\n this.settingsService.getSetting(SettingId.UseAdditionalStores).subscribe((setting: SettingData) => {\r\n this.StoresEnabled = setting.ValueBool;\r\n });\r\n\r\n this.IncludeEquipment = this.router.url.includes(\"equipment\");\r\n this.IncludeParts = this.router.url.includes(\"stock\");\r\n\r\n this.loadDataSubscription = this.loadDataEvent.pipe(debounceTime(2000)).subscribe(() => {\r\n this.InternalLoadData();\r\n });\r\n\r\n this.LoadData();\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n if (this.loadDataSubscription) {\r\n this.loadDataSubscription.unsubscribe();\r\n this.loadDataSubscription = null;\r\n }\r\n }\r\n\r\n public calculateTotal(options: any): void {\r\n if (options.summaryProcess === \"start\") {\r\n options.totalValue = 0;\r\n } else if (options.summaryProcess === \"calculate\") {\r\n options.totalValue += (options.value.Value / options.value.ExchangeRate);\r\n }\r\n }\r\n\r\n public allowRaisingPurchaseOrder(): boolean {\r\n return this.form.valid && this.dataSource != null && this.dataSource.totalCount() > 0;\r\n }\r\n\r\n public hasChanges(): boolean {\r\n return !this.form.pristine || (this.filter && this.filter.length > 0);\r\n }\r\n\r\n public OnDiscard(): void {\r\n //reset the grid\r\n this.grid.instance.state(null);\r\n this.filter = [];\r\n this.form.form.reset();\r\n this.Options.FromDate = new Date();\r\n this.Options.FromDate.setFullYear(this.Options.FromDate.getFullYear() - 1);\r\n this.Options.ToDate = new Date();\r\n }\r\n\r\n public customizeTotal(data): string {\r\n return this.currencyPipe.transform(data.value, this.baseCurrencyCode);\r\n }\r\n\r\n public DatesChanged(e: any): void {\r\n if (!e.event) {\r\n return;\r\n }\r\n this.LoadData();\r\n }\r\n\r\n public FilterChanged(): void {\r\n this.LoadData();\r\n }\r\n\r\n public LoadData(): void {\r\n this.loadDataEvent.emit();\r\n }\r\n\r\n public RaisePurchaseOrder(): void {\r\n //TODO this is wrong but we can figure it out when we get to raising PO (as it isnt an ODataStore anynmore)\r\n const gridDataSource = this.grid.instance.getDataSource().store() as ODataStore;\r\n const filterExpr = this.grid.instance.getCombinedFilter();\r\n\r\n gridDataSource.load({\r\n filter: filterExpr\r\n }).then((filteredData) => {\r\n const selectedParts = filteredData.map((p) => {\r\n const newPartListModel = new ReorderItem();\r\n newPartListModel.ItemId = p.ItemId;\r\n newPartListModel.Quantity = p.Quantity;\r\n newPartListModel.Description = p.Description;\r\n newPartListModel.StoreId = p.StoreId;\r\n newPartListModel.Type = p.Type;\r\n newPartListModel.Item = p.Item;\r\n return newPartListModel;\r\n });\r\n\r\n const SiteID = 1;\r\n this.poPopup.Open(selectedParts, null, null, SiteID);\r\n });\r\n }\r\n\r\n private InternalLoadData(): void {\r\n if (this.filter == null) {\r\n this.filter = [];\r\n }\r\n if (this.Options.FromDate >= this.Options.ToDate) {\r\n //If from date is beyond todate, then dont do anything\r\n return;\r\n }\r\n if (this.Options.ToDate >= this.EndOfToday) {\r\n //If to date is future dont do anything (shouldnt happen but just in case)\r\n return;\r\n }\r\n\r\n this.data = [];\r\n if (!this.IncludeParts && !this.IncludeEquipment) {\r\n this.CreateDataSource();\r\n }\r\n\r\n this.isLoading = true;\r\n\r\n if (this.IncludeParts) {\r\n const stockDataSource = this.stockReorderingService.GetDataSource(this.Options);\r\n stockDataSource.load().then((stockData) => {\r\n stockData.forEach((s) => {\r\n this.data.push({\r\n ItemId: s.StockHeaderId,\r\n StoreId: s.StoreId,\r\n Type: ReorderItemType.Stock,\r\n Item: s.PartNo,\r\n Description: s.Description,\r\n SupplierId: s.SupplierId,\r\n ManufacturerId: s.ManufacturerId,\r\n StockTypeId: s.StockTypeId,\r\n Quantity: s.Quantity,\r\n ReasonId: s.ReasonId,\r\n UnitCost: s.UnitCost,\r\n Value: s.Value,\r\n CurrencySymbol: s.CurrencySymbol,\r\n ExchangeRate: s.ExchangeRate\r\n });\r\n });\r\n this.CreateDataSource();\r\n });\r\n }\r\n\r\n if (this.IncludeEquipment) {\r\n const equipmentDataSource = this.equipmentReorderingService.GetDataSource(this.Options);\r\n equipmentDataSource.load().then((equipmentData) => {\r\n equipmentData.forEach((e) => {\r\n this.data.push({\r\n ItemId: e.MakeModelId,\r\n StoreId: e.StoreId,\r\n Type: ReorderItemType.Equipment,\r\n Item: e.MakeModel,\r\n Description: e.Description,\r\n SupplierId: e.SupplierId,\r\n Quantity: e.Quantity,\r\n ReasonId: e.ReasonId,\r\n UnitCost: e.UnitCost,\r\n Value: e.Value,\r\n CurrencySymbol: e.CurrencySymbol,\r\n ExchangeRate: e.ExchangeRate,\r\n ManufacturerId: null,\r\n StockTypeId: null\r\n });\r\n });\r\n this.CreateDataSource();\r\n });\r\n }\r\n }\r\n\r\n private CreateFilterFields(): void {\r\n\r\n this.fields = [{\r\n caption: this.translateService.instant(\"reordering.filter.store\"),\r\n dataField: \"StoreId\",\r\n dataType: \"number\",\r\n lookup: {\r\n dataSource: this.storeDataStore,\r\n displayExpr: \"StoreName\",\r\n valueExpr: \"StoreId\"\r\n }\r\n }, {\r\n caption: this.translateService.instant(\"reordering.filter.supplier\"),\r\n dataField: \"SupplierId\",\r\n dataType: \"number\",\r\n lookup: {\r\n dataSource: this.supplierDataStore,\r\n displayExpr: \"Name\",\r\n valueExpr: \"SupplierId\"\r\n }\r\n }, {\r\n caption: this.translateService.instant(\"reordering.filter.stock-type\"),\r\n dataField: \"StockTypeId\",\r\n dataType: \"number\",\r\n lookup: {\r\n dataSource: this.stockTypesService.GetDataStore(),\r\n displayExpr: \"StockTypeName\",\r\n valueExpr: \"StockTypeId\"\r\n }\r\n }, {\r\n caption: this.translateService.instant(\"reordering.filter.manufacturer\"),\r\n dataField: \"ManufacturerId\",\r\n dataType: \"number\",\r\n lookup: {\r\n dataSource: this.stockManufacturerService.StockManufacturerStore(),\r\n displayExpr: \"Name\",\r\n valueExpr: \"ManufacturerId\"\r\n }\r\n }];\r\n }\r\n\r\n private CreateReasonsAndFields(): void {\r\n //we need to call get once to ensure the translations are loaded before the instant methods occur\r\n this.translateService.get(\"reordering.reason-demand\").subscribe((demandValue: string) => {\r\n this.reasons = [{\r\n Name: demandValue,\r\n Value: ReorderingReason.Demand\r\n }, {\r\n Name: this.translateService.instant(\"reordering.reason-forecast\"),\r\n Value: ReorderingReason.Forecast\r\n }, {\r\n Name: this.translateService.instant(\"reordering.reason-minimum-stock-level\"),\r\n Value: ReorderingReason.MinimumStockLevel\r\n }, {\r\n Name: this.translateService.instant(\"reordering.reason-maximum-stock-level\"),\r\n Value: ReorderingReason.MaximumStockLevel\r\n }, {\r\n Name: this.translateService.instant(\"reordering.reason-minimum-order-quantity\"),\r\n Value: ReorderingReason.MinimumOrderQuantity\r\n }];\r\n\r\n this.CreateFilterFields();\r\n });\r\n }\r\n\r\n private CreateDataSource(): void {\r\n this.isLoading = false;\r\n this.dataSource = new DataSource({\r\n key: [ \"ItemId\", \"StoreId\", \"Type\" ],\r\n store: this.data\r\n });\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG, IODataService, PageableDatastoreService } from \"servicesight-shared\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class DeviceService extends PageableDatastoreService {\r\n private static readonly odataKey = \"DeviceSerial\";\r\n\r\n private readonly deviceLatestODataUrl = `${this.config.apiLocations.ServiceSightOData}LatestDeviceDataOD`;\r\n private readonly deviceODataUrl = `${this.config.apiLocations.ServiceSightOData}DeviceDataOD`;\r\n\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(\"ODataService\") protected odataService: IODataService,\r\n @Inject(APP_CONFIG) private config: IAppConfig\r\n ) {\r\n super(DeviceService.odataKey);\r\n }\r\n\r\n public HasAnyDevice(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}/Device/HasDevices`);\r\n }\r\n\r\n protected GetDataSourceObject(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url : this.deviceLatestODataUrl,\r\n key: DeviceService.odataKey,\r\n keyType: \"String\",\r\n paging: true,\r\n pageSize: 50\r\n });\r\n }\r\n\r\n public GetDeviceDataSource(deviceSerial: string): DataSource {\r\n return this.odataService.GetDataSource({\r\n url : this.deviceODataUrl,\r\n key: \"EntryId\",\r\n keyType: \"String\",\r\n paging: true,\r\n pageSize: 50,\r\n queryStringParams: {\r\n deviceSerial\r\n }\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

{{ 'device.title' | translate }} {{ deviceSerial }}

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n","\r\nimport { Component, OnInit } from \"@angular/core\";\r\nimport { ActivatedRoute } from \"@angular/router\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { DeviceService } from \"../services/device.service\";\r\n\r\n@Component({\r\n selector: \"app-device\",\r\n templateUrl: \"./device.component.html\",\r\n styleUrls: [\"./device.component.scss\"]\r\n})\r\nexport class DeviceComponent implements OnInit {\r\n\r\n public dataSource: DataSource;\r\n public deviceSerial: string;\r\n\r\n public temperatureData: { Temperature: number; EntryDateTime: Date }[] = [];\r\n public humidityData: { Humidity: number; EntryDateTime: Date }[] = [];\r\n\r\n constructor(\r\n private deviceService: DeviceService,\r\n private route: ActivatedRoute\r\n ) { }\r\n\r\n public ngOnInit(): void {\r\n this.route.params.subscribe(params => {\r\n this.deviceSerial = params.id;\r\n this.dataSource = this.deviceService.GetDeviceDataSource(params.id);\r\n this.dataSource.sort({ selector: \"EntryDateTime\", desc: true });\r\n\r\n this.dataSource.load().then((data: any[]) => {\r\n this.temperatureData = data.map(x => {\r\n return {\r\n Temperature: x.Temperature,\r\n EntryDateTime: new Date(x.EntryDateTime)\r\n };\r\n });\r\n\r\n this.humidityData = data.map(x => {\r\n return {\r\n Humidity: x.Humidity,\r\n EntryDateTime: new Date(x.EntryDateTime)\r\n };\r\n });\r\n });\r\n });\r\n }\r\n\r\n}\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { Module, ModuleService } from \"servicesight-shared\";\r\nimport { DeviceService } from \"../services/device.service\";\r\n\r\n@Component({\r\n selector: \"app-devices-list\",\r\n templateUrl: \"./devices-list.component.html\",\r\n styleUrls: [\r\n \"./devices-list.component.scss\",\r\n \"../../../../projects/servicesight-shared/src/lib/styles/global.scss\",\r\n \"../../../../projects/servicesight-shared/src/lib/styles/backgrounds.scss\",\r\n \"../../../../projects/servicesight-shared/src/lib/styles/servicesight-shared.scss\",\r\n ]\r\n})\r\nexport class DevicesListComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n\r\n public dataSource: DataSource;\r\n public IsProEnabled: boolean = false;\r\n\r\n public exportOptions: { id: number; label: string }[] = [\r\n { id: 1, label: \"Export data as xlsx\" },\r\n { id: 2, label: \"Export data as csv\" }\r\n ];\r\n\r\n constructor(\r\n private moduleService: ModuleService,\r\n private deviceService: DeviceService,\r\n private router: Router\r\n ) { }\r\n\r\n public ngOnInit(): void {\r\n this.dataSource = this.deviceService.GetDataSource(true);\r\n\r\n this.moduleService.GetEnabledModules().subscribe(modules => {\r\n this.IsProEnabled = modules.includes(Module.Pro);\r\n });\r\n }\r\n\r\n public openColumnChooser(): void {\r\n this.dataGrid.instance.showColumnChooser();\r\n }\r\n\r\n public viewDetails(event): void {\r\n this.router.navigate([\"equipment\", \"devices\", event.data.DeviceSerial]);\r\n }\r\n\r\n public orderDevice(): void {\r\n alert(\"Coming soon\");\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'devices.title' | translate }}

\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n ","export class CustomerLocationModel {\r\n public CustomerId: number;\r\n public Location: string;\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable, of } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG, ProteanResponse } from \"servicesight-shared\";\r\nimport { ODataService } from \"../../shared/services/odata/odata.service\";\r\nimport { CustomerEquipmentSystemModel } from \"servicesight-shared\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class CustomerEquipmentSystemsService {\r\n public lastOpenedModal: number = null;\r\n\r\n constructor(\r\n @Inject(\"ODataService\") private odataService: ODataService,\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private config: IAppConfig) { }\r\n\r\n public GetCustomerEquipmentSystems(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.EquipmentOData}CustomerEquipmentSystemOData`,\r\n key: \"EquipmentSystemId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public DataStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.config.apiLocations.EquipmentOData}CustomerEquipmentSystemOData`,\r\n key: \"EquipmentSystemId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public CustomerEquipmentSystemCounts(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.config.apiLocations.EquipmentOData}CustomerEquipmentSystemCountOData`,\r\n key: \"EquipmentSystemId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public SaveCustomerEquipmentSystem(model: CustomerEquipmentSystemModel): Observable {\r\n return this.http.post(`${this.config.apiLocations.Equipment}CustomerEquipmentSystem`, model);\r\n }\r\n\r\n public DeleteCustomerEquipmentSystem(ids: Array): Observable {\r\n return this.http.request(\"delete\", `${this.config.apiLocations.Equipment}CustomerEquipmentSystem`, { body: ids });\r\n }\r\n\r\n public GetEquipmentSystem(id: number): Observable {\r\n if (!id) {\r\n return of(null);\r\n }\r\n\r\n return this.http.get(`${this.config.apiLocations.Equipment}CustomerEquipmentSystem/${id}`);\r\n }\r\n\r\n public SaveDataInEquipmentSystem(equipmentSystemId: number, equipIds: number[]): Observable {\r\n return this.http.put(`${this.config.apiLocations.Equipment}CustomerEquipmentSystem/SaveEquipmentsInSystem?equipmentSystemId=${equipmentSystemId}`, equipIds);\r\n }\r\n}\r\n","export enum CylinderStatus {\r\n Active = 1,\r\n Returned = 2\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG, PageableDatastoreService } from \"servicesight-shared\";\r\nimport { CylinderCopy } from \"src/app/f-gas/models/cylinder-copy.model\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\nimport { Cylinder } from \"../models/cylinder.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class CylinderService extends PageableDatastoreService {\r\n\r\n private static readonly odataKey: string = \"CylinderId\";\r\n\r\n constructor(\r\n private odataService: ODataService,\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private config: IAppConfig,\r\n ) {\r\n super(CylinderService.odataKey);\r\n }\r\n\r\n protected GetDataSourceObject(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.FGasOData}CylindersOData`,\r\n key: CylinderService.odataKey,\r\n keyType: \"Int32\",\r\n paging: true,\r\n pageSize: 50\r\n });\r\n }\r\n\r\n public GetCylinders(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.config.apiLocations.FGasOData}CylindersOData`,\r\n key: \"CylinderId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetCylinderHistory(cylinderId: number): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.ServiceSightOData}CylinderHistoryOD`,\r\n key: \"ElementId\",\r\n keyType: \"String\",\r\n paging: true,\r\n pageSize: 50,\r\n queryStringParams: {\r\n cylinderId\r\n }\r\n });\r\n }\r\n\r\n public Get(id: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.FGas}Cylinder/${id}`);\r\n }\r\n\r\n public Save(model: Cylinder): Observable {\r\n return (model.CylinderId && model.CylinderId > 0) ? this.Update(model) : this.Create(model);\r\n }\r\n\r\n public Delete(id: number): Observable {\r\n return this.http.delete(`${this.config.apiLocations.FGas}Cylinder/${id}`);\r\n }\r\n\r\n public TransferToDepot(model: Cylinder): Observable {\r\n return this.http.post(`${this.config.apiLocations.FGas}Cylinder/TransferToDepot`, model);\r\n }\r\n\r\n private Create(model: Cylinder): Observable {\r\n return this.http.post(`${this.config.apiLocations.FGas}Cylinder`, model);\r\n }\r\n\r\n private Update(model: Cylinder): Observable {\r\n return this.http.put(`${this.config.apiLocations.FGas}Cylinder`, model);\r\n }\r\n\r\n public CloneCylinder(model: CylinderCopy): Observable {\r\n return this.http.post(`${this.config.apiLocations.FGas}Cylinder/Clone`, model);\r\n }\r\n\r\n public GetNew(): Observable {\r\n return this.http.get(`${this.config.apiLocations.FGas}Cylinder`);\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG, IProteanResponse } from \"servicesight-shared\";\r\nimport { JobMaterialListModel } from \"../models/job-material-list\";\r\nimport { JobMaterialMetadata } from \"../models/job-material-metadata\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class JobMaterialDataService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private config: IAppConfig) { }\r\n\r\n // Get Material MetaData\r\n public GetMaterialMetadata(jobId: number): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}JobMaterial/GetMetadata?jobId=${jobId}`;\r\n return this.http.get(url);\r\n }\r\n\r\n // Get Material Item\r\n public GetMaterialItem(jobId: number, miscItemId: number): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}JobMaterial/Get?jobId=${jobId}&miscItemId=${miscItemId}`;\r\n return this.http.get(url);\r\n }\r\n\r\n // Get Price for Misc Type\r\n public GetPrice(jobId: number, miscTypeId: number, cost: number): Observable {\r\n cost = cost || 0;\r\n const url = `${this.config.apiLocations.ServiceSight}JobMaterial/getPrice?jobId=${jobId}&miscTypeId=${miscTypeId}&cost=${cost}`;\r\n return this.http.get(url);\r\n }\r\n\r\n // Update Material Item\r\n public UpdateMaterialItem(model: JobMaterialListModel): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}JobMaterial/Update`;\r\n return this.http.post(url, model);\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG, ProteanResponse, RefrigerantTransaction } from \"servicesight-shared\";\r\nimport { JobCylinderLogModel } from \"../../shared/models/job-cylinder-log.model\";\r\nimport { JobRefrigerantModel } from \"../models/job-refrigerant.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class JobRefrigerantService {\r\n\r\n constructor(private http: HttpClient, @Inject(APP_CONFIG) protected config: IAppConfig) { }\r\n\r\n public CreateLogEntry(model: JobCylinderLogModel): Observable {\r\n const url = `${this.config.apiLocations.FGas}RefrigerantTransaction`;\r\n return this.http.post(url, model);\r\n }\r\n\r\n public AddJobRefrigerant(model: JobCylinderLogModel): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Refrigerant/Create`;\r\n return this.http.post(url, model);\r\n }\r\n\r\n public GetJobRefrigerants(jobId: number): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Refrigerant/Get?jobId=${jobId}`;\r\n return this.http.get(url);\r\n }\r\n\r\n public UpdatePrice(model: JobRefrigerantModel): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Refrigerant/UpdatePrice`;\r\n return this.http.post(url, model);\r\n }\r\n\r\n public DeletePendingJobRefrigerant(jobRefrigerantLineId: number): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Refrigerant/DeletePending?jobRefrigerantLineId=${jobRefrigerantLineId}`;\r\n return this.http.delete(url);\r\n }\r\n\r\n public GetLogEntriesForJob(jobId: number): Observable {\r\n const url = `${this.config.apiLocations.FGas}RefrigerantTransaction/${jobId}`;\r\n return this.http.get(url);\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable, Subject } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG, IProteanResponse, JobVisitEngineer } from \"servicesight-shared\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\nimport { JobVisitModel } from \"../models/job-visit\";\r\nimport { JobVisitFurtherWorkModel } from \"../models/job-visit-further-work\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class JobVisitDataService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private odataService: ODataService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) { }\r\n\r\n public jobVisitHide = new Subject();\r\n\r\n public JobVisitHide() {\r\n this.jobVisitHide.next(true);\r\n }\r\n\r\n // Get Job Visit\r\n public getJobVisit(jobId, sessionId): Observable {\r\n const url = `${this.appConfig.apiLocations.ServiceSight}JobVisit/Get?jobId=${jobId}&sessionId=${sessionId}`;\r\n return this.http.get(url);\r\n }\r\n\r\n // Update Job Visit\r\n public updateJobVisit(visit: JobVisitModel): Observable {\r\n const url = `${this.appConfig.apiLocations.ServiceSight}JobVisit/Update`;\r\n return this.http.post(url, visit);\r\n }\r\n\r\n // Delete Job Visit\r\n public deleteJobVisits(jobId: number, visitIds: number[]): Observable {\r\n const url = `${this.appConfig.apiLocations.ServiceSight}JobVisit/DeleteVisits?jobId=${jobId}`;\r\n return this.http.post(url, visitIds);\r\n }\r\n\r\n // Complete Job Visit\r\n public completeVisit(visit: JobVisitModel): Observable {\r\n const url = `${this.appConfig.apiLocations.ServiceSight}JobVisit/Complete`;\r\n return this.http.post(url, visit);\r\n }\r\n\r\n // Complete Job Visit\r\n public uncompleteVisit(visit: JobVisitModel): Observable {\r\n const url = `${this.appConfig.apiLocations.ServiceSight}JobVisit/Uncomplete`;\r\n return this.http.post(url, visit);\r\n }\r\n\r\n // Notify Engineer\r\n public notifyVisitEngineer(visit: JobVisitModel): Observable {\r\n const url = `${this.appConfig.apiLocations.ServiceSight}JobVisit/Notify`;\r\n return this.http.post(url, visit);\r\n }\r\n\r\n // ReSync Job Visit\r\n public reSyncVisitEngineer(visit: JobVisitModel): Observable {\r\n const url = `${this.appConfig.apiLocations.ServiceSight}JobVisit/ReSync`;\r\n return this.http.post(url, visit);\r\n }\r\n\r\n // Get All Engineers. Probably obsolete\r\n public getAllEngineers(): Observable {\r\n const url = `${this.appConfig.apiLocations.ServiceSight}JobVisit/GetAllEngineers`;\r\n return this.http.get(url);\r\n }\r\n\r\n // Add Further Work To Job\r\n public addFurtherWorkToJob(furtherWorks: JobVisitFurtherWorkModel[]): Observable {\r\n const url = `${this.appConfig.apiLocations.ServiceSight}JobVisit/AddFurtherWorkToJob`;\r\n return this.http.post(url, furtherWorks);\r\n }\r\n\r\n // Add Further Work to New Quote\r\n public addFurtherWorkToNewQuote(furtherWorks: JobVisitFurtherWorkModel[]): Observable {\r\n const url = `${this.appConfig.apiLocations.ServiceSight}JobVisit/AddFurtherWorkToNewQuote`;\r\n return this.http.post(url, furtherWorks);\r\n }\r\n\r\n // Further Work No Action Required\r\n public furtherWorkNoActionRequired(furtherWorks: JobVisitFurtherWorkModel[]): Observable {\r\n const url = `${this.appConfig.apiLocations.ServiceSight}JobVisit/FurtherWorkNoActionRequired`;\r\n return this.http.post(url, furtherWorks);\r\n }\r\n\r\n public GetEquipmentDataStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url : this.appConfig.apiLocations.EquipmentOData + \"EquipmentOData\",\r\n key: \"EquipId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n}\r\n","export enum JobVisitStatus {\r\n Entry = 100,\r\n Unalloc = 200,\r\n NotificationRequired = 210,\r\n NotificationSent = 220,\r\n WaitingAcceptance = 230,\r\n Allocated = 250,\r\n EnRoute = 300,\r\n OnSite = 400,\r\n Visited = 500,\r\n NeedsChecking = 600,\r\n Complete = 800\r\n}\r\n","import { TransactionItem } from \"servicesight-shared\";\r\n\r\nexport class JobCylinderLogModel {\r\n LogEntryTypeId: number;\r\n CylinderId: number;\r\n CylinderIdLeak?: number;\r\n DestinationId: number;\r\n DestinationTypeId: TransactionItem;\r\n EquipIdLeak?: number;\r\n Weight: number;\r\n SessionId: number;\r\n JobId: number;\r\n Notes: string;\r\n RefrigerantTypeId: number;\r\n EngineerId: number;\r\n LogDate: Date;\r\n ReturnedWeight?: number;\r\n Status?: number;\r\n AutoLeakDetectionSystem?: boolean;\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { map } from \"rxjs/operators\";\r\nimport { IAppConfig, APP_CONFIG, ModuleService } from \"servicesight-shared\";\r\nimport { ModuleAccessModel } from \"../../models/module-access.model\";\r\nimport { RequestContactMeModel } from \"../../models/request-contact-me.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class LicenseService {\r\n\r\n constructor(\r\n private moduleService: ModuleService,\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private config: IAppConfig) { }\r\n\r\n public GetCompanyHasAccessToModule(moduleId: number): Observable {\r\n return this.moduleService.GetEnabledModules().pipe(map(val => val.includes(moduleId)));\r\n }\r\n\r\n public GetCompanyHasAccessToModules(): Observable {\r\n return this.moduleService.GetEnabledModulesAccess();\r\n }\r\n\r\n public GetCompanyCountryId(): Promise {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Company/GetCompanyCountryId`).toPromise();\r\n }\r\n\r\n public RequestContactMe(moduleId: number, userName: string, companyId: string): Promise {\r\n const data: RequestContactMeModel = {\r\n ModuleId: moduleId,\r\n UserName: userName,\r\n CompanyId: companyId\r\n };\r\n\r\n return this.http.post(`${this.config.apiLocations.ServiceSight}Company/RequestContactMe`, data).toPromise();\r\n }\r\n}\r\n","\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n","import { formatDate } from \"@angular/common\";\r\nimport {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { DomSanitizer, SafeUrl } from \"@angular/platform-browser\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { CylinderIdentificationStyle, Orientation } from \"servicesight-components\";\r\nimport {\r\n DocumentTypeEnum,\r\n EquipmentDataService,\r\n FormMesssageService,\r\n JobVisitEngineer,\r\n PhraseBookType,\r\n RefrigerantTypeModel,\r\n SettingData,\r\n SettingId,\r\n SettingsService,\r\n TransactionItem\r\n} from \"servicesight-shared\";\r\nimport { CustomerEquipmentSystemsService } from \"src/app/customers/services/customer-equipment-systems.service\";\r\nimport { CylinderStatus } from \"src/app/f-gas/enums/cylinder-status.enum\";\r\nimport { CylinderService } from \"src/app/f-gas/services/cylinder.service\";\r\nimport { JobVisitListModel } from \"src/app/jobs/models/job-visit-list\";\r\nimport { JobMaterialDataService } from \"src/app/jobs/services/job-material-data.service\";\r\nimport { JobRefrigerantService } from \"src/app/jobs/services/job-refrigerant.service\";\r\nimport { JobVisitDataService } from \"src/app/jobs/services/job-visit-data.service\";\r\nimport { JobVisitStatus } from \"src/app/shared/enums/JobVisitStatus\";\r\nimport { JobCylinderLogModel } from \"src/app/shared/models/job-cylinder-log.model\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { PrimaryImageService } from \"src/app/stock/services/primary-image.service\";\r\n\r\n@Component({\r\n selector: \"app-job-cylinder-log-dialog\",\r\n templateUrl: \"./job-cylinder-log-dialog.component.html\",\r\n styleUrls: [\"./job-cylinder-log-dialog.component.scss\"]\r\n})\r\nexport class JobCylinderLogDialogComponent implements OnInit, OnChanges {\r\n @Input() jobId: number;\r\n @Input() siteId: number;\r\n @Input() equipId: number;\r\n @Input() systemId: number;\r\n\r\n @Output() added: EventEmitter = new EventEmitter();\r\n\r\n @ViewChild(\"logentryform\", { static: true }) form: NgForm;\r\n\r\n private overrideEquipmentWithSystemId: number = null;\r\n private activeCylindersFilter: any[];\r\n\r\n public visible = false;\r\n public unit: string;\r\n public formName = \"logentryform\";\r\n public visits: JobVisitListModel[];\r\n public engineers: JobVisitEngineer[] = [];\r\n public equipmentDataSource: DataSource;\r\n public cylinderDataSource: DataSource;\r\n public customerEquipmentSystemsDataSource: DataSource;\r\n public orientation = Orientation.Landscape;\r\n public primaryImage: SafeUrl;\r\n public equipmentId: number;\r\n public refrigerantType = new RefrigerantTypeModel();\r\n public refrigerantTypeLeak = new RefrigerantTypeModel();\r\n public phraseType = PhraseBookType;\r\n public model = new JobCylinderLogModel();\r\n\r\n public get fromEquipment(): boolean {\r\n return !!this.equipId;\r\n }\r\n\r\n public get fromSystem(): boolean {\r\n return !!this.systemId;\r\n }\r\n\r\n constructor(\r\n private jobMaterialService: JobMaterialDataService,\r\n private equipmentService: EquipmentDataService,\r\n private customerEquipmentSystemsService: CustomerEquipmentSystemsService,\r\n private cylinderService: CylinderService,\r\n private settingsService: SettingsService,\r\n private primaryImageService: PrimaryImageService,\r\n private sanitizer: DomSanitizer,\r\n private jobRefrigerantService: JobRefrigerantService,\r\n private formMessageService: FormMesssageService,\r\n private licenseService: LicenseService,\r\n private jobVisitService: JobVisitDataService) {\r\n this.refrigerantType.CylinderStyle = CylinderIdentificationStyle.Half;\r\n this.refrigerantTypeLeak.CylinderStyle = CylinderIdentificationStyle.Half;\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.jobId && changes.jobId.currentValue) {\r\n this.model.DestinationTypeId = TransactionItem.Equipment; // for now only equipment from a job\r\n this.PopulateJobVisits();\r\n }\r\n\r\n if (changes.equipId && changes.equipId.currentValue) {\r\n this.model.DestinationId = changes.equipId.currentValue;\r\n this.model.DestinationTypeId = TransactionItem.Equipment;\r\n this.equipmentDataSource = this.equipmentService.GetEquipmentRefrigerantDataSource();\r\n this.SystemSetupAndLeakTest(changes.equipId.currentValue, this.systemId);\r\n }\r\n\r\n if (changes.systemId && changes.systemId.currentValue) {\r\n this.model.DestinationId = changes.systemId.currentValue;\r\n this.model.DestinationTypeId = TransactionItem.System;\r\n this.SystemSetupAndLeakTest(this.equipId, changes.systemId.currentValue);\r\n }\r\n\r\n if (changes.siteId && changes.siteId.currentValue) {\r\n if (this.fromSystem) {\r\n this.customerEquipmentSystemsDataSource = this.customerEquipmentSystemsService.GetCustomerEquipmentSystems();\r\n this.customerEquipmentSystemsDataSource.filter([\"CustomerId\", \"=\", this.siteId]);\r\n }\r\n }\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe((res) => {\r\n const statusId = CylinderStatus.Active;\r\n if (res.FGasEnabled) {\r\n this.cylinderDataSource = this.cylinderService.GetDataSource();\r\n this.activeCylindersFilter = [\"CylinderStatus\", \"=\", CylinderStatus[statusId]];\r\n this.cylinderDataSource.filter(this.activeCylindersFilter);\r\n this.cylinderDataSource.load();\r\n }\r\n if (res.EquipmentEnabled) {\r\n this.equipmentDataSource = this.equipmentService.GetEquipmentRefrigerantDataSource();\r\n if (this.fromEquipment || this.fromSystem) {\r\n this.equipmentDataSource.load();\r\n }\r\n }\r\n });\r\n this.settingsService.getSetting(SettingId.FGasRefrigerantUnits).subscribe((settingData: SettingData) => {\r\n this.unit = settingData.ValueListSelectedId === 1 ? \"(kg)\" : \"(lb)\";\r\n });\r\n this.LoadPrimaryImage();\r\n }\r\n\r\n public Discard(): void {\r\n this.ClearForm();\r\n this.ClearCylindersFilters();\r\n }\r\n\r\n public Save(): void {\r\n if (this.overrideEquipmentWithSystemId) {\r\n this.model.DestinationId = this.overrideEquipmentWithSystemId;\r\n this.model.DestinationTypeId = TransactionItem.System;\r\n }\r\n\r\n if (this.model.LogEntryTypeId === 3) {\r\n this.model.CylinderId = 0;\r\n this.model.Weight = 0;\r\n }\r\n\r\n if (this.jobId) {\r\n const selectedVisit = this.visits.find((i) => i.SessionID === this.model.SessionId);\r\n this.model.EngineerId = selectedVisit.EmployeeID;\r\n this.model.LogDate = selectedVisit.VisitDate;\r\n this.model.JobId = this.jobId;\r\n this.formMessageService.RegisterObservable(\r\n this.jobRefrigerantService.AddJobRefrigerant(this.model), this.formName)\r\n .subscribe(() => {\r\n this.ClearForm();\r\n this.added.emit();\r\n });\r\n } else {\r\n this.formMessageService.RegisterObservable(\r\n this.jobRefrigerantService.CreateLogEntry(this.model), this.formName)\r\n .subscribe(() => {\r\n this.ClearForm();\r\n this.added.emit();\r\n });\r\n }\r\n }\r\n\r\n public Show(): void {\r\n if (this.fromEquipment) {\r\n this.model.DestinationId = this.equipId;\r\n this.model.DestinationTypeId = TransactionItem.Equipment;\r\n this.equipmentId = this.equipId;\r\n }\r\n\r\n if (this.fromSystem) {\r\n this.model.DestinationId = this.systemId;\r\n this.model.DestinationTypeId = TransactionItem.System;\r\n }\r\n\r\n if (this.fromEquipment || this.fromSystem) {\r\n this.jobVisitService.getAllEngineers().subscribe((res) => {\r\n this.engineers = res.filter((eng) => eng.IsActive);\r\n });\r\n this.LoadPrimaryImage();\r\n this.visible = true;\r\n } else {\r\n this.PopulateJobVisits();\r\n this.FilterEquipmentByJobAndShow(this.jobId);\r\n }\r\n }\r\n\r\n public GetCylinderImage(cylinderId: number): void {\r\n this.SetRefrigerant(cylinderId, this.refrigerantType);\r\n }\r\n\r\n public GetLeakCylinderImage(cylinderId: number): void {\r\n this.SetRefrigerant(cylinderId, this.refrigerantTypeLeak);\r\n }\r\n\r\n public OnSelectEquipment(equipId: number): void {\r\n this.equipmentId = equipId;\r\n if (this.equipmentId) {\r\n this.primaryImageService.GetPrimaryImage(this.equipmentId, DocumentTypeEnum.Equipment);\r\n this.SystemSetupAndLeakTest(equipId, this.systemId);\r\n }\r\n }\r\n\r\n public ChangeEntryType(): void {\r\n this.SystemSetupAndLeakTest(this.equipmentId, this.systemId);\r\n this.FilterCylinders();\r\n if (this.model.LogEntryTypeId === 1) {\r\n this.ResetSelectedCylinderIfMixedType();\r\n }\r\n this.cylinderDataSource.load();\r\n }\r\n\r\n public LoadPrimaryImage(): void {\r\n this.primaryImageService.primaryImage.subscribe(image => {\r\n if (image) {\r\n this.primaryImage = this.sanitizer.bypassSecurityTrustUrl(image.toString());\r\n } else {\r\n this.primaryImage = null;\r\n }\r\n });\r\n if (this.equipmentId) {\r\n this.primaryImageService.GetPrimaryImage(this.equipmentId, DocumentTypeEnum.Equipment);\r\n }\r\n }\r\n\r\n public GetEquipmentDisplayValue(row: any): string {\r\n return row ? `${row.EquipNumber} / ${row.Make} ${row.Model} ${row.SerialNo ? \"/ \" + row.SerialNo : \"\"} / ${row.Refrigerant}` : \"\";\r\n }\r\n\r\n public GetCylinderDisplayValue(row: any): string {\r\n return row ? `${row.CylinderNo}${row.SerialNumber ? \" / \" + row.SerialNumber : \"\"} / ${row.Refrigerant} / ${row.CylinderType} / ${row.CylinderStatus}` : \"\";\r\n }\r\n\r\n public GetVisitDisplayValue(visit: JobVisitListModel): string {\r\n return visit ? `Visit ${visit.SessionID} / ${formatDate(visit.VisitDate, \"shortDate\", navigator.language)} / ${visit.Employee ? visit.Employee : \"\"}` : \"\";\r\n }\r\n\r\n public UpdateNotes(notes: string): void {\r\n this.model.Notes = notes;\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n private ResetSelectedCylinderIfMixedType(): void {\r\n const selectedCylinder = this.cylinderDataSource.items().find(x => x.CylinderId === this.model.CylinderId);\r\n if (selectedCylinder && selectedCylinder.AllowMixedRefrigerants) {\r\n this.form.controls[\"job.log-entry.cylinder\"].reset();\r\n this.SetDefaultRefrigerant();\r\n }\r\n }\r\n\r\n private FilterCylinders(): void {\r\n const filter: any[] = [];\r\n const subFilter: any[] = [];\r\n const addLogEntryTypeId: number = 1;\r\n const removalLogEntryTypeId: number = 2;\r\n\r\n if (this.model.LogEntryTypeId === addLogEntryTypeId) {\r\n subFilter.push([\"AllowMixedRefrigerants\", \"=\", false]);\r\n if (this.model.RefrigerantTypeId) {\r\n subFilter.push(\"AND\");\r\n subFilter.push([\"RefrigerantTypeId\", \"=\", this.model.RefrigerantTypeId]);\r\n }\r\n } else if (this.model.LogEntryTypeId === removalLogEntryTypeId) {\r\n subFilter.push([\"AllowMixedRefrigerants\", \"=\", true]);\r\n if (this.model.RefrigerantTypeId) {\r\n subFilter.push(\"OR\");\r\n subFilter.push([\"RefrigerantTypeId\", \"=\", this.model.RefrigerantTypeId]);\r\n }\r\n }\r\n\r\n filter.push(this.activeCylindersFilter);\r\n if (subFilter.length > 0) {\r\n filter.push(\"AND\");\r\n filter.push(subFilter);\r\n }\r\n\r\n this.cylinderDataSource.filter(filter);\r\n }\r\n\r\n private ClearForm(): void {\r\n this.visible = false;\r\n this.model = new JobCylinderLogModel();\r\n this.equipmentId = null;\r\n this.primaryImage = null;\r\n this.SetDefaultRefrigerant();\r\n this.form.form.reset();\r\n }\r\n\r\n private ClearCylindersFilters(): void {\r\n this.cylinderDataSource.filter(this.activeCylindersFilter);\r\n this.cylinderDataSource.load();\r\n }\r\n\r\n private SetDefaultRefrigerant() {\r\n this.refrigerantType = new RefrigerantTypeModel();\r\n this.refrigerantType.CylinderStyle = CylinderIdentificationStyle.Half;\r\n this.refrigerantTypeLeak = new RefrigerantTypeModel();\r\n this.refrigerantTypeLeak.CylinderStyle = CylinderIdentificationStyle.Half;\r\n }\r\n\r\n private SetRefrigerant(cylinderId: number, refrigerant: RefrigerantTypeModel): void {\r\n this.cylinderDataSource.store().byKey(cylinderId).then((v) => {\r\n refrigerant.CylinderStyle = v.CylinderStyle;\r\n refrigerant.Colour1 = v.Colour1;\r\n refrigerant.Colour2 = v.Colour2;\r\n refrigerant.Colour3 = v.Colour3;\r\n });\r\n }\r\n\r\n private SystemSetupAndLeakTest(equipId: number, systemId: number): void {\r\n if (systemId) {\r\n this.customerEquipmentSystemsService.GetEquipmentSystem(systemId).subscribe(system => {\r\n this.model.AutoLeakDetectionSystem = system.AutoLeakDetectionSystem;\r\n this.model.RefrigerantTypeId = system.RefrigerantTypeId;\r\n this.FilterCylinders();\r\n this.cylinderDataSource.load();\r\n });\r\n } else if (equipId) {\r\n this.equipmentDataSource.store().byKey(equipId)\r\n .then(i => {\r\n if (i.EquipmentSystemId) {\r\n this.overrideEquipmentWithSystemId = i.EquipmentSystemId;\r\n this.model.DestinationTypeId = TransactionItem.System;\r\n this.customerEquipmentSystemsService.GetEquipmentSystem(i.EquipmentSystemId).subscribe(system => {\r\n this.model.AutoLeakDetectionSystem = system.AutoLeakDetectionSystem;\r\n this.model.RefrigerantTypeId = system.RefrigerantTypeId;\r\n });\r\n } else {\r\n this.overrideEquipmentWithSystemId = null;\r\n this.model.DestinationTypeId = TransactionItem.Equipment;\r\n this.model.AutoLeakDetectionSystem = i.AutoLeakDetectionSystem;\r\n this.model.RefrigerantTypeId = i.RefrigerantTypeId;\r\n }\r\n this.FilterCylinders();\r\n this.cylinderDataSource.load();\r\n });\r\n }\r\n }\r\n\r\n private PopulateJobVisits(): void {\r\n this.jobMaterialService.GetMaterialMetadata(this.jobId).subscribe(res => {\r\n this.visits = res.Visits.filter(i => i.Status > JobVisitStatus.WaitingAcceptance);\r\n });\r\n }\r\n\r\n private FilterEquipmentByJobAndShow(jobId: number): void {\r\n this.equipmentService.GetJobEquipment(jobId).subscribe(equip => {\r\n const equipFilter = [];\r\n const equipIds = equip.map(i => i.EquipId);\r\n equipIds.forEach((el, index) => {\r\n equipFilter.push([\"EquipId\", \"=\", el]);\r\n if (equipIds.length - 1 > index) {\r\n equipFilter.push(\"or\");\r\n }\r\n });\r\n this.equipmentDataSource.filter(equipFilter);\r\n this.equipmentDataSource.load().then(() => this.visible = true);\r\n });\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { CookieService } from \"ngx-cookie-service\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IJstranslateService } from \"./ijstranslate-service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class JstranslateService implements IJstranslateService {\r\n\r\n get Locale(): string {\r\n return this.GetBrowserLanguage();\r\n }\r\n\r\n constructor(public translate: TranslateService, public cookies: CookieService) { }\r\n\r\n Translate(s: string, v?: any): Observable {\r\n return v ? this.translate.get(s, v) : this.translate.get(s);\r\n }\r\n\r\n InitTranslation() {\r\n this.SetupTranslation(this.translate);\r\n }\r\n\r\n SetupTranslation(translate: TranslateService) {\r\n translate.addLangs([ \"en\", \"de\", \"us\" ]);\r\n translate.setDefaultLang(\"en-gb\");\r\n\r\n const browserLang = translate.getBrowserCultureLang().toLowerCase();\r\n const lang = browserLang.match(/en-gb|de-de|en-us/) ? browserLang : \"en-gb\";\r\n translate.use(lang);\r\n }\r\n\r\n GetBrowserLanguage() {\r\n const browserLang = this.translate.getBrowserCultureLang().toLowerCase();\r\n return browserLang.match(/en-gb|de-de|en-us/) ? browserLang : \"en-gb\";\r\n }\r\n\r\n SetCookies(lang: string) {\r\n if (!this.cookies.get(\"i18n.langtag\")) {\r\n this.cookies.set(\"i18n.langtag\", lang);\r\n }\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG, MakeModel, ServicingItem } from \"servicesight-shared\";\r\nimport { MakeModelOption } from \"src/app/settings/equipment-settings/models/options/make-model-option.model\";\r\nimport { MakeModelItem } from \"src/app/settings/models/makemodel\";\r\nimport { ODataService } from \"../odata/odata.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class MakeModelService {\r\n\r\n constructor(\r\n @Inject(APP_CONFIG) private config: IAppConfig,\r\n private http: HttpClient,\r\n private odataService: ODataService) { }\r\n\r\n getSampleUpload(): Observable {\r\n return this.http.get(`${this.config.apiLocations.Equipment}MakeModelUpload`, { observe: \"response\", responseType: \"blob\" as \"json\" });\r\n }\r\n\r\n getImportProgress(): Observable {\r\n return this.http.get(`${this.config.apiLocations.Equipment}MakeModelUpload/Progress`);\r\n }\r\n\r\n uploadRows(rows: MakeModel[]): Observable {\r\n return this.http.post(`${this.config.apiLocations.Equipment}MakeModelUpload`, rows);\r\n }\r\n\r\n public Get(makeModelId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.Equipment}makemodel/${makeModelId}`);\r\n }\r\n\r\n public GetServiceLevel(makeModelId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.RecurringJob}MakeModelService/${makeModelId}`);\r\n }\r\n\r\n public GetOption(optionId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.Equipment}MakeModel/Option/${optionId}`);\r\n }\r\n\r\n public OptionAttributesOverlap(optionIds: number[], attributeIds: number[]): Observable {\r\n return this.http.post(`${this.config.apiLocations.Equipment}MakeModel/OptionAttributesOverlap`,\r\n { OptionIds: optionIds, AttributeIds: attributeIds });\r\n }\r\n\r\n public Save(model: MakeModelItem): Observable {\r\n model.Options.forEach(o => {\r\n o.Materials.forEach(m => {\r\n if (m.MaterialId < 0) {\r\n m.MaterialId = 0;\r\n }\r\n });\r\n });\r\n\r\n if (model.MakeModelId) {\r\n return this.http.put(`${this.config.apiLocations.Equipment}makemodel`, model);\r\n } else {\r\n return this.http.post(`${this.config.apiLocations.Equipment}makemodel`, model);\r\n }\r\n }\r\n\r\n public Delete(makeModelId: number): Observable {\r\n return this.http.delete(`${this.config.apiLocations.Equipment}makemodel/${makeModelId}`);\r\n }\r\n\r\n public MakeModelDuplicated(id: number, make: string, model: string): Observable {\r\n return this.http.get(`${this.config.apiLocations.Equipment}makemodel/${id}/Duplicated/${make}/${model}`);\r\n }\r\n\r\n public GetCategoriesDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: this.config.apiLocations.EquipmentOData + \"CategoryOData\",\r\n key: \"CategoryId\",\r\n keyType: \"Int32\",\r\n sortSelector: \"Category\",\r\n paging: false\r\n });\r\n }\r\n\r\n public GetTypesDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: this.config.apiLocations.EquipmentOData + \"TypeOData\",\r\n key: \"TypeId\",\r\n keyType: \"Int32\",\r\n sortSelector: \"Type\",\r\n paging: false\r\n });\r\n }\r\n\r\n public GetSubTypesDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: this.config.apiLocations.EquipmentOData + \"SubTypeOData\",\r\n key: \"SubTypeId\",\r\n keyType: \"Int32\",\r\n sortSelector: \"SubType\",\r\n paging: false\r\n });\r\n }\r\n\r\n\r\n\r\n public GetMakeModelOptionDataSource(makeModelId: number): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.EquipmentOData}MakeModelOptionOData`,\r\n key: \"OptionId\",\r\n keyType: \"Int32\",\r\n queryStringParams: {\r\n makeModelId\r\n }\r\n });\r\n }\r\n}\r\n","import { Injectable, Injector } from \"@angular/core\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class Ng1ContactService {\r\n private $injector: any;\r\n\r\n private get $Injector(): any {\r\n if (!this.$injector) {\r\n this.$injector = this.injector.get(\"$injector\");\r\n }\r\n return this.$injector;\r\n }\r\n\r\n private get contactService(): any {\r\n return this.$Injector.get(\"contactService\");\r\n }\r\n\r\n constructor(private injector: Injector) { }\r\n\r\n public openContactModal(contactId: number, customerId?: number): Promise {\r\n return this.contactService.openContactModal(contactId, customerId);\r\n }\r\n}\r\n","import { Injectable, Injector } from \"@angular/core\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class Ng1CustomerService {\r\n private $injector: any;\r\n\r\n private get $Injector(): any {\r\n if (!this.$injector) {\r\n this.$injector = this.injector.get(\"$injector\");\r\n }\r\n return this.$injector;\r\n }\r\n\r\n private get customerService(): any {\r\n return this.$Injector.get(\"customerService\");\r\n }\r\n\r\n constructor(private injector: Injector) { }\r\n\r\n public openCustomerModal(type: string, customerId?: number): Promise {\r\n return this.customerService.openCustomerModal(type, customerId);\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable, Subject } from \"rxjs\";\r\nimport { map } from \"rxjs/operators\";\r\nimport {\r\n APP_CONFIG,\r\n IAppConfig,\r\n IAuthService,\r\n IODataService,\r\n IProteanResponse,\r\n JobDataService,\r\n JobTabEnum\r\n} from \"servicesight-shared\";\r\nimport { JobWorkRequired } from \"src/app/planner/models/job-work-required.model\";\r\nimport { CancelReason } from \"src/app/quotes/models/CancelReason\";\r\nimport { IServiceSightCollection } from \"src/app/quotes/models/IServiceSightCollection\";\r\nimport { JobTypeTabsModel } from \"src/app/settings/job-settings/models/job-type-tabs.model\";\r\nimport { Email } from \"src/app/shared/models/email.model\";\r\nimport { ISelectOption } from \"src/app/shared/models/iselect-option.model\";\r\nimport { JobChangeWhatThreeWordsModel } from \"../models/job-change-whatthreewords\";\r\nimport { JobCreateModel } from \"../models/job-create\";\r\nimport { JobCreateMetadata } from \"../models/job-create-metadata\";\r\nimport { JobDetail } from \"../models/job-detail\";\r\nimport { JobEquipmentModel } from \"../models/job-equipment\";\r\nimport { JobInvoicingModel } from \"../models/job-invoicing\";\r\nimport { JobMaterialListModel } from \"../models/job-material-list\";\r\nimport { JobVisitListModel } from \"../models/job-visit-list\";\r\nimport { PurchaseOrdersMiscModel } from \"../models/purchase-orders-misc.model\";\r\nimport { RecentJob } from \"../models/recent-job\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class JobService extends JobDataService {\r\n\r\n constructor(\r\n http: HttpClient,\r\n @Inject(\"AuthService\") auth: IAuthService,\r\n @Inject(\"ODataService\") odataService: IODataService,\r\n @Inject(APP_CONFIG) config: IAppConfig) {\r\n super(http, auth, odataService, config);\r\n }\r\n\r\n public jobEquipmentChanged = new Subject();\r\n\r\n public Save(job: JobCreateModel): Observable {\r\n return this.http.post(this.config.apiLocations.ServiceSight + \"Job/CreateAsync\", job);\r\n }\r\n\r\n public GetNewJobMetadata(): Observable {\r\n return this.http.get(this.config.apiLocations.ServiceSight + \"Job/getNewJobMetadata\");\r\n }\r\n\r\n public GetRecentJobsAccordion(customerId: number, siteId: number): Observable {\r\n return this.http.get(this.config.apiLocations.ServiceSight + `Job/GetCustomerAccordionDetail?customerId=${customerId}&siteId=${siteId}`)\r\n .pipe(map((res: any) => res.RecentJobs ));\r\n }\r\n\r\n public GetJobTypes(): Observable {\r\n return this.http.get(this.config.apiLocations.ServiceSight + \"Job/GetAllMetadata\")\r\n .pipe(map((res: any) => (res.JobTypes as ISelectOption[]).sort((a, b) => (a.Name > b.Name ? 1 : -1))));\r\n }\r\n\r\n public ChangeJobType(jobId: number, jobTypeId: number): Observable {\r\n const url = this.config.apiLocations.ServiceSight + `Job/ChangeJobType?jobId=${jobId}&jobTypeId=${jobTypeId}`;\r\n return this.http.request(\"POST\", url);\r\n }\r\n\r\n public ChangeJobSite(jobId: number, siteId: number, changeCustomer: boolean, changePriority: boolean): Observable {\r\n const url = this.config.apiLocations.ServiceSight + `Job/ChangeSite?jobId=${jobId}&siteId=${siteId}&changeCustomer=${changeCustomer}&changePriority=${changePriority}`;\r\n return this.http.request(\"POST\", url);\r\n }\r\n\r\n public ChangeJobCustomer(jobId: number, customerId: number): Observable {\r\n const url = this.config.apiLocations.ServiceSight + `Job/ChangeCustomer?jobId=${jobId}&customerId=${customerId}`;\r\n return this.http.request(\"POST\", url);\r\n }\r\n\r\n public ChangeJobContact(jobId: number, contactId: number): Observable {\r\n const url = this.config.apiLocations.ServiceSight + `Job/ChangeContact?jobId=${jobId}&contactId=${contactId}`;\r\n return this.http.request(\"POST\", url);\r\n }\r\n\r\n public AreCustomerAndSiteAssociated(customerId: number, siteId: number): Observable {\r\n const url = this.config.apiLocations.ServiceSight + `Job/AreCustomerAndSiteAssociated?customerId=${customerId}&siteId=${siteId}`;\r\n return this.http.request(\"GET\", url);\r\n }\r\n\r\n public SaveJob(job: JobDetail): Observable {\r\n const url = this.config.apiLocations.ServiceSight + \"Job/Update\";\r\n return this.http.post(url, job );\r\n }\r\n\r\n public GetVisits(jobId: number): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}JobVisit/GetJobVisits?jobId=${jobId}`;\r\n return this.http.get(url);\r\n }\r\n\r\n public DeleteJobVisits(jobId: number, visitIds: number[]): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}JobVisit/DeleteVisits?jobId=${jobId}`;\r\n return this.http.post(url, visitIds);\r\n }\r\n\r\n public GetMaterials(jobId: number): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}JobMaterial/GetAll?jobId=${jobId}`;\r\n return this.http.get(url);\r\n }\r\n\r\n public DeleteMaterialItems(jobId: number, miscItemIds: number[]): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}JobMaterial/DeleteItems?jobId=${jobId}`;\r\n return this.http.post(url, miscItemIds);\r\n }\r\n\r\n public GetJobInvoiceDetails(jobId: number): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}JobInvoice/GetJobInvoiceDetails?entityId=${jobId}`;\r\n return this.http.get(url);\r\n }\r\n\r\n public OkToInvoiceImmediate(job: JobDetail): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Job/OkToInvoiceImmediate`;\r\n return this.http.post(url, job);\r\n }\r\n\r\n public InvoicePreview(job: JobDetail): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Job/InvoicePreview`;\r\n return this.http.post(url, job);\r\n }\r\n\r\n public InvoiceImmediate(job: JobDetail): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Job/InvoiceImmediate`;\r\n return this.http.post(url, job);\r\n }\r\n\r\n public GetJob(entityId: number): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Job/Get?entityId=${entityId}`;\r\n return this.http.get(url);\r\n }\r\n\r\n public CancelJob(job: JobDetail): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Job/Cancel`;\r\n return this.http.post(url, job);\r\n }\r\n\r\n public CompleteJob(job: JobDetail): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Job/Complete`;\r\n return this.http.post(url, job);\r\n }\r\n\r\n public AcceptJob(job: JobDetail): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Job/Accept`;\r\n return this.http.post(url, job);\r\n }\r\n\r\n public UncompleteJob(job: JobDetail): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Job/Uncomplete`;\r\n return this.http.post(url, job);\r\n }\r\n\r\n public PlaceJob(job: JobDetail): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Job/Place`;\r\n return this.http.post(url, job);\r\n }\r\n\r\n public UpdateJob(job: JobDetail): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Job/Update`;\r\n return this.http.post(url, job);\r\n }\r\n\r\n public GetCancelationReasons(): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}/CancelReasons/GetAll`;\r\n return this.http.get(url).pipe(map((res: IServiceSightCollection) => res.ModelCollection));\r\n }\r\n\r\n public GetEquipmentAccordion(jobId: number): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}JobEquipment/GetEquipmentItems?jobId=${jobId}`;\r\n return this.http.get(url);\r\n }\r\n\r\n public JobEquipmentChanged() {\r\n this.jobEquipmentChanged.next(true);\r\n }\r\n\r\n public MarkPrinted(entityid: number): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}JobSheet/MarkPrintedAsync?entityid=${entityid}`;\r\n return this.http.request(\"POST\", url);\r\n }\r\n\r\n public GetJobSheetEmailData(id, templateId: number, withInspections: boolean = false): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Email/GetJobSheetEmailData?id=${id}&templateId=${templateId}&withInspections=${withInspections}`;\r\n return this.http.get(url);\r\n }\r\n\r\n public SendJobSheetEmail(email: Email, withInspections: boolean = false): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Email/SendJobSheetEmail?withInspections=${withInspections}`;\r\n return this.http.post(url, email);\r\n }\r\n\r\n public GetJobWorkRequired(jobId: number): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Job/GetJobWorkRequired?jobId=${jobId}`;\r\n return this.http.get(url);\r\n }\r\n\r\n public GetJobMiscPurchaseOrders(jobId: number): Observable {\r\n const url = `${this.config.apiLocations.PurchaseOrders}JobOrder/${jobId}/Materials`;\r\n return this.http.get(url);\r\n }\r\n\r\n public CheckFixedPrices(jobId: number): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Job/CheckFixedPrices?jobId=${jobId}`;\r\n return this.http.get(url);\r\n }\r\n\r\n public GetPrintingNoteEmailData(jobId: number): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Email/GetPickingNoteEmailData?jobId=${jobId}`;\r\n return this.http.get(url);\r\n }\r\n\r\n public SendPrintingNoteEmail(email: Email): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Email/SendPickingNoteEmailData`;\r\n return this.http.post(url, email);\r\n }\r\n\r\n public GetOpenJobsForSite(siteId: number): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Job/GetOpenJobsForSite?siteId=${siteId}`;\r\n return this.http.get(url);\r\n }\r\n\r\n public UpdateWhatThreeWords(model: JobChangeWhatThreeWordsModel): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Job/ChangeWhatThreeWords`;\r\n return this.http.post(url, model);\r\n }\r\n\r\n public GetJobTypeTabs(jobTypeId: number): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Job/GetJobTypeTabs?jobTab=${jobTypeId}`;\r\n return this.http.get(url);\r\n }\r\n\r\n public CanRemoveTab(jobId: number, jobTab: JobTabEnum): Observable {\r\n const url = this.config.apiLocations.ServiceSight + `Job/RemoveJobTab?jobId=${jobId}&jobTab=${jobTab}`;\r\n return this.http.get(url);\r\n }\r\n\r\n public CheckPendingMaterials(jobId: number): Observable {\r\n const url = this.config.apiLocations.PurchaseOrders + `PurchaseOrders/NotReceivedMaterials/${jobId}`;\r\n return this.http.get(url);\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable, Subject } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG, ProteanResponse, ServiceGroupCustomerModel } from \"servicesight-shared\";\r\nimport { ServiceGroupsTabModel } from \"../../shared/models/service-groups-tab.model\";\r\nimport { ODataService } from \"../../shared/services/odata/odata.service\";\r\nimport { ServiceGroupData } from \"../models/service-group-data.model\";\r\nimport { ServiceGroupEquipmentUpdate } from \"../models/service-group-equip-update.model\";\r\nimport { ServiceGroupLoadingDataModel } from \"../models/service-group-loading-data.model\";\r\nimport { ServiceGroupModel } from \"../models/service-group.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class ServiceGroupsService {\r\n public openOnTab: ServiceGroupsTabModel;\r\n public lastOpenedModal: number = null;\r\n public customerChanged: Subject = new Subject();\r\n public serviceGroupLoadingData: Subject = new Subject();\r\n\r\n constructor(\r\n private odataService: ODataService,\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private config: IAppConfig) { }\r\n\r\n public GetCustomerSvcGroupList(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.ServiceSightOData}CustomerSvcGroupOD`,\r\n key: [\"CustomerId\", \"GroupId\"],\r\n keyType: {\r\n CustomerId: \"Int32\",\r\n GroupId: \"Int32\"\r\n }\r\n });\r\n }\r\n\r\n public GetEquipmentsAddedToSvcGroup(serviceGroupId: number = 0): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.EquipmentOData}EquipmentsAddedToSvcGroupOData?serviceGroupId=${serviceGroupId}`,\r\n key: \"EquipmentId\",\r\n keyType: \"Int32\",\r\n paging: false\r\n });\r\n }\r\n\r\n public GetEquipmentsInSvcGroups(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.config.apiLocations.EquipmentOData}EquipmentsInSvcGroupOData`,\r\n key: \"GroupId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public SaveServiceGroup(model: ServiceGroupModel): Observable {\r\n return this.http.post(`${this.config.apiLocations.ServiceSight}Customer/AddServiceGroup`, model);\r\n }\r\n\r\n public DeleteServiceGroup(ids: Array): Observable {\r\n return this.http.request(\"delete\", `${this.config.apiLocations.ServiceSight}Customer/DeleteServiceGroup`, { body: ids });\r\n }\r\n\r\n public SaveDataInServiceGroup(data: ServiceGroupData) {\r\n return this.http.put(`${this.config.apiLocations.ServiceSight}ServiceGroup/Update`, data);\r\n }\r\n\r\n public SaveEquipmentsInServiceGroup(data: ServiceGroupEquipmentUpdate): Observable {\r\n return this.http.post(`${this.config.apiLocations.Equipment}Equipment/SaveEquipmentsInServiceGroup`, data);\r\n }\r\n\r\n public GetServiceGroupName(serviceGroupId: number) {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Customer/GetServiceGroupName?serviceGroupId=${serviceGroupId}`);\r\n }\r\n\r\n public GetServiceGroupAssignedToEquipment(equipmentId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}ServiceGroup/GetServiceGroupAssignedToEquipment?equipmentId=${equipmentId}`);\r\n }\r\n\r\n public GetServicingDataInServiceGroup(groupId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}ServiceGroup/GetServiceGroup?groupId=${groupId}`);\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { NavigationEnd, Router } from \"@angular/router\";\r\nimport { filter } from \"rxjs/operators\";\r\n\r\n@Injectable({\r\n providedIn: \"root\",\r\n})\r\nexport class PreviousRouteService {\r\n private currentUrl: string = undefined;\r\n private previousUrl: string = undefined;\r\n\r\n constructor(router: Router) {\r\n this.currentUrl = router.url;\r\n router.events.pipe(filter((event) => event instanceof NavigationEnd)).subscribe((event: NavigationEnd) => {\r\n this.previousUrl = this.currentUrl;\r\n this.currentUrl = event.url;\r\n });\r\n }\r\n\r\n public PreviousUrlContains(fragment: string): boolean {\r\n return this.previousUrl.indexOf(fragment) !== -1;\r\n }\r\n\r\n public GetPreviousUrl(): string {\r\n return this.previousUrl;\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { ServiceContractModel } from \"../models/service-contract.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class EquipmentContractService {\r\n\r\n public constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private config: IAppConfig) {\r\n }\r\n\r\n public GetContracts(equipId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceContracts}Contract/GetContractsByEquipmentId/${equipId}`);\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ 'accordion.equipment.purchasing.supplier' | translate }}\r\n \r\n {{ purchasingDetails.Supplier }}\r\n \r\n
{{ 'accordion.equipment.purchasing.purchase.order.no' | translate }}\r\n \r\n {{ purchasingDetails.PurchaseOrderId }}\r\n \r\n
{{ 'accordion.equipment.purchasing.order.date' | translate }}\r\n {{ purchasingDetails.OrderDate | date: \"shortDate\" }}\r\n
{{ 'accordion.equipment.purchasing.goods.received' | translate }}\r\n \r\n {{ purchasingDetails.GoodsReceivedNoteId }}\r\n \r\n
{{ 'accordion.equipment.purchasing.receipt.date' | translate }}\r\n {{ purchasingDetails.ReceiptDate | date: \"shortDate\" }}\r\n
{{ 'accordion.equipment.purchasing.price' | translate }}\r\n {{ purchasingDetails.Price | currency: baseCurrencySymbol }}\r\n
","import { Component, Input } from \"@angular/core\";\r\nimport { EquipmentPurchasingDetails } from \"../models/equipment-purchasing-details.model\";\r\n\r\n@Component({\r\n selector: \"app-equipment-purchasing-accordion-item\",\r\n templateUrl: \"./equipment-purchasing-accordion-item.component.html\",\r\n styleUrls: [\"./equipment-purchasing-accordion-item.component.scss\"]\r\n})\r\nexport class EquipmentPurchasingAccordionItemComponent {\r\n @Input() purchasingDetails: EquipmentPurchasingDetails;\r\n\r\n public baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n\r\n constructor() { }\r\n\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ 'accordion.equipment.sales.customer' | translate }}\r\n \r\n {{ salesDetails.CustomerName }}\r\n \r\n
{{ 'accordion.equipment.sales.order.no' | translate }}\r\n \r\n {{ salesDetails.SalesOrderNumber }}\r\n \r\n
{{ 'accordion.equipment.sales.order.date' | translate }}\r\n {{ salesDetails.OrderDate | date: \"shortDate\" }}\r\n
{{ 'accordion.equipment.sales.despatch.note.no' | translate }}\r\n \r\n {{ salesDetails.DespatchNoteNumber }}\r\n \r\n
{{ 'accordion.equipment.sales.despatch.date' | translate }}\r\n {{ salesDetails.DespatchDate | date: \"shortDate\" }}\r\n
{{ 'accordion.equipment.sales.price' | translate }}\r\n {{ salesDetails.Price | currency: baseCurrencySymbol }}\r\n
","import { Component, Input } from \"@angular/core\";\r\nimport { EquipmentSalesDetails } from \"../models/equipment-sales-details.model\";\r\n\r\n@Component({\r\n selector: \"app-equipment-sales-accordion-item\",\r\n templateUrl: \"./equipment-sales-accordion-item.component.html\",\r\n styleUrls: [\"./equipment-sales-accordion-item.component.scss\"]\r\n})\r\nexport class EquipmentSalesAccordionItemComponent {\r\n @Input() equipmentId: number;\r\n @Input() salesDetails: EquipmentSalesDetails;\r\n\r\n public baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n\r\n constructor() { }\r\n\r\n}\r\n","{{'accordion.contactNotProvided' | translate}}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ 'accordion.contact.Name' | translate }}\r\n \r\n {{contact.Name}}\r\n
{{ 'accordion.contact.JobTitle' | translate }}{{contact.JobTitle}}
{{ 'accordion.contact.Phone' | translate }}\r\n {{contact.Telephone}}\r\n
{{ 'accordion.contact.PhoneExt' | translate }}{{contact.TelephoneExtension}}
{{ 'accordion.contact.Mobile' | translate }}\r\n {{contact.Mobile}}\r\n
{{ 'accordion.contact.Email' | translate }}\r\n {{contact.Email}}\r\n
{{ 'accordion.contact.Status' | translate }}{{contact.StatusDesc}}
\r\n\r\n","import { Component, Input, OnChanges, SimpleChanges } from \"@angular/core\";\r\nimport { Email } from \"src/app/shared/models/email.model\";\r\nimport { EmailService } from \"src/app/shared/services/email/email.service\";\r\nimport { AccordionDataService } from \"../accordion-data.service\";\r\nimport { AccordionContactModel } from \"../models/contact-model\";\r\n\r\n@Component({\r\n selector: \"app-contact-accordion-item\",\r\n templateUrl: \"./contact-accordion-item.component.html\",\r\n styleUrls: [\"./contact-accordion-item.component.scss\"]\r\n})\r\nexport class ContactAccordionItemComponent implements OnChanges {\r\n @Input() contactId: number;\r\n public contact: AccordionContactModel;\r\n public emailData: Email = new Email();\r\n public showTemplateDialog: boolean = false;\r\n public showErrorSendMessage: boolean = false;\r\n\r\n\r\n constructor(\r\n private dataService: AccordionDataService,\r\n private emailService: EmailService) { }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n this.contactId = changes.contactId.currentValue;\r\n if (this.contactId) {\r\n this.dataService.getContactData(this.contactId).subscribe(x => this.contact = x);\r\n } else {\r\n this.contact = null;\r\n }\r\n }\r\n\r\n openEmailDialog(): void {\r\n this.emailService.GetGeneralEmailData(this.contactId)\r\n .subscribe(x => {\r\n this.emailData = x;\r\n this.emailData.To = this.contact.Email;\r\n this.emailData.ContactID = this.contactId;\r\n }, () => { }, () => {\r\n this.showErrorSendMessage = false;\r\n this.showTemplateDialog = true;\r\n });\r\n }\r\n\r\n send(): void {\r\n this.emailService.SendGeneralEmail(this.emailData).subscribe((res) => {\r\n if (res.IsSuccess) {\r\n this.showTemplateDialog = false;\r\n } else {\r\n this.showErrorSendMessage = true;\r\n }\r\n }, () => {\r\n this.showErrorSendMessage = true;\r\n });\r\n }\r\n\r\n closeDialog(): void {\r\n this.showTemplateDialog = false;\r\n }\r\n\r\n // TODO: Remove that and use routerLink when migration to angular 7 is finished\r\n goToContact(contactId) {\r\n location.href = \"#/contacts/contact/\" + contactId;\r\n }\r\n}\r\n","import { Component, OnInit, Input, Output, EventEmitter } from \"@angular/core\";\r\n\r\n@Component({\r\n selector: \"app-text-input-dialogue\",\r\n templateUrl: \"./text-input-dialogue.component.html\",\r\n styleUrls: [\"./text-input-dialogue.component.scss\"]\r\n})\r\nexport class TextInputDialogueComponent implements OnInit {\r\n\r\n @Input() title: string;\r\n @Input() label: string;\r\n @Input() maxLength?: number;\r\n @Input() showDialog: boolean = true;\r\n @Output() close = new EventEmitter();\r\n @Output() save = new EventEmitter();\r\n public model: string;\r\n\r\n constructor() { }\r\n\r\n ngOnInit() { }\r\n\r\n public Save() {\r\n this.save.emit(this.model);\r\n this.showDialog = false;\r\n }\r\n\r\n public Show() {\r\n this.showDialog = true;\r\n }\r\n\r\n public Discard() {\r\n this.showDialog = false;\r\n this.close.emit();\r\n }\r\n}\r\n","{{'accordion.makeModelNotProvided' | translate}}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ 'accordion.equipment.make-model' | translate }}\r\n \r\n {{ MakeModelName }}\r\n \r\n
{{ 'accordion.equipment.category' | translate }}\r\n {{ CategoryName }}\r\n
{{ 'accordion.equipment.type' | translate }}\r\n {{ TypeName }}\r\n
{{ 'accordion.equipment.subType' | translate }}\r\n {{ SubTypeName }}\r\n
{{ 'accordion.equipment.meter.reading' | translate }}\r\n {{ MeterReading | number }}\r\n {{\"accordion.noMeterReadingsRecorded\" | translate}}\r\n
{{ 'accordion.equipment.date.read' | translate }}\r\n {{ DateRead | date: 'shortDate' }}\r\n {{\"accordion.noMeterReadingsRecorded\" | translate}}\r\n
{{ 'accordion.equipment.system' | translate }}\r\n {{ SystemName }}\r\n {{ \"customer.equipmentSystems.not-assigned\" | translate }}\r\n
\r\n","\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n","import { Location } from \"@angular/common\";\r\nimport { Component, Input, OnChanges, OnInit, SimpleChanges } from \"@angular/core\";\r\nimport { Module, SettingData, SettingId, SettingsService } from \"servicesight-shared\";\r\nimport { LicenseService } from \"./../../../services/licence/license.service\";\r\nimport { AccordionDataService } from \"../accordion-data.service\";\r\n\r\n@Component({\r\n selector: \"app-equipment-details-item\",\r\n templateUrl: \"./equipment-details-item.component.html\",\r\n styleUrls: [\"./equipment-details-item.component.scss\"]\r\n})\r\nexport class EquipmentDetailsItemComponent implements OnInit, OnChanges {\r\n\r\n @Input() makeModelId: number;\r\n @Input() equipmentId: number;\r\n\r\n public MakeModelName: string;\r\n public CategoryName: string;\r\n public TypeName: string;\r\n public SubTypeName: string;\r\n public MeterReading: number;\r\n public DateRead: Date;\r\n public proEnabled: boolean = false;\r\n public SystemName: string;\r\n\r\n private EquipmentSystemId: number;\r\n private CustomerId: number;\r\n private isEquipmentSystemsEnabled: boolean = false;\r\n\r\n public get MakeModelLink(): string {\r\n return `/#/proteansystem/systems/equipment-settings/make-and-model/${this.makeModelId}`;\r\n }\r\n\r\n constructor(\r\n private dataService: AccordionDataService,\r\n private licenseService: LicenseService,\r\n private location: Location,\r\n private settingsService: SettingsService) { }\r\n\r\n public ngOnInit(): void {\r\n this.licenseService.GetCompanyHasAccessToModule(Module.Pro).subscribe(enabled => {\r\n this.proEnabled = enabled;\r\n });\r\n\r\n this.settingsService.getSetting(SettingId.EquipmentSystems).subscribe((setting: SettingData) => {\r\n this.isEquipmentSystemsEnabled = setting.ValueBool;\r\n });\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (this.makeModelId) {\r\n this.dataService.getCategoryTypeSubtypeByMakeModel(this.makeModelId).subscribe(x => {\r\n this.MakeModelName = x.MakeModelName;\r\n this.CategoryName = x.CategoryName;\r\n this.TypeName = x.TypeName;\r\n this.SubTypeName = x.SubTypeName;\r\n });\r\n } else {\r\n this.MakeModelName = null;\r\n this.CategoryName = null;\r\n this.TypeName = null;\r\n this.SubTypeName = null;\r\n }\r\n\r\n if (this.equipmentId && !this.MeterReading) {\r\n this.dataService.getEquipmentMeterReading(this.equipmentId).subscribe(x => {\r\n this.MeterReading = x.MeterReading;\r\n this.DateRead = x.DateRead;\r\n });\r\n }\r\n\r\n if (changes.equipmentId && changes.equipmentId.currentValue > 0) {\r\n this.SystemName = null;\r\n this.CustomerId = null;\r\n\r\n this.dataService.getEquipmentSystem(this.equipmentId).subscribe(x => {\r\n this.EquipmentSystemId = x.EquipmentSystemId;\r\n this.SystemName = x.SystemName;\r\n this.CustomerId = x.CustomerId;\r\n });\r\n }\r\n }\r\n\r\n public showEquipmentSystem(): boolean {\r\n return this.proEnabled && this.isEquipmentSystemsEnabled;\r\n }\r\n\r\n public goToEquipmentSystem(): void {\r\n this.location.go(`/customers/equipment-system/${this.CustomerId}/${this.EquipmentSystemId}`);\r\n }\r\n}\r\n","
\r\n {{'accordion.map.addressNotProvided' | translate}}\r\n \r\n \r\n \r\n \r\n
\r\n","import { Component, Input, OnChanges } from \"@angular/core\";\r\nimport { AccordionDataService } from \"../accordion-data.service\";\r\nimport { Marker } from \"../models/marker\";\r\n\r\n@Component({\r\n selector: \"app-map-accordion-item\",\r\n templateUrl: \"./map-accordion-item.component.html\",\r\n styleUrls: [\"./map-accordion-item.component.scss\"]\r\n})\r\nexport class MapAccordionItemComponent implements OnChanges {\r\n\r\n @Input() customerId: number = null;\r\n @Input() supplierId: number = null;\r\n @Input() latitude: number = null;\r\n @Input() longitude: number = null;\r\n\r\n public markers: Marker[] = [];\r\n\r\n constructor(private dataService: AccordionDataService) { }\r\n\r\n public ngOnChanges(): void {\r\n if (this.latitude && this.longitude) {\r\n this.markers.push({ location: [this.latitude, this.longitude] });\r\n } else if (this.customerId) {\r\n this.dataService.getCustomerLocationViewModel(this.customerId).subscribe( x => {\r\n if (x.CustomerLocation.Latitude && x.CustomerLocation.Longitude) {\r\n this.markers.push({ location: [x.CustomerLocation.Latitude, x.CustomerLocation.Longitude] });\r\n }\r\n });\r\n } else if (this.supplierId) {\r\n this.dataService.getSupplierLocationViewModel(this.supplierId).subscribe( x => {\r\n if (x.CustomerLocation.Latitude && x.CustomerLocation.Longitude) {\r\n this.markers.push({ location: [x.CustomerLocation.Latitude, x.CustomerLocation.Longitude] });\r\n }\r\n });\r\n }\r\n }\r\n}\r\n","import { Component, EventEmitter, Input, Output } from \"@angular/core\";\r\n\r\n@Component({\r\n selector: \"app-record-nav-buttons\",\r\n templateUrl: \"./record-nav-buttons.component.html\",\r\n styleUrls: [\"./record-nav-buttons.component.scss\"]\r\n})\r\nexport class RecordNavButtonsComponent {\r\n\r\n @Input()\r\n public canNavigatePrevious: boolean = false;\r\n\r\n @Input()\r\n public canNavigateNext: boolean = false;\r\n\r\n @Output()\r\n public navigatePrevious: EventEmitter = new EventEmitter();\r\n\r\n @Output()\r\n public navigateNext: EventEmitter = new EventEmitter();\r\n\r\n public Previous(): void {\r\n this.navigatePrevious.emit();\r\n }\r\n\r\n public Next(): void {\r\n this.navigateNext.emit();\r\n }\r\n}\r\n","
\r\n \r\n \r\n
\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { Observable } from \"rxjs\";\r\nimport { DocumentTypeEnum, IAppConfig, APP_CONFIG, IODataService } from \"servicesight-shared\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class DiscussionService {\r\n constructor(\r\n @Inject(APP_CONFIG) private config: IAppConfig,\r\n @Inject(\"ODataService\") private odataService: IODataService,\r\n private http: HttpClient\r\n ) { }\r\n\r\n public GetDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.ServiceSightOData}DiscussionOD`,\r\n key: \"DiscussionId\",\r\n keyType: \"Guid\",\r\n pageSize: 50,\r\n paging: true\r\n });\r\n }\r\n\r\n public CreateItem(documentType: DocumentTypeEnum, documentId: number, message: string): Observable {\r\n return this.http.post(`${this.config.apiLocations.ServiceSight}Discussion/Create`, {\r\n DocumentType: documentType,\r\n DocumentId: documentId,\r\n Message: message\r\n });\r\n }\r\n}\r\n","
\r\n Requires ServiceSight Pro\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n

{{ GetAuthor(item.AuthorId) }} - {{ item.CreatedDateTime | date: 'medium' }}

\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
","import { Component, Input, OnChanges, OnInit } from \"@angular/core\";\r\nimport { DomSanitizer, SafeResourceUrl } from \"@angular/platform-browser\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { EdmLiteral } from \"devextreme/data/odata/utils\";\r\nimport \"devextreme/ui/html_editor/converters/markdown\";\r\nimport { DocumentTypeEnum } from \"servicesight-shared\";\r\nimport { EmployeeListData } from \"../../models/employee-list-data.model\";\r\nimport { DiscussionService } from \"../../services/discussion/discussion.service\";\r\nimport { EmployeeService } from \"../../services/employee/employee.service\";\r\n\r\n@Component({\r\n selector: \"app-discussion\",\r\n templateUrl: \"./discussion.component.html\",\r\n styleUrls: [\"./discussion.component.scss\"]\r\n})\r\nexport class DiscussionComponent implements OnInit, OnChanges {\r\n @Input() moduleEnabled: boolean = null;\r\n @Input() documentType: DocumentTypeEnum = null;\r\n @Input() documentId: number = null;\r\n @Input() disabled: boolean = false;\r\n\r\n private employeesData: EmployeeListData[] = [];\r\n\r\n public employees: ODataStore;\r\n public messages: DataSource;\r\n\r\n public newMessage: string = \"\";\r\n\r\n public get controlDisabled(): boolean {\r\n if (this.disabled) {\r\n return true;\r\n }\r\n\r\n if (this.moduleEnabled === false) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n public get buttonDisabled(): boolean {\r\n return (!this.newMessage && this.newMessage.length === 0) || this.controlDisabled;\r\n }\r\n\r\n constructor(\r\n private sanitizer: DomSanitizer,\r\n private employeeService: EmployeeService,\r\n private discussionService: DiscussionService) { }\r\n\r\n public ngOnChanges(): void {\r\n if (this.documentType && this.documentId) {\r\n this.messages = this.GetDiscussionsDataSource();\r\n }\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.employees = this.employeeService.GetEmployeeDataStore();\r\n this.employeeService.GetAll().subscribe(data => {\r\n this.employeesData = data;\r\n });\r\n }\r\n\r\n public createItem(): void {\r\n this.discussionService.CreateItem(this.documentType, this.documentId, this.newMessage).subscribe(() => {\r\n this.newMessage = \"\";\r\n this.ReloadDiscussion();\r\n });\r\n }\r\n\r\n public GetAuthor(authorId: number): string {\r\n const employee = this.employeesData.find(x => x.EmployeeID === authorId);\r\n return employee ? employee.Employee : null;\r\n }\r\n\r\n public GetAuthorPhoto(authorId: number): SafeResourceUrl {\r\n const employee = this.employeesData.find(x => x.EmployeeID === authorId);\r\n\r\n if (employee) {\r\n const photoFace = `data:image/bmp;charset=utf-8;base64,${employee.PhotoFace}`;\r\n return this.sanitizer.bypassSecurityTrustResourceUrl(photoFace);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n public ReloadDiscussion() {\r\n if (this.messages) {\r\n this.messages.reload();\r\n }\r\n }\r\n\r\n private GetDiscussionsDataSource(): DataSource {\r\n const dataSource = this.discussionService.GetDataSource();\r\n dataSource.filter([[\"DocTypeId\", \"=\", this.GetEdmLiteral()], \"and\", [\"DocId\", \"=\", this.documentId]]);\r\n dataSource.sort({ selector: \"CreatedDateTime\", desc: true });\r\n\r\n return dataSource;\r\n }\r\n\r\n private GetEdmLiteral(): EdmLiteral {\r\n switch (this.documentType) {\r\n case DocumentTypeEnum.Job:\r\n return new EdmLiteral(\"ServiceSight.Shared.Enums.DocumentType'Job'\");\r\n case DocumentTypeEnum.Quote:\r\n return new EdmLiteral(\"ServiceSight.Shared.Enums.DocumentType'Quote'\");\r\n case DocumentTypeEnum.PurchaseOrder:\r\n return new EdmLiteral(\"ServiceSight.Shared.Enums.DocumentType'PurchaseOrder'\");\r\n case DocumentTypeEnum.Cylinder:\r\n return new EdmLiteral(\"ServiceSight.Shared.Enums.DocumentType'Cylinder'\");\r\n case DocumentTypeEnum.Reminder:\r\n return new EdmLiteral(\"ServiceSight.Shared.Enums.DocumentType'Task'\");\r\n case DocumentTypeEnum.PurchaseNote:\r\n return new EdmLiteral(\"ServiceSight.Shared.Enums.DocumentType'PurchaseInvoice'\");\r\n case DocumentTypeEnum.SalesOrder:\r\n return new EdmLiteral(\"ServiceSight.Shared.Enums.DocumentType'SalesOrder'\");\r\n case DocumentTypeEnum.Equipment:\r\n return new EdmLiteral(\"ServiceSight.Shared.Enums.DocumentType'Equip'\");\r\n case DocumentTypeEnum.Stock:\r\n return new EdmLiteral(\"ServiceSight.Shared.Enums.DocumentType'Stock'\");\r\n case DocumentTypeEnum.SalesOpportunity:\r\n return new EdmLiteral(\"ServiceSight.Shared.Enums.DocumentType'SalesOpportunity'\");\r\n case DocumentTypeEnum.ServiceContract:\r\n return new EdmLiteral(\"ServiceSight.Shared.Enums.DocumentType'MaintContract'\");\r\n default:\r\n throw new Error(\"Not supported\");\r\n }\r\n }\r\n}\r\n","import { InspectionAutocomplete } from \"../pipes/enums/inspection-autocomplete.pipe\";\r\n\r\nexport class InspectionTemplate {\r\n Id: number;\r\n Name: string;\r\n Type: string;\r\n AutoComplete: InspectionAutocomplete;\r\n}\r\n","import { InspectionTemplate } from \"src/app/shared/models/inspection-template.model\";\r\n\r\nexport class TemplateListItem extends InspectionTemplate {\r\n Selected: boolean = false;\r\n}\r\n","export enum JobCat {\r\n Abuse = 1,\r\n Callout = 2,\r\n Repair = 3,\r\n Service = 4\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { TemplateListItem } from \"../../../inspections/models/inspection-template-list-item\";\r\nimport { ServiceTypeModelMetadata } from \"../../../inspections/models/service-type-model-metadata.model\";\r\nimport { IServiceSightCollection } from \"../../../quotes/models/IServiceSightCollection\";\r\nimport { JobCat } from \"../../../shared/enums/job-cat.enum\";\r\nimport { ODataService } from \"../../../shared/services/odata/odata.service\";\r\nimport { ServiceContractModel } from \"../models/service-contract.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class ServicingService {\r\n\r\n private readonly serviceSightUrl: string;\r\n private readonly templateUrl: string;\r\n private readonly oDataBaseUrl: string;\r\n private readonly serviceContractsUrl: string;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private odataService: ODataService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) {\r\n this.serviceSightUrl = appConfig.apiLocations.ServiceSight;\r\n this.templateUrl = appConfig.apiLocations.Inspections + \"template\";\r\n this.oDataBaseUrl = appConfig.apiLocations.EquipmentOData;\r\n this.serviceContractsUrl = appConfig.apiLocations.ServiceContracts;\r\n }\r\n\r\n public ODataMakeModelServiceLevels(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.oDataBaseUrl}MakeModelServiceLevels`,\r\n key: \"MakeModelId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetJobTypes(): Observable> {\r\n return this.http.get>(this.appConfig.apiLocations.ServiceSight + \"JobType/GetAllJobTypesAsync\");\r\n }\r\n\r\n public GetAllJobTypesForCategory(jobCat: JobCat): Observable> {\r\n return this.http.get>(`${this.appConfig.apiLocations.ServiceSight}JobType/GetAllJobTypesForCategory?jobCat=${jobCat}`);\r\n }\r\n\r\n public GetAllTemplate(): Observable {\r\n return this.http.get(this.templateUrl);\r\n }\r\n\r\n public Metadata(): Observable {\r\n return this.http.get(this.serviceSightUrl + \"ServiceTypes/MetadataAsync\");\r\n }\r\n\r\n public GetCustomerActiveContract(customerId: number): Observable {\r\n return this.http.get(this.serviceContractsUrl + `Contract/GetCustomerActiveContracts/${customerId}`);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n {{'servicing.contractNo' | translate}} {{contract.ContractId}} - {{contract.Type}}\r\n

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

{{contract.Status | serviceContractStatus | translate}}

\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n {{ currencySymbol }}\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n

{{ 'servicing.schedule' | translate }}

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

{{ 'servicing.configuration' | translate }}

\r\n\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n {{'servicing.assigned-service-group' | translate }}\r\n {{ AssignedServiceGroup.Name }}\r\n {{ 'servicing.service-group' | translate }}\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n
\r\n {{ data.data.Interval }} {{getIntervalUnitStatus(data.data.IntervalUnits)}}\r\n
\r\n\r\n
{{ data.value | currency: currencySymbol }}
\r\n\r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n
\r\n {{currencySymbol}}\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n \r\n\r\n \r\n\r\n
\r\n {{cellInfo.Interval}} {{cellInfo.IntervalUnits}}\r\n
\r\n \r\n
\r\n
\r\n\r\n\r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n
\r\n
\r\n
-
\r\n
\r\n \r\n\r\n
\r\n \r\n \r\n
\r\n\r\n\r\n\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n \r\n
\r\n\r\n\r\n\r\n\r\n\r\n","import { Location } from \"@angular/common\";\r\nimport {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { UntypedFormControl } from \"@angular/forms\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Guid } from \"guid-typescript\";\r\nimport * as moment from \"moment\";\r\nimport { combineLatest, forkJoin, Observable } from \"rxjs\";\r\nimport {\r\n RecurringJobsService,\r\n ServiceContractStatus,\r\n ServiceGroupCustomerModel,\r\n ServiceParts,\r\n ServicingComponentUsageEnum,\r\n ServicingItem,\r\n SettingData,\r\n SettingId,\r\n SettingsService,\r\n Sfg20ScheduleInterval,\r\n Sfg20Service\r\n} from \"servicesight-shared\";\r\nimport { EquipmentService } from \"src/app/equipment/services/equipment.service\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { MakeModelService } from \"src/app/shared/services/make-model/make-model.service\";\r\nimport { ServiceGroupsService } from \"../../../customers/services/service-groups.service\";\r\nimport { JobTypeBackgrounds } from \"../../../equipment/models/job-type-backgrounds.model\";\r\nimport { CalculationItem } from \"../../../inspections/models/calculation-item.model\";\r\nimport { Duration } from \"../../../inspections/models/duration.model\";\r\nimport { TemplateListItem } from \"../../../inspections/models/inspection-template-list-item\";\r\nimport { JobCat } from \"../../../shared/enums/job-cat.enum\";\r\nimport { ServiceContractModel } from \"../../attribute-settings/models/service-contract.model\";\r\nimport { ServicingService } from \"../../attribute-settings/services/servicing.service\";\r\nimport { JobTypeNamesModel } from \"../models/job-type-names.model\";\r\n\r\n@Component({\r\n selector: \"app-servicing\",\r\n templateUrl: \"./servicing.component.html\",\r\n styleUrls: [\r\n \"./servicing.component.scss\",\r\n \"../../../../../projects/servicesight-shared/src/lib/styles/servicesight-shared.scss\"\r\n ]\r\n})\r\nexport class ServicingComponent implements OnChanges, OnInit {\r\n @Input() form: UntypedFormControl;\r\n @Input() genericId: number;\r\n @Input() MakeModelId: number;\r\n @Input() sfg20ScheduleId: number;\r\n @Input() servicingsSource: Array;\r\n @Input() displayedOn: ServicingComponentUsageEnum;\r\n @Input() customerId: number;\r\n @Input() showContractBar: boolean = false;\r\n @Input() isEquipment: boolean = false;\r\n @Input() headerName: string = \"\";\r\n @Input() headerDetails: string = \"\";\r\n @Input() backgroundColors: Array = [\r\n { id: 0, used: false },\r\n { id: 1, used: false },\r\n { id: 2, used: false },\r\n { id: 3, used: false }\r\n ];\r\n @Output() servicingsSourceChanged = new EventEmitter>();\r\n @Output() backgroundJobTypeColors = new EventEmitter>();\r\n @Output() isServiceGroupAssigned = new EventEmitter();\r\n @Output() sfg20ScheduleIdChange = new EventEmitter();\r\n\r\n @ViewChild(\"jobdatatypes\", { static: true }) public jobdatatypes: DxDataGridComponent;\r\n @ViewChild(\"servicingsGrid\", { static: true }) public servicingsGrid: DxDataGridComponent;\r\n @ViewChild(\"serviceGroupsGrid\", { static: true }) public serviceGroupsGrid: DxDataGridComponent;\r\n\r\n private defaultServiceIntervalUnits: number;\r\n private defaultServiceIntervalValue: number;\r\n private defaultScheduleFromDueDate: number;\r\n public ServicePartsItems: DataSource;\r\n public scheduleIntervals: Sfg20ScheduleInterval[] = [];\r\n public tmpValue: ServicingItem;\r\n public selectedServicingsIds: Array = [];\r\n public selectedJobdatatypesIds: Array = [];\r\n public showJobSelectScheduleDialog: boolean = false;\r\n public jobTypes: any[];\r\n public inspectionsDataSource: TemplateListItem[] = [];\r\n public calculationItems: CalculationItem[] = [];\r\n public durationItems: Duration[] = [];\r\n public isLoading: boolean;\r\n public showAttributeCopyMessage = false;\r\n public intervalText: string;\r\n public priceText: string;\r\n public contractStatus = ServiceContractStatus;\r\n public contractData: ServiceContractModel[] = [];\r\n public hasAccessToContracts: boolean;\r\n public currencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n public selectedServiceLevelId: string;\r\n public componentUsedOn = ServicingComponentUsageEnum;\r\n public jobTypeName: string;\r\n public isServiceGroupModalOpened: boolean = false;\r\n public serviceGroupsDataSource: DataSource;\r\n public EquipmentsInSvcGroupsDataStore: ODataStore;\r\n public selectedServiceGroup: Array<{ CustomerId: number; GroupId: number }>;\r\n public SearchText: string = \"\";\r\n public AssignedServiceGroup: ServiceGroupCustomerModel | null = new ServiceGroupCustomerModel();\r\n public dataGridClass: string = \"\";\r\n public areServiceGroupsEnabled: boolean = false;\r\n public selectionMode: string;\r\n public displaySfg: boolean = false;\r\n public newSfg20ScheduleInterval: Sfg20ScheduleInterval;\r\n private jobTypeItems: JobTypeNamesModel[];\r\n\r\n public get removeButtonDisabled(): boolean {\r\n return !(this.selectedServicingsIds && this.selectedServicingsIds.length > 0);\r\n }\r\n\r\n public get visualiserGenericId(): number {\r\n if (this.AssignedServiceGroup && this.AssignedServiceGroup.Id) {\r\n return this.AssignedServiceGroup.Id;\r\n }\r\n\r\n return this.genericId;\r\n }\r\n\r\n public get visualiserDisplayedOn(): ServicingComponentUsageEnum {\r\n if (this.AssignedServiceGroup && this.AssignedServiceGroup.Id) {\r\n return ServicingComponentUsageEnum.ServiceGroups;\r\n }\r\n\r\n return this.displayedOn;\r\n }\r\n\r\n public get isEquipmentOnServiceGroup(): boolean {\r\n return this.displayedOn === this.componentUsedOn.Equipments && this.AssignedServiceGroup && !!this.AssignedServiceGroup.Id;\r\n }\r\n\r\n constructor(\r\n private settingService: SettingsService,\r\n private service: ServicingService,\r\n private recurringJobsService: RecurringJobsService,\r\n private translate: TranslateService,\r\n private makeModelService: MakeModelService,\r\n private licenseService: LicenseService,\r\n private serviceGroups: ServiceGroupsService,\r\n private equipmentService: EquipmentService,\r\n private location: Location,\r\n private sfg20Service: Sfg20Service) {\r\n this.onReorder = this.onReorder.bind(this);\r\n this.intervalText = this.translate.instant(\"servicing.interval\");\r\n this.priceText = this.translate.instant(\"servicing.price\");\r\n this.handleJobTypeName = this.handleJobTypeName.bind(this);\r\n this.overrideOnValueChanged = this.overrideOnValueChanged.bind(this);\r\n this.calculateSfg20IntervalCellValue = this.calculateSfg20IntervalCellValue.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.loadInspections();\r\n this.loadMetadata();\r\n this.loadJobTypes();\r\n this.loadDefaultScheduleFromDueDate();\r\n this.loadDefaultServiceIntervalUnits();\r\n this.loadDefaultServiceIntervalValue();\r\n\r\n if (this.servicingsSource && this.servicingsSource.length) {\r\n this.handleServicingSourceQuantity();\r\n }\r\n this.backgroundJobTypeColors.emit(this.backgroundColors);\r\n combineLatest([this.licenseService.GetCompanyHasAccessToModules(), this.loadServiceGroupSettings()]).subscribe(res => {\r\n this.hasAccessToContracts = res[0].ServiceContractsEnabled;\r\n this.areServiceGroupsEnabled = res[0].RecurringJobsEnabled && res[0].EquipmentEnabled && res[0].ProEnabled && res[1].ValueBool;\r\n this.serviceGroups.serviceGroupLoadingData.next({ AreServiceGroupsEnabled: true, AreServiceGroupAssigned: false, AreServiceGroupsLoaded: false });\r\n\r\n this.loadContractData();\r\n });\r\n\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(modules => {\r\n if (modules.ProEnabled && modules.EquipmentEnabled) {\r\n this.EquipmentsInSvcGroupsDataStore = this.serviceGroups.GetEquipmentsInSvcGroups();\r\n this.EquipmentsInSvcGroupsDataStore.load();\r\n this.serviceGroups.customerChanged.subscribe(x => {\r\n this.serviceGroupsDataSource = this.serviceGroups.GetCustomerSvcGroupList();\r\n this.serviceGroupsDataSource.filter([\"CustomerId\", \"=\", x]);\r\n });\r\n\r\n if (modules.Sfg20Enabled) {\r\n this.displaySfg = this.displayedOn !== this.componentUsedOn.Customers;\r\n this.getSfg20ScheduleIntervals();\r\n }\r\n }\r\n });\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (this.servicingsSource && this.servicingsSource.length) {\r\n this.handleServicingSourceQuantity();\r\n }\r\n\r\n if (this.customerId && !this.serviceGroupsDataSource) {\r\n this.serviceGroupsDataSource = this.serviceGroups.GetCustomerSvcGroupList();\r\n this.serviceGroupsDataSource.filter([\"CustomerId\", \"=\", this.customerId]);\r\n }\r\n\r\n this.loadContractData();\r\n if (this.displayedOn != null) {\r\n this.handleDataGridClassName();\r\n this.handleSelectionMode();\r\n }\r\n\r\n if (this.isEquipment && changes.genericId && changes.genericId.currentValue !== changes.genericId.previousValue) {\r\n this.loadServiceGroup();\r\n }\r\n\r\n if (changes.sfg20ScheduleId && changes.sfg20ScheduleId.currentValue) {\r\n this.getSfg20ScheduleIntervals();\r\n }\r\n }\r\n\r\n private handleDataGridClassName(): void {\r\n if (this.componentUsedOn.MakeModelSettings === this.displayedOn) {\r\n this.dataGridClass = \"make-model-container-servicing\";\r\n } else {\r\n this.dataGridClass = \"job-list-container-servicing\";\r\n }\r\n\r\n if (this.AssignedServiceGroup && this.AssignedServiceGroup.Id) {\r\n this.dataGridClass = \"\"; // set default styling of dx-data-grid\r\n }\r\n }\r\n\r\n onReorder(e) {\r\n const visibleRows = e.component.getVisibleRows();\r\n const toIndex = this.servicingsSource.indexOf(visibleRows[e.toIndex].data);\r\n const fromIndex = this.servicingsSource.indexOf(e.itemData);\r\n\r\n this.servicingsSource.splice(fromIndex, 1);\r\n this.servicingsSource.splice(toIndex, 0, e.itemData);\r\n this.form.markAsDirty();\r\n this.recurringJobsService.servicingData.next(this.servicingsSource);\r\n }\r\n\r\n public getIntervalUnitStatus(intervalUnits: number): string {\r\n if (this.durationItems.find(o => o.DurationID === intervalUnits)) {\r\n return this.durationItems.find(o => o.DurationID === intervalUnits).DurationName;\r\n }\r\n return \"\";\r\n }\r\n\r\n public getIndex(serviceLevelId: string): number {\r\n return this.servicingsSource.findIndex(e => e.ServiceLevelId === serviceLevelId);\r\n }\r\n\r\n public startEditing($event) {\r\n this.form.markAsDirty();\r\n this.selectedServiceLevelId = $event.data.ServiceLevelId;\r\n this.jobTypeName = this.jobTypeItems.find(x => x.JobTypeID === $event.data.DefaultJobType).Name;\r\n this.newSfg20ScheduleInterval = this.getSelectedServiceSfgInterval();\r\n }\r\n\r\n public update(): void {\r\n this.servicingsSourceChanged.emit(this.servicingsSource);\r\n this.handleServicingBackgrounds();\r\n this.recurringJobsService.servicingData.next(this.servicingsSource);\r\n }\r\n\r\n public overrideOnValueChanged(e: any): void {\r\n if (e.dataField === \"DefaultJobType\" && e.parentType === \"dataRow\") {\r\n const defaultValueChangeHandler = e.editorOptions.onValueChanged;\r\n const $this = this;\r\n e.editorOptions.onValueChanged = (args) => {\r\n $this.handleJobTypeName(args);\r\n defaultValueChangeHandler(args);\r\n };\r\n }\r\n }\r\n\r\n public DeleteServicing(): void {\r\n if (this.selectedServicingsIds) {\r\n this.selectedServicingsIds // removes servicings from the model\r\n .forEach(f => {\r\n return this.servicingsSource.splice(this.servicingsSource.findIndex(e => e.ServiceLevelId === f), 1);\r\n });\r\n this.servicingsSourceChanged.emit(this.servicingsSource);\r\n this.form.markAsDirty();\r\n }\r\n this.handleServicingSourceQuantity();\r\n this.handleServicingBackgrounds();\r\n this.recurringJobsService.servicingData.next(this.servicingsSource);\r\n }\r\n\r\n public AddServicing(): void {\r\n const colorNotFound = -1;\r\n this.handleServicingBackgrounds();\r\n if (this.selectedJobdatatypesIds.length > 0) {\r\n this.selectedJobdatatypesIds.forEach((i) => { // adds new attributes to the model\r\n const newItem = new ServicingItem();\r\n const availableColors = this.backgroundColors.find(item => !item.used);\r\n newItem.DefaultJobType = i;\r\n newItem.ServiceLevelId = Guid.create().toString();\r\n newItem.IntervalUnits = this.defaultServiceIntervalUnits;\r\n newItem.Interval = this.defaultServiceIntervalValue;\r\n newItem.NextDueCalcTypeId = this.defaultScheduleFromDueDate;\r\n newItem.MakeModelId = i;\r\n newItem.IsNew = true;\r\n newItem.NextDue = moment().startOf(\"day\").format(\"yyyy-MM-DDTHH:mm:ss\");\r\n newItem.BackgroundColor = availableColors ? availableColors.id : colorNotFound;\r\n newItem.ComponentUsedOn = this.displayedOn;\r\n if (this.servicingsSource == null) {\r\n this.servicingsSource = new Array();\r\n }\r\n this.servicingsSource.push(newItem);\r\n this.servicingsSourceChanged.emit(this.servicingsSource);\r\n this.handleServicingBackgrounds();\r\n });\r\n }\r\n this.recurringJobsService.servicingData.next(this.servicingsSource);\r\n this.form.markAsDirty();\r\n this.showJobSelectScheduleDialog = false;\r\n this.handleServicingSourceQuantity();\r\n }\r\n\r\n\r\n public ClosedJobTypeDialog(): void {\r\n this.showJobSelectScheduleDialog = false;\r\n }\r\n\r\n public OpenJobTypeDialog(): void {\r\n this.showJobSelectScheduleDialog = true;\r\n this.selectedJobdatatypesIds = [];\r\n }\r\n\r\n getSelectedJobTypes(): any[] {\r\n return this.jobdatatypes ? this.jobdatatypes.instance.getSelectedRowsData() : [];\r\n }\r\n\r\n getSelectedServicing(): ServicingItem[] {\r\n return this.servicingsGrid ? this.servicingsGrid.instance.getSelectedRowsData() : [];\r\n }\r\n\r\n public OnCopyFromMakeModel(): void {\r\n this.showAttributeCopyMessage = true;\r\n }\r\n\r\n public ConfirmAction(confirm: boolean): void {\r\n if (confirm) {\r\n this.setAllColorsAvailable();\r\n forkJoin([\r\n this.makeModelService.Get(this.MakeModelId),\r\n this.makeModelService.GetServiceLevel(this.MakeModelId)\r\n ]).subscribe(([makeModel, serviceLevels]) => {\r\n if (serviceLevels.length > 0) {\r\n this.OnSfg20ScheduleIdChange(makeModel.Sfg20ScheduleId);\r\n\r\n this.servicingsSource = new Array();\r\n serviceLevels.forEach((item) => { // adds new attributes to the model\r\n const availableColors = this.backgroundColors.find(color => !color.used);\r\n const colorNotFound = -1;\r\n const newItem = new ServicingItem();\r\n\r\n newItem.DefaultJobType = item.DefaultJobType;\r\n newItem.ServiceLevelId = Guid.create().toString();\r\n newItem.MakeModelId = item.MakeModelId;\r\n newItem.NextDue = new Date(new Date().toDateString());\r\n newItem.Interval = item.Interval;\r\n newItem.InspectTemplateId = item.InspectTemplateId;\r\n newItem.LabourBudgetHours = item.LabourBudgetHours;\r\n newItem.IntervalUnits = item.IntervalUnits;\r\n newItem.MeterUnits = item.MeterUnits;\r\n newItem.Price = item.Price;\r\n newItem.IsNew = true;\r\n newItem.BackgroundColor = availableColors ? availableColors.id : colorNotFound;\r\n newItem.NextDueCalcTypeId = item.NextDueCalcTypeId;\r\n newItem.ServiceParts = item.ServiceParts;\r\n newItem.Sfg20FrequencyInterval = item.Sfg20FrequencyInterval;\r\n newItem.Sfg20FrequencyPeriod = item.Sfg20FrequencyPeriod;\r\n this.servicingsSource.push(newItem);\r\n this.servicingsSourceChanged.emit(this.servicingsSource);\r\n this.handleServicingBackgrounds();\r\n });\r\n }\r\n this.recurringJobsService.servicingData.next(this.servicingsSource);\r\n this.handleServicingSourceQuantity();\r\n });\r\n }\r\n this.showAttributeCopyMessage = false;\r\n }\r\n\r\n public getUpdatedServiceParts($event: Array) {\r\n const item = this.servicingsSource.filter(el => el.ServiceLevelId === this.selectedServiceLevelId);\r\n item[0].ServiceParts = $event;\r\n }\r\n\r\n public updateSfg20Interval(sfg20Interval: Sfg20ScheduleInterval): void {\r\n this.newSfg20ScheduleInterval = sfg20Interval;\r\n }\r\n\r\n public onEditFormSaving(): void {\r\n const selectedSfgInterval = this.servicingsSource.find(el => el.ServiceLevelId === this.selectedServiceLevelId);\r\n selectedSfgInterval.Sfg20FrequencyInterval = this.newSfg20ScheduleInterval?.FrequencyInterval;\r\n selectedSfgInterval.Sfg20FrequencyPeriod = this.newSfg20ScheduleInterval?.FrequencyPeriod;\r\n }\r\n\r\n public handleJobTypeName($event): void {\r\n this.jobTypeName = this.jobTypeItems.find(x => x.JobTypeID === $event.value).Name;\r\n }\r\n\r\n public assignToServiceGroup(): void {\r\n this.isServiceGroupModalOpened = true;\r\n }\r\n\r\n public SearchTextChanged($event: string): void {\r\n this.serviceGroupsGrid.instance.searchByText(encodeURI($event).replace(/%20/g, \" \"));\r\n }\r\n\r\n public OnSfg20ScheduleIdChange(scheduleId: number, resetInterval: boolean = false): void {\r\n this.sfg20ScheduleId = scheduleId;\r\n if (resetInterval) {\r\n this.newSfg20ScheduleInterval = null;\r\n this.servicingsSource?.forEach(x => {\r\n x.Sfg20FrequencyInterval = null;\r\n x.Sfg20FrequencyPeriod = null;\r\n });\r\n }\r\n\r\n this.getSfg20ScheduleIntervals();\r\n this.sfg20ScheduleIdChange.emit(scheduleId);\r\n }\r\n\r\n public closeModal(): void {\r\n this.selectedServiceGroup = null;\r\n this.isServiceGroupModalOpened = false;\r\n }\r\n\r\n public addToServiceGroup(): void {\r\n this.serviceGroups.SaveEquipmentsInServiceGroup({\r\n AddEquipmentsInSvcGroup: [this.genericId],\r\n ServiceGroupId: this.selectedServiceGroup[0].GroupId,\r\n RemoveEquipmentsInSvcGroup: []\r\n }).subscribe(() => {\r\n this.loadServiceGroup();\r\n });\r\n this.isServiceGroupModalOpened = false;\r\n }\r\n\r\n public selectionChangeHandler(): void {\r\n if (this.selectedServiceGroup.length > 1) {\r\n this.serviceGroupsGrid.instance.deselectRows([this.selectedServiceGroup.shift()]);\r\n }\r\n }\r\n\r\n public unAssignServiceGroup(): void {\r\n this.equipmentService.UnAssignServiceGroup(this.genericId)\r\n .subscribe(() => {\r\n this.AssignedServiceGroup = null;\r\n this.serviceGroupsGrid.instance.refresh();\r\n this.handleSelectionMode();\r\n this.isServiceGroupAssigned.emit(this.AssignedServiceGroup);\r\n });\r\n }\r\n\r\n public handleSelectionMode(): void {\r\n if (this.AssignedServiceGroup && this.AssignedServiceGroup.Id && this.displayedOn === this.componentUsedOn.Equipments) {\r\n this.selectionMode = \"none\";\r\n } else {\r\n this.selectionMode = \"multiple\";\r\n }\r\n }\r\n\r\n public goToServiceGroups() {\r\n this.serviceGroups.lastOpenedModal = this.AssignedServiceGroup.Id;\r\n this.location.go(`/customers/customer/${this.customerId}`);\r\n }\r\n\r\n public calculateSfg20IntervalCellValue(rowData: any): string {\r\n const interval = this.scheduleIntervals.find(x =>\r\n x.FrequencyPeriod === rowData.Sfg20FrequencyPeriod &&\r\n x.FrequencyInterval === rowData.Sfg20FrequencyInterval);\r\n return interval?.FrequencyDuration ?? \"\";\r\n }\r\n\r\n public getLastEditorColumnSpan(): number {\r\n let colSpan = 2;\r\n if (this.displayedOn === this.componentUsedOn.ServiceGroups ||\r\n (!this.displaySfg && this.displayedOn !== this.componentUsedOn.Customers)) {\r\n colSpan = 3;\r\n }\r\n\r\n return colSpan;\r\n }\r\n\r\n public getBudgetHoursGroupColumnCount(): number {\r\n return this.displayedOn !== this.componentUsedOn.MakeModelSettings ? 2 : 1;\r\n }\r\n\r\n private getSfg20ScheduleIntervals(): void {\r\n if (this.sfg20ScheduleId) {\r\n this.sfg20Service.GetSfg20ScheduleIntervals(this.sfg20ScheduleId)\r\n .subscribe(x => this.scheduleIntervals = x);\r\n }\r\n }\r\n\r\n private getSelectedServiceSfgInterval(): Sfg20ScheduleInterval {\r\n const item = this.servicingsSource?.find(el => el.ServiceLevelId === this.selectedServiceLevelId);\r\n const frequencyDuration = item?.Sfg20FrequencyInterval && item?.Sfg20FrequencyPeriod ?\r\n `${item.Sfg20FrequencyInterval}${item.Sfg20FrequencyPeriod}` :\r\n null;\r\n\r\n return {\r\n FrequencyDuration: frequencyDuration,\r\n FrequencyInterval: item?.Sfg20FrequencyInterval,\r\n FrequencyPeriod: item?.Sfg20FrequencyPeriod\r\n };\r\n }\r\n\r\n private loadContractData(): void {\r\n if (this.showContractBar && this.displayedOn === this.componentUsedOn.Customers && this.hasAccessToContracts) {\r\n this.service.GetCustomerActiveContract(this.customerId).subscribe((result) => {\r\n this.contractData = result;\r\n });\r\n }\r\n }\r\n\r\n private handleServicingSourceQuantity(): void {\r\n setTimeout(() => this.recurringJobsService.jobTypesQuantity.next(this.servicingsSource.length), 0);\r\n }\r\n\r\n private loadInspections() {\r\n this.service.GetAllTemplate().subscribe((result) => {\r\n const nullTemplateListItem = new TemplateListItem();\r\n nullTemplateListItem.Id = null;\r\n nullTemplateListItem.Name = \"\";\r\n this.inspectionsDataSource = [];\r\n this.inspectionsDataSource.push(nullTemplateListItem);\r\n this.inspectionsDataSource = this.inspectionsDataSource.concat(result);\r\n });\r\n }\r\n\r\n private loadMetadata() {\r\n this.service.Metadata().subscribe((result) => {\r\n this.durationItems = result.Durations;\r\n this.calculationItems = result.Calculation;\r\n });\r\n }\r\n\r\n private loadJobTypes() {\r\n this.service.GetAllJobTypesForCategory(JobCat.Service).subscribe((result) => {\r\n this.jobTypes = result.ModelCollection;\r\n this.jobTypeItems = this.jobTypes.map(({ Name, JobTypeID }) => ({ Name, JobTypeID }));\r\n });\r\n }\r\n\r\n private loadDefaultServiceIntervalUnits() {\r\n this.settingService.getSetting(SettingId.ServicingDefaultServiceIntervalUnits).subscribe((result) => {\r\n this.defaultServiceIntervalUnits = result.ValueListSelectedId;\r\n });\r\n }\r\n\r\n private loadDefaultServiceIntervalValue() {\r\n this.settingService.getSetting(SettingId.ServicingDefaultServiceIntervalValue).subscribe((result) => {\r\n this.defaultServiceIntervalValue = result.ValueNumber;\r\n });\r\n }\r\n\r\n private loadDefaultScheduleFromDueDate() {\r\n this.settingService.getSetting(SettingId.SvcScheduleFromDueDate).subscribe((result) => {\r\n this.defaultScheduleFromDueDate = result.ValueListSelectedId;\r\n });\r\n }\r\n\r\n private loadServiceGroupSettings(): Observable {\r\n return this.settingService.getSetting(SettingId.ServicingUseServiceGroups);\r\n }\r\n\r\n private handleServicingBackgrounds(): void {\r\n if (this.servicingsSource) {\r\n this.backgroundColors.map(item => {\r\n const isUsed = this.servicingsSource.find(el => el.BackgroundColor === item.id);\r\n item.used = isUsed != null;\r\n });\r\n this.backgroundJobTypeColors.emit(this.backgroundColors);\r\n }\r\n }\r\n\r\n private setAllColorsAvailable(): void {\r\n this.backgroundColors.map(item => item.used = false);\r\n }\r\n\r\n private loadServiceGroup(): void {\r\n this.serviceGroups.GetServiceGroupAssignedToEquipment(this.genericId)\r\n .subscribe(serviceGroup => {\r\n this.AssignedServiceGroup = serviceGroup;\r\n this.handleDataGridClassName();\r\n this.handleSelectionMode();\r\n this.serviceGroups.serviceGroupLoadingData.next({ AreServiceGroupsEnabled: true, AreServiceGroupsLoaded: true, AreServiceGroupAssigned: !!serviceGroup });\r\n if (!!serviceGroup) {\r\n this.isServiceGroupAssigned.emit(this.AssignedServiceGroup);\r\n }\r\n });\r\n }\r\n}\r\n","interface IKeyNames {\r\n Name: string;\r\n Code: number;\r\n AlternativeCode?: number | string;\r\n}\r\nexport enum SpecialKeyCodes {\r\n ARROW_LEFT = 37,\r\n ARROW_UP,\r\n ARROW_RIGHT,\r\n ARROW_DOWN,\r\n BACKSPACE = 8,\r\n DELETE = 46,\r\n DOT = 190\r\n}\r\n\r\nexport enum NumbersKeyCodes {\r\n KEY0 = 48,\r\n KEY1,\r\n KEY2,\r\n KEY3,\r\n KEY4,\r\n KEY5,\r\n KEY6,\r\n KEY7,\r\n KEY8,\r\n KEY9,\r\n NUMPAD0 = 96,\r\n NUMPAD1,\r\n NUMPAD2,\r\n NUMPAD3,\r\n NUMPAD4,\r\n NUMPAD5,\r\n NUMPAD6,\r\n NUMPAD7,\r\n NUMPAD8,\r\n NUMPAD9,\r\n}\r\n\r\nexport const SPECIAL_KEY_NAMES: IKeyNames[] = [\r\n { Code: SpecialKeyCodes.ARROW_LEFT, Name: \"ArrowLeft\" },\r\n { Code: SpecialKeyCodes.ARROW_UP, Name: \"ArrowUp\" },\r\n { Code: SpecialKeyCodes.ARROW_DOWN, Name: \"ArrowDown\" },\r\n { Code: SpecialKeyCodes.ARROW_RIGHT, Name: \"ArrowRight\"},\r\n { Code: SpecialKeyCodes.BACKSPACE, Name: \"Backspace\" },\r\n { Code: SpecialKeyCodes.DELETE, Name: \"Delete\" },\r\n { Code: SpecialKeyCodes.DOT, Name: \".\", AlternativeCode: \"Period\" } // or dot '.'\r\n];\r\n\r\nexport const NUMBERS_KEY: IKeyNames[] = [\r\n { Code: NumbersKeyCodes.KEY0, AlternativeCode: NumbersKeyCodes.NUMPAD0, Name: \"0\" },\r\n { Code: NumbersKeyCodes.KEY1, AlternativeCode: NumbersKeyCodes.NUMPAD1, Name: \"1\" },\r\n { Code: NumbersKeyCodes.KEY2, AlternativeCode: NumbersKeyCodes.NUMPAD2, Name: \"2\" },\r\n { Code: NumbersKeyCodes.KEY3, AlternativeCode: NumbersKeyCodes.NUMPAD3, Name: \"3\" },\r\n { Code: NumbersKeyCodes.KEY4, AlternativeCode: NumbersKeyCodes.NUMPAD4, Name: \"4\" },\r\n { Code: NumbersKeyCodes.KEY5, AlternativeCode: NumbersKeyCodes.NUMPAD5, Name: \"5\" },\r\n { Code: NumbersKeyCodes.KEY6, AlternativeCode: NumbersKeyCodes.NUMPAD6, Name: \"6\" },\r\n { Code: NumbersKeyCodes.KEY7, AlternativeCode: NumbersKeyCodes.NUMPAD7, Name: \"7\" },\r\n { Code: NumbersKeyCodes.KEY8, AlternativeCode: NumbersKeyCodes.NUMPAD8, Name: \"8\" },\r\n { Code: NumbersKeyCodes.KEY9, AlternativeCode: NumbersKeyCodes.NUMPAD9, Name: \"9\" },\r\n];\r\n","import { Directive, ElementRef, HostListener } from \"@angular/core\";\r\nimport { NUMBERS_KEY } from \"../../enums/key-code.enums\";\r\n\r\n@Directive({\r\n selector: \"[appOnlyInteger]\"\r\n})\r\nexport class OnlyIntegerDirective {\r\n\r\n private regex: RegExp = new RegExp(/^\\d*(\\d)/);\r\n private removeCharacters: RegExp = new RegExp(/\\D+[^\\d*]/g);\r\n\r\n constructor(private el: ElementRef) { }\r\n\r\n @HostListener(\"keydown\", [ \"$event\" ])\r\n onKeyDown(event: KeyboardEvent) {\r\n return this.PreventCharacters(event);\r\n }\r\n\r\n @HostListener(\"blur\")\r\n onBlur() {\r\n const curr = this.el.nativeElement.value.replace(this.removeCharacters, \"\");\r\n const newValue = Number(curr) ? Number(curr) : 0;\r\n this.el.nativeElement.value = newValue.toFixed(0);\r\n }\r\n\r\n @HostListener(\"paste\", [ \"$event\" ])\r\n onPaste(event: ClipboardEvent) {\r\n event.preventDefault();\r\n this.onlyNumbers(event.clipboardData);\r\n }\r\n\r\n @HostListener(\"drop\", [ \"$event\" ])\r\n onDrop(event: DragEvent) {\r\n event.preventDefault();\r\n this.onlyNumbers(event.dataTransfer);\r\n }\r\n\r\n private onlyNumbers(value: DataTransfer) {\r\n const data2insert: string = value.getData(\"text/plain\").replace(this.removeCharacters, \"\");\r\n const formattedNumber = Number(data2insert.replace(/\\s+/, \"\")).toFixed(0); // remove whitespace\r\n document.execCommand(\"insertText\", false, formattedNumber); // remove whitespace\r\n }\r\n\r\n private IsNumberKeyPressed(event: KeyboardEvent) {\r\n return (NUMBERS_KEY.find(k => k.Name === event.key) || (event.ctrlKey && NUMBERS_KEY.find(k => k.Name === event.key)));\r\n }\r\n\r\n private PreventCharacters(event: KeyboardEvent) {\r\n const keyPressed = NUMBERS_KEY.find(k => k.Name === event.key);\r\n if (keyPressed || this.IsNumberKeyPressed(event)) {\r\n return;\r\n }\r\n\r\n // Do not use event.keycode this is deprecated.\r\n // See: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode\r\n if (!Number(event.key) && !event.key.match(this.regex)) {\r\n event.preventDefault();\r\n return false;\r\n }\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { IListItemModel } from \"../../models/ilist-item.model\";\r\nimport { ISiteService } from \"../interfaces/ISiteService\";\r\nimport { ODataService } from \"../odata/odata.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class SiteService implements ISiteService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private odataService: ODataService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) { }\r\n\r\n GetSites(customerId: number): Observable {\r\n return this.http.get(this.appConfig.apiLocations.ServiceSight + \"Job/GetSites?customerId=\" + customerId);\r\n }\r\n\r\n /**\r\n * Returns the OData source for Site OData\r\n */\r\n public GetSiteDataSource(customerId?: number): DataSource {\r\n const url = `${this.appConfig.apiLocations.ServiceSightOData}SiteOD`;\r\n\r\n const dataSource = this.odataService.GetDataSource({\r\n url,\r\n key: \"SiteId\",\r\n keyType: \"Int32\",\r\n fieldTypes: {\r\n InvoiceId: \"Int32\",\r\n }\r\n });\r\n\r\n if (customerId) {\r\n dataSource.filter([\"InvoiceId\", \"=\", customerId]);\r\n }\r\n\r\n return dataSource;\r\n }\r\n}\r\n","export enum TaskStatus {\r\n Cancelled = 0,\r\n Active = 300,\r\n Complete = 800\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { TaskStatus } from \"./enums/task-status.enum\";\r\n\r\n@Pipe({\r\n name: \"taskStatus\"\r\n})\r\nexport class TaskStatusPipe implements PipeTransform {\r\n\r\n transform(value: any): any {\r\n const status = {\r\n [TaskStatus.Cancelled]: \"task.cancelled\",\r\n [TaskStatus.Active]: \"task.active\",\r\n [TaskStatus.Complete]: \"task.complete\"\r\n };\r\n return status[value] || \"Unknown status!\";\r\n }\r\n}\r\n","export enum GoodsReceivedStatus {\r\n DetailsRequired = 50,\r\n Pending = 100,\r\n BookedIn = 250,\r\n BatchUpdated = 710,\r\n PiMatchedNotBu = 790,\r\n PiMatchedBu = 800,\r\n Cancelled = 900\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { GoodsReceivedStatus } from \"../../goods-received/enums/goods-received-status.enum\";\r\n\r\n@Pipe({\r\n name: \"goodsReceivedStatus\"\r\n})\r\nexport class GoodsReceivedStatusPipe implements PipeTransform {\r\n private readonly equipmentStatus = {\r\n [GoodsReceivedStatus.DetailsRequired]: \"goods-received.status.awaiting-details\",\r\n [GoodsReceivedStatus.Pending]: \"goods-received.status.pending\",\r\n [GoodsReceivedStatus.BookedIn]: \"goods-received.status.booked-in\",\r\n [GoodsReceivedStatus.PiMatchedBu]: \"goods-received.status.matched\",\r\n [GoodsReceivedStatus.Cancelled]: \"goods-received.status.cancelled\"\r\n };\r\n\r\n private readonly stringValueMapping = {\r\n DetailsRequired: GoodsReceivedStatus.DetailsRequired,\r\n Pending: GoodsReceivedStatus.Pending,\r\n BookedIn: GoodsReceivedStatus.BookedIn,\r\n Cancelled: GoodsReceivedStatus.Cancelled,\r\n PiMatchedBu: GoodsReceivedStatus.PiMatchedBu\r\n };\r\n\r\n transform(value: GoodsReceivedStatus): string {\r\n let safeValue = Number(value);\r\n if (isNaN(safeValue)) {\r\n safeValue = this.stringValueMapping[value];\r\n }\r\n\r\n return this.equipmentStatus[safeValue];\r\n }\r\n}\r\n","export enum PurchaseOrderStatus {\r\n AuthorisationReq = 150,\r\n Pending = 250,\r\n SelectToPrint = 300,\r\n Placed = 400,\r\n PartReceived = 450,\r\n Delivered = 500,\r\n SXOutstanding = 600,\r\n PIMatchedSXOS = 700,\r\n Complete = 800,\r\n Cancelled = 900\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { PurchaseOrderStatus } from \"src/app/purchase-orders/enums/purchase-order-status.enum\";\r\n\r\n@Pipe({\r\n name: \"purchaseOrderStatus\"\r\n})\r\nexport class PurchaseOrderStatusPipe implements PipeTransform {\r\n\r\n private readonly equipmentStatus = {\r\n [PurchaseOrderStatus.Pending]: \"purchase-order.status.pending\",\r\n [PurchaseOrderStatus.AuthorisationReq]: \"purchase-order.status.authorisation-required\",\r\n [PurchaseOrderStatus.Placed]: \"purchase-order.status.placed\",\r\n [PurchaseOrderStatus.PartReceived]: \"purchase-order.status.partially-received\",\r\n [PurchaseOrderStatus.Complete]: \"purchase-order.status.completed\",\r\n [PurchaseOrderStatus.Cancelled]: \"purchase-order.status.cancelled\"\r\n };\r\n\r\n private readonly stringValueMapping = {\r\n Pending: PurchaseOrderStatus.Pending,\r\n AuthorisationReq: PurchaseOrderStatus.AuthorisationReq,\r\n Placed: PurchaseOrderStatus.Placed,\r\n PartReceived: PurchaseOrderStatus.PartReceived,\r\n Complete: PurchaseOrderStatus.Complete,\r\n Cancelled: PurchaseOrderStatus.Cancelled\r\n };\r\n\r\n transform(value: number | string | PurchaseOrderStatus): string {\r\n let safeValue = Number(value);\r\n if (isNaN(safeValue)) {\r\n safeValue = this.stringValueMapping[value];\r\n }\r\n\r\n return this.equipmentStatus[safeValue];\r\n }\r\n\r\n}\r\n","export enum ReturnsNoteStatusEnum {\r\n Cancelled = 0,\r\n Pending = 100,\r\n ReplacementsOs = 450,\r\n ReplacementsOsbu = 460,\r\n Returned = 500,\r\n BatchUpdated = 710,\r\n PcMatchedNotBu = 790,\r\n PcMatchedBu = 800,\r\n Archived = 900\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { ReturnsNoteStatusEnum } from \"../../returns-note/enums/returns-note-status.enum\";\r\n\r\n@Pipe({\r\n name: \"returnsNoteStatus\"\r\n})\r\nexport class ReturnsNoteStatusPipe implements PipeTransform {\r\n private readonly returnsNoteStatus = {\r\n [ReturnsNoteStatusEnum.Pending]: \"returns-note.status.pending\",\r\n [ReturnsNoteStatusEnum.Returned]: \"returns-note.status.returned\",\r\n [ReturnsNoteStatusEnum.Cancelled]: \"returns-note.status.cancelled\",\r\n [ReturnsNoteStatusEnum.PcMatchedBu]: \"returns-note.status.matched\"\r\n };\r\n\r\n private readonly stringValueMapping = {\r\n Pending: ReturnsNoteStatusEnum.Pending,\r\n Returned: ReturnsNoteStatusEnum.Returned,\r\n Cancelled: ReturnsNoteStatusEnum.Cancelled,\r\n PcMatchedBu: ReturnsNoteStatusEnum.PcMatchedBu\r\n };\r\n\r\n transform(value: number | string | ReturnsNoteStatusEnum): string {\r\n let safeValue = Number(value);\r\n if (isNaN(safeValue)) {\r\n safeValue = this.stringValueMapping[value];\r\n }\r\n\r\n return this.returnsNoteStatus[safeValue];\r\n }\r\n}\r\n","
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n
\r\n\r\n \r\n {{'equipment.history.job' | translate}} {{item.data.ElementId}} {{item.data.Date | date: \"short\"}},\r\n {{item.data.ItemType}} at {{item.data.ItemText}} - {{item.data.Status | jobStatus | translate}}\r\n \r\n \r\n {{'equipment.history.message' | translate}} {{item.data.Date | date: \"short\"}}\r\n \r\n \r\n {{'equipment.history.reminder' | translate}} {{item.data.ElementId}} {{item.data.Date | date: \"short\"}} {{item.data.ItemType}} - {{item.data.Status | taskStatus | translate}}\r\n \r\n \r\n {{'equipment.history.serviceContract' | translate}} {{item.data.ElementId}} {{item.data.Date | date: \"shortDate\"}} - {{item.data.EndDate | date: \"shortDate\"}} {{item.data.ItemType}} - {{item.data.Status | serviceContractStatus | translate}}\r\n \r\n \r\n {{'equipment.history.purchase.order' | translate}} {{item.data.ElementId}} {{item.data.Date | date: \"shortDate\"}} from {{item.data.ItemText}} - {{item.data.Status | purchaseOrderStatus | translate}}\r\n \r\n \r\n {{'equipment.history.goods.received.note' | translate}} {{item.data.ElementId}} {{item.data.Date | date: \"shortDate\"}} from {{item.data.ItemText}} - {{item.data.Status | goodsReceivedStatus | translate}}\r\n \r\n \r\n {{'equipment.history.returns-note' | translate}} {{item.data.ElementId}} {{item.data.Date | date: \"shortDate\"}} {{\"equipment.history.from-grn\" | translate}} {{item.data.AdviceNoteId}} - {{item.data.Status | returnsNoteStatus | translate}}\r\n \r\n \r\n \r\n {{'equipment.history.sales.order' | translate}} {{item.data.SecondElementId}}\r\n \r\n \r\n {{'equipment.history.meter-reading' | translate}} {{item.data.Value}}, {{'equipment.history.on' | translate}} {{item.data.Date | date: \"short\"}}\r\n \r\n  - \r\n \r\n {{'equipment.history.despatch.note' | translate}} {{item.data.ElementId}} {{item.data.Date | date: \"shortDate\"}} from {{item.data.ItemText}} - {{ item.data.Status | despatchNoteStatus | translate }}\r\n \r\n \r\n

\r\n {{'equipment.history.taken-by' | translate}} {{item.data.ItemText}} {{\"equipment.history.on-job\" | translate}} {{item.data.SecondElementId }}\r\n

\r\n

\r\n {{item.data.Description}}\r\n

\r\n
\r\n
\r\n\r\n
\r\n","import { Component, Input, OnInit, ViewChild } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport ArrayStore from \"devextreme/data/array_store\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { DocumentTypeEnum } from \"servicesight-shared\";\r\nimport { ModuleAccessModel } from \"src/app/shared/models/module-access.model\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { SiteService } from \"../../../shared/services/site/site.service\";\r\nimport { EquipmentService } from \"../../services/equipment.service\";\r\n\r\n@Component({\r\n selector: \"app-equip-history\",\r\n templateUrl: \"./equip-history.component.html\",\r\n styleUrls: [\"./equip-history.component.scss\"]\r\n})\r\nexport class EquipHistoryComponent implements OnInit {\r\n\r\n @Input() equipId: number;\r\n @ViewChild(\"historyDataGrid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n\r\n public modulesAccess: ModuleAccessModel;\r\n public searchText: string = \"\";\r\n public history: DataSource;\r\n public customers: DataSource;\r\n public expanded = false;\r\n public documentType = DocumentTypeEnum;\r\n\r\n public historyFilterTypes: DataSource;\r\n private readonly filterTypes = [{\r\n ID: DocumentTypeEnum.Job,\r\n name: this.translateService.instant(\"equipment.history.types.jobs\")\r\n },\r\n {\r\n ID: DocumentTypeEnum.ServiceContract,\r\n name: this.translateService.instant(\"equipment.history.types.serviceContracts\")\r\n },\r\n {\r\n ID: DocumentTypeEnum.Reminder,\r\n name: this.translateService.instant(\"equipment.history.types.reminders\")\r\n },\r\n {\r\n ID: DocumentTypeEnum.Message,\r\n name: this.translateService.instant(\"equipment.history.types.messages\")\r\n }];\r\n\r\n public get proEnabled(): boolean {\r\n if (this.modulesAccess) {\r\n return this.modulesAccess.ProEnabled;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n constructor(\r\n private licenseService: LicenseService,\r\n private service: EquipmentService,\r\n public siteService: SiteService,\r\n private translateService: TranslateService) { }\r\n\r\n public ngOnInit(): void {\r\n if (this.equipId && this.equipId > 0) {\r\n this.history = this.service.GetEquipmentHistory(this.equipId);\r\n }\r\n\r\n this.historyFilterTypes = new DataSource({\r\n store: new ArrayStore({\r\n data: this.filterTypes,\r\n key: \"ID\"\r\n })\r\n });\r\n\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(modules => {\r\n this.modulesAccess = modules;\r\n\r\n if (this.modulesAccess.PurchaseOrdersEnabled) {\r\n this.filterTypes.push({\r\n ID: DocumentTypeEnum.PurchaseOrder,\r\n name: this.translateService.instant(\"equipment.history.types.purchase.orders\")\r\n });\r\n\r\n this.filterTypes.push({\r\n ID: DocumentTypeEnum.AdviceNote,\r\n name: this.translateService.instant(\"equipment.history.types.goods.received.note\")\r\n });\r\n }\r\n\r\n if (this.modulesAccess.PurchaseOrdersEnabled && this.modulesAccess.ProEnabled) {\r\n this.filterTypes.push({\r\n ID: DocumentTypeEnum.ReturnsNote,\r\n name: this.translateService.instant(\"equipment.history.types.returns-notes\")\r\n });\r\n }\r\n\r\n if (this.modulesAccess.SalesOrderEnabled) {\r\n this.filterTypes.push({\r\n ID: DocumentTypeEnum.DespatchNote,\r\n name: this.translateService.instant(\"equipment.history.types.despatch.notes\")\r\n });\r\n }\r\n\r\n if (this.modulesAccess.EquipmentEnabled) {\r\n this.filterTypes.push({\r\n ID: DocumentTypeEnum.MeterRead,\r\n name: this.translateService.instant(\"equipment.history.types.meter-reading\")\r\n });\r\n }\r\n\r\n this.historyFilterTypes = new DataSource({\r\n store: new ArrayStore({\r\n data: this.filterTypes,\r\n key: \"ID\"\r\n })\r\n });\r\n });\r\n }\r\n\r\n public OnSearchChanged(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.searchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public FilterChanged(selectedFilters): void {\r\n if (selectedFilters.length === 0) {\r\n this.dataGrid.instance.clearFilter();\r\n } else {\r\n const filter = [];\r\n selectedFilters.forEach(key => {\r\n filter.push([\"Type\", \"=\", key]);\r\n filter.push(\"or\");\r\n });\r\n filter.pop();\r\n this.dataGrid.instance.filter(filter);\r\n }\r\n this.OnSearchChanged();\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { EquipmentStatus } from \"servicesight-shared\";\r\n\r\n@Pipe({\r\n name: \"equipmentStatus\"\r\n})\r\nexport class EquipmentStatusPipe implements PipeTransform {\r\n\r\n private readonly equipmentStatus = {\r\n [EquipmentStatus.Returned]: \"equipment.status.returned\",\r\n [EquipmentStatus.Stock]: \"equipment.status.stock\",\r\n [EquipmentStatus.ForHire]: \"equipment.status.forHire\",\r\n [EquipmentStatus.OnHire]: \"equipment.status.onHire\",\r\n [EquipmentStatus.Rental]: \"equipment.status.rental\",\r\n [EquipmentStatus.CustomersOwn]: \"equipment.status.customersOwn\",\r\n [EquipmentStatus.Retired]: \"equipment.status.retired\",\r\n [EquipmentStatus.Sold]: \"equipment.status.sold\",\r\n };\r\n\r\n transform(value: any): any {\r\n return this.equipmentStatus[value];\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n {{ 'equipment.detail.equipment.no' | translate }}  \r\n
\r\n
\r\n \r\n
\r\n

\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n + {{ 'equipment.detail.new.contact' | translate }}\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n + {{ 'equipment.detail.new.location' | translate }}\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
 
\r\n
\r\n
\r\n

{{ 'equipment.detail.references' | translate }}

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

{{ 'equipment.detail.sales.warranty' | translate }}

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

\r\n {{'equipment.detail.tab.contractNo' | translate}}: {{contract.ContractId}}\r\n \r\n - {{contract.ContractName}}\r\n \r\n

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

{{contract.Status | serviceContractStatus | translate}}

\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n {{ currencySymbol }}\r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \"\"\r\n

\r\n {{ 'messages.accordion.no-image' | translate }}\r\n

\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n {{ 'equipment.refrigerant.refrigerant-type' | translate }}\r\n \r\n {{ refrigerantType.Name }}\r\n
\r\n {{ 'fgas.refrigerant-type.gwp' | translate }}\r\n \r\n {{ refrigerantType.GlobalWarmingPotential }}\r\n
\r\n {{ 'fgas.refrigerant-type.CO2Equivalency' | translate }}\r\n \r\n {{ GetCo2Equivalency(refrigerantType) | number: '1.1-1' }}\r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n 999 ? 999 : noOfCopies\"\r\n min=\"1\"\r\n max=\"999\"\r\n value=\"1\"\r\n [(ngModel)]=\"noOfCopies\" />\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n","import { Location } from \"@angular/common\";\r\nimport { ChangeDetectorRef, Component, HostListener, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { DomSanitizer, SafeUrl } from \"@angular/platform-browser\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxAccordionComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Guid } from \"guid-typescript\";\r\nimport { combineLatest, Observable } from \"rxjs\";\r\nimport { finalize, map } from \"rxjs/operators\";\r\nimport { CylinderIdentificationStyle, Orientation } from \"servicesight-components\";\r\nimport {\r\n ColourDropdownModel,\r\n ComponentCanDeactivate,\r\n ContactService,\r\n CustomerService,\r\n CustomerStatus,\r\n DateOnlyService,\r\n DocumentTypeEnum,\r\n Equipment,\r\n EquipmentCfts,\r\n EquipmentConditionService,\r\n EquipmentDataService,\r\n EquipmentPermissionsService,\r\n EquipmentRefrigerantComponent,\r\n EquipmentStatus,\r\n FormMesssageService,\r\n IUserReferences,\r\n JobTabEnum,\r\n RecurringJobsService,\r\n RefrigerantTypeModel,\r\n ServiceGroupCustomerModel,\r\n ServicingComponentUsageEnum,\r\n ServicingItem,\r\n SettingId,\r\n SettingsService,\r\n UICustomisation,\r\n UserReferenceService,\r\n UserRefType\r\n} from \"servicesight-shared\";\r\nimport { CustomerLocationModel } from \"src/app/jobs/models/customer-location\";\r\nimport { JobCreateModel } from \"src/app/jobs/models/job-create\";\r\nimport { MessageService } from \"src/app/messages/services/message/message.service\";\r\nimport { MakeModelItem } from \"src/app/settings/models/makemodel\";\r\nimport { StoreService } from \"src/app/settings/services/store.service\";\r\nimport { EquipmentPurchasingDetails } from \"src/app/shared/components/accordion/models/equipment-purchasing-details.model\";\r\nimport { EquipmentSalesDetails } from \"src/app/shared/components/accordion/models/equipment-sales-details.model\";\r\nimport { JobCylinderLogDialogComponent } from \"src/app/shared/components/job-cylinder-log-dialog/job-cylinder-log-dialog.component\";\r\nimport { MessageDocTypeIds } from \"src/app/shared/enums/messages/message-doc-type-ids.enum\";\r\nimport { MessageTypes } from \"src/app/shared/enums/messages/message-types.enum\";\r\nimport { ModuleAccessModel } from \"src/app/shared/models/module-access.model\";\r\nimport { JstranslateService } from \"src/app/shared/services/jstranslate/jstranslate.service\";\r\nimport { MakeModelService } from \"src/app/shared/services/make-model/make-model.service\";\r\nimport { Ng1ContactService } from \"src/app/shared/services/ng1-contact.service\";\r\nimport { Ng1CustomerService } from \"src/app/shared/services/ng1-customer.service\";\r\nimport { Ng1ReminderService } from \"src/app/shared/services/ng1-reminder.service\";\r\nimport { JobService } from \"./../../jobs/services/job.service\";\r\nimport { LicenseService } from \"./../../shared/services/licence/license.service\";\r\nimport { ServiceGroupsService } from \"../../customers/services/service-groups.service\";\r\nimport { AccordionDataService } from \"../../shared/components/accordion/accordion-data.service\";\r\nimport { PreviousRouteService } from \"../../shared/services/previous-route.service\";\r\nimport { PrimaryImageService } from \"../../stock/services/primary-image.service\";\r\nimport { JobTypeBackgrounds } from \"../models/job-type-backgrounds.model\";\r\nimport { ServiceContractModel } from \"../models/service-contract.model\";\r\nimport { EquipmentContractService } from \"../services/equipment-contract.service\";\r\nimport { EquipmentService } from \"../services/equipment.service\";\r\n\r\n@Component({\r\n selector: \"app-equipment-detail\",\r\n templateUrl: \"./equipment-detail.component.html\",\r\n styleUrls: [\"./equipment-detail.component.scss\"]\r\n})\r\n\r\nexport class EquipmentDetailComponent implements OnInit, ComponentCanDeactivate {\r\n\r\n @ViewChild(\"equipmentForm\", { static: true }) form: NgForm;\r\n @ViewChild(\"accordionComponent\") accordionComponent: DxAccordionComponent;\r\n @ViewChild(\"LogEntryDialogue\", { static: false }) CylinderLogDialog: JobCylinderLogDialogComponent;\r\n @ViewChild(\"equipmentRefrigerant\", { static: false }) equipmentRefrigerant: EquipmentRefrigerantComponent;\r\n\r\n private initComplete: boolean = false;\r\n private pendingSiteId: number = null;\r\n\r\n public salesOrdersEnabled: boolean = false;\r\n public selectedMake: string;\r\n public EquipModel = new Equipment();\r\n public isNew = false;\r\n public isLoading = false;\r\n public readonly formName: string = \"equipmentForm\";\r\n public sitesDataSource: DataSource;\r\n public contactsDataSource: DataSource;\r\n public makesDataSource: DataSource;\r\n public makeModelsDataSource: DataSource;\r\n public userReferencesDataSource: ODataStore;\r\n public locationsDataSource: DataSource;\r\n public readonly maxSalesWarrantyLength = 9999;\r\n public UICustomisations: IUserReferences;\r\n public userRefEquipment1Label: string;\r\n public userRefEquipment2Label: string;\r\n public userRefEquipment3Label: string;\r\n public statusArray: Array;\r\n public duplicates: Array;\r\n public showPopup = false;\r\n public showDuplicatedPopup = false;\r\n public showAttributeCopyMessage = false;\r\n public duplicatedMessage: string;\r\n public equipmentid: number;\r\n public showDeleteMessage = false;\r\n public hasDeletePermission = true;\r\n public warrantyStartUI: Date;\r\n public isAllowedServicing: boolean;\r\n public accordionSalesDetails: EquipmentSalesDetails = null;\r\n public accordionPurchasingDetails: EquipmentPurchasingDetails = null;\r\n public titleConfirmationDialogue: string;\r\n public messageConfirmationDialogue: string;\r\n public docType = DocumentTypeEnum;\r\n public contracts: ServiceContractModel[] = [];\r\n public showServiceGroupsWarning: boolean = false;\r\n public assignedServiceGroupData?: ServiceGroupCustomerModel;\r\n public showEquipmentJobScheduleRemovalWarning: boolean = false;\r\n public equipmentStatus: EquipmentStatus;\r\n private areServiceGroupsAssigned: boolean = false;\r\n public get currencySymbol(): string {\r\n return JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n }\r\n public componentUsedOn = ServicingComponentUsageEnum;\r\n public primaryImage: SafeUrl;\r\n\r\n public refrigerantType = new RefrigerantTypeModel();\r\n public orientation = Orientation.Portrait;\r\n\r\n private jobId?: number;\r\n private createFromJob: boolean = false;\r\n private jobSourceTab: JobTabEnum;\r\n\r\n public CanNavigatePrevious: boolean = false;\r\n public CanNavigateNext: boolean = false;\r\n public IsRecordNavigationEnabled: boolean = false;\r\n public isVisibleCopyEquipment: boolean = false;\r\n public noOfCopies: number = 1;\r\n public copyEquipmentMessageSuccess: string = \"\";\r\n public copyEquipSuccessWindowMessage: boolean = false;\r\n public copiedEquipmentIds: number[] = [];\r\n public equipmentConditions: ColourDropdownModel[] = [];\r\n public modulesAccess: ModuleAccessModel = {\r\n AccountsLinkEnabled: false,\r\n ConsumerPortalEnabled: false,\r\n EquipmentEnabled: false,\r\n PowerBiEnabled: false,\r\n ProEnabled: false,\r\n PurchaseOrdersEnabled: false,\r\n RecurringJobsEnabled: false,\r\n SalesOrderEnabled: false,\r\n ServiceContractsEnabled: false,\r\n StockEnabled: false,\r\n SalesOpportunityEnabled: false,\r\n SalesCampaignsEnabled: false,\r\n FGasEnabled: false,\r\n CustomerFeedbackEnabled: false,\r\n GasSafeEnabled: false,\r\n AdvancedQuotesEnabled: false,\r\n CFTSEnabled: false,\r\n Sfg20Enabled: false,\r\n ProjectEnabled: false\r\n };\r\n public additionalStoresEnabled: boolean = false;\r\n public storeDataSource: DataSource;\r\n public backgroundColors: Array = [\r\n { id: 0, used: false },\r\n { id: 1, used: false },\r\n { id: 2, used: false },\r\n { id: 3, used: false }\r\n ];\r\n\r\n public get systemId(): number {\r\n const system = this.EquipModel;\r\n\r\n if (system && system.EquipmentSystemId) {\r\n return system.EquipmentSystemId;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n public get SelectedSiteId(): number {\r\n if (this.EquipModel) {\r\n return this.EquipModel.SiteId;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n public set SelectedSiteId(value: number) {\r\n if (!this.EquipModel) {\r\n this.EquipModel = new Equipment();\r\n }\r\n\r\n this.EquipModel.SiteId = value;\r\n\r\n if (this.initComplete) {\r\n this.changeDetector.detectChanges();\r\n }\r\n }\r\n\r\n public get ShowValue(): boolean {\r\n return this.modulesAccess?.ProEnabled &&\r\n (\r\n this.equipmentStatus === EquipmentStatus.Stock ||\r\n this.equipmentStatus === EquipmentStatus.ForHire ||\r\n this.equipmentStatus === EquipmentStatus.OnHire\r\n );\r\n }\r\n\r\n public get ShowStore(): boolean {\r\n return this.modulesAccess?.ProEnabled\r\n && this.modulesAccess.EquipmentEnabled\r\n && this.equipmentStatus === EquipmentStatus.Stock\r\n && this.additionalStoresEnabled;\r\n }\r\n\r\n constructor(\r\n private changeDetector: ChangeDetectorRef,\r\n private customerService: CustomerService,\r\n private contactService: ContactService,\r\n private service: EquipmentService,\r\n private equipmentDataService: EquipmentDataService,\r\n private formMessageService: FormMesssageService,\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private location: Location,\r\n private translate: JstranslateService,\r\n private permissionsService: EquipmentPermissionsService,\r\n private dateOnlyService: DateOnlyService,\r\n private makeModelService: MakeModelService,\r\n private messageService: MessageService,\r\n private equipmentContractService: EquipmentContractService,\r\n private translateService: TranslateService,\r\n private recurringJobsService: RecurringJobsService,\r\n private licenseService: LicenseService,\r\n private userRefsService: UserReferenceService,\r\n private serviceGroups: ServiceGroupsService,\r\n private ng1reminderService: Ng1ReminderService,\r\n private ng1CustomerService: Ng1CustomerService,\r\n private ng1ContactService: Ng1ContactService,\r\n private primaryImageService: PrimaryImageService,\r\n private jobService: JobService,\r\n private sanitizer: DomSanitizer,\r\n private previousRouteService: PreviousRouteService,\r\n private equipmentConditionService: EquipmentConditionService,\r\n private accordionDataService: AccordionDataService,\r\n private storeService: StoreService,\r\n private settingsService: SettingsService) {\r\n this.statusArray = this.GetEquipmentStatus();\r\n this.EquipModel = new Equipment();\r\n this.ng1reminderService = ng1reminderService;\r\n\r\n // code below must be here because OnInit method is executed to late.\r\n // in 'OnInit' 'state' object is override/cleared and we don't have access to data which was send\r\n // Doc ref. https://angular.io/api/router/NavigationExtras#state\r\n const extras = this.router.getCurrentNavigation()?.extras;\r\n let state = null;\r\n if (extras) {\r\n state = extras.state as { jobId: number; siteId: number; sourceTab: JobTabEnum };\r\n }\r\n\r\n if (state && state.jobId && state.siteId && state.sourceTab) {\r\n this.createFromJob = true;\r\n this.jobId = Number(state.jobId);\r\n this.SelectedSiteId = Number(state.siteId);\r\n this.jobSourceTab = state.sourceTab;\r\n }\r\n\r\n this.refrigerantType.Colour1 = \"\";\r\n this.refrigerantType.Colour2 = \"\";\r\n this.refrigerantType.Colour3 = \"\";\r\n this.refrigerantType.CylinderStyle = CylinderIdentificationStyle.Half;\r\n\r\n this.equipmentConditionService.GetAll()\r\n .subscribe(x => {\r\n this.equipmentConditions = x.map(condition => {\r\n return { Label: condition.Name, Colour: condition.Colour, Value: condition.ConditionId };\r\n });\r\n });\r\n }\r\n\r\n @HostListener(\"window:beforeunload\")\r\n public canDeactivate(): Observable | boolean {\r\n return !this.form.form.dirty;\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.permissionsService.Reload();\r\n this.permissionsService.HasDeleteEquipmentPermission.subscribe(x => this.hasDeletePermission = x);\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(modules => {\r\n this.modulesAccess = modules;\r\n\r\n this.isAllowedServicing = modules.RecurringJobsEnabled;\r\n this.salesOrdersEnabled = modules.SalesOrderEnabled;\r\n\r\n if (this.isAllowedServicing) {\r\n this.serviceGroups.serviceGroupLoadingData.subscribe(x => {\r\n this.areServiceGroupsAssigned = x.AreServiceGroupAssigned;\r\n });\r\n }\r\n });\r\n\r\n this.settingsService.getSetting(SettingId.UseAdditionalStores).subscribe(res => {\r\n this.additionalStoresEnabled = res.ValueBool;\r\n });\r\n\r\n this.GetUserReferences();\r\n\r\n this.sitesDataSource = this.customerService.GetCustomersDataSource([\"Status\", \"=\", CustomerStatus.ACTIVE]);\r\n this.contactsDataSource = this.contactService.GetContactsDataSource();\r\n this.makesDataSource = this.service.GetMakesDataSource();\r\n this.makeModelsDataSource = this.service.GetMakeModelsDataSource();\r\n this.userReferencesDataSource = this.userRefsService.getListDataStore(UserRefType.EQUIP_1);\r\n this.storeDataSource = this.storeService.GetDataSource();\r\n\r\n this.route.params.subscribe(params => {\r\n const stringId = params.id;\r\n\r\n if (isNaN(Number(stringId))) {\r\n this.equipmentid = 0;\r\n } else {\r\n this.equipmentid = Number(stringId);\r\n this.equipmentContractService.GetContracts(this.equipmentid).subscribe(result => {\r\n if ((result as any).StatusCode) {\r\n this.contracts = [];\r\n } else {\r\n this.contracts = result;\r\n }\r\n });\r\n }\r\n\r\n if (!this.equipmentid) {\r\n this.equipmentid = 0;\r\n this.isNew = true;\r\n\r\n combineLatest([\r\n this.service.GetNewEquipment(),\r\n this.settingsService.getSetting(SettingId.DefaultEquipmentCondition)\r\n ]).subscribe(([newEquipment, defaultCondition]) => {\r\n const preSelectedSite = this.EquipModel.SiteId;\r\n\r\n this.EquipModel = newEquipment;\r\n this.EquipModel.ConditionId = defaultCondition.ValueListSelectedId;\r\n this.updateConditionColour(this.EquipModel.ConditionId);\r\n\r\n if (this.createFromJob) {\r\n this.EquipModel.SiteId = preSelectedSite;\r\n this.LoadDataSources();\r\n }\r\n\r\n this.EquipModel.RefrigerantTypeEditable = true;\r\n this.EquipModel.CurrentChargeEditable = true;\r\n this.EquipModel.Cfts = {\r\n YearOfManufacture: null,\r\n AttachmentLc: null,\r\n AttachmentSwl: null,\r\n Lc: null,\r\n Swl: null\r\n };\r\n });\r\n }\r\n if (this.equipmentid) {\r\n this.accordionDataService.GetEquipmentSalesDetails(this.equipmentid)\r\n .subscribe(details => this.accordionSalesDetails = details);\r\n }\r\n this.IsRecordNavigationEnabled = !this.isNew && this.previousRouteService.PreviousUrlContains(\"/equipment\");\r\n this.Load();\r\n });\r\n\r\n if (this.createFromJob) {\r\n this.LoadDataSources();\r\n }\r\n\r\n this.initComplete = true;\r\n }\r\n\r\n public GetCo2Equivalency(refrigerantType: RefrigerantTypeModel): number {\r\n // ((kg of refrigerant gas / 1000) * GWP)\r\n return ((this.EquipModel?.DesignCapacity ?? 0) / 1000) * (refrigerantType?.GlobalWarmingPotential ?? 0);\r\n }\r\n\r\n public OnStatusChanged(): void {\r\n if (this.equipmentStatus === EquipmentStatus.Stock) {\r\n this.EquipModel.StoreId = 1;\r\n } else {\r\n this.EquipModel.StoreId = null;\r\n }\r\n }\r\n\r\n public OnSelectSite(value: number): void {\r\n if (this.areServiceGroupsAssigned) {\r\n this.pendingSiteId = value;\r\n this.showServiceGroupsWarning = true;\r\n } else {\r\n this.SelectedSiteId = value;\r\n this.SiteChanged();\r\n }\r\n }\r\n\r\n public OnSelectMake(): void {\r\n this.EquipModel.MakeModelId = null;\r\n this.FilterMakeModels(this.selectedMake);\r\n }\r\n\r\n public OpenLogEntryDialog(): void {\r\n this.CylinderLogDialog.Show();\r\n }\r\n\r\n public UpdateRefrigerantType(refrigerantType: RefrigerantTypeModel): void {\r\n this.refrigerantType = refrigerantType;\r\n }\r\n\r\n public NewSite(): void {\r\n let siteId = 0;\r\n this.ng1CustomerService.openCustomerModal(\"site\", this.SelectedSiteId)\r\n .then((id: number) => {\r\n siteId = id;\r\n this.sitesDataSource.filter([\"InvoiceId\", \"=\", this.SelectedSiteId]);\r\n return this.sitesDataSource.reload();\r\n })\r\n .then(() => {\r\n this.EquipModel.ContactId = null;\r\n this.SelectedSiteId = siteId;\r\n this.SiteChanged();\r\n });\r\n }\r\n\r\n public NewContact(): void {\r\n let contactId = null;\r\n this.ng1ContactService.openContactModal(0, this.SelectedSiteId)\r\n .then((id: number) => {\r\n contactId = id;\r\n this.contactsDataSource.filter([\"CustomerId\", \"=\", this.SelectedSiteId]);\r\n return this.contactsDataSource.reload();\r\n })\r\n .then(() => {\r\n this.EquipModel.ContactId = contactId;\r\n });\r\n }\r\n\r\n public NewLocation(): void {\r\n this.showPopup = true;\r\n }\r\n\r\n public CreateNewJob(): void {\r\n const jobFromEquipment: JobCreateModel = {\r\n CustomerId: this.EquipModel.CustomerId,\r\n SiteId: this.SelectedSiteId,\r\n ContactId: this.EquipModel.ContactId,\r\n EquipmentId: this.equipmentid,\r\n JobTypeId: 1,\r\n Reference: null,\r\n ToDo: null,\r\n Notes: null,\r\n WhatThreeWords: null,\r\n SalesOpportunityID: null\r\n };\r\n\r\n this.jobService.Save(jobFromEquipment).subscribe(response => {\r\n if (response.EntityId) {\r\n this.router.navigate([`/jobs/job/${response.EntityId}/${JobTabEnum.Equipment}`]);\r\n }\r\n });\r\n }\r\n\r\n public CreateNewMessage(): void {\r\n this.messageService.SetNewMessageParameters(0, MessageTypes.RefMessage, false, MessageDocTypeIds.Equip, this.equipmentid);\r\n this.router.navigate([\"messages/newmessage\"]);\r\n }\r\n\r\n public CreateNewReminder(): void {\r\n this.ng1reminderService.CreateEquipmentReminder(this.equipmentid, this.EquipModel.ContactId, this.EquipModel.Equip);\r\n }\r\n\r\n public CloseNewLocationDialogue(): void {\r\n this.showPopup = false;\r\n }\r\n\r\n public SaveLocation(location: string): void {\r\n const model = new CustomerLocationModel();\r\n model.CustomerId = this.SelectedSiteId;\r\n model.Location = location;\r\n this.service.CreateNewLocation(model).subscribe((res) => {\r\n this.EquipModel.LocationId = res.EntityId;\r\n this.SelectLocation();\r\n this.showPopup = false;\r\n this.form.form.markAsDirty();\r\n });\r\n }\r\n\r\n public Discard(): void {\r\n if (this.equipmentid) {\r\n this.Load();\r\n this.form.form.markAsPristine();\r\n } else if (this.jobId && this.modulesAccess?.ProEnabled) {\r\n this.router.navigate([`/jobs/job/${this.jobId}/${this.jobSourceTab}`]);\r\n } else {\r\n location.href = \"#/equipment/list\";\r\n }\r\n }\r\n\r\n public SubmitForm(): void {\r\n const hasStatusChangedToRetired = this.equipmentStatus === EquipmentStatus.Retired && this.EquipModel.Status !== this.equipmentStatus;\r\n const hasAnyServicingAssigned =\r\n (this.EquipModel.Servicing && this.EquipModel.Servicing.length > 0) ||\r\n this.areServiceGroupsAssigned;\r\n\r\n if (hasStatusChangedToRetired && hasAnyServicingAssigned) {\r\n this.showEquipmentJobScheduleRemovalWarning = true;\r\n }\r\n else {\r\n this.Save();\r\n }\r\n }\r\n\r\n public ConfirmEquipmentJobScheduleRemoval(confirmed: boolean): void {\r\n this.showEquipmentJobScheduleRemovalWarning = false;\r\n if (confirmed) {\r\n this.Save();\r\n }\r\n }\r\n\r\n public Save(): void {\r\n this.isLoading = true;\r\n this.EquipModel.Status = this.equipmentStatus;\r\n this.EquipModel.SalesWarrantyStart = this.dateOnlyService.RecalculateDateOnSave(this.warrantyStartUI);\r\n\r\n if (this.EquipModel.Servicing !== null) {\r\n this.EquipModel.Servicing.forEach((item: ServicingItem) => {\r\n if (item.IsNew) {\r\n item.ServiceLevelId = null;\r\n }\r\n });\r\n }\r\n\r\n this.formMessageService\r\n .RegisterObservable(this.service.Save(this.EquipModel), this.formName)\r\n .pipe(\r\n map(id => {\r\n if (this.modulesAccess?.ProEnabled && this.jobId && id) {\r\n this.equipmentDataService.AddEquipmentToJob({\r\n JobId: this.jobId,\r\n SelectedEquipmentIds: [id],\r\n WorkRequired: this.EquipModel.WorkRequired,\r\n IsInstall: this.jobSourceTab === JobTabEnum.Install\r\n }).subscribe();\r\n }\r\n return id;\r\n })\r\n )\r\n .subscribe(res => {\r\n if (this.createFromJob) {\r\n this.router.navigate([`/jobs/job/${this.jobId}/${this.jobSourceTab}`]);\r\n } else {\r\n location.href = `#/equipment/detail/${res}`;\r\n this.form.form.markAsPristine();\r\n this.isLoading = false;\r\n this.Load();\r\n }\r\n }, () => this.isLoading = false);\r\n }\r\n\r\n public RestrictInvalidCharacters(e) {\r\n const invalidChars = [\"-\", \"+\", \"e\", \"E\", \".\", \",\"];\r\n if (invalidChars.includes(e.key)) {\r\n e.preventDefault();\r\n }\r\n }\r\n\r\n public ValidateWarrantyLength(): void {\r\n if (this.EquipModel.SalesWarrantyLength &&\r\n (this.EquipModel.SalesWarrantyLength < 0 || this.EquipModel.SalesWarrantyLength > this.maxSalesWarrantyLength)) {\r\n this.form.form.controls[\"equipment.detail.sales.warranty\"].setErrors({ outOfRange: { start: 0, end: this.maxSalesWarrantyLength } });\r\n }\r\n }\r\n\r\n public ValidateSerialNo($event: any): void {\r\n if (this.EquipModel.SerialNo) {\r\n $event.stopPropagation();\r\n this.service.GetSerialNoDuplicates(this.isNew ? 0 : this.EquipModel.EquipId, this.EquipModel.SerialNo).subscribe(res => {\r\n this.duplicates = res;\r\n if (this.duplicates.some(() => true)) {\r\n this.translate.Translate(\"equipment.detail.duplicated.serial.no.message\", { value: this.duplicates.map((v) => v.Equip).join(\", \") })\r\n .subscribe((t) => {\r\n this.duplicatedMessage = t;\r\n this.showDuplicatedPopup = true;\r\n });\r\n }\r\n });\r\n }\r\n }\r\n\r\n public ValidateEquip(): void {\r\n if (this.EquipModel.Equip) {\r\n this.service.EquipDuplicated(this.isNew ? 0 : this.EquipModel.EquipId, this.EquipModel.Equip).subscribe(duplicated => {\r\n if (duplicated) {\r\n this.form.form.controls[\"equipment.detail.equipment.no\"].markAsDirty();\r\n this.form.form.controls[\"equipment.detail.equipment.no\"].setErrors({ duplicatedEquipmentNo: true });\r\n } else {\r\n this.form.form.controls[\"equipment.detail.equipment.no\"].setErrors(null);\r\n }\r\n });\r\n }\r\n }\r\n\r\n public OnSelectMakeModel(): void {\r\n if (this.EquipModel.MakeModelId) {\r\n\r\n let showMakeModelCopyMessage: boolean = false;\r\n\r\n this.makeModelService.Get(this.EquipModel.MakeModelId)\r\n .subscribe((mm: MakeModelItem) => {\r\n if (mm.Attributes.length > 0) {\r\n showMakeModelCopyMessage = true;\r\n }\r\n\r\n if (this.modulesAccess?.ProEnabled) {\r\n this.EquipModel.SalesWarrantyLengthMeterUnits = mm.SalesWarrantyLengthMeterUnits;\r\n this.EquipModel.SalesWarrantyLength = mm.SalesWarrantyLength;\r\n }\r\n\r\n if (this.isAllowedServicing && !this.EquipModel.EquipId) {\r\n this.makeModelService.GetServiceLevel(this.EquipModel.MakeModelId)\r\n .subscribe(result => {\r\n if (result.length > 0 || mm.Sfg20ScheduleId) {\r\n if (showMakeModelCopyMessage) {\r\n this.titleConfirmationDialogue = this.translateService.instant(\"equipment.copy.attributes.title-both\");\r\n this.messageConfirmationDialogue = this.translateService.instant(\"equipment.copy.attributes.message-both\");\r\n } else {\r\n this.titleConfirmationDialogue = this.translateService.instant(\"equipment.copy.attributes-service.title\");\r\n this.messageConfirmationDialogue = this.translateService.instant(\"equipment.copy.attributes-service.message\");\r\n }\r\n this.showAttributeCopyMessage = true;\r\n } else if (showMakeModelCopyMessage) {\r\n this.titleConfirmationDialogue = this.translateService.instant(\"equipment.copy.attributes.title\");\r\n this.messageConfirmationDialogue = this.translateService.instant(\"equipment.copy.attributes.message\");\r\n this.showAttributeCopyMessage = true;\r\n }\r\n });\r\n } else {\r\n if (showMakeModelCopyMessage) {\r\n this.titleConfirmationDialogue = this.translateService.instant(\"equipment.copy.attributes.title\");\r\n this.messageConfirmationDialogue = this.translateService.instant(\"equipment.copy.attributes.message\");\r\n this.showAttributeCopyMessage = true;\r\n }\r\n }\r\n });\r\n }\r\n }\r\n\r\n public ConfirmAction(confirm: boolean): void {\r\n if (confirm) {\r\n this.makeModelService.Get(this.EquipModel.MakeModelId)\r\n .subscribe((mm: MakeModelItem) => {\r\n this.EquipModel.Attributes = mm.Attributes.map((i) => {\r\n i.Id = this.EquipModel.EquipId;\r\n return i;\r\n });\r\n\r\n if (this.isAllowedServicing && this.isNew) {\r\n this.EquipModel.Sfg20ScheduleId = mm.Sfg20ScheduleId;\r\n }\r\n });\r\n if (this.isAllowedServicing && !this.EquipModel.EquipId) {\r\n this.setAllColorsAvailable();\r\n this.makeModelService.GetServiceLevel(this.EquipModel.MakeModelId)\r\n .subscribe(result => {\r\n if (result.length > 0) {\r\n this.EquipModel.Servicing = new Array();\r\n result.forEach((item) => { // adds new attributes to the model\r\n const newItem = new ServicingItem();\r\n const colorNotFound = 0;\r\n const availableColors = this.backgroundColors.find(el => !el.used);\r\n newItem.DefaultJobType = item.DefaultJobType;\r\n newItem.ServiceLevelId = Guid.create().toString();\r\n newItem.MakeModelId = item.MakeModelId;\r\n newItem.NextDue = new Date(new Date().toDateString());\r\n newItem.Interval = item.Interval;\r\n newItem.InspectTemplateId = item.InspectTemplateId;\r\n newItem.LabourBudgetHours = item.LabourBudgetHours;\r\n newItem.IntervalUnits = item.IntervalUnits;\r\n newItem.MeterUnits = item.MeterUnits;\r\n newItem.NextDueCalcTypeId = item.NextDueCalcTypeId;\r\n newItem.BackgroundColor = availableColors ? availableColors.id : colorNotFound;\r\n newItem.Price = item.Price;\r\n newItem.IsNew = true;\r\n newItem.ComponentUsedOn = ServicingComponentUsageEnum.Equipments;\r\n newItem.ServiceParts = item.ServiceParts;\r\n newItem.WorkDescription = item.WorkDescription;\r\n newItem.Sfg20FrequencyInterval = item.Sfg20FrequencyInterval;\r\n newItem.Sfg20FrequencyPeriod = item.Sfg20FrequencyPeriod;\r\n this.EquipModel.Servicing.push(newItem);\r\n this.handleServicingBackgrounds();\r\n });\r\n this.recurringJobsService.servicingData.next(this.EquipModel.Servicing);\r\n }\r\n });\r\n }\r\n }\r\n this.showAttributeCopyMessage = false;\r\n }\r\n\r\n public Delete(): void {\r\n this.showDeleteMessage = true;\r\n }\r\n\r\n public ConfirmDeleteAction(confirm: boolean): void {\r\n if (confirm) {\r\n this.isLoading = true;\r\n this.formMessageService.RegisterObservable(this.service.DeleteEquipment(this.EquipModel.EquipId), this.formName)\r\n .pipe(finalize(() => {\r\n this.isLoading = false;\r\n this.showDeleteMessage = false;\r\n }))\r\n .subscribe(() => this.location.go(\"/equipment/list\"));\r\n } else {\r\n this.showDeleteMessage = false;\r\n }\r\n }\r\n\r\n public OnLogAdded(): void {\r\n this.updateCurrentCharge();\r\n this.equipmentRefrigerant.OnLogAdded();\r\n }\r\n\r\n public updateConditionColour(newValue: number): void {\r\n this.EquipModel.ConditionColour = this.equipmentConditions.find(x => x.Value === newValue)?.Colour;\r\n }\r\n\r\n private LoadDataSources(): void {\r\n this.SelectLocation();\r\n this.SelectContact();\r\n\r\n if (this.equipmentid && this.modulesAccess.PurchaseOrdersEnabled) {\r\n this.accordionDataService.GetEquipmentPurchasingDetails(this.equipmentid).subscribe(result => {\r\n this.accordionPurchasingDetails = result;\r\n });\r\n }\r\n }\r\n\r\n private GetUserReferences(): void {\r\n this.UICustomisations = JSON.parse(localStorage.getItem(\"ls.userReferences\"));\r\n const userRefEquipment1 = this.UICustomisations.list.filter((i) => i.UICustomisationID === UICustomisation.EQUIPMENT_REF1)[0];\r\n this.userRefEquipment1Label = userRefEquipment1.CustomText || userRefEquipment1.OriginalText;\r\n const userRefEquipment2 = this.UICustomisations.list.filter((i) => i.UICustomisationID === UICustomisation.EQUIPMENT_REF2)[0];\r\n this.userRefEquipment2Label = userRefEquipment2.CustomText || userRefEquipment2.OriginalText;\r\n const userRefEquipment3 = this.UICustomisations.list.filter((i) => i.UICustomisationID === UICustomisation.EQUIPMENT_REF3)[0];\r\n this.userRefEquipment3Label = userRefEquipment3.CustomText || userRefEquipment3.OriginalText;\r\n }\r\n\r\n private FilterContacts(siteId: number): Promise {\r\n this.contactsDataSource.filter([\"CustomerId\", \"=\", siteId]);\r\n return this.contactsDataSource.reload();\r\n }\r\n\r\n private FilterMakeModels(make: string): Promise {\r\n this.makeModelsDataSource.filter([\"Make\", \"=\", make]);\r\n return this.makeModelsDataSource.reload();\r\n }\r\n\r\n private GetEquipmentStatus(): Array {\r\n return Object.keys(EquipmentStatus)\r\n .filter((v) => !isNaN(Number(v)))\r\n .map(key => Number(key));\r\n }\r\n\r\n private SelectContact(): void {\r\n this.FilterContacts(this.SelectedSiteId);\r\n }\r\n\r\n private SelectMakeModel(): void {\r\n this.makeModelsDataSource.store().byKey(this.EquipModel.MakeModelId).then(selectedMake => {\r\n this.selectedMake = selectedMake.Make;\r\n const selectedMakeModel = this.EquipModel.MakeModelId; // caching selected make\r\n this.EquipModel.MakeModelId = null; // remove selected make from the model before loading the data sources\r\n this.FilterMakeModels(this.selectedMake).then(() => {\r\n this.EquipModel.MakeModelId = selectedMakeModel; // assign back the cached selected make after the data sources are reloaded\r\n });\r\n });\r\n }\r\n\r\n private SelectLocation(): void {\r\n this.locationsDataSource = this.service.GetLocationsDataSource(this.SelectedSiteId);\r\n }\r\n\r\n public servicingsSourceChanged(items: Array) {\r\n this.EquipModel.Servicing = items;\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public Load(): void {\r\n this.showDuplicatedPopup = false;\r\n this.showPopup = false;\r\n this.duplicatedMessage = \"\";\r\n if (this.equipmentid) {\r\n this.isLoading = true;\r\n this.service.Get(this.equipmentid).pipe(finalize(() => this.isLoading = false)).subscribe(m => {\r\n this.EquipModel = m;\r\n this.equipmentStatus = this.EquipModel.Status;\r\n this.warrantyStartUI = m.SalesWarrantyStart;\r\n this.sitesDataSource.store().byKey(this.SelectedSiteId).then(x => {\r\n this.EquipModel.CustomerId = x.InvoiceId;\r\n });\r\n this.LoadDataSources();\r\n this.SelectContact();\r\n this.SelectMakeModel();\r\n this.recurringJobsService.Reload(true);\r\n this.SetCurrentItem(this.equipmentid);\r\n\r\n this.equipmentRefrigerant?.OnLogUpdated();\r\n });\r\n } else {\r\n this.isLoading = false;\r\n this.FilterMakeModels(null);\r\n this.FilterContacts(null);\r\n }\r\n\r\n this.LoadPrimaryImage();\r\n }\r\n\r\n private updateCurrentCharge(): void {\r\n this.service.Get(this.equipmentid).subscribe(m => {\r\n this.EquipModel.CurrentCharge = m.CurrentCharge;\r\n });\r\n }\r\n\r\n handleJobTypesBackground($event: Array) {\r\n this.backgroundColors = $event || [];\r\n }\r\n\r\n public ConfirmDeleteServiceGroup($event: boolean): void {\r\n if ($event) {\r\n this.service.UnAssignServiceGroup(this.equipmentid).subscribe(() => {\r\n this.SelectedSiteId = this.pendingSiteId;\r\n this.pendingSiteId = null;\r\n this.areServiceGroupsAssigned = false;\r\n this.SiteChanged();\r\n });\r\n }\r\n this.showServiceGroupsWarning = false;\r\n }\r\n\r\n public handleServiceGroups($event: ServiceGroupCustomerModel | null): void {\r\n if ($event && $event.Id) {\r\n this.serviceGroups.GetServicingDataInServiceGroup($event.Id).subscribe(x => {\r\n this.EquipModel.Servicing = x.ServiceGroupServicing;\r\n this.EquipModel.Sfg20ScheduleId = x.Sfg20ScheduleId;\r\n this.recurringJobsService.jobTypesQuantity.next(x.ServiceGroupServicing.length);\r\n });\r\n this.assignedServiceGroupData = $event;\r\n } else {\r\n this.assignedServiceGroupData = null;\r\n this.Load();\r\n }\r\n }\r\n\r\n public LoadPrimaryImage(isChanged: boolean = false): void {\r\n this.primaryImageService.primaryImage.subscribe(image => {\r\n if (image) {\r\n const trustedImage = this.sanitizer.bypassSecurityTrustUrl(image.toString());\r\n this.primaryImage = trustedImage;\r\n this.accordionComponent.instance.expandItem(0);\r\n } else {\r\n this.primaryImage = null;\r\n this.accordionComponent.instance.collapseItem(0);\r\n this.accordionComponent.instance.expandItem(4);\r\n }\r\n });\r\n\r\n if (this.equipmentid) {\r\n this.primaryImageService.GetPrimaryImage(this.equipmentid, DocumentTypeEnum.Equipment);\r\n }\r\n\r\n if (isChanged) {\r\n this.Save();\r\n }\r\n }\r\n\r\n public OpenCloningWindow(): void {\r\n this.isVisibleCopyEquipment = true;\r\n this.noOfCopies = 1;\r\n }\r\n\r\n public OpenCloseCloneEquipmentBox(show: boolean): void {\r\n if (show) {\r\n document.querySelector(\"body\").classList.add(\"overhidn\");\r\n } else {\r\n document.querySelector(\"body\").classList.remove(\"overhidn\");\r\n }\r\n this.isVisibleCopyEquipment = show;\r\n }\r\n\r\n public CloneEquipmentProcess(): void {\r\n this.isVisibleCopyEquipment = false;\r\n this.service.CloneEquipment({ EquipmentId: this.equipmentid, NumberOfCopies: this.noOfCopies }).subscribe(ids => {\r\n if (ids.length > 0) {\r\n this.copyEquipmentMessageSuccess = this.translateService.instant(\"equipment.cloned-successful\", { no: ids.length });\r\n this.copiedEquipmentIds = ids;\r\n }\r\n }).add(() => this.copyEquipSuccessWindowMessage = true);\r\n }\r\n\r\n public ShowClonedEquipmentList($event: boolean): void {\r\n this.copyEquipSuccessWindowMessage = false;\r\n if ($event) {\r\n this.router.navigate([\"/equipment/list\"], { state: { equipIds: this.copiedEquipmentIds } });\r\n }\r\n }\r\n\r\n public UpdateEquipmentCftsData(data: EquipmentCfts) {\r\n this.EquipModel.Cfts = data;\r\n }\r\n\r\n private handleServicingBackgrounds() {\r\n this.backgroundColors.map(item => {\r\n const isUsed = this.EquipModel.Servicing.find(el => el.BackgroundColor === item.id);\r\n item.used = isUsed != null;\r\n });\r\n }\r\n\r\n private setAllColorsAvailable() {\r\n if (this.backgroundColors) {\r\n this.backgroundColors.map(item => item.used = false);\r\n }\r\n }\r\n\r\n private SetCurrentItem(id: number) {\r\n if (this.IsRecordNavigationEnabled) {\r\n this.equipmentDataService.SetCurrentItem(id).then(() => {\r\n this.CanNavigatePrevious = this.equipmentDataService.IsPreviousAvailable();\r\n this.CanNavigateNext = this.equipmentDataService.IsNextAvailable();\r\n });\r\n }\r\n }\r\n\r\n public NavigateNext(): void {\r\n if (this.CanNavigateNext) {\r\n this.equipmentDataService.GetNextId().then(nextId => {\r\n this.router.navigate([\"equipment\", \"detail\", nextId]);\r\n });\r\n }\r\n }\r\n\r\n public NavigatePrevious(): void {\r\n if (this.CanNavigatePrevious) {\r\n this.equipmentDataService.GetPreviousId().then(previousId => {\r\n this.router.navigate([\"equipment\", \"detail\", previousId]);\r\n });\r\n }\r\n }\r\n\r\n private SiteChanged(): void {\r\n this.form.form.markAsDirty();\r\n this.EquipModel.ContactId = null;\r\n this.EquipModel.CustomerId = null;\r\n this.EquipModel.LocationId = null;\r\n if (this.SelectedSiteId) {\r\n this.LoadDataSources();\r\n this.sitesDataSource.store().byKey(this.SelectedSiteId).then(site => {\r\n this.EquipModel.CustomerId = site.InvoiceId;\r\n\r\n this.service.GetDefaultContactId(this.SelectedSiteId).subscribe((res) => {\r\n this.EquipModel.ContactId = 0;\r\n this.EquipModel.ContactId = res;\r\n });\r\n this.serviceGroups.customerChanged.next(this.SelectedSiteId);\r\n });\r\n }\r\n }\r\n}\r\n","import { Component, Input, OnInit } from \"@angular/core\";\r\nimport { DomSanitizer, SafeResourceUrl } from \"@angular/platform-browser\";\r\nimport { Module, ToasterService, ToastType } from \"servicesight-shared\";\r\nimport { AuthService } from \"../../services/auth/auth.service\";\r\nimport { LicenseService } from \"../../services/licence/license.service\";\r\n\r\n@Component({\r\n selector: \"app-marketing-template\",\r\n templateUrl: \"./marketing-template.component.html\",\r\n styleUrls: [\"./marketing-template.component.scss\"]\r\n})\r\nexport class MarketingTemplateComponent implements OnInit {\r\n\r\n @Input() title: string;\r\n @Input() heading: string;\r\n @Input() videoId: string;\r\n @Input() type: Module;\r\n\r\n public videoUrl: SafeResourceUrl;\r\n\r\n constructor(\r\n private authService: AuthService,\r\n private licenseService: LicenseService,\r\n private toaster: ToasterService,\r\n private sanitizer: DomSanitizer) { }\r\n\r\n public ngOnInit(): void {\r\n this.videoUrl = this.makeSafeUrl(this.videoId);\r\n }\r\n\r\n public contactMe() {\r\n const companyId = this.authService.AuthorizationData.defaultcompanyid;\r\n const userName = this.authService.Username;\r\n\r\n this.licenseService.RequestContactMe(this.type, userName, companyId)\r\n .then(() => this.toaster.pop(\"equipment.marketing.contact-me-confirm\", ToastType.medium));\r\n }\r\n\r\n private makeSafeUrl(videoId): SafeResourceUrl {\r\n const url = `https://www.youtube.com/embed/${videoId}?autoplay=1&loop=1&mute=1&playlist=${videoId}&controls=1&rel=0`;\r\n return this.sanitizer.bypassSecurityTrustResourceUrl(url);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n

{{ title | translate }}

\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
{{ heading | translate }}
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n

{{ 'equipment.marketing.features' | translate }}

\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n","\r\n
    \r\n
  • {{ 'equipment.marketing.feature-1' | translate }}
  • \r\n
  • {{ 'equipment.marketing.feature-2' | translate }}
  • \r\n
  • {{ 'equipment.marketing.feature-3' | translate }}
  • \r\n
  • {{ 'equipment.marketing.feature-4' | translate }}
  • \r\n
  • {{ 'equipment.marketing.feature-5' | translate }}
  • \r\n
  • {{ 'equipment.marketing.feature-6' | translate }}
  • \r\n
  • {{ 'equipment.marketing.feature-7' | translate }}
  • \r\n
\r\n
\r\n

{{ 'equipment.marketing.price-1' | translate: { price1: price1, price2: price2 } }}

\r\n

{{ 'equipment.marketing.price-2' | translate: { price2: price2, price3: price3 } }}

\r\n
\r\n\r\n","import { Component, OnInit } from \"@angular/core\";\r\nimport { Module } from \"servicesight-shared\";\r\nimport { LicenseService } from \"../../shared/services/licence/license.service\";\r\n\r\nconst Ireland: number = 100;\r\nconst USA: number = 224;\r\n\r\n@Component({\r\n selector: \"app-equipment-marketing\",\r\n templateUrl: \"./equipment-marketing.component.html\",\r\n styleUrls: [\"../../../assets/css/marketing.component.scss\"]\r\n})\r\nexport class EquipmentMarketingComponent implements OnInit {\r\n\r\n public ready: boolean = false;\r\n public type: Module = Module.Equipment;\r\n public videoId: string = \"cp3EdQx4iws\";\r\n public price1: string = \"£10\";\r\n public price2: string = \"£15\";\r\n public price3: string = \"£30\";\r\n\r\n constructor(private licenseService: LicenseService) { }\r\n\r\n public ngOnInit(): void {\r\n this.licenseService.GetCompanyCountryId().then(countryId => {\r\n if (countryId === USA) {\r\n this.videoId = \"f8Whq3bcAzM\";\r\n } else if (countryId === Ireland) {\r\n this.videoId = \"c56Tp4RY22I\";\r\n this.price1 = \"€10\";\r\n this.price2 = \"€15\";\r\n this.price3 = \"€30\";\r\n } else {\r\n this.videoId = \"cp3EdQx4iws\";\r\n }\r\n\r\n this.ready = true;\r\n });\r\n }\r\n}\r\n","// eslint-disable-next-line prefer-arrow/prefer-arrow-functions\r\nexport function deepEquals(x: any, y: any): boolean {\r\n if (x === y) {\r\n return true; // if both x and y are null or undefined and exactly the same\r\n } else if (!(x instanceof Object) || !(y instanceof Object)) {\r\n return false; // if they are not strictly equal, they both need to be Objects\r\n } else if (x.constructor !== y.constructor) {\r\n // they must have the exact same prototype chain, the closest we can do is\r\n // test their constructor.\r\n return false;\r\n } else {\r\n for (const p in x) {\r\n if (!x.hasOwnProperty(p)) {\r\n continue; // other properties were tested using x.constructor === y.constructor\r\n }\r\n if (!y.hasOwnProperty(p)) {\r\n return false; // allows to compare x[ p ] and y[ p ] when set to undefined\r\n }\r\n if (x[p] === y[p]) {\r\n continue; // if they have the same strict value or identity then they are equal\r\n }\r\n if (typeof (x[p]) !== \"object\") {\r\n return false; // Numbers, Strings, Functions, Booleans must be strictly equal\r\n }\r\n if (!deepEquals(x[p], y[p])) {\r\n return false;\r\n }\r\n }\r\n for (const p in y) {\r\n if (y.hasOwnProperty(p) && !x.hasOwnProperty(p)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n}\r\n","
\r\n
\r\n

{{ importTitle | translate }}

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

{{ 'import.step.file.title' | translate }}

\r\n

{{ 'import.step.file.error' | translate }}

\r\n \r\n \r\n \r\n {{ 'import.step.file.sample' | translate }}\r\n \r\n
\r\n\r\n \r\n
\r\n

{{ 'import.step.map.title' | translate }}

\r\n
\r\n
\r\n \r\n {{ 'import.step.map.format-detected' | translate: { format: mappedTemplateText } }}\r\n
\r\n
\r\n \r\n   {{ 'import.step.map.show-hide' | translate }}\r\n
\r\n
\r\n
\r\n
-1, 'invalid-map': item.value.required && item.value.value === -1 }\"\r\n *ngFor=\"let item of map | keyvalue\">\r\n\r\n {{ item.value.displayName }}\r\n {{ item.value.displayName | translate }}\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n

{{ 'import.step.preupload.title' | translate }}

\r\n

{{ 'import.step.upload.title' | translate }}

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

0\">{{ 'import.step.preupload.noerrors' | translate }}

\r\n

0\">{{ 'import.step.preupload.someerrors' | translate }}

\r\n

{{ 'import.step.preupload.fixsrequired' | translate }}

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

0\">{{ 'import.step.upload.someerrors' | translate }}

\r\n

{{ 'import.step.upload.fixsrequired' | translate }}

\r\n
\r\n
{{ 'import.step.preupload.total' | translate: { n: Summary.TotalRows } }}
\r\n
{{ 'import.step.preupload.valid' | translate: { n: Summary.NumberOfValidRows } }}
\r\n
{{ 'import.step.upload.valid' | translate: { n: Summary.NumberOfValidRows } }}
\r\n\r\n
0\">{{ 'import.step.upload.warnings' | translate: { n: Summary.warnings.length } }}
\r\n\r\n
0 && wizzard.current === 2\">{{ 'import.step.preupload.invaild' | translate: { n: Summary.NumberOfInvalidRows } }}
\r\n
0 && wizzard.current === 3\">{{ 'import.step.upload.invaild' | translate: { n: Summary.NumberOfInvalidRows } }}
\r\n
\r\n
0\" class=\"mgt1 pdl2\">\r\n

{{ 'import.step.upload.fixes' | translate }}

\r\n
\r\n
\r\n
\r\n \r\n \r\n {{ 'import.step.upload.fix-row' | translate: { n: row.RowNumber } }}\r\n \r\n
\r\n
\r\n
{{ error | translate }}
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n","import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxFileUploaderComponent } from \"devextreme-angular\";\r\nimport * as XLSX from \"xlsx\";\r\nimport { deepEquals } from \"./helpers/deep-equals.function\";\r\nimport { ImportColumnDictionary } from \"../../models/import/import-column-dictionary.model\";\r\nimport { ImportColumn } from \"../../models/import/import-column.model\";\r\nimport { ImportMapResult } from \"../../models/import/import-map-result.model\";\r\nimport { ImportMap } from \"../../models/import/import-map.model\";\r\nimport { ImportMappedRow } from \"../../models/import/import-mapped-row.model\";\r\nimport { ImportSummary } from \"../../models/import/import-summary.model\";\r\nimport { ImportValidationObject } from \"../../models/import/import-validation-object.model\";\r\nimport { ImportValidationFunc } from \"../../models/import/import-validation.type\";\r\n\r\n@Component({\r\n selector: \"app-importer\",\r\n templateUrl: \"./importer.component.html\",\r\n styleUrls: [\"./importer.component.scss\"]\r\n})\r\nexport class ImporterComponent implements OnInit {\r\n @ViewChild(\"uploader\", { static: true }) uploader: DxFileUploaderComponent;\r\n\r\n private get mappingKey(): string {\r\n return `${this.importTitle}.custom.mapping`;\r\n }\r\n\r\n private importData: any[] = null;\r\n private customMap: ImportMap;\r\n private mappedTemplateText: string;\r\n private rawColumns: Array;\r\n private noMatch: number = -1;\r\n\r\n public mappingIsCollapsed: boolean = true;\r\n public mappingIsKnown: boolean = true;\r\n public fileInvalid: boolean = false;\r\n public wizzard = {\r\n steps: [\"import.step.file\", \"import.step.map\", \"import.step.upload\"],\r\n current: 0\r\n };\r\n\r\n public Summary: ImportSummary = {\r\n TotalRows: 0,\r\n NumberOfInvalidRows: 0,\r\n NumberOfValidRows: 0,\r\n invalid: [],\r\n valid: [],\r\n warnings: []\r\n };\r\n public file = [];\r\n public fileHeaders: ImportColumn[];\r\n public map: ImportColumnDictionary;\r\n\r\n get bkBtnText(): string {\r\n return this.wizzard.current === 0 ? \"buttons.cancel\" : \"buttons.back\";\r\n }\r\n\r\n get nxBtnText(): string {\r\n return this.wizzard.current === 2 ? \"buttons.upload\" : \"buttons.next\";\r\n }\r\n\r\n get nxBtnEnabled(): boolean {\r\n if (this.fileInvalid) {\r\n return false;\r\n } else if (this.wizzard.current === 0) {\r\n return this.importData !== null;\r\n } else if (this.wizzard.current === 1) {\r\n // eslint-disable-next-line guard-for-in\r\n for (const key in this.map) {\r\n const current = this.map[key];\r\n if (current.required && current.value === this.noMatch) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n } else if (this.wizzard.current === 2) {\r\n return this.Summary && this.Summary.valid ? this.Summary.valid.length > 0 : false;\r\n } else if (this.wizzard.current === 3) {\r\n return true;\r\n } else {\r\n return true;\r\n }\r\n }\r\n\r\n get finished(): boolean {\r\n if (this.wizzard.current === 3 && this.Summary.NumberOfInvalidRows > 0) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n @Output() public upload = new EventEmitter();\r\n @Output() public downloadSample = new EventEmitter();\r\n @Output() public newFileSelected = new EventEmitter();\r\n\r\n @Input() public useTranslate: boolean = false;\r\n @Input() public importTitle: string;\r\n @Input() public defaultMap: ImportColumnDictionary = { };\r\n @Input() public defaultMapper: { [key: string]: string } = { };\r\n @Input() public preDefinedMaps: Array = [];\r\n @Input() public validationObj: ImportValidationObject = { //--- Sould we return lists of errors from these functions for better error messages?\r\n Empty: () => true\r\n };\r\n @Input() public converterObj: { [key: string]: (val: any) => any } = {\r\n\r\n };\r\n @Input() public addtionalRowValidator: ImportValidationFunc =\r\n () => {\r\n return {\r\n isValid: true,\r\n errors: []\r\n };\r\n };\r\n\r\n constructor(private translateService: TranslateService) { }\r\n\r\n ngOnInit() {\r\n this.customMap = JSON.parse(localStorage.getItem(this.mappingKey)) as ImportMap;\r\n if (this.customMap) {\r\n this.preDefinedMaps.push(this.customMap);\r\n }\r\n }\r\n\r\n next(): void {\r\n if (this.wizzard.current === 1) {\r\n //validate\r\n // TEMPORARY for help creating pre-defined mappings\r\n //console.log(this.map);\r\n this.newFileSelected.emit(); // reset row validation\r\n const clientValidationSummary = this.mapAndValidate(this.importData, this.map);\r\n\r\n this.saveCustomMapping();\r\n\r\n const total = clientValidationSummary.valid.length + clientValidationSummary.invalid.length;\r\n const validCount = clientValidationSummary.valid.length;\r\n const invalidCount = clientValidationSummary.invalid.length;\r\n\r\n // Bind summary to ui\r\n this.Summary.valid = clientValidationSummary.valid;\r\n this.setSummary(total, validCount, invalidCount, clientValidationSummary.invalid, true);\r\n }\r\n\r\n if (this.wizzard.current === 2) {\r\n // Call import\r\n this.upload.emit(this.Summary.valid);\r\n } else {\r\n this.wizzard.current++;\r\n }\r\n }\r\n\r\n uploadError(errorCount: number, errors: any[]): void {\r\n //--- Not everything worked\r\n this.wizzard.current = 3; // Final feedback stage\r\n this.setSummary(null, null, errorCount, errors, true);\r\n }\r\n\r\n emptyFile(): void {\r\n this.uploader.instance.reset();\r\n }\r\n\r\n back(): void {\r\n if (this.wizzard.current === 0) {\r\n window.history.back();\r\n } else if (this.wizzard.current === 1 || this.wizzard.current === 2) {\r\n this.Summary.invalid.length = 0;\r\n } else if (this.wizzard.current === 3) {\r\n this.wizzard.current--; // Skip pre upload validation\r\n }\r\n this.wizzard.current--;\r\n }\r\n\r\n showHideMapping(): void {\r\n this.mappingIsCollapsed = !this.mappingIsCollapsed;\r\n }\r\n\r\n getSample(): void {\r\n this.downloadSample.emit();\r\n }\r\n\r\n spreadSheetSelected(ev): void {\r\n if (this.file.length === 0) {\r\n return;\r\n }\r\n const reader = new FileReader();\r\n\r\n reader.onload = (e: any) => {\r\n // eslint-disable-next-line no-underscore-dangle\r\n this.fileInvalid = !ev.component._files[0].isValid();\r\n\r\n const data = e.target.result;\r\n const workbook = XLSX.read(data, { type: \"array\", raw: true, cellDates: true });\r\n const worksheet = workbook.Sheets[workbook.SheetNames[0]];\r\n const outputData = XLSX.utils.sheet_to_json(worksheet, { header: 1, raw: true });\r\n\r\n const columns = this.getColumns(outputData[0] as string[]);\r\n if (!this.fileInvalid) { // If file headers okay continue processing\r\n const template = this.checkDefinedMaps(outputData[0] as string[]);\r\n if (template) {\r\n this.mappedTemplateText = template.name;\r\n this.map = template.map;\r\n this.mappingIsKnown = true;\r\n this.mappingIsCollapsed = true;\r\n } else {\r\n this.mapColumns(columns);\r\n this.mappingIsKnown = false;\r\n this.mappingIsCollapsed = false;\r\n }\r\n // TEMPORARY for help creating pre-defined mappings\r\n this.rawColumns = outputData[0] as string[];\r\n\r\n this.importData = outputData;\r\n this.fileHeaders = columns;\r\n this.newFileSelected.emit();\r\n\r\n } else {\r\n return;\r\n }\r\n };\r\n reader.readAsArrayBuffer(this.file[0]);\r\n }\r\n\r\n setSummary(total: number, valid: number, invalid: number, errors: any[], resetErrors: boolean): void {\r\n this.Summary.TotalRows = total; // Should this be the number of rows in the file and not change??\r\n this.Summary.NumberOfValidRows = valid;\r\n this.Summary.NumberOfInvalidRows = invalid;\r\n\r\n if (resetErrors && errors.length > 0) {\r\n this.Summary.invalid = errors;\r\n } else if (Array.isArray(this.Summary.invalid)) {\r\n this.Summary.invalid.concat(errors);\r\n }\r\n }\r\n\r\n checkDefinedMaps(columns: Array): ImportMap {\r\n const columnsStr = columns.toString();\r\n const map = this.preDefinedMaps.find(m => m.columns.toString() === columnsStr);\r\n return map;\r\n }\r\n\r\n getColumns(row: Array): Array {\r\n return [this.translateService.instant(\"import.column.nomatch\")].concat(row).map((val, i) => {\r\n if (typeof val === \"string\") {\r\n return { value: val, index: i - 1 };\r\n } else { // Something is up with the header row?\r\n this.fileInvalid = true;\r\n }\r\n }).filter(col => col);\r\n }\r\n\r\n mapColumns(columns: Array) {\r\n this.map = this.resetMap();\r\n this.fileInvalid = false;\r\n\r\n const len = columns.length;\r\n let i = 1;\r\n for (; i < len; i++) {\r\n if (columns[i] && columns[i].value) {\r\n let realName = null;\r\n for (const prop in this.defaultMapper) {\r\n if (Object.prototype.hasOwnProperty.call(this.defaultMapper, prop)) {\r\n const fromFile = columns[i].value.replace(/\\W/g, \"\").toLowerCase();\r\n const propSafe = prop.replace(/\\W/g, \"\").toLowerCase();\r\n if (propSafe === fromFile) {\r\n realName = this.defaultMapper[prop];\r\n }\r\n }\r\n }\r\n\r\n if (realName) {\r\n const mapItem = this.map[realName];\r\n if (mapItem) {\r\n mapItem.value = columns[i].index;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n mapAndValidate(rows: any[], map: ImportColumnDictionary): ImportMapResult {\r\n const len = rows.length;\r\n const out: ImportMapResult = {\r\n valid: [],\r\n invalid: [],\r\n warnings: []\r\n };\r\n\r\n for (let r = 1; r < len; r++) {\r\n const data = rows[r];\r\n const mappedRow: ImportMappedRow = {\r\n isCollapsed: true, //for error UI\r\n Errors: [],\r\n valid: true,\r\n RowNumber: r\r\n };\r\n\r\n if (data.length === 0) {\r\n continue;\r\n }\r\n\r\n // eslint-disable-next-line guard-for-in\r\n for (const col in map) {\r\n let val = data[map[col].value] || \"\";\r\n const emptyValidator = () => true;\r\n const validator = this.validationObj[col] || emptyValidator;\r\n const columnDisplayName = this.translateService.instant(map[col].displayName);\r\n if (this.defaultMap[col].valueConverter) {\r\n val = this.defaultMap[col].valueConverter(val);\r\n }\r\n //--- Potenial to change this to give more specific errors, from the validator function\r\n if (this.defaultMap[col].required && !val) {\r\n const error = this.translateService.instant(\"import.step.upload.novalueerror\", { column: columnDisplayName });\r\n mappedRow.Errors.push(error);\r\n mappedRow.valid = false;\r\n } else if (!validator(val, data)) {\r\n const error = this.translateService.instant(\"import.step.upload.error\", { column: columnDisplayName, value: val });\r\n mappedRow.Errors.push(error);\r\n mappedRow.valid = false;\r\n }\r\n if (this.converterObj.hasOwnProperty(col) && val) {\r\n mappedRow[col] = this.converterObj[col](val);\r\n } else {\r\n mappedRow[col] = val === \"\" ? null : val;\r\n }\r\n }\r\n const result = this.addtionalRowValidator(mappedRow);\r\n if (!result.isValid) {\r\n mappedRow.Errors.push(...result.errors);\r\n mappedRow.valid = false;\r\n }\r\n\r\n if (mappedRow.valid) {\r\n out.valid.push(mappedRow);\r\n } else {\r\n out.invalid.push(mappedRow);\r\n }\r\n }\r\n\r\n return out;\r\n }\r\n\r\n saveCustomMapping(): void {\r\n let isCustom = true;\r\n if (this.mappingIsKnown) {\r\n //check map against predefined\r\n const map = this.preDefinedMaps.find((m) => m.name === this.mappedTemplateText);\r\n isCustom = deepEquals(map.map, this.map);\r\n }\r\n if (isCustom) {\r\n const customMapping = {\r\n columns: this.rawColumns,\r\n name: this.translateService.instant(\"import.map.pervious\"),\r\n map: this.map\r\n };\r\n localStorage.setItem(this.mappingKey, JSON.stringify(customMapping));\r\n }\r\n }\r\n\r\n resetMap(): ImportColumnDictionary {\r\n return this.defaultMap;\r\n }\r\n}\r\n\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { EquipmentSummary } from \"../models/equipment-upload-summary.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class EquipmentServiceUploadService {\r\n\r\n constructor(\r\n @Inject(APP_CONFIG) private config: IAppConfig,\r\n private http: HttpClient\r\n ) { }\r\n\r\n public GetSample(): Observable {\r\n return this.http.get(`${this.config.apiLocations.Equipment}EquipmentServiceUpload`, { observe: \"response\", responseType: \"blob\" as \"json\" });\r\n }\r\n\r\n public GetRemainingCount(): Observable {\r\n return this.http.get(`${this.config.apiLocations.Equipment}EquipmentServiceUpload/Progress`);\r\n }\r\n\r\n public GetSummary(): Observable {\r\n return this.http.get(`${this.config.apiLocations.Equipment}EquipmentServiceUpload/Summary`);\r\n }\r\n\r\n public Upload(rows: any[]): Observable {\r\n return this.http.post(`${this.config.apiLocations.Equipment}EquipmentServiceUpload`, rows);\r\n }\r\n}\r\n","import { AfterViewInit, Component, OnDestroy, ViewChild } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport * as moment from \"moment\";\r\nimport { DateOnlyService, ToasterService, ToastType } from \"servicesight-shared\";\r\nimport { ImporterComponent } from \"src/app/shared/components/importer/importer.component\";\r\nimport { ImportColumnDictionary } from \"src/app/shared/models/import/import-column-dictionary.model\";\r\nimport { ImportMap } from \"src/app/shared/models/import/import-map.model\";\r\nimport { ImportValidationObject } from \"src/app/shared/models/import/import-validation-object.model\";\r\nimport { ImportValidationFunc } from \"src/app/shared/models/import/import-validation.type\";\r\nimport { EquipmentServiceUploadService } from \"../services/equipment-service-upload.service\";\r\n\r\n@Component({\r\n selector: \"app-equipment-service-upload\",\r\n templateUrl: \"./equipment-service-upload.component.html\",\r\n styleUrls: [\"./equipment-service-upload.component.scss\"]\r\n})\r\nexport class EquipmentServiceUploadComponent implements AfterViewInit, OnDestroy {\r\n private poll: any;\r\n\r\n @ViewChild(\"importer\", { static: true }) importer: ImporterComponent;\r\n\r\n public noMatch: number = -1;\r\n public isProcessing: boolean = false;\r\n public remainingRows: number = 0;\r\n public defaultMap: ImportColumnDictionary = {\r\n EquipNo: { displayName: \"Equip No\", value: this.noMatch, required: true },\r\n JobType: { displayName: \"Job Type\", value: this.noMatch, required: true },\r\n Interval: { displayName: \"Interval\", value: this.noMatch, required: true },\r\n IntervalUnits: { displayName: \"Interval Units\", value: this.noMatch, required: true },\r\n CalculationType: { displayName: \"Calculation Type\", value: this.noMatch, required: true },\r\n NextDue: { displayName: \"Next Due\", value: this.noMatch, required: true },\r\n LastDone: { displayName: \"Last Done\", value: this.noMatch, required: false },\r\n SvcPrice: { displayName: \"Svc Price\", value: this.noMatch, required: false },\r\n InspectionType: { displayName: \"Inspection Type\", value: this.noMatch, required: false },\r\n BudgetHours: { displayName: \"Budget Hours\", value: this.noMatch, required: false },\r\n };\r\n\r\n public defaultMaps: { [key: string]: string } = {\r\n Equip: \"EquipNo\",\r\n EquipNo: \"EquipNo\",\r\n Equipment: \"EquipNo\",\r\n EquipmentNo: \"EquipNo\",\r\n EquipNumber: \"EquipNo\",\r\n EquipmentNumber: \"EquipNo\",\r\n equip: \"EquipNo\",\r\n equipno: \"EquipNo\",\r\n equipment: \"EquipNo\",\r\n equipmentno: \"EquipNo\",\r\n equipnumber: \"EquipNo\",\r\n equipmentnumber: \"EquipNo\",\r\n JobType: \"JobType\",\r\n jobType: \"JobType\",\r\n jobtype: \"JobType\",\r\n job: \"JobType\",\r\n Interval: \"Interval\",\r\n interval: \"Interval\",\r\n IntervalUnits: \"IntervalUnits\",\r\n intervalUnits: \"IntervalUnits\",\r\n intervalunits: \"IntervalUnits\",\r\n CalculationType: \"CalculationType\",\r\n calculationType: \"CalculationType\",\r\n calculationtype: \"CalculationType\",\r\n NextDue: \"NextDue\",\r\n nextDue: \"NextDue\",\r\n nextdue: \"NextDue\",\r\n due: \"NextDue\",\r\n Due: \"NextDue\",\r\n LastDone: \"LastDone\",\r\n lastDone: \"LastDone\",\r\n lastdone: \"LastDone\",\r\n Done: \"LastDone\",\r\n done: \"LastDone\",\r\n SvcPrice: \"SvcPrice\",\r\n svcPrice: \"SvcPrice\",\r\n svcprice: \"SvcPrice\",\r\n Price: \"SvcPrice\",\r\n price: \"SvcPrice\",\r\n InspectionType: \"InspectionType\",\r\n inspectionType: \"InspectionType\",\r\n inspectiontype: \"InspectionType\",\r\n Inspection: \"InspectionType\",\r\n inspection: \"InspectionType\",\r\n BudgetHours: \"BudgetHours\",\r\n budgetHours: \"BudgetHours\",\r\n budgethours: \"BudgetHours\",\r\n Budget: \"BudgetHours\",\r\n budget: \"BudgetHours\",\r\n };\r\n\r\n public preDefinedMaps: Array = [\r\n {\r\n columns: [\r\n \"Equip No\",\r\n \"Job Type\",\r\n \"Interval\",\r\n \"Interval Units\",\r\n \"Calculation Type\",\r\n \"Next Due\",\r\n \"Last Done\",\r\n \"Svc Price\",\r\n \"Inspection Type\",\r\n \"Budget Hours\"\r\n ],\r\n name: \"ServiceSight\",\r\n map: {\r\n EquipNo: { displayName: \"Equip No\", value: 0 },\r\n JobType: { displayName: \"Job Type\", value: 1 },\r\n Interval: { displayName: \"Interval\", value: 2 },\r\n IntervalUnits: { displayName: \"Interval Units\", value: 3 },\r\n CalculationType: { displayName: \"Calculation Type\", value: 4 },\r\n NextDue: { displayName: \"Next Due\", value: 5 },\r\n LastDone: { displayName: \"Last Done\", value: 6 },\r\n SvcPrice: { displayName: \"Svc Price\", value: 7 },\r\n InspectionType: { displayName: \"Inspection Type\", value: 8 },\r\n BudgetHours: { displayName: \"Budget Hours\", value: 9 }\r\n }\r\n }\r\n ];\r\n\r\n public columnValidations: ImportValidationObject = {\r\n EquipNo: (val) => val && val.toString().length <= 50,\r\n JobType: (val) => val && val.toString().length <= 50,\r\n Interval: (val) => val && Number.isInteger(Number(val)) && Number(val) > 0,\r\n IntervalUnits: (val) => val &&\r\n ( val.toLowerCase() === \"day\" ||\r\n val && val.toLowerCase() === \"week\" ||\r\n val && val.toLowerCase() === \"month\" ),\r\n CalculationType: (val) => val &&\r\n ( val.toLowerCase() === \"done date\" ||\r\n val.toLowerCase() === \"due date\" ),\r\n NextDue: (val) => val && this.validDate(val),\r\n LastDone: (val) => !val || this.validDate(val),\r\n SvcPrice: (val) => !Number.isNaN(Number(val)),\r\n InspectionType: (val) => val.toString().length <= 50,\r\n BudgetHours: (val) => !Number.isNaN(Number(val)) || (val && Number(val) > 0)\r\n };\r\n\r\n public equipmentMap: Map = new Map();\r\n public equipmentNoMap: { [key: string]: boolean } = { };\r\n public converters = {\r\n NextDue: this.parseDate.bind(this),\r\n LastDone: this.parseDate.bind(this)\r\n };\r\n\r\n public rowValidator: ImportValidationFunc = () => {\r\n const errors: string[] = [];\r\n\r\n return {\r\n isValid: true,\r\n errors\r\n };\r\n };\r\n\r\n constructor(\r\n private router: Router,\r\n private dateOnlyService: DateOnlyService,\r\n private equipmentServiceUploadService: EquipmentServiceUploadService,\r\n private toasterService: ToasterService) {\r\n this.rowValidator = this.rowValidator.bind(this);\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n moment.locale(JSON.parse(localStorage.getItem(\"ls.UserBrowserLocale\")).toLowerCase());\r\n this.getRemainingCount();\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n if (this.poll) {\r\n clearTimeout(this.poll);\r\n this.poll = null;\r\n }\r\n }\r\n\r\n public reset(): void {\r\n this.equipmentMap.clear();\r\n this.equipmentNoMap = { };\r\n }\r\n\r\n public getSample(): void {\r\n this.equipmentServiceUploadService.GetSample().subscribe(response => {\r\n const contentType = \"text/csv\";\r\n const blob = new Blob([response.body], { type: contentType });\r\n const data = window.URL.createObjectURL(blob);\r\n const link = document.createElement(\"a\");\r\n link.hidden = true;\r\n link.href = data;\r\n link.download = \"equipmentservice-sample.csv\";\r\n document.body.appendChild(link);\r\n link.click();\r\n document.body.removeChild(link);\r\n setTimeout(() => {\r\n // For Firefox it is necessary to delay revoking the ObjectURL\r\n window.URL.revokeObjectURL(data);\r\n }, 100);\r\n });\r\n }\r\n\r\n public upload(rows: any[]): void {\r\n this.isProcessing = true;\r\n\r\n this.equipmentServiceUploadService.Upload(rows).subscribe(() => {\r\n this.getRemainingCount();\r\n }, () => {\r\n this.isProcessing = false;\r\n });\r\n }\r\n\r\n public getRemainingCount(): void {\r\n this.equipmentServiceUploadService.GetRemainingCount().subscribe(s => {\r\n this.remainingRows = s;\r\n if (s > 0) {\r\n this.isProcessing = true;\r\n this.poll = setTimeout(this.getRemainingCount.bind(this), 3000);\r\n } else {\r\n if (this.isProcessing) {\r\n this.getSummary();\r\n }\r\n\r\n this.isProcessing = false;\r\n if (this.poll) {\r\n clearTimeout(this.poll);\r\n this.poll = null;\r\n }\r\n }\r\n });\r\n }\r\n\r\n private getSummary(): void {\r\n this.equipmentServiceUploadService.GetSummary().subscribe(res => {\r\n if (res.FailedRows === 0) {\r\n this.toasterService.pop(\"equipment.service.import.complete\", ToastType.medium);\r\n this.router.navigate([\"/equipment/list\"]);\r\n } else {\r\n this.toasterService.pop(\"equipment.service.import.completewitherrors\", ToastType.dark);\r\n this.importer.uploadError(res.FailedRows, res.Errors);\r\n }\r\n });\r\n }\r\n\r\n private validDate(val: any): boolean {\r\n return moment(val, \"L\").isValid();\r\n }\r\n\r\n private parseDate(val: string | Date) {\r\n // regex test for non empty string\r\n if (typeof val === \"string\") { // strings come from csv files\r\n return /\\S+/.test(val.toString()) ? this.dateOnlyService.RecalculateDateOnSave(moment(val, \"L\").toDate()) : null;\r\n } else if (val && val.getDate) { // date come from xlsx files\r\n return this.dateOnlyService.ReverseUTC(val);\r\n }\r\n return val;\r\n }\r\n}\r\n","\r\n\r\n\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Observable } from \"rxjs\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { EquipmentCategory } from \"../models/equipment-category\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class EquipmentCategoriesService {\r\n private readonly baseUrl: string;\r\n private readonly serviceUrl: string;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) appConfig: IAppConfig) {\r\n this.baseUrl = appConfig.apiLocations.Equipment;\r\n this.serviceUrl = this.baseUrl + \"Category\";\r\n }\r\n\r\n GetAll(): Observable> {\r\n return this.http.get>(this.serviceUrl);\r\n }\r\n\r\n Save(categories: Array): Observable> {\r\n return this.http.put>(this.serviceUrl, categories);\r\n }\r\n}\r\n\r\n","
\r\n
\r\n

{{ 'equipment.list.equipment.stock-list' | translate }}

\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n {{ data.value | currency: baseCurrencySymbol }}\r\n
\r\n\r\n
\r\n
{{ 'generic.yes' | translate }}
\r\n
{{ 'generic.no' | translate }}
\r\n
\r\n\r\n \r\n
\r\n
\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { EdmLiteral } from \"devextreme/data/odata/utils\";\r\nimport { toArray } from \"rxjs\";\r\nimport {\r\n CustomerLocatioModel,\r\n Equipment,\r\n EquipmentDataService,\r\n GridExportService,\r\n GridKind,\r\n GridService,\r\n Module,\r\n ModuleService,\r\n SettingData,\r\n SettingId,\r\n SettingsService,\r\n StoreModel,\r\n StoreService,\r\n UICustomisation,\r\n UserReferenceService,\r\n UserRefType\r\n} from \"servicesight-shared\";\r\nimport { EquipmentCategoriesService } from \"src/app/settings/services/equipment-categories.service\";\r\n\r\n@Component({\r\n selector: \"app-equipment-stock-list\",\r\n templateUrl: \"./equipment-stock-list.component.html\",\r\n styleUrls: [\"./equipment-stock-list.component.scss\"],\r\n})\r\nexport class EquipmentStockListComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n\r\n public isAllowedCreateEquipment = false;\r\n public IsRecurringJobModuleEnabled: boolean = false;\r\n public IsProEnabled: boolean = false;\r\n\r\n public uploadButtonItems: Array<{ name: string; link: string }> = [];\r\n public searchText: string = \"\";\r\n public useAdditionalStores: boolean = false;\r\n\r\n public equipmentStockDataSource: DataSource;\r\n public storeDataStore: ODataStore;\r\n\r\n public categoryId: number = 0;\r\n public storeId: number = 0;\r\n public categoryDataOptions: { id: number; name: string }[] = [];\r\n public storeList: StoreModel[] = [];\r\n\r\n public cachedUserRef1: any[];\r\n public userRef1Label: string;\r\n public userRef2Label: string;\r\n\r\n public baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n\r\n public exportOptions: { id: number; label: string }[] = [\r\n { id: 1, label: \"Export data as xlsx\" },\r\n { id: 2, label: \"Export data as csv\" },\r\n ];\r\n\r\n public ynDataSource = [\r\n { id: false, name: \"No\" },\r\n { id: true, name: \"Yes\" }\r\n ];\r\n\r\n private gridState: any = {};\r\n private locations: CustomerLocatioModel[] = [];\r\n private dataSources: { [makeModelId: string]: DataSource } = {};\r\n\r\n constructor(\r\n private translateService: TranslateService,\r\n private moduleService: ModuleService,\r\n private router: Router,\r\n private settingsService: SettingsService,\r\n private storeService: StoreService,\r\n private equipmentService: EquipmentDataService,\r\n private userRefService: UserReferenceService,\r\n private gridExportService: GridExportService,\r\n private gridService: GridService,\r\n private equipmentCategoriesService: EquipmentCategoriesService\r\n ) {\r\n this.GetLocation = this.GetLocation.bind(this);\r\n this.calculateMakeModelFilter = this.calculateMakeModelFilter.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.equipmentService\r\n .GetButtonsCreatePermissions()\r\n .subscribe(\r\n (res) => (this.isAllowedCreateEquipment = res.IsAllowedEquipmentCreate)\r\n );\r\n\r\n this.settingsService\r\n .getSetting(SettingId.UseAdditionalStores)\r\n .subscribe((settingData: SettingData) => {\r\n this.useAdditionalStores = settingData.ValueBool;\r\n });\r\n\r\n this.moduleService.GetEnabledModules().subscribe((modules) => {\r\n this.IsRecurringJobModuleEnabled = modules.includes(Module.RecurringJobs);\r\n this.IsProEnabled = modules.includes(Module.Pro);\r\n });\r\n\r\n this.gridService.GetLayout(GridKind.EquipmentStock).subscribe(value => {\r\n if (value) {\r\n value.searchText = \"\";\r\n this.gridState = value;\r\n this.dataGrid.instance.state(value);\r\n }\r\n this.GetDataSources();\r\n }, () => this.GetDataSources());\r\n\r\n this.storeService.GetStores().pipe(toArray()).subscribe(a => {\r\n const all = [{ StoreId: 0, StoreName: \"All\", SiteId: 1, StoreType: 1 }];\r\n this.storeList = all.concat(a[0]);\r\n });\r\n\r\n this.equipmentService.GetAllCustomerLocations().subscribe(locations => {\r\n this.locations = locations;\r\n });\r\n\r\n this.userRef1Label = this.userRefService.getLabel(UICustomisation.MAKE_MODEL_REF1);\r\n this.userRef2Label = this.userRefService.getLabel(UICustomisation.MAKE_MODEL_REF2);\r\n this.userRefService.getListDataStore(UserRefType.MAKE_MODEL_1).load().then(res => this.cachedUserRef1 = res);\r\n\r\n this.equipmentCategoriesService.GetAll().subscribe(categories => {\r\n this.categoryDataOptions = categories.map(category => {\r\n return {\r\n id: category.Id,\r\n name: category.Name\r\n };\r\n });\r\n });\r\n\r\n this.translateService\r\n .get([\r\n \"equipment.list.upload.records\",\r\n \"equipment.list.upload.service-schedules\",\r\n ])\r\n .subscribe((translations) => {\r\n this.uploadButtonItems = [\r\n {\r\n name: translations[\"equipment.list.upload.records\"],\r\n link: \"upload\",\r\n },\r\n {\r\n name: translations[\"equipment.list.upload.service-schedules\"],\r\n link: \"service-upload\",\r\n },\r\n ];\r\n });\r\n }\r\n\r\n public makeModelDisplayValue(rowData: any): string {\r\n return `${rowData.Make} / ${rowData.Model}`;\r\n }\r\n\r\n public NewEquipment(): void {\r\n this.dataGrid.instance.clearFilter();\r\n this.router.navigate([\"equipment\", \"new-equipment\"]);\r\n }\r\n\r\n public UploadButtonItemClick(e: any): void {\r\n this.router.navigate([\"equipment\", e.itemData.link]);\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.dataGrid.instance.searchByText(this.searchText);\r\n }\r\n\r\n public SaveLayout(): void {\r\n const state = this.dataGrid.instance.state();\r\n this.gridService.SaveLayout(state, GridKind.EquipmentStock);\r\n }\r\n\r\n public ResetLayout(): void {\r\n this.gridService.ResetLayout(GridKind.EquipmentStock);\r\n this.dataGrid.instance.state(null);\r\n this.gridState = null;\r\n }\r\n\r\n public OpenColumnChooser(): void {\r\n this.dataGrid.instance.showColumnChooser();\r\n }\r\n\r\n public OnExportItemClick(e: any): void {\r\n switch (e.itemData.id) {\r\n case 1:\r\n this.gridExportService.exportGridAsXlsx(this.dataGrid.instance, this.translateService.instant(\"label.equipment\"));\r\n break;\r\n case 2:\r\n this.gridExportService.exportGridAsCsv(this.dataGrid.instance, this.translateService.instant(\"label.equipment\"));\r\n break;\r\n default:\r\n throw new Error(\"Unhandled export type: \" + e.itemData.id);\r\n }\r\n }\r\n\r\n public columnVisible(name: string, defaultValue: boolean): boolean {\r\n if (this.gridState && this.gridState.columns) {\r\n const column = this.gridState.columns.find(x => x.name === name);\r\n\r\n if (column) {\r\n return column.visible;\r\n }\r\n }\r\n\r\n return defaultValue;\r\n }\r\n\r\n public GetLocation(row: Equipment): string {\r\n if (!row.SiteId || !row.LocationId) {\r\n return \"\";\r\n }\r\n\r\n const locationName = this.locations.find(x => x.CustomerID === row.SiteId && x.LocationId === row.LocationId)?.Location;\r\n return locationName ?? \"\";\r\n }\r\n\r\n public FilterStoreList(event) {\r\n this.storeId = event.value;\r\n this.SetFilters();\r\n if(event.event) {\r\n this.dataSources = {};\r\n }\r\n }\r\n\r\n public CategoryFilterChanged(event): void {\r\n this.categoryId = Number(event.currentTarget.value);\r\n this.SetFilters();\r\n }\r\n\r\n public calculateMakeModelFilter(filterValue, selectedFilterOperation, target) {\r\n const column = this as any;\r\n\r\n if (target === \"search\" || target === \"filterRow\") {\r\n return [\r\n [new EdmLiteral(\"cast(Make, 'Edm.String')\"),\"contains\",`${filterValue}`], \"or\",\r\n [new EdmLiteral(\"cast(Model, 'Edm.String')\"),\"contains\",`${filterValue}`]\r\n ];\r\n }\r\n\r\n return column.defaultCalculateFilterExpression(filterValue, selectedFilterOperation, target);\r\n }\r\n\r\n public getEquipmentAtStock(makeModelId: string) {\r\n if (!this.dataSources[makeModelId]) {\r\n this.dataSources[makeModelId] = this.equipmentService.GetEquipmentInStockDataSource(Number(makeModelId));\r\n if(this.storeId) {\r\n this.dataSources[makeModelId].filter([\"StoreId\", \"=\", this.storeId]);\r\n }\r\n }\r\n return this.dataSources[makeModelId];\r\n }\r\n\r\n private SetFilters(): void {\r\n const filters = [];\r\n const filterStore = this.GetStoreFilter();\r\n filters.push(filterStore);\r\n\r\n if (this.categoryId) {\r\n const categoryName = this.categoryDataOptions.find(x => x.id === this.categoryId).name;\r\n const categoryFilter = [\"EquipCat\", \"=\", categoryName];\r\n filters.push(\"and\");\r\n filters.push(categoryFilter);\r\n }\r\n\r\n this.dataGrid.instance.filter(filters);\r\n }\r\n\r\n private GetDataSources(): void {\r\n this.equipmentStockDataSource = this.equipmentService.GetEquipmentStockSource();\r\n\r\n const filter = this.GetStoreFilter();\r\n this.equipmentStockDataSource.filter(filter);\r\n }\r\n\r\n private GetStoreFilter(): (string | number)[] {\r\n return [\"StoreId\", \"=\", this.storeId];\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { EquipmentSummary } from \"../models/equipment-upload-summary.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class EquipmentUploadService {\r\n\r\n constructor(\r\n @Inject(APP_CONFIG) private config: IAppConfig,\r\n private http: HttpClient\r\n ) { }\r\n\r\n public GetSample(fgasEnabled: boolean): Observable {\r\n return this.http.get(`${this.config.apiLocations.Equipment}EquipmentUpload/${fgasEnabled}`,\r\n { observe: \"response\", responseType: \"blob\" as \"json\" });\r\n }\r\n\r\n public GetRemainingCount(): Observable {\r\n return this.http.get(`${this.config.apiLocations.Equipment}EquipmentUpload/Progress`);\r\n }\r\n\r\n public GetSummary(): Observable {\r\n return this.http.get(`${this.config.apiLocations.Equipment}EquipmentUpload/Summary`);\r\n }\r\n\r\n public Upload(rows: any[]): Observable {\r\n return this.http.post(`${this.config.apiLocations.Equipment}EquipmentUpload`, rows);\r\n }\r\n}\r\n","import { AfterViewInit, Component, OnDestroy, OnInit, ViewChild } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { Equipment, EquipmentStatus, SettingId, SettingsService, ToasterService, ToastType } from \"servicesight-shared\";\r\nimport { ImporterComponent } from \"src/app/shared/components/importer/importer.component\";\r\nimport { ImportColumnDictionary } from \"src/app/shared/models/import/import-column-dictionary.model\";\r\nimport { ImportMap } from \"src/app/shared/models/import/import-map.model\";\r\nimport { ImportValidationObject } from \"src/app/shared/models/import/import-validation-object.model\";\r\nimport { ImportValidationFunc } from \"src/app/shared/models/import/import-validation.type\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { EquipmentUploadService } from \"../services/equipment-upload.service\";\r\n\r\n@Component({\r\n selector: \"app-equipment-upload\",\r\n templateUrl: \"./equipment-upload.component.html\",\r\n styleUrls: [\"./equipment-upload.component.scss\"]\r\n})\r\nexport class EquipmentUploadComponent implements OnInit, AfterViewInit, OnDestroy {\r\n private poll: any;\r\n private statusLookup: { [key: string]: number };\r\n private hasAccessToFgas: boolean;\r\n private storesEnabled: boolean;\r\n @ViewChild(\"importer\", { static: true }) importer: ImporterComponent;\r\n\r\n public noMatch: number = -1;\r\n public isProcessing: boolean = false;\r\n public remainingRows: number = 0;\r\n public defaultMap: ImportColumnDictionary = {\r\n Equip: { displayName: \"Equip\", value: this.noMatch, required: true },\r\n Make: { displayName: \"Make\", value: this.noMatch, required: true },\r\n Model: { displayName: \"Model\", value: this.noMatch, required: true },\r\n Category: { displayName: \"Category\", value: this.noMatch, required: true },\r\n Type: { displayName: \"Type\", value: this.noMatch, required: true },\r\n SubType: { displayName: \"SubType\", value: this.noMatch, required: true },\r\n SerialNo: { displayName: \"SerialNo\", value: this.noMatch, required: false },\r\n SecondHand: { displayName: \"SecondHand\", value: this.noMatch, required: true },\r\n SiteAlpha: { displayName: \"SiteAlpha\", value: this.noMatch, required: true },\r\n SiteEquipID: { displayName: \"SiteEquipID\", value: this.noMatch, required: false },\r\n Status: {\r\n displayName: \"Status\",\r\n value: this.noMatch,\r\n required: true,\r\n valueConverter: (val) => {\r\n const matcher = val.toLowerCase().replace(/\\s|\\'/g, \"\");\r\n const out = this.statusLookup[matcher];\r\n return out ? out.toString() : null;\r\n }\r\n },\r\n SalesWarrantyLength: { displayName: \"SalesWarrantyLength\", value: this.noMatch, required: false },\r\n SalesWarrantyStartDate: {\r\n displayName: \"SalesWarrantyStartDate\",\r\n value: this.noMatch,\r\n required: false,\r\n valueConverter: (val: any) => {\r\n if (val && ((typeof val === \"string\" && val.includes(\"Z\")) || typeof val.getMonth === \"function\")) {\r\n const date = new Date(val);\r\n // Invert the timezone offest and add to the time to generate a local date\r\n const timeZoneAdjustment = new Date().getTimezoneOffset();\r\n return new Date(date.getTime() + timeZoneAdjustment * 60000).toLocaleDateString();\r\n }\r\n return val;\r\n }\r\n },\r\n UserRef1Equip: { displayName: \"UserRef1Equip\", value: this.noMatch, required: false },\r\n UserRef2Equip: { displayName: \"UserRef2Equip\", value: this.noMatch, required: false },\r\n UserRef3Equip: { displayName: \"UserRef3Equip\", value: this.noMatch, required: false },\r\n ContactTitle: { displayName: \"ContactTitle\", value: this.noMatch, required: false },\r\n ContactFirstName: { displayName: \"ContactFirstName\", value: this.noMatch, required: false },\r\n ContactLastName: { displayName: \"ContactLastName\", value: this.noMatch, required: false },\r\n ContactPhone: { displayName: \"ContactPhone\", value: this.noMatch, required: false },\r\n ContactEmail: { displayName: \"ContactEmail\", value: this.noMatch, required: false },\r\n WarningNotes: { displayName: \"WarningNotes\", value: this.noMatch, required: false },\r\n Notes: { displayName: \"Notes\", value: this.noMatch, required: false },\r\n Location: { displayName: \"Location\", value: this.noMatch, required: false }\r\n };\r\n\r\n public defaultMaps: { [key: string]: string } = {\r\n Equip: \"Equip\",\r\n EquipNo: \"Equip\",\r\n Equipment: \"Equip\",\r\n EquipmentNo: \"Equip\",\r\n EquipNumber: \"Equip\",\r\n EquipmentNumber: \"Equip\",\r\n equip: \"Equip\",\r\n equipno: \"Equip\",\r\n equipment: \"Equip\",\r\n equipmentno: \"Equip\",\r\n equipnumber: \"Equip\",\r\n equipmentnumber: \"Equip\",\r\n Make: \"Make\",\r\n make: \"Make\",\r\n Model: \"Model\",\r\n model: \"Model\",\r\n Category: \"Category\",\r\n Cat: \"Category\",\r\n equipcategory: \"Category\",\r\n category: \"Category\",\r\n cat: \"Category\",\r\n c: \"Category\",\r\n EquipCat: \"Category\",\r\n equipcat: \"Category\",\r\n Type: \"Type\",\r\n equiptype: \"Type\",\r\n type: \"Type\",\r\n t: \"Type\",\r\n SubType: \"SubType\",\r\n Sub: \"SubType\",\r\n equipsubtype: \"SubType\",\r\n subtype: \"SubType\",\r\n sub: \"SubType\",\r\n st: \"SubType\",\r\n SerialNo: \"SerialNo\",\r\n Serial: \"SerialNo\",\r\n SerialNumber: \"SerialNo\",\r\n SN: \"SerialNo\",\r\n serialno: \"SerialNo\",\r\n serial: \"SerialNo\",\r\n sn: \"SerialNo\",\r\n SecondHand: \"SecondHand\",\r\n secondhand: \"SecondHand\",\r\n SiteAlpha: \"SiteAlpha\",\r\n Site: \"SiteAlpha\",\r\n Alpha: \"SiteAlpha\",\r\n sitealpha: \"SiteAlpha\",\r\n site: \"SiteAlpha\",\r\n alpha: \"SiteAlpha\",\r\n SiteEquipID: \"SiteEquipID\",\r\n SiteEquipId: \"SiteEquipID\",\r\n EquipId: \"SiteEquipID\",\r\n siteequipid: \"SiteEquipID\",\r\n equipid: \"SiteEquipID\",\r\n Status: \"Status\",\r\n status: \"Status\",\r\n SalesWarranty: \"SalesWarrantyLength\",\r\n Warranty: \"SalesWarrantyLength\",\r\n saleswarranty: \"SalesWarrantyLength\",\r\n warranty: \"SalesWarrantyLength\",\r\n SalesWarrantyLength: \"SalesWarrantyLength\",\r\n WarrantyLength: \"SalesWarrantyLength\",\r\n saleswarrantylength: \"SalesWarrantyLength\",\r\n warrantylength: \"SalesWarrantyLength\",\r\n ContactTitle: \"ContactTitle\",\r\n contacttitle: \"ContactTitle\",\r\n Title: \"ContactTitle\",\r\n title: \"ContactTitle\",\r\n ContactFirstName: \"ContactFirstName\",\r\n FirstName: \"ContactFirstName\",\r\n contactfirstname: \"ContactFirstName\",\r\n firstname: \"ContactFirstName\",\r\n ContactLastName: \"ContactLastName\",\r\n LastName: \"ContactLastName\",\r\n contactlastname: \"ContactLastName\",\r\n lastname: \"ContactLastName\",\r\n ContactPhone: \"ContactPhone\",\r\n Phone: \"ContactPhone\",\r\n Tel: \"ContactPhone\",\r\n ContactTel: \"ContactPhone\",\r\n contactphone: \"ContactPhone\",\r\n phone: \"ContactPhone\",\r\n tel: \"ContactPhone\",\r\n contacttel: \"ContactPhone\",\r\n ContactEmail: \"ContactEmail\",\r\n Email: \"ContactEmail\",\r\n contactemail: \"ContactEmail\",\r\n email: \"ContactEmail\",\r\n WarningNotes: \"WarningNotes\",\r\n Warning: \"WarningNotes\",\r\n warningnotes: \"WarningNotes\",\r\n warning: \"WarningNotes\",\r\n Notes: \"Notes\",\r\n notes: \"Notes\",\r\n Location: \"Location\",\r\n location: \"Location\"\r\n };\r\n\r\n public preDefinedMaps: Array = [\r\n {\r\n columns: [\"Equip\", \"Make\", \"Model\", \"EquipCat\", \"EquipType\", \"EquipSubType\", \"SerialNo\",\r\n \"SecondHand\", \"SiteAlpha\", \"SiteEquipID\", \"Status\", \"SalesWarrantyLength\", \"SalesWarrantyStartDate\",\r\n \"UserRef1Equip\", \"UserRef2Equip\", \"UserRef3Equip\", \"ContactTitle\", \"ContactFirstName\", \"ContactLastName\",\r\n \"ContactPhone\", \"ContactEmail\", \"WarningNotes\", \"Notes\", \"Location\"],\r\n name: \"ServiceSight\",\r\n map: {\r\n Equip: { displayName: \"Equip\", value: 0 },\r\n Make: { displayName: \"Make\", value: 1 },\r\n Model: { displayName: \"Model\", value: 2 },\r\n Category: { displayName: \"Category\", value: 3 },\r\n Type: { displayName: \"Type\", value: 4 },\r\n SubType: { displayName: \"SubType\", value: 5 },\r\n SerialNo: { displayName: \"SerialNo\", value: 6 },\r\n SecondHand: { displayName: \"SecondHand\", value: 7 },\r\n SiteAlpha: { displayName: \"SiteAlpha\", value: 8 },\r\n SiteEquipID: { displayName: \"SiteEquipID\", value: 9 },\r\n Status: { displayName: \"Status\", value: 10 },\r\n SalesWarrantyLength: { displayName: \"SalesWarrantyLength\", value: 11 },\r\n SalesWarrantyStartDate: { displayName: \"SalesWarrantyStartDate\", value: 12 },\r\n UserRef1Equip: { displayName: \"UserRef1Equip\", value: 13 },\r\n UserRef2Equip: { displayName: \"UserRef2Equip\", value: 14 },\r\n UserRef3Equip: { displayName: \"UserRef3Equip\", value: 15 },\r\n ContactTitle: { displayName: \"ContactTitle\", value: 16 },\r\n ContactFirstName: { displayName: \"ContactFirstName\", value: 17 },\r\n ContactLastName: { displayName: \"ContactLastName\", value: 18 },\r\n ContactPhone: { displayName: \"ContactPhone\", value: 19 },\r\n ContactEmail: { displayName: \"ContactEmail\", value: 20 },\r\n WarningNotes: { displayName: \"WarningNotes\", value: 21 },\r\n Notes: { displayName: \"Notes\", value: 22 },\r\n Location: { displayName: \"Location\", value: 23 }\r\n }\r\n },\r\n {\r\n columns: [\"Equip\", \"Make\", \"Model\", \"EquipCat\", \"EquipType\", \"EquipSubType\", \"SerialNo\",\r\n \"SecondHand\", \"SiteAlpha\", \"SiteEquipID\", \"Status\", \"SalesWarrantyLength\", \"SalesWarrantyStartDate\",\r\n \"UserRef1Equip\", \"UserRef2Equip\", \"UserRef3Equip\", \"ContactTitle\", \"ContactFirstName\", \"ContactLastName\",\r\n \"ContactPhone\", \"ContactEmail\", \"WarningNotes\", \"Notes\", \"Location\"],\r\n name: \"ServiceSight US\",\r\n map: {\r\n Equip: { displayName: \"Equip\", value: 0 },\r\n Make: { displayName: \"Make\", value: 1 },\r\n Model: { displayName: \"Model\", value: 2 },\r\n Category: { displayName: \"Category\", value: 3 },\r\n Type: { displayName: \"Type\", value: 4 },\r\n SubType: { displayName: \"SubType\", value: 5 },\r\n SerialNo: { displayName: \"SerialNo\", value: 6 },\r\n SecondHand: { displayName: \"SecondHand\", value: 7 },\r\n SiteAlpha: { displayName: \"SiteAlpha\", value: 8 },\r\n SiteEquipID: { displayName: \"SiteEquipID\", value: 9 },\r\n Status: { displayName: \"Status\", value: 10 },\r\n SalesWarrantyLength: { displayName: \"SalesWarrantyLength\", value: 11 },\r\n SalesWarrantyStartDate: { displayName: \"SalesWarrantyStartDate\", value: 12 },\r\n UserRef1Equip: { displayName: \"UserRef1Equip\", value: 13 },\r\n UserRef2Equip: { displayName: \"UserRef2Equip\", value: 14 },\r\n UserRef3Equip: { displayName: \"UserRef3Equip\", value: 15 },\r\n ContactTitle: { displayName: \"ContactTitle\", value: 16 },\r\n ContactFirstName: { displayName: \"ContactFirstName\", value: 17 },\r\n ContactLastName: { displayName: \"ContactLastName\", value: 18 },\r\n ContactPhone: { displayName: \"ContactPhone\", value: 19 },\r\n ContactEmail: { displayName: \"ContactEmail\", value: 20 },\r\n WarningNotes: { displayName: \"WarningNotes\", value: 21 },\r\n Notes: { displayName: \"Notes\", value: 22 },\r\n Location: { displayName: \"Location\", value: 23 }\r\n }\r\n }\r\n ];\r\n\r\n public columnValidations: ImportValidationObject = {\r\n Equip: (val) => val.toString().length <= 50,\r\n Make: (val) => val.toString().length <= 30,\r\n Model: (val) => val.toString().length <= 50,\r\n Category: (val) => val.toString().length <= 30,\r\n Type: (val) => val.toString().length <= 30,\r\n SubType: (val) => val.toString().length <= 30,\r\n SerialNo: (val) => val.toString().length <= 255,\r\n SecondHand: (val) => val === \"Y\" || val === \"N\",\r\n SiteAlpha: () => true,\r\n SiteEquipID: (val) => val.toString().length <= 50,\r\n Status: (val) => EquipmentStatus[val] !== undefined,\r\n SalesWarrantyLength: (val) => Number.isInteger(Number(val)),\r\n SalesWarrantyStartDate: () => true,\r\n UserRef1Equip: (val) => val.toString().length <= 50,\r\n UserRef2Equip: (val) => val.toString().length <= 50,\r\n UserRef3Equip: (val) => val.toString().length <= 50,\r\n ContactTitle: (val) => val.toString().length <= 15,\r\n ContactFirstName: (val) => val.toString().length <= 50,\r\n ContactLastName: (val) => val.toString().length <= 100,\r\n ContactPhone: (val) => val.toString().length <= 50,\r\n ContactEmail: (val) => !val || (val.toString().length <= 255 && val.match(/.+?@.+/g)),\r\n WarningNotes: (val) => val.toString().length <= 255,\r\n Notes: () => true,\r\n Location: (val) => val.toString().length <= 50\r\n };\r\n\r\n public equipmentMap: Map = new Map();\r\n public equipmentNoMap: { [key: string]: boolean } = { };\r\n\r\n public rowValidator: ImportValidationFunc = (row: Equipment) => {\r\n const errors: string[] = [];\r\n const key = `${row.Make}|${row.Model}|${row.SerialNo}`;\r\n const isDuplicateMakeModel = row.SerialNo && row.SerialNo.toString().length ? this.equipmentMap.has(key) : false;\r\n const isDuplicateEquipNo = this.equipmentNoMap[row.Equip];\r\n if (!isDuplicateEquipNo) {\r\n this.equipmentNoMap[row.Equip] = true;\r\n } else {\r\n errors.push(this.translateService.instant(\"equipment.import.error.duplicateNumber\", row));\r\n }\r\n\r\n if (!isDuplicateMakeModel) {\r\n this.equipmentMap.set(key, true);\r\n } else {\r\n errors.push(this.translateService.instant(\"equipment.import.error.duplicateMMS\", row));\r\n }\r\n\r\n let fGasPropertiesValid = true;\r\n if (this.isAnyFgasPropertyFilled(row)) {\r\n const equipRefrigerant = [\"DesignCapacity\", \"RefrigerantType\", \"CurrentCharge\", \"AutoLeakDetectionSystem\"]\r\n .filter(k => k in row)\r\n .reduce((obj2, k) => (obj2[k] = row[k], obj2), {});\r\n\r\n Object.keys(equipRefrigerant).forEach(e => {\r\n if (!equipRefrigerant[e]) {\r\n errors.push(this.translateService.instant(\"import.step.upload.novalueerror\", { column: e }));\r\n fGasPropertiesValid = false;\r\n }\r\n });\r\n }\r\n\r\n return {\r\n isValid: !isDuplicateMakeModel && !isDuplicateEquipNo && fGasPropertiesValid,\r\n errors\r\n };\r\n };\r\n\r\n private isAnyFgasPropertyFilled(row: Equipment): boolean {\r\n return !!row.RefrigerantType || !!row.CurrentCharge || !!row.DesignCapacity || !!row.AutoLeakDetectionSystem;\r\n }\r\n\r\n constructor(\r\n private router: Router,\r\n private equipmentUploadService: EquipmentUploadService,\r\n private toasterService: ToasterService,\r\n private licenseService: LicenseService,\r\n private settingsService: SettingsService,\r\n private translateService: TranslateService) {\r\n this.rowValidator = this.rowValidator.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(x => {\r\n this.hasAccessToFgas = x.FGasEnabled;\r\n if (this.hasAccessToFgas) {\r\n this.changeToMapsWithFgas();\r\n }\r\n });\r\n\r\n this.settingsService.getSetting(SettingId.UseAdditionalStores).subscribe(result => {\r\n this.storesEnabled = result.ValueBool;\r\n if (this.storesEnabled) {\r\n this.addStore();\r\n }\r\n });\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n const statusesTranslationKeys = [\"equipment.status.stock\", \"equipment.status.forHire\", \"equipment.status.onHire\", \"equipment.status.rental\",\r\n \"equipment.status.customersOwn\", \"equipment.status.retired\", \"equipment.status.sold\"];\r\n\r\n this.translateService.get(statusesTranslationKeys).subscribe(translations => {\r\n this.statusLookup = {\r\n [this.getMatchReadyString(translations[\"equipment.status.stock\"])]: EquipmentStatus.Stock,\r\n [this.getMatchReadyString(translations[\"equipment.status.forHire\"])]: EquipmentStatus.ForHire,\r\n [this.getMatchReadyString(translations[\"equipment.status.onHire\"])]: EquipmentStatus.OnHire,\r\n [this.getMatchReadyString(translations[\"equipment.status.rental\"])]: EquipmentStatus.Rental,\r\n [this.getMatchReadyString(translations[\"equipment.status.customersOwn\"])]: EquipmentStatus.CustomersOwn,\r\n [this.getMatchReadyString(translations[\"equipment.status.retired\"])]: EquipmentStatus.Retired,\r\n [this.getMatchReadyString(translations[\"equipment.status.sold\"])]: EquipmentStatus.Sold\r\n };\r\n });\r\n this.getRemainingCount();\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n if (this.poll) {\r\n clearTimeout(this.poll);\r\n this.poll = null;\r\n }\r\n }\r\n\r\n reset(): void {\r\n this.equipmentMap.clear();\r\n this.equipmentNoMap = { };\r\n }\r\n\r\n getSample(): void {\r\n this.equipmentUploadService.GetSample(this.hasAccessToFgas).subscribe(response => {\r\n const contentType = \"text/csv\";\r\n const blob = new Blob([response.body], { type: contentType });\r\n const data = window.URL.createObjectURL(blob);\r\n const link = document.createElement(\"a\");\r\n link.hidden = true;\r\n link.href = data;\r\n link.download = \"equipment-sample.csv\";\r\n document.body.appendChild(link);\r\n link.click();\r\n document.body.removeChild(link);\r\n setTimeout(() => {\r\n // For Firefox it is necessary to delay revoking the ObjectURL\r\n window.URL.revokeObjectURL(data);\r\n }, 100);\r\n });\r\n }\r\n\r\n upload(rows: any[]): void {\r\n this.equipmentUploadService.Upload(rows).subscribe(() => {\r\n this.isProcessing = true;\r\n this.getRemainingCount();\r\n });\r\n }\r\n\r\n getRemainingCount(): void {\r\n this.equipmentUploadService.GetRemainingCount().subscribe(s => {\r\n this.remainingRows = s;\r\n if (s > 0) {\r\n this.isProcessing = true;\r\n this.poll = setTimeout(this.getRemainingCount.bind(this), 3000);\r\n } else {\r\n if (this.isProcessing) {\r\n this.getSummary();\r\n }\r\n\r\n this.isProcessing = false;\r\n if (this.poll) {\r\n clearTimeout(this.poll);\r\n this.poll = null;\r\n }\r\n }\r\n });\r\n }\r\n\r\n private changeToMapsWithFgas(): void {\r\n const fgasMap: ImportColumnDictionary = {\r\n System: { displayName: \"System\", value: this.noMatch, required: false },\r\n RefrigerantType: { displayName: \"RefrigerantType\", value: this.noMatch, required: false },\r\n DesignCapacity: {\r\n displayName: \"DesignCapacity\",\r\n value: this.noMatch,\r\n required: false,\r\n valueConverter: (val) => {\r\n return val.trim() === \"\" ? null : val;\r\n }\r\n },\r\n CurrentCharge: {\r\n displayName: \"CurrentCharge\",\r\n value: this.noMatch,\r\n required: false,\r\n valueConverter: (val) => {\r\n return val.trim() === \"\" ? null : val;\r\n }\r\n },\r\n AutoLeakDetectionSystem: { displayName: \"AutoLeakDetectionSystem\", value: this.noMatch, required: false }\r\n };\r\n this.defaultMap = {\r\n ...this.defaultMap, ...fgasMap\r\n };\r\n\r\n const fgasMaps: { [key: string]: string } = {\r\n System: \"System\",\r\n system: \"System\",\r\n RefrigerantType: \"RefrigerantType\",\r\n refrigeranttype: \"RefrigerantType\",\r\n Refrigerant: \"RefrigerantType\",\r\n refrigerant: \"RefrigerantType\",\r\n RefType: \"RefrigerantType\",\r\n reftype: \"RefrigerantType\",\r\n DesignCapacity: \"DesignCapacity\",\r\n designcapacity: \"DesignCapacity\",\r\n CurrentCharge: \"CurrentCharge\",\r\n currentcharge: \"CurrentCharge\",\r\n Charge: \"CurrentCharge\",\r\n charge: \"CurrentCharge\",\r\n AutoLeakDetectionSystemFitted: \"AutoLeakDetectionSystem\",\r\n autoleakdetectionsystemfitted: \"AutoLeakDetectionSystem\",\r\n AutoLeakDetectionSystem: \"AutoLeakDetectionSystem\",\r\n autoleakdetectionsystem: \"AutoLeakDetectionSystem\",\r\n AutoLeakDetection: \"AutoLeakDetectionSystem\",\r\n autoleakdetection: \"AutoLeakDetectionSystem\",\r\n AutoLeak: \"AutoLeakDetectionSystem\",\r\n autoleak: \"AutoLeakDetectionSystem\"\r\n };\r\n\r\n this.defaultMaps = {\r\n ...this.defaultMaps, ...fgasMaps\r\n };\r\n\r\n const preDefinedFgasMaps: Array = [{\r\n columns: [\"System\", \"RefrigerantType\", \"DesignCapacity\",\r\n \"CurrentCharge\", \"AutoLeakDetectionSystemFitted\"],\r\n name: \"ServiceSight\",\r\n map: {\r\n System: { displayName: \"System\", value: 24 },\r\n RefrigerantType: { displayName: \"RefrigerantType\", value: 25 },\r\n DesignCapacity: { displayName: \"DesignCapacity\", value: 26 },\r\n CurrentCharge: { displayName: \"CurrentCharge\", value: 27 },\r\n AutoLeakDetectionSystem: { displayName: \"AutoLeakDetectionSystem\", value: 28 },\r\n }\r\n },\r\n {\r\n columns: [\"System\", \"RefrigerantType\", \"DesignCapacity\",\r\n \"CurrentCharge\", \"AutoLeakDetectionSystemFitted\"],\r\n name: \"ServiceSight US\",\r\n map: {\r\n System: { displayName: \"System\", value: 24 },\r\n RefrigerantType: { displayName: \"RefrigerantType\", value: 25 },\r\n DesignCapacity: { displayName: \"DesignCapacity\", value: 26 },\r\n CurrentCharge: { displayName: \"CurrentCharge\", value: 27 },\r\n AutoLeakDetectionSystem: { displayName: \"AutoLeakDetectionSystem\", value: 28 },\r\n }\r\n }];\r\n\r\n const preDefinedMapsWithFgas = this.preDefinedMaps.map((predefined) => {\r\n const predefinedMap = preDefinedFgasMaps.find(x => x.name === predefined.name);\r\n return {\r\n columns: [...predefined.columns, ...predefinedMap.columns],\r\n name: predefined.name,\r\n map: { ...predefined.map, ...predefinedMap.map }\r\n };\r\n });\r\n\r\n this.preDefinedMaps = preDefinedMapsWithFgas;\r\n\r\n const fgasColumnValidations: ImportValidationObject = {\r\n System: (val) => val.toString().length <= 50,\r\n RefrigerantType: (val) => val.toString().length <= 50,\r\n DesignCapacity: (val) => !val || !isNaN(val) && (!val || Number(val) >= 0),\r\n CurrentCharge: (val) => !val || !isNaN(val) && (!val || Number(val) >= 0),\r\n AutoLeakDetectionSystem: () => true\r\n };\r\n\r\n this.columnValidations = {\r\n ...this.columnValidations, ...fgasColumnValidations\r\n };\r\n }\r\n\r\n private addStore(): void {\r\n const storeMap: ImportColumnDictionary = {\r\n Store: { displayName: \"Store\", value: this.noMatch, required: false }\r\n };\r\n this.defaultMap = {\r\n ...this.defaultMap, ...storeMap\r\n };\r\n\r\n const storeMaps: { [key: string]: string } = {\r\n Store: \"Store\",\r\n store: \"Store\",\r\n Warehouse: \"Store\",\r\n warehouse: \"Store\"\r\n };\r\n\r\n this.defaultMaps = {\r\n ...this.defaultMaps, ...storeMaps\r\n };\r\n\r\n const preDefinedStoreMaps: Array = [\r\n {\r\n columns: [\"Store\"],\r\n name: \"ServiceSight\",\r\n map: {\r\n Store: { displayName: \"Store\", value: 23 },\r\n }\r\n },\r\n {\r\n columns: [\"Warehouse\"],\r\n name: \"ServiceSight US\",\r\n map: {\r\n Store: { displayName: \"Warehouse\", value: 23 },\r\n }\r\n }\r\n ];\r\n\r\n const preDefinedMapsWithStore = this.preDefinedMaps.map(preDefinedMap => {\r\n const storePreDefinedMap = preDefinedStoreMaps.find(p => p.name === preDefinedMap.name);\r\n\r\n if (storePreDefinedMap){\r\n const storeIdx = storePreDefinedMap.map.Store.value;\r\n Object.keys(preDefinedMap.map).forEach(key => {\r\n if (preDefinedMap.map[key].value >= storeIdx) {\r\n preDefinedMap.map[key].value += 1;\r\n }\r\n });\r\n\r\n preDefinedMap.columns.splice(storeIdx, 0, storePreDefinedMap.columns[0]);\r\n\r\n return {\r\n columns: [...preDefinedMap.columns],\r\n name: preDefinedMap.name,\r\n map: {...preDefinedMap.map, ...storePreDefinedMap.map}\r\n };\r\n }\r\n\r\n return preDefinedMap;\r\n });\r\n\r\n this.preDefinedMaps = preDefinedMapsWithStore;\r\n\r\n const storeColumnValidations: ImportValidationObject = {\r\n Store: (val) => val.toString().length <= 50\r\n };\r\n\r\n this.columnValidations = {\r\n ...this.columnValidations, ...storeColumnValidations\r\n };\r\n }\r\n\r\n private getSummary(): void {\r\n this.equipmentUploadService.GetSummary().subscribe(res => {\r\n if (res.FailedRows === 0) {\r\n this.toasterService.pop(\"equipment.import.complete\", ToastType.medium);\r\n this.router.navigate([\"/equipment/list\"]);\r\n } else {\r\n this.toasterService.pop(\"equipment.import.completewitherrors\", ToastType.dark);\r\n this.importer.uploadError(res.FailedRows, res.Errors);\r\n }\r\n });\r\n }\r\n\r\n private getMatchReadyString(text: string): string {\r\n return text.toLowerCase().replace(/\\s|\\'/g, \"\");\r\n }\r\n}\r\n","\r\n\r\n\r\n","import { NgModule } from \"@angular/core\";\r\nimport { RouterModule, Routes } from \"@angular/router\";\r\nimport { CanDeactivateGuard, EquipmentListComponent } from \"servicesight-shared\";\r\nimport { ReorderingComponent } from \"../shared/components/reordering/reordering.component\";\r\nimport { DeviceComponent } from \"./device/device.component\";\r\nimport { DevicesListComponent } from \"./devices-list/devices-list.component\";\r\nimport { EquipmentDetailComponent } from \"./equipment-detail/equipment-detail.component\";\r\nimport { EquipmentMarketingComponent } from \"./equipment-marketing/equipment-marketing.component\";\r\nimport { EquipmentServiceUploadComponent } from \"./equipment-service-upload/equipment-service-upload.component\";\r\nimport { EquipmentStockListComponent } from \"./equipment-stock-list/equipment-stock-list.component\";\r\nimport { EquipmentUploadComponent } from \"./equipment-upload/equipment-upload.component\";\r\n\r\nconst routes: Routes = [\r\n { path: \"list\", component: EquipmentListComponent},\r\n { path: \"marketing\", component: EquipmentMarketingComponent},\r\n { path: \"customer/list/:customerId/:invoiceId\", component: EquipmentListComponent},\r\n { path: \"detail/:id\", component: EquipmentDetailComponent, canDeactivate: [ CanDeactivateGuard ] },\r\n { path: \"new-equipment\", component: EquipmentDetailComponent, canDeactivate: [ CanDeactivateGuard ]},\r\n { path: \"upload\", component: EquipmentUploadComponent},\r\n { path: \"service-upload\", component: EquipmentServiceUploadComponent},\r\n { path: \"devices\", component: DevicesListComponent},\r\n { path: \"stock\", component: EquipmentStockListComponent },\r\n { path: \"reordering\", component: ReorderingComponent },\r\n { path: \"devices/:id\", component: DeviceComponent},\r\n { path: \"\", redirectTo: \"list\", pathMatch: \"full\"},\r\n { path: \"**\", redirectTo: \"list\"}\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\n\r\nexport class EquipmentRoutingModule {\r\n public static readonly Routes: Routes = routes;\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { Observable } from \"rxjs\";\r\nimport { PageableDatastoreService, IAppConfig, APP_CONFIG, IODataService } from \"servicesight-shared\";\r\nimport { ReturnsNoteCancel } from \"./models/returns-note-cancel.model\";\r\nimport { ReturnsNote } from \"./models/returns-note.model\";\r\nimport { map } from \"rxjs/operators\";\r\nimport { Email } from \"../shared/models/email.model\";\r\nimport { QueuedEmailType } from \"../shared/enums/queued-email-type.enum\";\r\nimport { AuthService } from \"src/app/shared/services/auth/auth.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class ReturnsService extends PageableDatastoreService {\r\n private static readonly odataKey: string = \"ReturnsNoteId\";\r\n\r\n constructor(\r\n @Inject(\"ODataService\") protected odataService: IODataService,\r\n @Inject(APP_CONFIG) protected config: IAppConfig,\r\n private httpClient: HttpClient,\r\n private authService: AuthService\r\n ) {\r\n super(ReturnsService.odataKey);\r\n }\r\n\r\n protected GetDataSourceObject(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.PurchaseOrdersOData}ReturnsNoteOData`,\r\n key: ReturnsService.odataKey,\r\n keyType: \"String\"\r\n });\r\n }\r\n\r\n public Save(returnsNote: ReturnsNote): Observable {\r\n return this.httpClient.put(`${this.config.apiLocations.PurchaseOrders}ReturnsNote`, returnsNote);\r\n }\r\n\r\n public Get(id: number): Observable {\r\n return this.httpClient.get(`${this.config.apiLocations.PurchaseOrders}ReturnsNote/${id}`);\r\n }\r\n\r\n public Cancel(returnsNoteCancel: ReturnsNoteCancel): Observable {\r\n return this.httpClient.put(`${this.config.apiLocations.PurchaseOrders}ReturnsNote/Cancel`, returnsNoteCancel);\r\n }\r\n\r\n public GetByGoodsReceived(goodsReceivedId: number): Observable {\r\n return this.httpClient.get(`${this.config.apiLocations.PurchaseOrders}ReturnsNote/FromGoodsReceived/${goodsReceivedId}`);\r\n }\r\n\r\n public BookOut(returnsNote: ReturnsNote, supplierName: string): Observable {\r\n return this.httpClient.put(`${this.config.apiLocations.PurchaseOrders}ReturnsNote/BookOut?supplierName=${supplierName}`, returnsNote);\r\n }\r\n\r\n public GetStatus(id: number): Observable {\r\n return this.httpClient.get(`${this.config.apiLocations.PurchaseOrders}ReturnsNote/FromGoodsReceived/${id}`).pipe(map((res: ReturnsNote) => res.Status));\r\n }\r\n\r\n public SendGoodsReceivedEmail(emailData: Email): Observable {\r\n emailData.EmailType = QueuedEmailType.ReturnsNote;\r\n emailData.SenderEmployeeId = this.authService.EmployeeId;\r\n return this.httpClient.post(`${this.config.apiLocations.ServiceSight}Email/QueueEmail`, emailData);\r\n }\r\n\r\n public GetGoodsReceivedEmailData(id: number): Observable {\r\n return this.httpClient.get(`${this.config.apiLocations.PurchaseOrders}ReturnsNoteEmail/${id}`);\r\n }\r\n\r\n /**\r\n * Creates a return for a cylinder\r\n * @param cylinderId id of the cylinder to attach to the returns note\r\n * @returns id of the newly created returns note\r\n */\r\n public ReturnCylinder(cylinderId: number): Observable {\r\n return this.httpClient.get(`${this.config.apiLocations.PurchaseOrders}ReturnsNote/ReturnCylinder/${cylinderId}`);\r\n }\r\n\r\n public Matched(id: number, invoiceDate: Date, invoiceReference: string): Observable {\r\n return this.httpClient.put(`${this.config.apiLocations.PurchaseOrders}ReturnsNote/${id}/Matched`, {invoiceDate, invoiceReference});\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { CylinderTypeModel } from \"src/app/shared/models/cylinder-type.model\";\r\nimport { ODataService } from \"../../shared/services/odata/odata.service\";\r\n\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class CylinderTypesService {\r\n private readonly fgasODataBaseUrl: string;\r\n\r\n constructor(\r\n private odataService: ODataService,\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private config: IAppConfig) {\r\n this.fgasODataBaseUrl = config.apiLocations.FGasOData;\r\n }\r\n\r\n public GetDataSource(removePaging?: boolean): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.fgasODataBaseUrl}CylinderTypesOData`,\r\n key: \"CylinderTypeId\",\r\n keyType: \"Int32\",\r\n paging: removePaging ? false : true\r\n });\r\n }\r\n\r\n public GetDataStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.fgasODataBaseUrl}CylinderTypesOData`,\r\n key: \"CylinderTypeId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public ODataCylinderTypeServiceLevels(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.fgasODataBaseUrl}CylinderTypesOData`,\r\n key: \"CylinderTypeId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public Create(model: CylinderTypeModel): Observable {\r\n return this.http.post(`${this.config.apiLocations.FGas}CylinderTypes`, model);\r\n }\r\n\r\n public CreateUpdate(model: CylinderTypeModel): Observable {\r\n return (model.CylinderTypeId && model.CylinderTypeId > 0) ? this.Update(model) : this.Create(model);\r\n }\r\n\r\n public Get(id: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.FGas}CylinderTypes/${id}`);\r\n }\r\n\r\n public GetMixedTypes(): Observable {\r\n return this.http.get(`${this.config.apiLocations.FGas}CylinderTypes/Mixed`);\r\n }\r\n\r\n public Update(model: CylinderTypeModel): Observable {\r\n return this.http.put(`${this.config.apiLocations.FGas}CylinderTypes`, model);\r\n }\r\n\r\n public IsInUse(id: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.FGas}CylinderTypes/${id}/InUse`);\r\n }\r\n\r\n public Delete(id: number): Observable {\r\n return this.http.delete(`${this.config.apiLocations.FGas}CylinderTypes/${id}`);\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable, of } from \"rxjs\";\r\nimport { map } from \"rxjs/operators\";\r\nimport { IAppConfig, APP_CONFIG, RefrigerantTypeModel, SupplierPricesModel } from \"servicesight-shared\";\r\nimport { CostAndPrice } from \"src/app/quotes/models/cost-price.model\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\nimport { RefrigerantTypeAccountsModel } from \"../models/refrigerant-type-accounts\";\r\nimport { RefrigerantTypeDefaults } from \"../models/refrigerant-type-defaults\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class RefrigerantTypeService {\r\n private readonly refrigerantTypeODataBaseUrl: string;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private odataService: ODataService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig\r\n ) {\r\n this.refrigerantTypeODataBaseUrl = this.appConfig.apiLocations.FGasOData + \"RefrigerantTypeOData\";\r\n }\r\n\r\n public GetDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.refrigerantTypeODataBaseUrl}`,\r\n key: \"RefrigerantTypeId\",\r\n keyType: \"Int32\",\r\n });\r\n }\r\n\r\n public GetDataStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.refrigerantTypeODataBaseUrl}`,\r\n key: \"RefrigerantTypeId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public Get(id: number): Observable {\r\n if (!id) {\r\n return of(null);\r\n }\r\n\r\n return this.http.get(`${this.appConfig.apiLocations.FGas}RefrigerantType/${id}`);\r\n }\r\n\r\n public CreateUpdate(model: RefrigerantTypeModel): Observable {\r\n return (model.RefrigerantTypeId && model.RefrigerantTypeId > 0) ? this.Update(model) : this.Create(model);\r\n }\r\n\r\n public Create(model: RefrigerantTypeModel): Observable {\r\n return this.http.post(`${this.appConfig.apiLocations.FGas}RefrigerantType`, model);\r\n }\r\n\r\n public Update(model: RefrigerantTypeModel): Observable {\r\n return this.http.put(`${this.appConfig.apiLocations.FGas}RefrigerantType`, model);\r\n }\r\n\r\n public Delete(id: number): Observable {\r\n return this.http.delete(`${this.appConfig.apiLocations.FGas}RefrigerantType/${id}`);\r\n }\r\n\r\n public GetNominalAccounts(): Observable {\r\n return this.http.get(`${this.appConfig.apiLocations.ServiceSight}RefrigerantType/GetNominalAccounts`);\r\n }\r\n\r\n public RefrigerantTypeDefaults(): Observable {\r\n return this.http.get(`${this.appConfig.apiLocations.ServiceSight}RefrigerantType/GetRefrigerantTypeDefaults`);\r\n }\r\n\r\n public GetPriceRegrigerant(refrigerantTypeId: number, customerId?: number): Observable {\r\n customerId = customerId ? customerId : 0;\r\n const url = `${this.appConfig.apiLocations.ServiceSight}Customer/GetPriceRefrigerant?id=${customerId}&refrigerantTypeId=${refrigerantTypeId}`;\r\n return this.http.get(url);\r\n }\r\n\r\n public GetEstimatedCost(refrigerantTypeId: number, quantity: number): Observable {\r\n return this.Get(refrigerantTypeId).pipe(\r\n map(r => {\r\n const prefSupplier: SupplierPricesModel = r.SupplierPrices?.find(s => s.Preferred);\r\n const weight: number = prefSupplier?.Weight ?? 0;\r\n const cost: number = prefSupplier?.BuyingPrice ?? 0;\r\n const unitCost: number = weight > 0 ? cost / weight : 0;\r\n const exchangeRate: number = 1 / (prefSupplier?.ExchangeRate ?? 1);\r\n return unitCost * exchangeRate * quantity;\r\n })\r\n );\r\n }\r\n}\r\n","\r\n
\r\n 999 ? 999 : noOfCopies\"\r\n min=\"1\"\r\n max=\"999\"\r\n value=\"1\"\r\n [(ngModel)]=\"noOfCopies\" />\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n\r\n\r\n","import { Component } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { FormMesssageService } from \"servicesight-shared\";\r\nimport { CylinderService } from \"../services/cylinder.service\";\r\n\r\n@Component({\r\n selector: \"app-cylinder-detail-copy\",\r\n templateUrl: \"./cylinder-detail-copy.component.html\",\r\n styleUrls: [\"./cylinder-detail-copy.component.scss\"]\r\n})\r\nexport class CylinderDetailCopyComponent {\r\n\r\n public isVisibleCopyCylinder: boolean;\r\n public noOfCopies: number;\r\n public copyCylinderMessageSuccess: string = \"\";\r\n public copyCylinderSuccessWindowMessage: boolean = false;\r\n public copiedCylinderIds: number[] = [];\r\n public cylinderId: number;\r\n public refrigerantTypeId: number;\r\n\r\n private formName: string;\r\n\r\n constructor(\r\n private cylinderService: CylinderService,\r\n private translate: TranslateService,\r\n private router: Router,\r\n private formMessageService: FormMesssageService\r\n ) { }\r\n\r\n public OpenCloningWindow(cylinderId: number, refrigerantTypeId: number, formName: string): void {\r\n this.cylinderId = cylinderId;\r\n this.refrigerantTypeId = refrigerantTypeId;\r\n this.isVisibleCopyCylinder = true;\r\n this.noOfCopies = 1;\r\n this.formName = formName;\r\n }\r\n\r\n public OpenCloseCloneCylinderBox(show: boolean): void {\r\n if (show) {\r\n document.querySelector(\"body\").classList.add(\"overhidn\");\r\n } else {\r\n document.querySelector(\"body\").classList.remove(\"overhidn\");\r\n }\r\n this.isVisibleCopyCylinder = show;\r\n }\r\n\r\n public CloneCylinder(): void {\r\n this.isVisibleCopyCylinder = false;\r\n\r\n this.formMessageService.RegisterObservable(\r\n this.cylinderService.CloneCylinder({\r\n CylinderId: this.cylinderId,\r\n RefrigerantTypeId: this.refrigerantTypeId,\r\n NumberOfCopies: this.noOfCopies })\r\n , this.formName).subscribe(ids => {\r\n if (ids.length > 0) {\r\n this.copyCylinderMessageSuccess = this.translate.instant(\"copy.cloned-successful\", { no: ids.length });\r\n this.copiedCylinderIds = ids;\r\n this.copyCylinderSuccessWindowMessage = true;\r\n }\r\n });\r\n }\r\n\r\n public ShowClonedCylindersList($event: boolean): void {\r\n this.copyCylinderSuccessWindowMessage = false;\r\n if ($event) {\r\n this.router.navigate([\"/f-gas/cylinders/list\"], { state: { cylindersIds: this.copiedCylinderIds } });\r\n }\r\n }\r\n}\r\n","import { CylinderStatus } from \"../enums/cylinder-status.enum\";\r\n\r\nexport class Cylinder {\r\n CylinderId: number;\r\n CylinderNo: string;\r\n CylinderTypeId: number;\r\n RefrigerantTypeId: number;\r\n CylinderStatus: CylinderStatus;\r\n StoreId: number;\r\n SerialNumber: string;\r\n Weight: number;\r\n CurrentWeight: number;\r\n SupplierId?: number;\r\n ReturnDate?: Date;\r\n PurchaseDate?: Date;\r\n CylinderRef1Id?: number;\r\n CylinderRef2: string;\r\n Value: number;\r\n CylinderType: string;\r\n AllowEditCurrentWeight?: boolean;\r\n}\r\n\r\n","import { Component, Input } from \"@angular/core\";\r\nimport { DocumentTypeEnum } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-cylinders-files-tab\",\r\n templateUrl: \"./cylinders-files-tab.component.html\",\r\n styleUrls: [\"./cylinders-files-tab.component.scss\"]\r\n})\r\nexport class CylindersFilesTabComponent {\r\n @Input() CylinderId: number;\r\n public docType = DocumentTypeEnum;\r\n}\r\n","\r\n","
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n
\r\n\r\n \r\n {{'fgas.cylinder.history.job' | translate}} {{item.data.Id}},\r\n {{item.data.Date | date: \"short\"}},\r\n {{item.data.Type}} {{'fgas.cylinder.history.at' | translate}} {{item.data.Customer}}\r\n - {{item.data.Status | jobStatus | translate}}\r\n \r\n\r\n \r\n {{'fgas.cylinder.history.purchase-order' | translate}} {{item.data.Id}},\r\n {{item.data.Date | date: \"short\"}},\r\n {{ item.data.OrderValue | currency: baseCurrencySymbol }}\r\n - {{item.data.Status | purchaseOrderStatus | translate}}\r\n \r\n\r\n \r\n {{'fgas.cylinder.history.goods-received-note' | translate}} {{item.data.Id}},\r\n {{item.data.Date | date: \"short\"}},\r\n {{ 'fgas.cylinder.history.purchase-order-abbreviation' | translate }} {{item.data.PurchaseId}}\r\n \r\n , {{ 'fgas.cylinder.history.reference-abbreviation' | translate }} {{item.data.ReferenceNumber}}\r\n \r\n - {{item.data.Status | goodsReceivedStatus | translate}}\r\n \r\n\r\n \r\n {{'fgas.cylinder.history.returns-note' | translate}} {{item.data.Id}},\r\n {{item.data.Date | date: \"short\"}},\r\n {{ 'fgas.cylinder.history.purchase-order-abbreviation' | translate }} {{item.data.PurchaseId}}\r\n \r\n , {{ 'fgas.cylinder.history.reference-abbreviation' | translate }} {{item.data.ReferenceNumber}}\r\n \r\n - {{item.data.Status | returnsNoteStatus | translate}}\r\n \r\n\r\n \r\n {{'fgas.cylinder.history.message' | translate}}\r\n {{item.data.Date | date: \"short\"}}\r\n \r\n\r\n \r\n {{'fgas.cylinder.history.reminder' | translate}} {{item.data.Id}}\r\n {{item.data.Date | date: \"short\"}},\r\n {{item.data.Type}}\r\n {{item.data.Customer ? '- '+item.data.Customer : ''}}\r\n {{item.data.Contact.trim() ? '- '+item.data.Contact : ''}}\r\n - {{item.data.Status | taskStatus | translate}}\r\n \r\n\r\n

\r\n {{item.data.Description}}\r\n

\r\n
\r\n
\r\n","import { Component, Input, OnChanges, OnInit, ViewChild } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { DocumentTypeEnum } from \"servicesight-shared\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { CylinderService } from \"../services/cylinder.service\";\r\n\r\n@Component({\r\n selector: \"app-cylinder-history-tab\",\r\n templateUrl: \"./cylinder-history-tab.component.html\",\r\n styleUrls: [\"./cylinder-history-tab.component.scss\"]\r\n})\r\nexport class CylinderHistoryTabComponent implements OnInit, OnChanges {\r\n @Input() cylinderId: number;\r\n @ViewChild(\"historyDataGrid\") private dataGrid: DxDataGridComponent;\r\n\r\n public searchText: string = \"\";\r\n public historyDataSource: DataSource;\r\n public historyType = DocumentTypeEnum;\r\n public historyFilterTypes: DataSource;\r\n public baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n public showInForeignCurrency: boolean = false;\r\n\r\n private readonly filterTypes = [\r\n {\r\n ID: DocumentTypeEnum.Job,\r\n name: this.translate.instant(\"fgas.cylinder.history.type.jobs\")\r\n },\r\n {\r\n ID: DocumentTypeEnum.Reminder,\r\n name: this.translate.instant(\"fgas.cylinder.history.type.reminders\")\r\n },\r\n {\r\n ID: DocumentTypeEnum.Message,\r\n name: this.translate.instant(\"fgas.cylinder.history.type.messages\")\r\n }];\r\n\r\n constructor(\r\n private licenseService: LicenseService,\r\n private cylinderService: CylinderService,\r\n private translate: TranslateService) {\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.historyFilterTypes = new DataSource(this.filterTypes);\r\n\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(x => {\r\n if (x.PurchaseOrdersEnabled) {\r\n this.filterTypes.push({\r\n ID: DocumentTypeEnum.PurchaseOrder,\r\n name: this.translate.instant(\"fgas.cylinder.history.type.purchase-orders\")\r\n });\r\n this.filterTypes.push({\r\n ID: DocumentTypeEnum.AdviceNote,\r\n name: this.translate.instant(\"fgas.cylinder.history.type.goods-received-notes\")\r\n });\r\n this.filterTypes.push({\r\n ID: DocumentTypeEnum.ReturnsNote,\r\n name: this.translate.instant(\"fgas.cylinder.history.type.returns-notes\")\r\n });\r\n }\r\n });\r\n }\r\n\r\n public ngOnChanges(): void {\r\n if (!this.historyDataSource && this.cylinderId > 0) {\r\n this.historyDataSource = this.cylinderService.GetCylinderHistory(this.cylinderId);\r\n }\r\n }\r\n\r\n public SearchByText(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.searchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public FilterChanged(selectedFilters): void {\r\n if (selectedFilters.length === 0) {\r\n this.dataGrid.instance.clearFilter();\r\n } else {\r\n const filter = [];\r\n selectedFilters.forEach(key => {\r\n filter.push([\"ElementType\", \"=\", key]);\r\n filter.push(\"or\");\r\n });\r\n filter.pop();\r\n this.dataGrid.instance.filter(filter);\r\n }\r\n this.SearchByText();\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { CylinderStatus } from \"../enums/cylinder-status.enum\";\r\n\r\n@Pipe({\r\n name: \"cylinderStatus\"\r\n})\r\nexport class CylinderStatusPipe implements PipeTransform {\r\n\r\n private readonly cylinderStatus = {\r\n [CylinderStatus.Active]: \"fgas.cylinder.status.active\",\r\n [CylinderStatus.Returned]: \"fgas.cylinder.status.returned\"\r\n };\r\n\r\n private readonly stringValueMapping = {\r\n Active: CylinderStatus.Active,\r\n Returned: CylinderStatus.Returned\r\n };\r\n\r\n transform(value: number | string | CylinderStatus): string {\r\n let safeValue = Number(value);\r\n if (isNaN(safeValue)) {\r\n safeValue = this.stringValueMapping[value];\r\n }\r\n\r\n return this.cylinderStatus[safeValue];\r\n }\r\n\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n {{ 'fgas.cylinder.detail.cylinder-no' | translate }}  \r\n \r\n

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

{{ 'fgas.cylinder.detail.supplier-information' | translate }}

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

{{ 'fgas.cylinder.detail.references' | translate }}

\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n {{ 'messages.accordion.no-image' | translate }}\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n","import { AfterViewInit, Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxSelectBoxComponent } from \"devextreme-angular\";\r\nimport ArrayStore from \"devextreme/data/array_store\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { Observable } from \"rxjs\";\r\nimport { mergeMap } from \"rxjs/operators\";\r\nimport { CylinderIdentificationStyle, Orientation } from \"servicesight-components\";\r\nimport {\r\n DateOnlyService,\r\n DocumentTypeEnum,\r\n FormMesssageService,\r\n IUserReferences,\r\n RefrigerantTypeModel,\r\n SettingData,\r\n SettingId,\r\n SettingsService,\r\n UICustomisation,\r\n UserReferenceService,\r\n UserRefType\r\n} from \"servicesight-shared\";\r\nimport { MessageService } from \"src/app/messages/services/message/message.service\";\r\nimport { ReturnsService } from \"src/app/returns-note/returns.service\";\r\nimport { CylinderTypesService } from \"src/app/settings/services/cylinder-types.service\";\r\nimport { RefrigerantTypeService } from \"src/app/settings/services/refrigerant-type.service\";\r\nimport { StoreService } from \"src/app/settings/services/store.service\";\r\nimport { MessageDocTypeIds } from \"src/app/shared/enums/messages/message-doc-type-ids.enum\";\r\nimport { MessageTypes } from \"src/app/shared/enums/messages/message-types.enum\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { Ng1ReminderService } from \"src/app/shared/services/ng1-reminder.service\";\r\nimport { SupplierService } from \"src/app/shared/services/supplier/supplier.service\";\r\nimport { CylinderDetailCopyComponent } from \"../cylinder-detail-copy/cylinder-detail-copy.component\";\r\nimport { CylinderStatus } from \"../enums/cylinder-status.enum\";\r\nimport { Cylinder } from \"../models/cylinder.model\";\r\nimport { CylinderService } from \"../services/cylinder.service\";\r\n\r\n@Component({\r\n selector: \"app-cylinder-detail\",\r\n templateUrl: \"./cylinder-detail.component.html\",\r\n styleUrls: [\"./cylinder-detail.component.scss\"]\r\n})\r\nexport class CylinderDetailComponent implements OnInit, AfterViewInit {\r\n @ViewChild(\"cylinderForm\", { static: true }) form: NgForm;\r\n @ViewChild(\"refrigerantTypeDropdown\", { static: true }) refrigerantTypeDropdown: DxSelectBoxComponent;\r\n @ViewChild(\"copy\", { static: true }) private copy: CylinderDetailCopyComponent;\r\n\r\n public refrigerantTypeDataSource: DataSource;\r\n public mixedRefrigerantTypeDataSource: DataSource;\r\n public cylinderTypeDataSource: DataSource;\r\n public supplierDataSource: DataSource;\r\n public userReferencesDataSource: DataSource;\r\n public storeDataSource: DataSource;\r\n\r\n public statusArray: Array;\r\n public userRefCylinder1Label: string;\r\n public userRefCylinder2Label: string;\r\n public UICustomisations: IUserReferences;\r\n public isNew: boolean = false;\r\n public purchasingEnabled = false;\r\n public unit: string;\r\n public additionalStoresEnabled: boolean = false;\r\n public readonly formName: string = \"cylinderForm\";\r\n public model = new Cylinder();\r\n public PurchaseDateUI: Date;\r\n public ReturnDateUI: Date;\r\n public store = { SiteId: null };\r\n public refrigerantType = new RefrigerantTypeModel();\r\n public orientation = Orientation.Landscape;\r\n public docType = DocumentTypeEnum;\r\n public showDeleteMessage = false;\r\n public baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n public proEnabled = false;\r\n public CylinderStatus = CylinderStatus;\r\n public allowEditRefrigerantType: boolean;\r\n public saveEnabled: boolean = true;\r\n\r\n private storedCylinderWeight: number;\r\n\r\n public get editRefrigerantTypeEnabled(): boolean {\r\n return (this.allowEditRefrigerantType && this.storedCylinderWeight === 0) || this.isNew;\r\n }\r\n\r\n constructor(\r\n private userRefsService: UserReferenceService,\r\n private cylinderTypeService: CylinderTypesService,\r\n private refrigerantTypeService: RefrigerantTypeService,\r\n private storeService: StoreService,\r\n private supplierService: SupplierService,\r\n private route: ActivatedRoute,\r\n private settingsService: SettingsService,\r\n private formMessageService: FormMesssageService,\r\n private cylinderService: CylinderService,\r\n private router: Router,\r\n private licenseService: LicenseService,\r\n private translate: TranslateService,\r\n private dateOnlyService: DateOnlyService,\r\n private messageService: MessageService,\r\n private ng1reminderService: Ng1ReminderService,\r\n private returnsService: ReturnsService) {\r\n this.statusArray = this.GetCylinderStatus();\r\n this.isNew = !this.route.snapshot.paramMap.get(\"id\");\r\n this.refrigerantType.Colour1 = \"\";\r\n this.refrigerantType.Colour2 = \"\";\r\n this.refrigerantType.Colour3 = \"\";\r\n this.refrigerantType.CylinderStyle = CylinderIdentificationStyle.Half;\r\n }\r\n\r\n ngOnInit(): void {\r\n this.GetUserReferences();\r\n this.userReferencesDataSource = this.userRefsService.getListDataSource(UserRefType.CYLINDER_1);\r\n this.cylinderTypeDataSource = this.cylinderTypeService.GetDataSource();\r\n this.refrigerantTypeDataSource = this.refrigerantTypeService.GetDataSource();\r\n\r\n this.mixedRefrigerantTypeDataSource = new DataSource({\r\n store: new ArrayStore({\r\n key: \"RefrigerantTypeId\",\r\n data: [\r\n {\r\n RefrigerantTypeId: -1,\r\n Name: this.translate.instant(\"fgas.cylinder.detail.mixed\")\r\n }\r\n ]})\r\n });\r\n\r\n this.storeDataSource = this.storeService.GetDataSource();\r\n this.supplierDataSource = this.supplierService.GetSupplierDataSource();\r\n this.settingsService.getSetting(SettingId.UseAdditionalStores).subscribe(res => {\r\n this.additionalStoresEnabled = res.ValueBool;\r\n if (!this.additionalStoresEnabled) {\r\n this.store.SiteId = 1; // Default to Main store if additional stores are not used\r\n }\r\n });\r\n this.settingsService.getSetting(SettingId.FGasRefrigerantUnits).subscribe((settingData: SettingData) => {\r\n this.unit = settingData.ValueListSelectedId === 1 ? \"(kg)\" : \"(lb)\";\r\n });\r\n\r\n this.settingsService.getSetting(SettingId.AllowChangeGasType).subscribe((settingData: SettingData) => {\r\n this.allowEditRefrigerantType = settingData.ValueBool;\r\n });\r\n\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(x => {\r\n this.purchasingEnabled = x.PurchaseOrdersEnabled;\r\n this.proEnabled = x.ProEnabled;\r\n });\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.route.params.subscribe(params => {\r\n const id = Number(params.id);\r\n\r\n if (!isNaN(id)) {\r\n this.isNew = false;\r\n this.setCylinderModel(id);\r\n } else {\r\n this.cylinderService.GetNew().subscribe((res) => {\r\n this.model.CylinderNo = res.CylinderNo;\r\n this.isNew = true;\r\n this.PurchaseDateUI = new Date(new Date().setHours(0, 0, 0, 0));\r\n this.ReturnDateUI = new Date(new Date().setHours(0, 0, 0, 0));\r\n });\r\n }\r\n });\r\n }\r\n\r\n public Discard(): void {\r\n if(this.isNew) {\r\n this.router.navigate([\"f-gas/cylinders/list\"]);\r\n } else {\r\n this.cylinderService.Get(this.model.CylinderId).subscribe((res) => {\r\n this.model = res;\r\n this.SetStoredCylinderWeight();\r\n this.form.form.markAsPristine();\r\n });\r\n }\r\n }\r\n\r\n public Save(): void {\r\n this.saveEnabled = false;\r\n if (!this.additionalStoresEnabled) {\r\n this.model.StoreId = 1; // Store id defaulted to Main store when multistore is not enabled\r\n }\r\n\r\n this.reclaculateDatesOnSave();\r\n\r\n this.saveCylinder()\r\n .subscribe((res) => {\r\n this.saveEnabled = true;\r\n if (this.isNew) {\r\n this.router.navigate([`f-gas/cylinders/detail/${res.CylinderId}`]);\r\n } else {\r\n this.setCylinderModel(res.CylinderId);\r\n }\r\n }, () => {\r\n this.saveEnabled = true;\r\n });\r\n }\r\n\r\n private saveCylinder(): Observable {\r\n return this.formMessageService\r\n .RegisterObservable(this.cylinderService.Save(this.model), \"cylinderForm\");\r\n }\r\n\r\n private setCylinderModel(id: number) {\r\n this.cylinderService.Get(id).subscribe(data => {\r\n this.model = data;\r\n this.SetStoredCylinderWeight();\r\n this.recalculateDatesOnLoad();\r\n });\r\n }\r\n\r\n private reclaculateDatesOnSave(): void {\r\n this.model.PurchaseDate = this.dateOnlyService.RecalculateDateOnSave(this.PurchaseDateUI);\r\n this.model.ReturnDate = this.dateOnlyService.RecalculateDateOnSave(this.ReturnDateUI);\r\n }\r\n\r\n private recalculateDatesOnLoad(): void {\r\n this.PurchaseDateUI = this.dateOnlyService.RecalculateDateOnLoad(this.model.PurchaseDate);\r\n this.ReturnDateUI = this.dateOnlyService.RecalculateDateOnLoad(this.model.ReturnDate);\r\n }\r\n\r\n public Delete(): void {\r\n this.showDeleteMessage = true;\r\n }\r\n\r\n public ConfirmDeleteAction(confirm: boolean): void {\r\n if (confirm) {\r\n this.formMessageService\r\n .RegisterObservable(this.cylinderService.Delete(this.model.CylinderId), \"cylinderForm\")\r\n .subscribe((success) => {\r\n if(success) {\r\n this.router.navigate([\"f-gas/cylinders/list\"]);\r\n }\r\n });\r\n }\r\n this.showDeleteMessage = false;\r\n }\r\n\r\n private GetCylinderStatus(): Array {\r\n return Object.keys(CylinderStatus)\r\n .filter((v) => !isNaN(Number(v)))\r\n .map(key => Number(key));\r\n }\r\n\r\n private GetUserReferences(): void {\r\n this.UICustomisations = JSON.parse(localStorage.getItem(\"ls.userReferences\"));\r\n const userRefCylinder1 = this.UICustomisations.list.filter((i) => i.UICustomisationID === UICustomisation.CYLINDERREF1)[0];\r\n this.userRefCylinder1Label = userRefCylinder1.CustomText || userRefCylinder1.OriginalText;\r\n const userRefCylinder2 = this.UICustomisations.list.filter((i) => i.UICustomisationID === UICustomisation.CYLINDERREF2)[0];\r\n this.userRefCylinder2Label = userRefCylinder2.CustomText || userRefCylinder2.OriginalText;\r\n }\r\n\r\n private SetStoredCylinderWeight(): void {\r\n this.storedCylinderWeight = this.model.CurrentWeight;\r\n }\r\n\r\n public UpdateRefrigenrantType(refrigerantType: any): void {\r\n if (refrigerantType.value && refrigerantType.value !== -1) {\r\n this.refrigerantTypeDataSource.store().byKey(refrigerantType.value).then((v: RefrigerantTypeModel) => {\r\n this.refrigerantType = v;\r\n this.refrigerantType.CylinderStyle = v.CylinderStyle;\r\n });\r\n }\r\n }\r\n\r\n public UpdateStore(store: any): void {\r\n if (store.value) {\r\n this.storeDataSource.store().byKey(store.value).then((v) => {\r\n this.store = v;\r\n });\r\n }\r\n }\r\n\r\n public NewReminder(): void {\r\n this.ng1reminderService.CreateCylinderReminder(this.model.CylinderId, this.model.CylinderNo);\r\n }\r\n\r\n public NewMessage(): void {\r\n this.messageService.SetNewMessageParameters(0, MessageTypes.RefMessage, false, MessageDocTypeIds.Cylinder, this.model.CylinderId);\r\n this.router.navigate([\"messages/newmessage\"]);\r\n }\r\n\r\n public OpenCloningWindow(): void {\r\n this.copy.OpenCloningWindow(this.model.CylinderId, this.refrigerantType.RefrigerantTypeId, this.formName);\r\n }\r\n\r\n public Transfer(): void {\r\n this.reclaculateDatesOnSave();\r\n\r\n this.formMessageService\r\n .RegisterObservable(this.cylinderService.TransferToDepot(this.model), \"cylinderForm\")\r\n .subscribe((res) => {\r\n this.model = res;\r\n this.SetStoredCylinderWeight();\r\n });\r\n }\r\n\r\n public ReturnCylinder(): void {\r\n if (this.form.dirty) {\r\n this.saveCylinder()\r\n .pipe(\r\n mergeMap(response => this.returnsService.ReturnCylinder(response.CylinderId))\r\n ).subscribe(returnNoteId => {\r\n this.navigateReturnDetails(returnNoteId);\r\n });\r\n } else {\r\n this.returnsService.ReturnCylinder(this.model.CylinderId).subscribe(returnNoteId => {\r\n this.navigateReturnDetails(returnNoteId);\r\n });\r\n }\r\n }\r\n\r\n private navigateReturnDetails(returnNoteId: number): void {\r\n this.router.navigate([\"/returns/detail/\", returnNoteId]);\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { CylinderUpload } from \"../models/cylinder-upload.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class CylinderUploadService {\r\n\r\n constructor(\r\n @Inject(APP_CONFIG) private config: IAppConfig,\r\n private http: HttpClient) { }\r\n\r\n public GetSample(language: string): Observable {\r\n return this.http.get(`${this.config.apiLocations.FGas}CylinderUpload/${language}`, { observe: \"response\", responseType: \"blob\" as \"json\" });\r\n }\r\n\r\n public GetRemainingCount(): Observable {\r\n return this.http.get(`${this.config.apiLocations.FGas}CylinderUpload/Progress`);\r\n }\r\n\r\n public GetSummary(): Observable {\r\n return this.http.get(`${this.config.apiLocations.FGas}CylinderUpload/Summary`);\r\n }\r\n\r\n public Upload(rows: CylinderUpload[]): Observable {\r\n return this.http.post(`${this.config.apiLocations.FGas}CylinderUpload`, rows);\r\n }\r\n}\r\n","import { AfterViewInit, Component, OnDestroy, ViewChild } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport * as moment from \"moment\";\r\nimport { ToasterService, ToastType } from \"servicesight-shared\";\r\nimport { DateOnlyService } from \"servicesight-shared\";\r\nimport { ImporterComponent } from \"src/app/shared/components/importer/importer.component\";\r\nimport { ImportColumnDictionary } from \"src/app/shared/models/import/import-column-dictionary.model\";\r\nimport { ImportMap } from \"src/app/shared/models/import/import-map.model\";\r\nimport { ImportValidationObject } from \"src/app/shared/models/import/import-validation-object.model\";\r\nimport { ImportValidationFunc } from \"src/app/shared/models/import/import-validation.type\";\r\nimport { CylinderUpload } from \"./../models/cylinder-upload.model\";\r\nimport { CylinderUploadService } from \"../services/cylinder-upload.service\";\r\n\r\n@Component({\r\n selector: \"app-cylinders-upload\",\r\n templateUrl: \"./cylinders-upload.component.html\",\r\n styleUrls: [\"./cylinders-upload.component.scss\"]\r\n})\r\nexport class CylindersUploadComponent implements AfterViewInit, OnDestroy {\r\n @ViewChild(\"importer\", { static: true }) importer: ImporterComponent;\r\n\r\n public poll: any;\r\n public noMatch: number = -1;\r\n public isProcessing: boolean = false;\r\n public remainingRows: number = 0;\r\n private fileLanguage: string;\r\n\r\n public defaultMap: ImportColumnDictionary = {\r\n CylinderNo: { displayName: \"fgas.cylinder.detail.cylinder-no\", value: this.noMatch, required: true },\r\n SerialNo: { displayName: \"fgas.cylinder.detail.serial-no\", value: this.noMatch, required: false },\r\n RefrigerantType: { displayName: \"fgas.cylinder.detail.refrigerant-type\", value: this.noMatch, required: true },\r\n CylinderType: { displayName: \"fgas.cylinder.detail.cylinder-type\", value: this.noMatch, required: true },\r\n Status: { displayName: \"fgas.cylinder.detail.status\", value: this.noMatch, required: true },\r\n Store: { displayName: \"fgas.cylinder.detail.store\", value: this.noMatch, required: true },\r\n Weight: { displayName: \"fgas.cylinder.detail.weight\", value: this.noMatch, required: true },\r\n CurrentWeight: { displayName: \"fgas.cylinder.detail.current-weight\", value: this.noMatch, required: true },\r\n Supplier: { displayName: \"fgas.cylinder.detail.supplier\", value: this.noMatch, required: false },\r\n PurchaseDate: { displayName: \"fgas.cylinder.detail.purchase-date\", value: this.noMatch, required: false },\r\n ReturnDate: { displayName: \"fgas.cylinder.detail.return-date\", value: this.noMatch, required: false },\r\n CylinderRef1: { displayName: \"fgas.cylinder.detail.ref1\", value: this.noMatch, required: false },\r\n CylinderRef2: { displayName: \"fgas.cylinder.detail.ref2\", value: this.noMatch, required: false },\r\n Value: { displayName: \"fgas.cylinder.detail.cost-price\", value: this.noMatch, required: false }\r\n };\r\n\r\n public defaultMaps: { [key: string]: string } = {\r\n CylinderNo: \"CylinderNo\",\r\n CylinderNumber: \"CylinderNo\",\r\n cylinderno: \"CylinderNo\",\r\n cylindernumber: \"CylinderNo\",\r\n TankNo: \"CylinderNo\",\r\n TankNumber: \"CylinderNo\",\r\n tankno: \"CylinderNo\",\r\n tanknumber: \"CylinderNo\",\r\n SerialNo: \"SerialNo\",\r\n SerialNumber: \"SerialNo\",\r\n serialno: \"SerialNo\",\r\n serialnumber: \"SerialNo\",\r\n RefrigerantType: \"RefrigerantType\",\r\n refrigeranttype: \"RefrigerantType\",\r\n RefType: \"RefrigerantType\",\r\n reftype: \"RefrigerantType\",\r\n CylinderType: \"CylinderType\",\r\n cylindertype: \"CylinderType\",\r\n CylType: \"CylinderType\",\r\n cyltype: \"CylinderType\",\r\n TankType: \"CylinderType\",\r\n tanktype: \"CylinderType\",\r\n Status: \"Status\",\r\n status: \"Status\",\r\n Store: \"Store\",\r\n store: \"Store\",\r\n Warehouse: \"Store\",\r\n warehouse: \"Store\",\r\n Weight: \"Weight\",\r\n weight: \"Weight\",\r\n CurrentWeight: \"CurrentWeight\",\r\n currentweight: \"CurrentWeight\",\r\n Supplier: \"Supplier\",\r\n supplier: \"Supplier\",\r\n Vendor: \"Supplier\",\r\n vendor: \"Supplier\",\r\n PurchaseDate: \"PurchaseDate\",\r\n purchasedate: \"PurchaseDate\",\r\n ReturnDate: \"ReturnDate\",\r\n returndate: \"ReturnDate\",\r\n CylinderRef1: \"CylinderRef1\",\r\n cylinderref1: \"CylinderRef1\",\r\n CylinderReference1: \"CylinderRef1\",\r\n cylinderreference1: \"CylinderRef1\",\r\n CylinderRef2: \"CylinderRef2\",\r\n cylinderref2: \"CylinderRef2\",\r\n CylinderReference2: \"CylinderRef2\",\r\n cylinderreference2: \"CylinderRef2\",\r\n TankRef1: \"CylinderRef1\",\r\n tankref1: \"CylinderRef1\",\r\n TankReference1: \"CylinderRef1\",\r\n tankreference1: \"CylinderRef1\",\r\n TankRef2: \"CylinderRef2\",\r\n tankref2: \"CylinderRef2\",\r\n TankReference2: \"CylinderRef2\",\r\n tankreference2: \"CylinderRef2\",\r\n Value: \"Value\",\r\n value: \"Value\"\r\n };\r\n\r\n public preDefinedMaps: Array = [\r\n {\r\n columns: [\r\n \"Cylinder no\",\r\n \"Serial no\",\r\n \"Refrigerant type\",\r\n \"Cylinder type\",\r\n \"Status\",\r\n \"Store\",\r\n \"Weight\",\r\n \"Current weight\",\r\n \"Supplier\",\r\n \"Purchase date\",\r\n \"Return date\",\r\n \"Cylinder ref 1\",\r\n \"Cylinder ref 2\",\r\n \"Value\"\r\n ],\r\n name: \"ServiceSight\",\r\n map: {\r\n CylinderNo: { displayName: \"fgas.cylinder.detail.cylinder-no\", value: 0 },\r\n SerialNo: { displayName: \"fgas.cylinder.detail.serial-no\", value: 1 },\r\n RefrigerantType: { displayName: \"fgas.cylinder.detail.refrigerant-type\", value: 2 },\r\n CylinderType: { displayName: \"fgas.cylinder.detail.cylinder-type\", value: 3 },\r\n Status: { displayName: \"fgas.cylinder.detail.status\", value: 4 },\r\n Store: { displayName: \"fgas.cylinder.detail.store\", value: 5 },\r\n Weight: { displayName: \"fgas.cylinder.detail.weight\", value: 6 },\r\n CurrentWeight: { displayName: \"fgas.cylinder.detail.current-weight\", value: 7 },\r\n Supplier: { displayName: \"fgas.cylinder.detail.supplier\", value: 8 },\r\n PurchaseDate: { displayName: \"fgas.cylinder.detail.purchase-date\", value: 9 },\r\n ReturnDate: { displayName: \"fgas.cylinder.detail.return-date\", value: 10 },\r\n CylinderRef1: { displayName: \"fgas.cylinder.detail.ref1\", value: 11 },\r\n CylinderRef2: { displayName: \"fgas.cylinder.detail.ref2\", value: 12 },\r\n Value: { displayName: \"fgas.cylinder.detail.cost-price\", value: 13 }\r\n }\r\n },\r\n {\r\n columns: [\r\n \"Tank no\",\r\n \"Serial no\",\r\n \"Refrigerant type\",\r\n \"Tank type\",\r\n \"Status\",\r\n \"Warehouse\",\r\n \"Weight\",\r\n \"Current weight\",\r\n \"Vendor\",\r\n \"Purchase date\",\r\n \"Return date\",\r\n \"Tank ref 1\",\r\n \"Tank ref 2\",\r\n \"Value\"\r\n ],\r\n name: \"ServiceSight US\",\r\n map: {\r\n CylinderNo: { displayName: \"fgas.cylinder.detail.cylinder-no\", value: 0 },\r\n SerialNo: { displayName: \"fgas.cylinder.detail.serial-no\", value: 1 },\r\n RefrigerantType: { displayName: \"fgas.cylinder.detail.refrigerant-type\", value: 2 },\r\n CylinderType: { displayName: \"fgas.cylinder.detail.cylinder-type\", value: 3 },\r\n Status: { displayName: \"fgas.cylinder.detail.status\", value: 4 },\r\n Store: { displayName: \"fgas.cylinder.detail.store\", value: 5 },\r\n Weight: { displayName: \"fgas.cylinder.detail.weight\", value: 6 },\r\n CurrentWeight: { displayName: \"fgas.cylinder.detail.current-weight\", value: 7 },\r\n Supplier: { displayName: \"fgas.cylinder.detail.supplier\", value: 8 },\r\n PurchaseDate: { displayName: \"fgas.cylinder.detail.purchase-date\", value: 9 },\r\n ReturnDate: { displayName: \"fgas.cylinder.detail.return-date\", value: 10 },\r\n CylinderRef1: { displayName: \"fgas.cylinder.detail.ref1\", value: 11 },\r\n CylinderRef2: { displayName: \"fgas.cylinder.detail.ref2\", value: 12 },\r\n Value: { displayName: \"fgas.cylinder.detail.cost-price\", value: 13 }\r\n }\r\n }\r\n ];\r\n\r\n public columnValidations: ImportValidationObject = {\r\n CylinderNo: (val) => val.toString().length <= 50,\r\n SerialNo: (val) => !val || val.toString().length <= 50,\r\n RefrigerantType: (val) => val.toString().length <= 255,\r\n CylinderType: (val) => val.toString().length <= 18,\r\n Status: (val) => val &&\r\n ( val.toLowerCase() === \"active\" ||\r\n val.toLowerCase() === \"returned\" ),\r\n Store: (val) => val.toString().length <= 50,\r\n Weight: (val) => !Number.isNaN(Number(val)),\r\n CurrentWeight: (val) => !Number.isNaN(Number(val)),\r\n Supplier: (val) => !val || val.toString().length <= 255,\r\n PurchaseDate: (val) => !val || this.validDate(val),\r\n ReturnDate: (val) => !val || this.validDate(val),\r\n CylinderRef1: () => true,\r\n CylinderRef2: () => true,\r\n Value: (val) => !val || !Number.isNaN(Number(val))\r\n };\r\n\r\n public cylinderMap: Map = new Map();\r\n\r\n public rowValidator: ImportValidationFunc = (row: CylinderUpload) => {\r\n const errors: string[] = [];\r\n const isDuplicateCylinder = this.cylinderMap.has(row.CylinderNo);\r\n\r\n if (!isDuplicateCylinder) {\r\n this.cylinderMap.set(row.CylinderNo, true);\r\n } else {\r\n errors.push(this.translateService.instant(\"fgas.cylinder.import.error.duplicate\", { Name: row.CylinderNo }));\r\n }\r\n\r\n return {\r\n isValid: !isDuplicateCylinder,\r\n errors\r\n };\r\n };\r\n\r\n public converters = {\r\n PurchaseDate: this.parseDate.bind(this),\r\n ReturnDate: this.parseDate.bind(this)\r\n };\r\n\r\n constructor(\r\n private router: Router,\r\n private cylinderUploadService: CylinderUploadService,\r\n private dateOnlyService: DateOnlyService,\r\n private toasterService: ToasterService,\r\n private translateService: TranslateService) {\r\n this.rowValidator = this.rowValidator.bind(this);\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n moment.locale(JSON.parse(localStorage.getItem(\"ls.UserBrowserLocale\")).toLowerCase());\r\n this.GetRemainingCount();\r\n this.fileLanguage = this.translateService.currentLang.toLowerCase();\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n if (this.poll) {\r\n clearTimeout(this.poll);\r\n this.poll = null;\r\n }\r\n }\r\n\r\n public Reset(): void {\r\n this.cylinderMap.clear();\r\n }\r\n\r\n public GetSample(): void {\r\n this.cylinderUploadService.GetSample(this.fileLanguage).subscribe(response => {\r\n const contentType = \"text/csv\";\r\n const blob = new Blob([response.body], { type: contentType });\r\n const data = window.URL.createObjectURL(blob);\r\n const link = document.createElement(\"a\");\r\n link.hidden = true;\r\n link.href = data;\r\n link.download = this.translateService.instant(\"fgas.cylinder.import.cylinders-sample\")+ \".csv\";\r\n document.body.appendChild(link);\r\n link.click();\r\n document.body.removeChild(link);\r\n setTimeout(() => {\r\n // For Firefox it is necessary to delay revoking the ObjectURL\r\n window.URL.revokeObjectURL(data);\r\n }, 100);\r\n });\r\n }\r\n\r\n public Upload(rows: CylinderUpload[]): void {\r\n this.isProcessing = true;\r\n this.cylinderUploadService.Upload(rows).subscribe(() => {\r\n this.GetRemainingCount();\r\n }, () => {\r\n this.isProcessing = false;\r\n });\r\n }\r\n\r\n public GetRemainingCount(): void {\r\n this.cylinderUploadService.GetRemainingCount().subscribe(s => {\r\n this.remainingRows = s;\r\n if (s > 0) {\r\n this.isProcessing = true;\r\n this.poll = setTimeout(this.GetRemainingCount.bind(this), 3000);\r\n } else {\r\n if (this.isProcessing) {\r\n this.GetSummary();\r\n }\r\n\r\n this.isProcessing = false;\r\n if (this.poll) {\r\n clearTimeout(this.poll);\r\n this.poll = null;\r\n }\r\n }\r\n });\r\n }\r\n\r\n private GetSummary(): void {\r\n this.cylinderUploadService.GetSummary().subscribe(res => {\r\n if (res.FailedRows === 0) {\r\n this.toasterService.pop(\"fgas.cylinder.import.complete\", ToastType.medium);\r\n this.router.navigate([\"/f-gas/cylinders/list\"]);\r\n } else {\r\n this.toasterService.pop(\"fgas.cylinder.import.completewitherrors\", ToastType.dark);\r\n res.Errors = res.Errors.map(row => {\r\n row.Errors = row.Errors.map(e => this.translateService.instant(e));\r\n return row;\r\n });\r\n this.importer.uploadError(res.FailedRows, res.Errors);\r\n }\r\n });\r\n }\r\n\r\n private validDate(val: any): boolean {\r\n return moment(val, \"L\").isValid();\r\n }\r\n\r\n private parseDate(val: string | Date) {\r\n // regex test for non empty string\r\n if (typeof val === \"string\") { // strings come from csv files\r\n return /\\S+/.test(val.toString()) ? this.dateOnlyService.RecalculateDateOnSave(moment(val, \"L\").toDate()) : null;\r\n } else if (val && val.getDate) { // date come from xlsx files\r\n return this.dateOnlyService.ReverseUTC(val);\r\n }\r\n return val;\r\n }\r\n}\r\n","\r\n
\r\n

{{ content | translate }}

\r\n \r\n

\r\n {{ message | translate }}\r\n

\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n","\r\n\r\n","import { Component, EventEmitter, Input, Output } from \"@angular/core\";\r\n\r\n@Component({\r\n selector: \"app-confirmation-message\",\r\n templateUrl: \"./confirmation-message.component.html\",\r\n styleUrls: [\"./confirmation-message.component.scss\"]\r\n})\r\nexport class ConfirmationMessageComponent {\r\n @Input() title: string;\r\n @Input() content: string;\r\n @Input() messages: string[] = [];\r\n @Input() buttonLabelYes: string = \"buttons.yes\";\r\n @Output() yes = new EventEmitter();\r\n @Output() no = new EventEmitter();\r\n\r\n showPopup = false;\r\n\r\n constructor() { }\r\n\r\n public show(): void {\r\n this.showPopup = true;\r\n }\r\n\r\n actionYes(): void {\r\n this.showPopup = false;\r\n this.yes.emit();\r\n }\r\n\r\n actionNo(): void {\r\n this.showPopup = false;\r\n this.no.emit();\r\n }\r\n\r\n actionClose(): void {\r\n this.showPopup = false;\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport {\r\n RefrigerantTransactionCorrectionModel,\r\n RefrigerantTransactionType,\r\n TransactionItem,\r\n IAppConfig, APP_CONFIG,\r\n LogEntry } from \"servicesight-shared\";\r\nimport { QueuedEmailType } from \"src/app/shared/enums/queued-email-type.enum\";\r\nimport { Email } from \"src/app/shared/models/email.model\";\r\nimport { AuthService } from \"src/app/shared/services/auth/auth.service\";\r\nimport { Decant } from \"../models/decant.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class RefrigerantLogService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private authService: AuthService,\r\n @Inject(APP_CONFIG) private config: IAppConfig) {\r\n }\r\n\r\n public AddCorrection(model: RefrigerantTransactionCorrectionModel): Observable {\r\n return this.http.post(`${this.config.apiLocations.FGas}RefrigerantTransactionCorrection`, model);\r\n }\r\n\r\n public AddDecant(model: Decant): Observable {\r\n const log: LogEntry = {\r\n RefrigerantTypeId: 0,\r\n LogEntryTypeId: RefrigerantTransactionType.Decant,\r\n CylinderId: model.SourceCylinderId,\r\n DestinationId: model.DestinationCylinderId,\r\n DestinationTypeId: TransactionItem.Cylinder,\r\n Weight: model.TransferWeight,\r\n EngineerId: this.authService.EmployeeId,\r\n LogDate: new Date(),\r\n Notes: model.Notes\r\n };\r\n return this.http.post(`${this.config.apiLocations.FGas}RefrigerantTransaction`, log);\r\n }\r\n\r\n public GetLogEmailData(previewType: number, documentId?: number): Observable {\r\n let emailUrl = `${previewType}`;\r\n if (!!documentId) {\r\n emailUrl = emailUrl + `/${documentId}`;\r\n }\r\n return this.http.get(`${this.config.apiLocations.FGas}Email/${emailUrl}`);\r\n }\r\n\r\n public SendLogEmailData(emailData: Email): Observable {\r\n emailData.EmailType = QueuedEmailType.FGasLog;\r\n emailData.SenderEmployeeId = this.authService.EmployeeId;\r\n return this.http.post(this.config.apiLocations.ServiceSight + \"Email/QueueEmail\", emailData);\r\n }\r\n\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n

{{ 'fgas.decant.title' | translate }}

\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n","import { Location } from \"@angular/common\";\r\nimport { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { ActivatedRoute } from \"@angular/router\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { CylinderIdentificationStyle, Orientation } from \"servicesight-components\";\r\nimport { FormMesssageService, PhraseBookType, SettingData, SettingId, SettingsService } from \"servicesight-shared\";\r\nimport { ConfirmationMessageComponent } from \"src/app/shared/components/confirmation-message/confirmation-message.component\";\r\nimport { RefrigerantLogService } from \"./../services/refrigerant-log.service\";\r\nimport { CylinderListItem } from \"../models/cylinder-list.model\";\r\nimport { Decant } from \"../models/decant.model\";\r\nimport { CylinderService } from \"../services/cylinder.service\";\r\n\r\n@Component({\r\n selector: \"app-decant\",\r\n templateUrl: \"./decant.component.html\",\r\n styleUrls: [\"./decant.component.scss\"]\r\n})\r\nexport class DecantComponent implements OnInit {\r\n\r\n @ViewChild(\"discardChangesMessage\") discardMessage: ConfirmationMessageComponent;\r\n @ViewChild(\"validationMessage\") validationMessage: ConfirmationMessageComponent;\r\n\r\n public formName: string = \"decantForm\";\r\n public validationMessages: string[] = [];\r\n public decant: Decant = {\r\n SourceCylinderId: null,\r\n TransferWeight: 0,\r\n DestinationCylinderId: null,\r\n Notes: null\r\n };\r\n\r\n public canEditSource: boolean = true;\r\n public disabled: boolean = false;\r\n public unit: string = \"(kg)\";\r\n public cylinderDataSource: DataSource;\r\n public cylinderDestinationDataSource: DataSource;\r\n public sourceCylinder: CylinderListItem = {\r\n CylinderStyle: CylinderIdentificationStyle.Half,\r\n CylinderType: null,\r\n Refrigerant: null,\r\n Colour1: null,\r\n Colour2: null,\r\n Colour3: null,\r\n CylinderId: null,\r\n CylinderNo: null,\r\n CylinderTypeId: null,\r\n CurrentWeight: 0,\r\n CylinderStatus: null,\r\n CylinderRef2: null,\r\n RefrigerantTypeId: null,\r\n StoreId: null,\r\n SerialNumber: null,\r\n Weight: 100,\r\n Value: 0\r\n };\r\n public destinationCylinder: CylinderListItem = {\r\n CylinderStyle: CylinderIdentificationStyle.Half,\r\n CylinderType: null,\r\n Refrigerant: null,\r\n Colour1: null,\r\n Colour2: null,\r\n Colour3: null,\r\n CylinderId: null,\r\n CylinderNo: null,\r\n CylinderTypeId: null,\r\n CurrentWeight: 0,\r\n CylinderStatus: null,\r\n CylinderRef2: null,\r\n RefrigerantTypeId: null,\r\n StoreId: null,\r\n SerialNumber: null,\r\n Weight: 100,\r\n Value: 0\r\n };\r\n\r\n public phraseType = PhraseBookType;\r\n public orientation = Orientation;\r\n\r\n public get newSourceWeight(): number {\r\n return this.disabled\r\n ? this.sourceCylinder.CurrentWeight\r\n : this.toFiveDecimalPlacesNumber(this.sourceCylinder.CurrentWeight - this.decant.TransferWeight);\r\n }\r\n\r\n public get newDestinationWeight(): number {\r\n return this.disabled\r\n ? this.destinationCylinder.CurrentWeight\r\n : this.toFiveDecimalPlacesNumber(this.destinationCylinder.CurrentWeight + this.decant.TransferWeight);\r\n }\r\n\r\n public get notEnoughInSource(): boolean {\r\n return this.sourceCylinder ? this.newSourceWeight < 0 : false;\r\n }\r\n\r\n public get willOverfillDestination(): boolean {\r\n return this.sourceCylinder ? this.newDestinationWeight > this.destinationCylinder.Weight : false;\r\n }\r\n\r\n public get weightIsValid(): boolean {\r\n return !(this.newDestinationWeight > this.destinationCylinder.Weight) && !(this.newSourceWeight < 0);\r\n }\r\n\r\n public get tickInterval(): number {\r\n return Math.ceil(this.sourceCylinder.Weight / 10);\r\n }\r\n\r\n constructor(\r\n private cylinderService: CylinderService,\r\n private location: Location,\r\n private settingsService: SettingsService,\r\n private formMessageService: FormMesssageService,\r\n private refrigerantTransactionService: RefrigerantLogService,\r\n private route: ActivatedRoute\r\n ) { }\r\n\r\n public ngOnInit(): void {\r\n this.cylinderDataSource = this.cylinderService.GetDataSource(true);\r\n this.cylinderDestinationDataSource = this.cylinderService.GetDataSource(true);\r\n\r\n this.route.queryParamMap.subscribe(params => {\r\n const id = params.get(\"srcCylinderId\");\r\n if (id) {\r\n this.decant.SourceCylinderId = Number(id);\r\n this.canEditSource = false;\r\n }\r\n });\r\n\r\n this.settingsService.getSetting(SettingId.FGasRefrigerantUnits).subscribe((settingData: SettingData) => {\r\n this.unit = settingData.ValueListSelectedId === 1 ? \"(kg)\" : \"(lb)\";\r\n });\r\n }\r\n\r\n public Back(): void {\r\n this.location.back();\r\n }\r\n\r\n public ValidateAndSave(): void {\r\n let isValid = true;\r\n this.validationMessages = [];\r\n if (this.newDestinationWeight > this.destinationCylinder.Weight) {\r\n this.validationMessages.push(\"fgas.decant.no-space\");\r\n isValid = false;\r\n }\r\n\r\n if (this.newSourceWeight < 0) {\r\n this.validationMessages.push(\"fgas.decant.not-enough\");\r\n isValid = false;\r\n }\r\n\r\n if (isValid) {\r\n this.Save();\r\n } else {\r\n this.validationMessage.show();\r\n }\r\n }\r\n\r\n public Save(): void {\r\n this.formMessageService.RegisterObservable(\r\n this.refrigerantTransactionService.AddDecant(this.decant), this.formName)\r\n .subscribe(() => {\r\n //update cylinder weights\r\n this.sourceCylinder.CurrentWeight = this.toFiveDecimalPlacesNumber(this.sourceCylinder.CurrentWeight - this.decant.TransferWeight);\r\n this.destinationCylinder.CurrentWeight = this.toFiveDecimalPlacesNumber(this.destinationCylinder.CurrentWeight + this.decant.TransferWeight);\r\n this.disabled = true;\r\n });\r\n }\r\n\r\n public SourceChanged(data: { value: number }): void {\r\n this.cylinderDataSource.store().byKey(data.value)\r\n .then(cylinder => {\r\n if (cylinder.RefrigerantTypeId === -1) {\r\n this.formMessageService.ShowWarning(\"fgas.decant.mixed-src-not-allowed\", this.formName);\r\n }\r\n this.sourceCylinder = cylinder;\r\n this.cylinderDestinationDataSource.filter(\r\n [\r\n [\"CylinderId\", \"<>\", data.value],\r\n \"and\",\r\n [\r\n [\"RefrigerantTypeId\", \"=\", this.sourceCylinder.RefrigerantTypeId],\r\n \"or\",\r\n [\"AllowMixedRefrigerants\", \"=\", true]\r\n ]\r\n ]);\r\n this.cylinderDestinationDataSource.load();\r\n });\r\n }\r\n\r\n public DestinationChanged(data: { value: number }): void {\r\n this.cylinderDataSource.store().byKey(data.value)\r\n .then(cylinder => this.destinationCylinder = cylinder);\r\n }\r\n\r\n public GetCylinderDisplayValue(row: any): string {\r\n return row ? `${row.CylinderNo}${row.SerialNumber ? \" / \" + row.SerialNumber : \"\"} / ${row.CylinderType} / ${row.Refrigerant}` : \"\";\r\n }\r\n\r\n public customizeText(): string {\r\n return \"\";\r\n }\r\n\r\n private toFiveDecimalPlacesNumber(value: number): number {\r\n return +(value).toFixed(5);\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { formatDate } from \"@angular/common\";\r\n\r\n@Pipe({\r\n name: \"customDate\"\r\n})\r\nexport class CustomDatePipe implements PipeTransform {\r\n\r\n transform(value: any, format: string): any {\r\n if (!value) {\r\n return \"\";\r\n }\r\n\r\n if (!format) {\r\n format = \"shortDate\";\r\n }\r\n\r\n return formatDate(value, format, navigator.language);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n {{ \"fgas.log-detail.log-no\" | translate }}  \r\n {{ TransactionModel.TransactionId }}\r\n

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

\r\n {{ getLogDate() }}\r\n

\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
{{ \"fgas.log-detail.Type\" | translate }}
\r\n
{{ TransactionModel.TransactionType | refrigerantTransactionType:TransactionModel.Status | translate }}
\r\n
\r\n
\r\n
{{ \"fgas.log-detail.Reference\" | translate }}
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
{{ \"fgas.log-detail.Refrigerant\" | translate }}
\r\n
{{ TransactionModel.Refrigerant }}
\r\n
\r\n
\r\n
{{ \"fgas.log-detail.Engineer\" | translate }}
\r\n
{{ TransactionModel.Engineer }}
\r\n
\r\n
\r\n
\r\n
\r\n
{{ \"fgas.log-detail.Transfer-Weight\" | translate: { units: units } }}
\r\n
{{ TransactionModel.CorrectedWeight }}
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n

{{'fgas.corrections.Corrections' | translate}}

\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{ data.value | customDate: 'shortDate' }}\r\n
\r\n
\r\n {{ data.value | refrigerantTransactionType | translate }}\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { AfterViewInit, Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport { zip } from \"rxjs\";\r\nimport { finalize } from \"rxjs/operators\";\r\nimport {\r\n DocumentTypeEnum,\r\n RefrigerantTransaction,\r\n RefrigerantTransactionCorrectionModel,\r\n RefrigerantTransactionCorrectionViewModel,\r\n RefrigerantTransactionService,\r\n SettingData,\r\n SettingId,\r\n SettingsService\r\n} from \"servicesight-shared\";\r\nimport { MessageService } from \"src/app/messages/services/message/message.service\";\r\nimport { MessageDocTypeIds } from \"src/app/shared/enums/messages/message-doc-type-ids.enum\";\r\nimport { MessageTypes } from \"src/app/shared/enums/messages/message-types.enum\";\r\nimport { Ng1ReminderService } from \"src/app/shared/services/ng1-reminder.service\";\r\nimport { RefrigerantLogService } from \"./../services/refrigerant-log.service\";\r\n\r\n@Component({\r\n selector: \"app-f-gas-log-detail\",\r\n templateUrl: \"./f-gas-log-detail.component.html\",\r\n styleUrls: [\"./f-gas-log-detail.component.scss\"]\r\n})\r\nexport class FGasLogDetailComponent implements OnInit, AfterViewInit {\r\n\r\n public IsRecordNavigationEnabled: boolean = true;\r\n public IsProEnabled: boolean = true;\r\n public CanNavigatePrevious: boolean = true;\r\n public CanNavigateNext: boolean = true;\r\n public TransactionModel: RefrigerantTransaction = new RefrigerantTransaction();\r\n public isLoading: boolean = true;\r\n public units: string = \"kg\";\r\n public docType = DocumentTypeEnum;\r\n\r\n @ViewChild(DxDataGridComponent, { static: false }) dataGrid: DxDataGridComponent;\r\n\r\n public corrections: RefrigerantTransactionCorrectionViewModel[];\r\n\r\n private transactionId: number = 0;\r\n\r\n constructor(\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private translate: TranslateService,\r\n private settingsService: SettingsService,\r\n private transactionsService: RefrigerantTransactionService,\r\n private logService: RefrigerantLogService,\r\n private ng1reminderService: Ng1ReminderService,\r\n private messageService: MessageService ) {\r\n this.insertRow = this.insertRow.bind(this);\r\n }\r\n\r\n ngOnInit(): void {\r\n this.settingsService.getSetting(SettingId.FGasRefrigerantUnits).subscribe((settingData: SettingData) => {\r\n this.units = settingData.ValueListSelectedId === 1 ? \"kg\" : \"lb\";\r\n });\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.route.params.subscribe(params => {\r\n this.transactionId = Number(params.id);\r\n\r\n if (!isNaN(this.transactionId)) {\r\n this.Load(this.transactionId);\r\n }\r\n });\r\n }\r\n\r\n public addRow(): void {\r\n this.dataGrid.instance.addRow();\r\n }\r\n\r\n public insertRow(e): void {\r\n const model: RefrigerantTransactionCorrectionModel = {\r\n TransactionId: this.transactionId,\r\n NewWeight: e.data.NewWeight,\r\n Notes: e.data.Notes\r\n };\r\n\r\n e.cancel = true;\r\n this.logService.AddCorrection(model).subscribe(() => {\r\n this.dataGrid.instance.cancelEditData();\r\n this.Load(this.transactionId);\r\n });\r\n\r\n }\r\n\r\n public CreateNewReminder(): void {\r\n this.ng1reminderService.CreateFGasLogReminder(\r\n this.TransactionModel.TransactionId,\r\n this.TransactionModel.TransactionType,\r\n this.getTransactionReference());\r\n }\r\n\r\n public CreateNewMessage(): void {\r\n this.messageService.SetNewMessageParameters(0, MessageTypes.RefMessage, false, MessageDocTypeIds.FGasLog, this.TransactionModel.TransactionId);\r\n this.router.navigate([\"messages/newmessage\"]);\r\n }\r\n\r\n private Load(id): void {\r\n zip(this.transactionsService.Get(id), this.transactionsService.GetCorrections(id))\r\n .pipe(finalize(() => this.isLoading = false))\r\n .subscribe(data => {\r\n this.TransactionModel = data[0];\r\n this.corrections = data[1];\r\n this.SetCurrentItem(this.TransactionModel.TransactionId);\r\n });\r\n }\r\n\r\n private SetCurrentItem(id: number): void {\r\n if (this.IsRecordNavigationEnabled) {\r\n this.transactionsService.SetCurrentItem(id).then(() => {\r\n this.CanNavigatePrevious = this.transactionsService.IsPreviousAvailable();\r\n this.CanNavigateNext = this.transactionsService.IsNextAvailable();\r\n });\r\n }\r\n }\r\n\r\n public NavigateNext(): void {\r\n if (this.CanNavigateNext) {\r\n this.transactionsService.GetNextId().then(nextId => {\r\n this.router.navigate([\"/f-gas/log\", nextId]);\r\n });\r\n }\r\n }\r\n\r\n public NavigatePrevious(): void {\r\n if (this.CanNavigatePrevious) {\r\n this.transactionsService.GetPreviousId().then(previousId => {\r\n this.router.navigate([\"/f-gas/log\", previousId]);\r\n });\r\n }\r\n }\r\n\r\n public getTransactionReference(): string {\r\n if (this.TransactionModel.Reference) {\r\n return `${this.getTransactionReferencePrefix(this.TransactionModel.TransactionType)} - ${this.TransactionModel.Reference.toString()}`;\r\n }\r\n\r\n return \"\";\r\n }\r\n\r\n private getTransactionReferencePrefix(transactionType): string {\r\n switch (transactionType) {\r\n case \"Addition\":\r\n case \"Removal\":\r\n case \"LeakTest\":\r\n return this.translate.instant(\"fgas.log-detail.Job\");\r\n case \"Decant\":\r\n return this.translate.instant(\"fgas.logtype.Decant\");\r\n default:\r\n return \"\";\r\n }\r\n }\r\n\r\n public getLogDate(): string {\r\n return this.toLocalString(this.TransactionModel.LogDate);\r\n }\r\n\r\n private toLocalString(dateStr): string {\r\n const date = new Date(Date.parse(dateStr));\r\n const newDate = new Date(date.getTime()-date.getTimezoneOffset()*60*1000);\r\n return newDate.toLocaleDateString();\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n

{{ 'fgas.log-preview.fgas-log' | translate }}

\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
{{ 'label.email.sendMessage' | translate }}
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n","import { Component, Inject, OnInit, ViewChild } from \"@angular/core\";\r\nimport { Location } from \"@angular/common\";\r\nimport { ActivatedRoute } from \"@angular/router\";\r\nimport { IAppConfig, APP_CONFIG, LogPreviewType, ReportViewerComponent } from \"servicesight-shared\";\r\nimport { Email } from \"src/app/shared/models/email.model\";\r\nimport { RefrigerantLogService } from \"../services/refrigerant-log.service\";\r\n\r\n@Component({\r\n selector: \"app-f-gas-log-preview\",\r\n templateUrl: \"./f-gas-log-preview.component.html\",\r\n styleUrls: [\"./f-gas-log-preview.component.scss\"]\r\n})\r\nexport class FGasLogPreviewComponent implements OnInit {\r\n @ViewChild(\"report\") report: ReportViewerComponent;\r\n\r\n public url: string;\r\n public hostUrl: string;\r\n public docId: number;\r\n public previewType: LogPreviewType;\r\n public showTemplateDialog: boolean = false;\r\n public emailData: Email = new Email();\r\n public showSuccessSendMessage: boolean = false;\r\n public showErrorSendMessage: boolean = false;\r\n private filter: string;\r\n\r\n constructor(\r\n private route: ActivatedRoute,\r\n private refrigerantLogService: RefrigerantLogService,\r\n private location: Location,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) {\r\n this.route.params.subscribe(params => {\r\n this.docId = Number(params.id);\r\n this.previewType = params.type;\r\n this.url = `${this.previewType}/${this.docId}`;\r\n\r\n this.route.queryParams.subscribe(queryParams => {\r\n if (queryParams.filter) {\r\n this.filter = queryParams.filter;\r\n this.url = this.url + \"?filter=\" + this.filter;\r\n }\r\n });\r\n });\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.hostUrl = this.appConfig.apiLocations.FGas.substr(0, this.appConfig.apiLocations.FGas.lastIndexOf(\"/api/\") + 1);\r\n }\r\n\r\n public CallPrint(): void {\r\n this.report.print();\r\n }\r\n\r\n public CallDownload(): void {\r\n this.report.download();\r\n }\r\n\r\n public GoBack(): void {\r\n this.location.back();\r\n }\r\n\r\n public OpenEmailDialog(): void {\r\n this.Send();\r\n }\r\n\r\n public OpenDialog(): void {\r\n this.refrigerantLogService.GetLogEmailData(this.previewType, this.docId).subscribe(x => this.emailData = x, () => { }, () => {\r\n this.showErrorSendMessage = false;\r\n this.showTemplateDialog = true;\r\n this.emailData.DataFilter = this.filter;\r\n });\r\n }\r\n\r\n public CloseDialog(): void {\r\n this.showTemplateDialog = false;\r\n }\r\n\r\n private Send(): void {\r\n this.refrigerantLogService.SendLogEmailData(this.emailData).subscribe(() => {\r\n this.showTemplateDialog = false;\r\n this.showSuccessSendMessage = true;\r\n }, () => {\r\n this.showErrorSendMessage = true;\r\n });\r\n }\r\n}\r\n","export enum WtnType {\r\n Return = 1,\r\n Removal = 2,\r\n Transfer = 3\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG, PageableDatastoreService } from \"servicesight-shared\";\r\nimport { QueuedEmailType } from \"src/app/shared/enums/queued-email-type.enum\";\r\nimport { Email } from \"src/app/shared/models/email.model\";\r\nimport { AuthService } from \"src/app/shared/services/auth/auth.service\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\nimport { Cylinder } from \"../models/cylinder.model\";\r\nimport { WasteTransferAccordionModel } from \"../models/waste-transfer-accordion.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class WasteTransferNotesService extends PageableDatastoreService {\r\n\r\n private static readonly odataKey: string = \"WasteTransferId\";\r\n\r\n constructor(\r\n private odataService: ODataService,\r\n private http: HttpClient,\r\n private authService: AuthService,\r\n @Inject(APP_CONFIG) private config: IAppConfig,\r\n ) {\r\n super(WasteTransferNotesService.odataKey);\r\n }\r\n\r\n protected GetDataSourceObject(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.FGasOData}WasteTransferNotesOData`,\r\n key: WasteTransferNotesService.odataKey,\r\n keyType: \"Int32\",\r\n paging: true,\r\n pageSize: 50\r\n });\r\n }\r\n\r\n public GetWasteTransfer(wtnNumber: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.FGas}WasteTransferNotes/${wtnNumber}`);\r\n }\r\n\r\n public GetDetails(wasteTransferNotesId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.FGas}WasteTransferNotes/Details/${wasteTransferNotesId}`);\r\n }\r\n\r\n public GetWasteTransferNotesEmailData(id: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.FGas}Email/GetWasteTransferNotesEmailData/${id}`);\r\n }\r\n\r\n public SendWasteTransferNotesEmailData(emailData: Email): Observable {\r\n emailData.SenderEmployeeId = this.authService.EmployeeId;\r\n emailData.EmailType = QueuedEmailType.WasteTransferNote;\r\n return this.http.post(this.config.apiLocations.ServiceSight + \"Email/QueueEmail\", emailData);\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'fgas.waste-transfer-notes.list.heading' | translate}}

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n {{ data.value }}\r\n \r\n \r\n {{ data.value }}\r\n \r\n \r\n {{ data.value}}\r\n \r\n
\r\n
\r\n {{ data.value | customDate: 'shortDate' }}\r\n
\r\n
\r\n \r\n {{ data.data.RemovedFrom }}\r\n \r\n
\r\n \r\n
\r\n","import { Component, Inject, OnInit, ViewChild } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { EdmLiteral } from \"devextreme/data/odata/utils\";\r\nimport * as moment from \"moment\";\r\nimport {\r\n GridExportService,\r\n GridKind,\r\n GridService,\r\n IAuthService,\r\n Module,\r\n SettingData,\r\n SettingId,\r\n SettingsService\r\n} from \"servicesight-shared\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { WtnType } from \"../enums/wtn-type.enums\";\r\nimport { Cylinder } from \"../models/cylinder.model\";\r\nimport { WasteTransferNotesService } from \"../services/waste-transfer-notes.service\";\r\n\r\n@Component({\r\n selector: \"app-waste-transfer-notes-list\",\r\n templateUrl: \"./waste-transfer-notes-list.component.html\",\r\n styleUrls: [\"./waste-transfer-notes-list.component.scss\"]\r\n})\r\nexport class WasteTransferNotesListComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n public wasteTransferNotesDataSource: DataSource;\r\n private dataSources: { [wasteTransferId: string]: Cylinder[] } = { };\r\n public SearchText: string = \"\";\r\n public units: string = \"kg\";\r\n public hasProModule: boolean;\r\n public isPortal: boolean;\r\n public filterSelected: any;\r\n public useAdditionalStoresSetting: boolean = false;\r\n\r\n private gridState: any = { };\r\n\r\n public CylinderStatusOptions: { id: string; label: string } [] = [\r\n { id: \"1\", label: \"Active\" },\r\n { id: \"2\", label: \"Returned\" }\r\n ];\r\n\r\n public WasteTransferNotesType: { id: string; label: string } [] = [\r\n { id: \"Return\", label: \"Returns\" },\r\n { id: \"Removal\", label: \"Removal\" },\r\n { id: \"Transfer\", label: \"Transfer\" }\r\n ];\r\n\r\n public exportOptions: { id: number; label: string } [] = [\r\n { id: 1, label: \"Export data as xlsx\" },\r\n { id: 2, label: \"Export data as csv\" }\r\n ];\r\n\r\n constructor(\r\n private gridService: GridService,\r\n private wasteTransferNotesService: WasteTransferNotesService,\r\n private settingsService: SettingsService,\r\n private licenseService: LicenseService,\r\n @Inject(\"AuthService\") authService: IAuthService,\r\n private gridExportService: GridExportService,\r\n private translate: TranslateService,\r\n ) {\r\n this.isPortal = authService.isPortalUser;\r\n this.calculateDateDisplayValue = this.calculateDateDisplayValue.bind(this);\r\n }\r\n\r\n ngOnInit(): void {\r\n this.licenseService.GetCompanyHasAccessToModule(Module.Pro).subscribe(r => {\r\n this.hasProModule = r;\r\n });\r\n\r\n this.getSettingsData();\r\n\r\n this.gridService.GetLayout(GridKind.WasteTransferNotes).subscribe(value => {\r\n if (value) {\r\n this.gridState = value;\r\n this.dataGrid.instance.state(value);\r\n }\r\n this.SetDataSource();\r\n });\r\n }\r\n\r\n public onExportItemClick(e: any): void {\r\n const title = this.translate.instant(\"f-gas.waste-transfer-notes\");\r\n switch (e.itemData.id) {\r\n case 1:\r\n this.gridExportService.exportGridAsXlsx(this.dataGrid.instance, title);\r\n break;\r\n case 2:\r\n this.gridExportService.exportGridAsCsv(this.dataGrid.instance, title);\r\n break;\r\n default:\r\n throw new Error(\"Unhandled export type: \" + e.itemData.id);\r\n }\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public getDetails(wasteTransferId: string): Cylinder[] {\r\n const source = this.dataSources[wasteTransferId];\r\n if (source == null) {\r\n this.dataSources[wasteTransferId] = [];\r\n this.wasteTransferNotesService.GetDetails(Number(wasteTransferId)).subscribe(cylinder => {\r\n this.dataSources[wasteTransferId] = cylinder;\r\n });\r\n }\r\n\r\n return this.dataSources[wasteTransferId];\r\n }\r\n\r\n public FilterChanged($event: any): void {\r\n const filterValue = Number($event.currentTarget.value);\r\n if (filterValue === 0) {\r\n this.filterSelected = null;\r\n } else {\r\n this.filterSelected = [\"Type\", \"=\", this.WasteTranferNoteTypeToEdmLiteral(Number(filterValue))];\r\n }\r\n this.dataGrid.instance.filter(this.filterSelected);\r\n }\r\n\r\n public calculateDateDisplayValue(cellValue): string {\r\n if (cellValue) {\r\n const date = moment(cellValue, \"d/MM/yyyy, hh:mm:ss a\", false);\r\n return date.toDate().toLocaleDateString();\r\n }\r\n\r\n return null;\r\n }\r\n\r\n public openColumnChooser(): void {\r\n this.dataGrid.instance.showColumnChooser();\r\n }\r\n\r\n public loadState = () => this.gridService.GetLayout(GridKind.WasteTransferNotes).toPromise();\r\n\r\n public SaveLayout(): void {\r\n const state = this.dataGrid.instance.state();\r\n this.gridService.SaveLayout(state, GridKind.WasteTransferNotes);\r\n }\r\n\r\n public ResetLayout(): void {\r\n this.gridService.ResetLayout(GridKind.WasteTransferNotes);\r\n this.dataGrid.instance.state(null);\r\n this.gridState = null;\r\n }\r\n\r\n public columnVisible(name: string, defaultValue: boolean): boolean {\r\n if (this.gridState && this.gridState.columns) {\r\n const column = this.gridState.columns.find(x => x.name === name);\r\n\r\n if (column) {\r\n return column.visible;\r\n }\r\n }\r\n\r\n return defaultValue;\r\n }\r\n\r\n private WasteTranferNoteTypeToEdmLiteral(item: WtnType): EdmLiteral {\r\n switch (item) {\r\n case WtnType.Return:\r\n return new EdmLiteral(\"FGas.Enums.WtnType'Return'\");\r\n case WtnType.Removal:\r\n return new EdmLiteral(\"FGas.Enums.WtnType'Removal'\");\r\n case WtnType.Transfer:\r\n return new EdmLiteral(\"FGas.Enums.WtnType'Transfer'\");\r\n default:\r\n throw new Error(\"Unhandled waste transfer note type: \" + item);\r\n }\r\n }\r\n\r\n private SetDataSource(): void {\r\n this.wasteTransferNotesDataSource = this.wasteTransferNotesService.GetDataSource(true);\r\n\r\n this.SearchText = \"\";\r\n this.SearchTextChanged();\r\n }\r\n\r\n private getSettingsData() {\r\n this.settingsService.getSetting(SettingId.FGasRefrigerantUnits).subscribe((settingData: SettingData) => {\r\n this.units = settingData.ValueListSelectedId === 1 ? \"kg\" : \"lb\";\r\n });\r\n\r\n this.settingsService.getSetting(SettingId.UseAdditionalStores).subscribe((settingData: SettingData) => {\r\n this.useAdditionalStoresSetting = settingData.ValueBool;\r\n });\r\n }\r\n}\r\n","export enum WtnContactTargetType {\r\n Source,\r\n Destination\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ 'accordion.waste-transfer-note.return-no' | translate }}\r\n \r\n {{sourceNumber}}\r\n \r\n
{{ 'accordion.waste-transfer-note.job-no' | translate }}\r\n \r\n {{sourceNumber}}\r\n \r\n
{{ 'accordion.waste-transfer-note.transfer' | translate }}
\r\n","import { Component, Input } from \"@angular/core\";\r\nimport { WtnType } from \"../../enums/wtn-type.enums\";\r\n\r\n@Component({\r\n selector: \"app-source-accordion-item\",\r\n templateUrl: \"./source-accordion-item.component.html\",\r\n styleUrls: [\"./source-accordion-item.component.scss\"]\r\n})\r\nexport class SourceAccordionItemComponent {\r\n @Input() type: number;\r\n @Input() sourceNumber: number;\r\n public wtnTypes = WtnType;\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n {{cylinder.CylinderNo}}\r\n \r\n \r\n {{cylinder.Type}}\r\n \r\n {{cylinder.Weight | number: '1.5'}} {{units}}\r\n
","import { Component, Input, OnInit } from \"@angular/core\";\r\nimport { SettingData, SettingId, SettingsService } from \"servicesight-shared\";\r\nimport { CylinderAccordion } from \"../../models/cylinder-accordion.model\";\r\n\r\n@Component({\r\n selector: \"app-cylinders-accordion-item\",\r\n templateUrl: \"./cylinders-accordion-item.component.html\",\r\n styleUrls: [\"./cylinders-accordion-item.component.scss\"]\r\n})\r\nexport class CylindersAccordionItemComponent implements OnInit {\r\n @Input() cylinders: CylinderAccordion[];\r\n public units: string = \"kg\";\r\n\r\n\r\n constructor(private settingsService: SettingsService) {}\r\n\r\n ngOnInit(): void {\r\n this.settingsService.getSetting(SettingId.FGasRefrigerantUnits).subscribe((settingData: SettingData) => {\r\n this.units = settingData.ValueListSelectedId === 1 ? \"kg\" : \"lb\";\r\n });\r\n }\r\n}\r\n","export enum WtnContactType {\r\n Customer = 0,\r\n Supplier = 1,\r\n Engineer = 2\r\n}\r\n","\r\n \r\n {{'accordion.customerNotProvided' | translate}}\r\n {{'accordion.supplierNotProvided' | translate}}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{ 'accordion.acc-no' | translate }}\r\n \r\n \r\n {{ contact.AccountNumber }}\r\n \r\n \r\n {{ contact.AccountNumber }}\r\n \r\n
\r\n {{ 'accordion.name' | translate }}\r\n \r\n {{ contact.Name }}\r\n
\r\n {{ 'accordion.address' | translate }}\r\n \r\n {{ contact.Address }}\r\n
\r\n
\r\n \r\n {{'accordion.engineerNotProvided' | translate}}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{ 'accordion.engineer-name' | translate}}\r\n \r\n \r\n {{ engineer.Name }}\r\n \r\n
\r\n {{ 'accordion.waste-transfer-note.van' | translate }}\r\n \r\n {{ engineer.VanNumber }}\r\n
\r\n {{ 'accordion.waste-transfer-note.certification-no' | translate }}\r\n \r\n {{ engineer.CertificateNo }}\r\n
\r\n
\r\n
\r\n","import { Component, Input, OnChanges } from \"@angular/core\";\r\nimport { mergeMap } from \"rxjs/operators\";\r\nimport { AccordionDataService } from \"src/app/shared/components/accordion/accordion-data.service\";\r\nimport { AccordionEngineerModel } from \"src/app/shared/components/accordion/models/accordion-engineer.model\";\r\nimport { AccordionSupplierModel } from \"src/app/shared/components/accordion/models/accordion-supplier.model\";\r\nimport { AccordionCustomerModel } from \"src/app/shared/components/accordion/models/customer-model\";\r\nimport { WtnContactAccordionModel } from \"src/app/shared/components/accordion/models/wtn-contact-accordion.model\";\r\nimport { WtnEngineer } from \"src/app/shared/components/accordion/models/wtn-engineer-accordion.model\";\r\nimport { WtnContactTargetType } from \"../../enums/wtn-contact-target-type.enums\";\r\nimport { WtnContactType } from \"../../enums/wtn-contact-type.enum\";\r\nimport { WtnType } from \"../../enums/wtn-type.enums\";\r\n\r\n@Component({\r\n selector: \"app-waste-transfer-contact-accordion-item\",\r\n templateUrl: \"./waste-transfer-contact-accordion-item.component.html\",\r\n styleUrls: [\"./waste-transfer-contact-accordion-item.component.scss\"]\r\n})\r\n\r\nexport class WasteTransferContactAccordionItemComponent implements OnChanges {\r\n @Input() contactId: number;\r\n @Input() type: WtnType;\r\n @Input() contactTarget: WtnContactTargetType;\r\n @Input() createdFromMobile: boolean;\r\n\r\n public contact: WtnContactAccordionModel;\r\n public engineer: WtnEngineer;\r\n public contactTypes = WtnContactType;\r\n public contactType: WtnContactType;\r\n\r\n constructor(\r\n private dataService: AccordionDataService\r\n ) { }\r\n\r\n ngOnChanges(): void {\r\n this.setContact();\r\n }\r\n\r\n private setContact(): void {\r\n switch (this.contactTarget) {\r\n case WtnContactTargetType.Source:\r\n this.setSourceContact();\r\n break;\r\n case WtnContactTargetType.Destination:\r\n this.setDestinationContact();\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n private setSourceContact(): void {\r\n switch(this.type) {\r\n case WtnType.Return:\r\n if (this.createdFromMobile) {\r\n this.setEngineerContact();\r\n } else {\r\n this.setCustomerContact();\r\n }\r\n break;\r\n case WtnType.Removal:\r\n this.setCustomerContact();\r\n break;\r\n case WtnType.Transfer:\r\n if (this.createdFromMobile) {\r\n this.setEngineerContact();\r\n } else {\r\n this.setStoreCustomerContact();\r\n }\r\n break;\r\n }\r\n }\r\n\r\n private setDestinationContact(): void {\r\n switch(this.type) {\r\n case WtnType.Return:\r\n this.setSupplierContact();\r\n break;\r\n case WtnType.Removal:\r\n this.setEngineerContact();\r\n break;\r\n case WtnType.Transfer:\r\n this.setStoreCustomerContact();\r\n break;\r\n }\r\n }\r\n\r\n private setCustomerContact(): void {\r\n this.contactType = WtnContactType.Customer;\r\n\r\n if (this.contactId) {\r\n this.dataService.getCustomerData(this.contactId).subscribe(x => {\r\n this.setContactModel(x.CustomerID, x);\r\n });\r\n }\r\n }\r\n\r\n private setSupplierContact(): void {\r\n this.contactType = WtnContactType.Supplier;\r\n\r\n if (this.contactId) {\r\n this.dataService.getSupplierData(this.contactId).subscribe(x => {\r\n this.setContactModel(x.SupplierId, x);\r\n });\r\n }\r\n }\r\n\r\n private setStoreCustomerContact(): void {\r\n this.contactType = WtnContactType.Customer;\r\n\r\n if(this.contactId) {\r\n this.dataService.GetStoreDetails(this.contactId)\r\n .pipe(\r\n mergeMap(response => {\r\n return this.dataService.getCustomerData(response.SiteId);\r\n })\r\n ).subscribe(customer => {\r\n this.setContactModel(customer.CustomerID, customer);\r\n });\r\n }\r\n }\r\n\r\n private setEngineerContact(): void {\r\n this.contactType = WtnContactType.Engineer;\r\n let engineerModel: AccordionEngineerModel = null;\r\n\r\n if (this.contactId) {\r\n this.dataService.GetEngineerDetails(this.contactId)\r\n .pipe(\r\n mergeMap(response => {\r\n engineerModel = response;\r\n return this.dataService.GetStoreDetails(response.StoreId);\r\n })\r\n ).subscribe(store => {\r\n this.setEngineerModel(engineerModel, store.StoreName);\r\n });\r\n }\r\n }\r\n\r\n private setEngineerModel(model: AccordionEngineerModel, storeName: string): void {\r\n this.engineer = {\r\n Name: model.Engineer,\r\n VanNumber: storeName,\r\n CertificateNo: model.CertificateNo\r\n };\r\n }\r\n\r\n private setContactModel(id: number, model: AccordionCustomerModel | AccordionSupplierModel): void {\r\n this.contact = {\r\n Id: id,\r\n AccountNumber: model.Alpha,\r\n Address: model.Address,\r\n Name: model.Name\r\n };\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n

{{ 'fgas.waste-transfer-notes.document.title' | translate }} {{ wtnNumber }}

\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
{{ 'label.email.sendMessage' | translate }}
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n","import { Component, Inject, OnInit, ViewChild } from \"@angular/core\";\r\nimport { Location } from \"@angular/common\";\r\nimport { ActivatedRoute } from \"@angular/router\";\r\nimport { ReportViewerComponent, LogPreviewType, IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { Email } from \"src/app/shared/models/email.model\";\r\nimport { WasteTransferNotesService } from \"../services/waste-transfer-notes.service\";\r\nimport { WasteTransferAccordionModel } from \"../models/waste-transfer-accordion.model\";\r\nimport { WtnContactTargetType } from \"../enums/wtn-contact-target-type.enums\";\r\n\r\n@Component({\r\n selector: \"app-waste-transfer-notes-preview\",\r\n templateUrl: \"./waste-transfer-notes-preview.component.html\",\r\n styleUrls: [\"./waste-transfer-notes-preview.component.scss\"]\r\n})\r\nexport class WasteTransferNotesPreviewComponent implements OnInit {\r\n @ViewChild(\"report\") report: ReportViewerComponent;\r\n\r\n public url: string;\r\n public hostUrl: string;\r\n public wtnNumber: number;\r\n public previewType: LogPreviewType;\r\n public showTemplateDialog: boolean = false;\r\n public emailData: Email = new Email();\r\n public showSuccessSendMessage: boolean = false;\r\n public showErrorSendMessage: boolean = false;\r\n public wasteTransfer: WasteTransferAccordionModel;\r\n public contactTargets = WtnContactTargetType;\r\n\r\n constructor(\r\n private route: ActivatedRoute,\r\n private location: Location,\r\n private wasteTransferNotesService: WasteTransferNotesService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) { }\r\n\r\n ngOnInit(): void {\r\n this.route.params.subscribe(params => {\r\n this.wtnNumber = Number(params.id);\r\n });\r\n this.hostUrl = this.appConfig.apiLocations.FGas.substr(0, this.appConfig.apiLocations.FGas.lastIndexOf(\"/api/\") + 1);\r\n this.url = `waste-transfer-notes/${this.wtnNumber}`;\r\n this.wasteTransferNotesService.GetWasteTransfer(this.wtnNumber).subscribe(response => {\r\n this.wasteTransfer = response;\r\n });\r\n this.hostUrl = this.appConfig.apiLocations.FGas.substr(0, this.appConfig.apiLocations.FGas.lastIndexOf(\"/api/\") + 1);\r\n this.url = `waste-transfer-notes/${this.wtnNumber}`;\r\n }\r\n\r\n public CallPrint(): void {\r\n this.report.print();\r\n }\r\n\r\n public CallDownload(): void {\r\n this.report.download();\r\n }\r\n\r\n public GoBack(): void {\r\n this.location.back();\r\n }\r\n\r\n public OpenEmailDialog(): void {\r\n this.Send();\r\n }\r\n\r\n public OpenDialog(): void {\r\n this.wasteTransferNotesService.GetWasteTransferNotesEmailData(this.wtnNumber).subscribe(x => this.emailData = x, () => { }, () => {\r\n this.showErrorSendMessage = false;\r\n this.showTemplateDialog = true;\r\n });\r\n }\r\n\r\n public CloseDialog(): void {\r\n this.showTemplateDialog = false;\r\n }\r\n\r\n private Send(): void {\r\n this.wasteTransferNotesService.SendWasteTransferNotesEmailData(this.emailData).subscribe(() => {\r\n this.showTemplateDialog = false;\r\n this.showSuccessSendMessage = true;\r\n }, () => {\r\n this.showErrorSendMessage = true;\r\n });\r\n }\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { IAppConfig, APP_CONFIG, PageableDatastoreService } from \"servicesight-shared\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class CylinderService extends PageableDatastoreService {\r\n\r\n private static readonly odataKey: string = \"CylinderId\";\r\n\r\n constructor(\r\n private odataService: ODataService,\r\n @Inject(APP_CONFIG) private config: IAppConfig,\r\n ) {\r\n super(CylinderService.odataKey);\r\n }\r\n\r\n protected GetDataSourceObject(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.FGasOData}CylindersOData`,\r\n key: CylinderService.odataKey,\r\n keyType: \"Int32\",\r\n paging: true,\r\n pageSize: 50\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'fgas.cylinder.list.heading' | translate}}

\r\n
\r\n \r\n\r\n {{ 'fgas.buttons.new-cylinder' | translate }}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n\r\n
\r\n \r\n {{ data.value | customDate: 'shortDate' }}\r\n \r\n
\r\n\r\n
\r\n {{ data.value | customDate: 'shortDate' }}\r\n
\r\n \r\n
\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Inject,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport * as moment from \"moment\";\r\nimport { toArray } from \"rxjs/operators\";\r\nimport { Orientation } from \"servicesight-components\";\r\nimport {\r\n GridKind,\r\n GridService,\r\n IAuthService,\r\n IUserReferences,\r\n Module,\r\n PermissionsService,\r\n SettingData,\r\n SettingId,\r\n SettingsService,\r\n GridExportService,\r\n StoreService\r\n} from \"servicesight-shared\";\r\nimport { CylinderService } from \"src/app/shared/services/cylinder/cylinder.service\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\n\r\n@Component({\r\n selector: \"app-cylinders-list\",\r\n templateUrl: \"./cylinders-list.component.html\",\r\n styleUrls: [\"./cylinders-list.component.scss\"]\r\n})\r\nexport class CylindersListComponent implements OnInit, OnChanges {\r\n\r\n @Input() isAddDialogue: boolean = false;\r\n @Input() selected: number[] = [];\r\n @Input() supplierId: number = null;\r\n @Input() cylinderIdsToHide: number[];\r\n @Output() selectedChange = new EventEmitter();\r\n\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n\r\n public storeId: number = 0;\r\n\r\n public cylindersDataSource: DataSource;\r\n public SearchText: string = \"\";\r\n public cylinderTypeOData: any = [];\r\n public hasAddPermission: boolean = true;\r\n public landscape: Orientation = Orientation.Landscape;\r\n\r\n public UICustomisations: IUserReferences;\r\n public userRefCylinder1Label: string;\r\n public userRefCylinder2Label: string;\r\n\r\n public filters: any = {};\r\n private statusFilter: any;\r\n private supplierIdFilter: any;\r\n public StoreListDataStore: DataSource;\r\n public Uploads: { value: string; name: string }[];\r\n public hasProModule: boolean;\r\n public isPortal: boolean;\r\n public hasPurchaseOrdersModule: boolean;\r\n private cylindersFilter = [];\r\n\r\n private useAdditionalStoresSetting: boolean = false;\r\n private gridState: any = {};\r\n public units: string = \"kg\";\r\n\r\n public get selectionMode(): string {\r\n return this.isAddDialogue ? \"multiple\" : \"none\";\r\n }\r\n\r\n public CylinderStatusOptions: { id: string; label: string }[] = [\r\n { id: \"Active\", label: \"Active\" },\r\n { id: \"Returned\", label: \"Returned\" }\r\n ];\r\n\r\n public exportOptions: { id: number; label: string }[] = [\r\n { id: 1, label: \"Export data as xlsx\" },\r\n { id: 2, label: \"Export data as csv\" }\r\n ];\r\n\r\n constructor(\r\n private gridService: GridService,\r\n private cylinderService: CylinderService,\r\n private permissionService: PermissionsService,\r\n private router: Router,\r\n private settingsService: SettingsService,\r\n private storeService: StoreService,\r\n private licenseService: LicenseService,\r\n private gridExportService: GridExportService,\r\n private translate: TranslateService,\r\n @Inject(\"AuthService\") authService: IAuthService,\r\n ) {\r\n\r\n this.calculateReturnDateDisplayValue = this.calculateReturnDateDisplayValue.bind(this);\r\n this.calculatePurchaseDateDisplayValue = this.calculatePurchaseDateDisplayValue.bind(this);\r\n\r\n // code below must be here because OnInit method is executed to late.\r\n // in 'OnInit' 'state' object is override/cleared and we don't have access to data which was send\r\n // Doc ref. https://angular.io/api/router/NavigationExtras#state\r\n const navigation = this.router.getCurrentNavigation();\r\n if (navigation) {\r\n const extras = navigation.extras;\r\n if (extras && extras.state && extras.state.hasOwnProperty(\"cylindersIds\")) {\r\n extras.state.cylindersIds.forEach((el, index) => {\r\n this.cylindersFilter.push([\"CylinderNo\", \"=\", el]);\r\n if (extras.state.cylindersIds.length > index) {\r\n this.cylindersFilter.push(\"or\");\r\n }\r\n });\r\n }\r\n }\r\n\r\n this.isPortal = authService.isPortalUser;\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.getSettingsData();\r\n this.GetUserReferences();\r\n this.permissionService.CurrentUserHasPermission(\"FGasCylindersCreate\").subscribe(x => this.hasAddPermission = x);\r\n\r\n this.licenseService.GetCompanyHasAccessToModule(Module.Pro).subscribe(r => {\r\n this.hasProModule = r;\r\n });\r\n this.licenseService.GetCompanyHasAccessToModule(Module.PurchaseOrders).subscribe(r => {\r\n this.hasPurchaseOrdersModule = r;\r\n });\r\n\r\n if (!this.isAddDialogue) {\r\n this.gridService.GetLayout(GridKind.Cylinders).subscribe(value => {\r\n if (value) {\r\n this.gridState = value;\r\n this.dataGrid.instance.state(value);\r\n }\r\n this.SetDataSources();\r\n });\r\n } else {\r\n this.SetDataSources();\r\n }\r\n\r\n const sub = this.storeService.GetStores().pipe(toArray()).subscribe(a => {\r\n const all = [{ StoreId: 0, StoreName: \"All\", SiteId: 1, StoreType: 1 }];\r\n const storesArray = all.concat(a[0]);\r\n\r\n this.StoreListDataStore = new DataSource({\r\n store: {\r\n type: \"array\",\r\n key: \"StoreId\",\r\n data: storesArray,\r\n }\r\n });\r\n sub.unsubscribe();\r\n if (this.isAddDialogue) {\r\n this.storeId = 1; //default to main store\r\n }\r\n });\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n const supplierIdChange = changes.supplierId;\r\n if (!supplierIdChange || supplierIdChange.currentValue === supplierIdChange.previousValue) {\r\n return;\r\n }\r\n\r\n if (this.supplierId) {\r\n this.supplierIdFilter = [\"SupplierId\", \"=\", this.supplierId];\r\n }\r\n }\r\n\r\n public calculateReturnDateDisplayValue(rowdata): string {\r\n return this.calculateDateDisplayValue(rowdata.ReturnDate);\r\n }\r\n\r\n public calculatePurchaseDateDisplayValue(rowdata): string {\r\n return this.calculateDateDisplayValue(rowdata.PurchaseDate);\r\n }\r\n\r\n public calculateDateDisplayValue(cellValue): string {\r\n if (cellValue) {\r\n const date = moment(cellValue, \"d/MM/yyyy, hh:mm:ss a\", false);\r\n return date.toDate().toLocaleDateString();\r\n }\r\n\r\n return null;\r\n }\r\n\r\n public UploadSelected(): void {\r\n this.router.navigate([\"/f-gas/cylinders/upload\"]);\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n if (this.dataGrid.instance) {\r\n this.dataGrid.instance.searchByText(this.SearchText);\r\n }\r\n }\r\n\r\n public SetFilters(): void {\r\n const filters = [];\r\n\r\n if (this.cylinderIdsToHide) {\r\n this.cylinderIdsToHide.forEach(a => {\r\n filters.push([\"CylinderId\", \"<>\", a]);\r\n filters.push(\"and\");\r\n });\r\n }\r\n\r\n if (this.storeId > 0) {\r\n filters.push([\"StoreId\", \"=\", this.storeId]);\r\n filters.push(\"and\");\r\n }\r\n if (this.isAddDialogue) {\r\n filters.push([\"CylinderStatus\", \"=\", \"Active\"]);\r\n filters.push(\"and\");\r\n } else {\r\n if (this.statusFilter) {\r\n filters.push(this.statusFilter);\r\n filters.push(\"and\");\r\n }\r\n }\r\n if (this.supplierIdFilter) {\r\n filters.push(this.supplierIdFilter);\r\n filters.push(\"and\");\r\n }\r\n\r\n if (filters.length) {\r\n filters.pop();\r\n this.dataGrid.instance.filter(filters);\r\n } else {\r\n this.dataGrid.instance.clearFilter();\r\n }\r\n }\r\n\r\n public StatusFilterChanged($event): void {\r\n const filterValue = $event.currentTarget.value;\r\n if (filterValue === \"0\") {\r\n this.statusFilter = null;\r\n } else {\r\n this.statusFilter = [\"CylinderStatus\", \"=\", filterValue];\r\n }\r\n this.SetFilters();\r\n }\r\n\r\n public SupplierFilterChanged($event): void {\r\n const filterValue = $event.currentTarget.value;\r\n if (filterValue === \"0\") {\r\n this.supplierIdFilter = null;\r\n } else {\r\n this.supplierIdFilter = [\"SupplierId\", \"=\", this.supplierId];\r\n }\r\n this.SetFilters();\r\n }\r\n\r\n public loadState = () => this.gridService.GetLayout(GridKind.Cylinders).toPromise();\r\n\r\n public SaveLayout(): void {\r\n const state = this.dataGrid.instance.state();\r\n this.gridService.SaveLayout(state, GridKind.Cylinders);\r\n }\r\n\r\n public ResetLayout(): void {\r\n this.gridService.ResetLayout(GridKind.Cylinders);\r\n this.dataGrid.instance.state(null);\r\n this.gridState = null;\r\n }\r\n\r\n public viewDetails(event) {\r\n this.router.navigate([\"/f-gas/cylinders/detail/\", event.data.CylinderId]);\r\n }\r\n\r\n public get UseAdditionalStores(): boolean {\r\n return this.useAdditionalStoresSetting;\r\n }\r\n\r\n public FilterStoreList($event) {\r\n this.storeId = $event.value;\r\n this.SetFilters();\r\n }\r\n\r\n public isDateRed(date: Date, status: string) {\r\n if (date === undefined || date === null) {\r\n return false;\r\n }\r\n\r\n const today: Date = new Date();\r\n today.setHours(0, 0, 0, 0);\r\n const theDate = date;\r\n theDate.setHours(0, 0, 0, 0);\r\n return status === \"Active\" && theDate < today;\r\n }\r\n\r\n public OnSelectionChanged(): void {\r\n this.selectedChange.emit(this.selected);\r\n }\r\n\r\n private GetUserReferences() {\r\n this.UICustomisations = JSON.parse(localStorage.getItem(\"ls.userReferences\"));\r\n const userRefJob1 = this.UICustomisations.list.filter((i) => i.UICustomisationID === 47)[0]; // UICustomisationID for cylinder ref 1 is 47 in ServiceSight\r\n this.userRefCylinder1Label = userRefJob1.CustomText || userRefJob1.OriginalText;\r\n const userRefJob2 = this.UICustomisations.list.filter((i) => i.UICustomisationID === 48)[0]; // UICustomisationID for cylinder ref 2 is 48 in ServiceSight\r\n this.userRefCylinder2Label = userRefJob2.CustomText || userRefJob2.OriginalText;\r\n }\r\n\r\n private SetDataSources(): void {\r\n this.cylindersDataSource = this.cylinderService.GetDataSource(true);\r\n if (this.cylindersFilter.length > 0) {\r\n this.cylindersDataSource.filter(this.cylindersFilter);\r\n } else {\r\n const filter = this.storeId > 0 ? [\"StoreId\", \"=\", this.storeId] : null;\r\n this.cylindersDataSource.filter(filter);\r\n }\r\n this.SearchText = \"\";\r\n this.SearchTextChanged();\r\n }\r\n\r\n private getSettingsData() {\r\n this.settingsService.getSetting(SettingId.UseAdditionalStores).subscribe((settingData: SettingData) => {\r\n this.useAdditionalStoresSetting = settingData.ValueBool;\r\n });\r\n\r\n this.settingsService.getSetting(SettingId.FGasRefrigerantUnits).subscribe((settingData: SettingData) => {\r\n this.units = settingData.ValueListSelectedId === 1 ? \"kg\" : \"lb\";\r\n });\r\n }\r\n\r\n public onExportItemClick(e: any): void {\r\n switch (e.itemData.id) {\r\n case 1:\r\n this.gridExportService.exportGridAsXlsx(this.dataGrid.instance, this.translate.instant(\"f-gas.cylinders\"));\r\n break;\r\n case 2:\r\n this.gridExportService.exportGridAsCsv(this.dataGrid.instance, this.translate.instant(\"f-gas.cylinders\"));\r\n break;\r\n default:\r\n throw new Error(\"Unhandled export type: \" + e.itemData.id);\r\n }\r\n }\r\n\r\n public openColumnChooser(): void {\r\n this.dataGrid.instance.showColumnChooser();\r\n }\r\n\r\n public columnVisible(name: string, defaultValue: boolean): boolean {\r\n if (this.gridState && this.gridState.columns) {\r\n const column = this.gridState.columns.find(x => x.name === name);\r\n\r\n if (column) {\r\n return column.visible;\r\n }\r\n }\r\n\r\n return defaultValue;\r\n }\r\n\r\n}\r\n","import { NgModule } from \"@angular/core\";\r\nimport { RouterModule, Routes } from \"@angular/router\";\r\nimport { FGasLogComponent } from \"servicesight-shared\";\r\nimport { CylinderDetailComponent } from \"./cylinder-detail/cylinder-detail.component\";\r\nimport { CylindersUploadComponent } from \"./cylinders-upload/cylinders-upload.component\";\r\nimport { DecantComponent } from \"./decant/decant.component\";\r\nimport { FGasLogDetailComponent } from \"./f-gas-log-detail/f-gas-log-detail.component\";\r\nimport { FGasLogPreviewComponent } from \"./f-gas-log-preview/f-gas-log-preview.component\";\r\nimport { WasteTransferNotesListComponent } from \"./waste-transfer-notes-list/waste-transfer-notes-list.component\";\r\nimport { WasteTransferNotesPreviewComponent } from \"./waste-transfer-notes-preview/waste-transfer-notes-preview.component\";\r\nimport { CylindersListComponent } from \"../shared/components/cylinders-list/cylinders-list.component\";\r\n\r\nconst routes: Routes = [\r\n { path: \"log\", component: FGasLogComponent },\r\n { path: \"log/:id\", component: FGasLogDetailComponent },\r\n { path: \"cylinders/list\", component: CylindersListComponent },\r\n { path: \"cylinders/detail/:id\", component: CylinderDetailComponent },\r\n { path: \"cylinders/new\", component: CylinderDetailComponent },\r\n { path: \"cylinders/upload\", component: CylindersUploadComponent },\r\n { path: \"preview/:type\", component: FGasLogPreviewComponent },\r\n { path: \"preview/:type/:id\", component: FGasLogPreviewComponent },\r\n { path: \"decant\", component: DecantComponent },\r\n { path: \"waste-transfer-notes/list\", component: WasteTransferNotesListComponent },\r\n { path: \"waste-transfer-notes/:id/document\", component: WasteTransferNotesPreviewComponent },\r\n { path: \"\", redirectTo: \"log\", pathMatch: \"full\" },\r\n { path: \"**\", redirectTo: \"log\" }\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\n\r\nexport class FGasRoutingModule {\r\n public static readonly Routes: Routes = routes;\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class SupplierPriceService {\r\n private readonly supplierPriceOdataBaseUrl: string;\r\n\r\n constructor(\r\n private odataService: ODataService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig\r\n ) {\r\n this.supplierPriceOdataBaseUrl = this.appConfig.apiLocations.FGasOData + \"SupplierPriceOData\";\r\n }\r\n\r\n public GetDataStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.supplierPriceOdataBaseUrl}`,\r\n key: \"SupplierPriceId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.supplierPriceOdataBaseUrl}`,\r\n key: \"SupplierPriceId\",\r\n keyType: \"Int32\",\r\n paging: true,\r\n pageSize: 50\r\n });\r\n }\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class SupplierPartPriceService {\r\n\r\n constructor(\r\n @Inject(APP_CONFIG) private config: IAppConfig,\r\n @Inject(\"ODataService\") private odataService: ODataService\r\n ) { }\r\n\r\n public GetDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.StockOData}StockSupplierPricesOData`,\r\n key: [\"StockHeaderId\", \"SupplierId\"],\r\n keyType: {\r\n StockHeaderId: \"Int32\",\r\n SupplierId: \"Int32\"\r\n },\r\n paging: true,\r\n pageSize: 50\r\n });\r\n }\r\n\r\n public GetDataStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.config.apiLocations.StockOData}StockSupplierPricesOData`,\r\n key: [\"StockHeaderId\", \"SupplierId\"],\r\n keyType: {\r\n StockHeaderId: \"Int32\",\r\n SupplierId: \"Int32\"\r\n }\r\n });\r\n }\r\n}\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { MakeModelListComponent } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-add-make-model-dialogue\",\r\n templateUrl: \"./add-make-model-dialogue.component.html\",\r\n styleUrls: [\"./add-make-model-dialogue.component.scss\"]\r\n})\r\nexport class AddMakeModelDialogueComponent implements OnChanges {\r\n @ViewChild(\"makeModelList\") makeModelList: MakeModelListComponent;\r\n @Output() makeModelAdded = new EventEmitter();\r\n @Input() supplierId: number = null;\r\n @Input() alreadyAdded: any[];\r\n\r\n public selected: number[] = [];\r\n public visible: boolean = false;\r\n public alreadyAddedFilter: any[];\r\n\r\n constructor() { }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.alreadyAdded) {\r\n if (!this.alreadyAdded.length) {\r\n this.alreadyAddedFilter = null;\r\n } else {\r\n this.alreadyAddedFilter = [];\r\n this.alreadyAdded.forEach((id) => {\r\n if(this.alreadyAddedFilter.length){\r\n this.alreadyAddedFilter.push(\"and\");\r\n }\r\n this.alreadyAddedFilter.push([\"MakeModelId\", \"<>\", id]);\r\n });\r\n }\r\n }\r\n }\r\n\r\n public Show(): void {\r\n this.selected = [];\r\n this.makeModelList.SetFilter(this.alreadyAddedFilter);\r\n this.visible = true;\r\n }\r\n\r\n public Close(): void {\r\n this.visible = false;\r\n }\r\n\r\n public AddEquipment(): void {\r\n this.makeModelAdded.emit(this.selected);\r\n this.Close();\r\n }\r\n}\r\n","\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n","export enum MakeModelOptionAddTo {\r\n None = 0,\r\n PurchaseOrder = 1,\r\n InstallationDeliverJob = 2,\r\n PreparationJob = 4\r\n}\r\n","import { HttpClient, HttpParams } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { map } from \"rxjs/operators\";\r\nimport { DateOnlyService, IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { IListItemModel } from \"src/app/shared/models/ilist-item.model\";\r\nimport { UICustomisationItem } from \"src/app/shared/models/ui-customisation-item.model\";\r\nimport { IQuoteService } from \"./interfaces/IQuoteService\";\r\nimport { CancelData } from \"../models/CancelData\";\r\nimport { CancelReasonCollection } from \"../models/CancelReasonCollection\";\r\nimport { CloneQuoteModel } from \"../models/clone-quote.model\";\r\nimport { IJob } from \"../models/IJob\";\r\nimport { IJobMisc } from \"../models/IJobMisc\";\r\nimport { IQuote } from \"../models/IQuote\";\r\nimport { IQuoteJobType } from \"../models/IQuoteJobType\";\r\nimport { IQuoteRevision } from \"../models/IQuoteRevision\";\r\nimport { IQuoteSummary } from \"../models/IQuoteSummary\";\r\nimport { IServiceSightCollection } from \"../models/IServiceSightCollection\";\r\nimport { QuoteSalesOrder } from \"../models/quote-sales-order\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class QuoteService implements IQuoteService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private dateOnlyService: DateOnlyService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) {\r\n }\r\n\r\n public GetQuote(quoteId: number, revisionId: number): Observable {\r\n return this.http.get(`${this.appConfig.apiLocations.Quotes}${quoteId}/${revisionId}`)\r\n .pipe(map(res => {\r\n this.RecalculateDatesOnLoad(res);\r\n return res;\r\n }));\r\n }\r\n\r\n DeleteQuote(quoteId: number, revisionId?: number): void {\r\n const params = new HttpParams();\r\n params.set(\"quoteId\", quoteId.toString());\r\n if (revisionId) {\r\n params.set(\"revisionId\", revisionId.toString());\r\n }\r\n this.http.delete(`${this.appConfig.apiLocations.Quotes}delete`, { params }).toPromise();\r\n }\r\n\r\n UpdateSummary(quote: IQuoteSummary): Observable {\r\n return this.http.put(`${this.appConfig.apiLocations.Quotes}${quote.SalesQuotationId}/${quote.RevisionId}/UpdateSummary`, quote);\r\n }\r\n\r\n SaveQuote(quote: IQuote): Observable {\r\n this.RecalculateDatesOnSave(quote);\r\n if (quote.QuoteSalesOrder.Materials && quote.QuoteSalesOrder.Materials.length > 0) {\r\n this.SetMiscIds(quote.QuoteSalesOrder);\r\n }\r\n return this.http.post(this.appConfig.apiLocations.Quotes, quote);\r\n }\r\n\r\n CreateQuoteFromReminder(quote: IQuote): Observable {\r\n return this.http.post(`${this.appConfig.apiLocations.Quotes}CreateQuoteFromReminder`, quote);\r\n }\r\n\r\n UpdateQuote(quote: IQuote): Observable {\r\n this.RecalculateDatesOnSave(quote);\r\n return this.http.put(this.appConfig.apiLocations.Quotes, quote);\r\n }\r\n\r\n RejectQuote(quoteId: number): Observable {\r\n return this.http.put(`${this.appConfig.apiLocations.Quotes}${quoteId}/Reject`, quoteId);\r\n }\r\n\r\n CancelQuote(data: CancelData): Observable {\r\n return this.http.put(`${this.appConfig.apiLocations.Quotes}${data.SalesQuotationId}/Cancel`, data);\r\n }\r\n\r\n GetJob(quoteId: number, revisionId: number): Observable {\r\n return this.http.get(`${this.appConfig.apiLocations.Quotes}${quoteId}/${revisionId}/Job`);\r\n }\r\n\r\n UpdateJob(job: IJob): Observable {\r\n return this.http.put(`${this.appConfig.apiLocations.Quotes}${job.SalesQuotationID}/${job.RevisionID}/Job`, job);\r\n }\r\n\r\n SaveJob(job: IJob): Observable {\r\n return this.http.post(`${this.appConfig.apiLocations.Quotes}${job.SalesQuotationID}/${job.RevisionID}/Job`, job);\r\n }\r\n\r\n GetJobMisc(quoteId: number, revisionId: number): Observable {\r\n return this.http.get(`${this.appConfig.apiLocations.Quotes}${quoteId}/${revisionId}/JobMisc`);\r\n }\r\n\r\n UpdateJobMisc(jobMisc: IJobMisc[], quoteId: number, revisionId: number): Observable {\r\n return this.http.put(`${this.appConfig.apiLocations.Quotes}${quoteId}/${revisionId}/JobMisc`, jobMisc);\r\n }\r\n\r\n SaveJobMisc(jobMisc: IJobMisc[], quoteId: number, revisionId: number): Observable {\r\n return this.http.post(`${this.appConfig.apiLocations.Quotes}${quoteId}/${revisionId}/JobMisc`, jobMisc);\r\n }\r\n\r\n SetDefaultJobType(jobTypeId: number): void {\r\n this.http.post(`${this.appConfig.apiLocations.Quotes}0/0/Job/SetDefaultJobType`, jobTypeId).subscribe();\r\n }\r\n\r\n public CreateRevision(revsionInfo: IQuoteRevision): Observable {\r\n return this.http.post(this.appConfig.apiLocations.Quotes + `CreateRevision`, revsionInfo);\r\n }\r\n\r\n GetJobTypes(): Observable> {\r\n return this.http.get>(this.appConfig.apiLocations.ServiceSight + \"JobType/GetAllJobTypesAsync\");\r\n }\r\n\r\n GetRevisionsList(quoteId: number): Observable {\r\n return this.http.get(`${this.appConfig.apiLocations.Quotes}${quoteId}/revisionsList`);\r\n }\r\n\r\n public GetAllMiscTypes(): Observable> {\r\n return this.http.get>(`${this.appConfig.apiLocations.ServiceSight}MiscType/GetAllMiscTypes`);\r\n }\r\n\r\n GetCancellationReason(): Observable {\r\n return this.http.get(this.appConfig.apiLocations.ServiceSight + \"CancelReasons/GetAll\");\r\n }\r\n\r\n public DeleteMiscItem(miscId: number): Observable {\r\n return this.http.delete(`${this.appConfig.apiLocations.Quotes}0/0/JobMisc/${miscId}`);\r\n }\r\n\r\n public GetDefaultJobType(): Observable {\r\n return this.http.get(`${this.appConfig.apiLocations.Quotes}0/0/Job/GetDefaultJobType`);\r\n }\r\n\r\n public GetQuoteUserReference1(): Observable {\r\n return this.http.get(`${this.appConfig.apiLocations.Quotes}GetUserRef`);\r\n }\r\n\r\n public GetUICustomisation(): Observable {\r\n return this.http.get(`${this.appConfig.apiLocations.Quotes}GetUICustomisation`);\r\n }\r\n\r\n public AcceptAndCreateContract(quoteId: number, revisionId: number): Observable {\r\n return this.http.post(`${this.appConfig.apiLocations.Quotes}AcceptQuoteAndCreateContract/${quoteId}/${revisionId}`, null);\r\n }\r\n\r\n AcceptQuoteAndCreateJob(quotationId: number, revisionId: number): Observable {\r\n return this.http.post(`${this.appConfig.apiLocations.Quotes}AcceptQuoteAndCreateJob/${quotationId}/${revisionId}`, null);\r\n }\r\n\r\n public AcceptAndCreateSalesOrder(quoteId: number, revisionId: number): Observable {\r\n return this.http.post(`${this.appConfig.apiLocations.Quotes}AcceptQuoteAndCreateSalesOrder/${quoteId}/${revisionId}`, null);\r\n }\r\n\r\n public AcceptQuote(quoteId: number, revisionId: number): Observable {\r\n return this.http.post(`${this.appConfig.apiLocations.Quotes}AcceptQuote/${quoteId}/${revisionId}`, null);\r\n }\r\n\r\n public SetStatusQuoted(quoteId: number, revisionId: number): Observable {\r\n return this.http.put(`${this.appConfig.apiLocations.Quotes}${quoteId}/${revisionId}/Quoted`, null);\r\n }\r\n\r\n public GetMiscPrice(customerId: number, miscTypeId: number, cost: number): Observable {\r\n return this.http.get(`${this.appConfig.apiLocations.ServiceSight}Customer/GetMiscPrice?id=${customerId}&miscTypeId=${miscTypeId}&cost=${cost}`)\r\n .pipe(map((res: any) => res.price));\r\n }\r\n\r\n public CloneQuote(model: CloneQuoteModel): Observable {\r\n return this.http.post(`${this.appConfig.apiLocations.Quotes}CopyQuote`, model);\r\n }\r\n\r\n public GetSalesTotal(quoteId: number, revisionId: number): Observable {\r\n return this.http.get(`${this.appConfig.apiLocations.Quotes}${quoteId}/${revisionId}/SalesTotal`);\r\n }\r\n\r\n private SetMiscIds(model: QuoteSalesOrder): void {\r\n model.Materials.forEach(c => c.QuoteMiscId = c.QuoteMiscId < 0 ? 0 : c.QuoteMiscId);\r\n }\r\n\r\n private RecalculateDatesOnLoad(quote: IQuote) {\r\n quote.ServiceContract.EquipsList.forEach(i => {\r\n i.StartDateUI = this.dateOnlyService.RecalculateDateOnLoad(i.StartDate);\r\n i.InvoiceFromUI = this.dateOnlyService.RecalculateDateOnLoad(i.InvoiceFrom);\r\n if (i.EndDate) {\r\n i.EndDateUI = this.dateOnlyService.RecalculateDateOnLoad(i.EndDate);\r\n }\r\n });\r\n quote.ServiceContract.SitesList.forEach(i => {\r\n i.StartDateUI = this.dateOnlyService.RecalculateDateOnLoad(i.StartDate);\r\n if (i.EndDate) {\r\n i.EndDateUI = this.dateOnlyService.RecalculateDateOnLoad(i.EndDate);\r\n }\r\n });\r\n }\r\n\r\n private RecalculateDatesOnSave(quote: IQuote) {\r\n if (quote.ServiceContract) {\r\n if (quote.ServiceContract.EquipsList) {\r\n quote.ServiceContract.EquipsList.forEach((i) => {\r\n i.StartDate = this.dateOnlyService.RecalculateDateOnSave(i.StartDateUI);\r\n i.InvoiceFrom = this.dateOnlyService.RecalculateDateOnSave(i.InvoiceFromUI);\r\n if (i.EndDateUI) {\r\n i.EndDate = this.dateOnlyService.RecalculateDateOnSave(i.EndDateUI);\r\n } else {\r\n i.EndDate = i.EndDateUI;\r\n }\r\n });\r\n }\r\n\r\n if (quote.ServiceContract.SitesList) {\r\n quote.ServiceContract.SitesList.forEach((s) => {\r\n s.StartDate = this.dateOnlyService.RecalculateDateOnSave(s.StartDateUI);\r\n if (s.EndDateUI) {\r\n s.EndDate = this.dateOnlyService.RecalculateDateOnSave(s.EndDateUI);\r\n } else {\r\n s.EndDate = s.EndDateUI;\r\n }\r\n });\r\n }\r\n }\r\n }\r\n}\r\n","\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
{{ 'quotes.warning.miscItemDescriptionRequired' | translate }}
\r\n
{{ 'quotes.warning.miscItemTypeRequired' | translate }}
\r\n
{{ 'quotes.warning.miscItemChargeRequired' | translate }}
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n","import { Component, EventEmitter, Inject, Input, OnInit, Output } from \"@angular/core\";\r\nimport { AbstractControl, UntypedFormControl, UntypedFormGroup, Validators } from \"@angular/forms\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { MakeModelOptionAddTo } from \"src/app/settings/equipment-settings/enum/make-model-option-add-to.enum\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { IJobMisc } from \"../../../quotes/models/IJobMisc\";\r\nimport { IQuoteService } from \"../../../quotes/services/interfaces/IQuoteService\";\r\nimport { QuoteService } from \"../../../quotes/services/quote.service\";\r\n\r\n@Component({\r\n selector: \"app-job-misc-dialog\",\r\n templateUrl: \"./job-misc-dialog.component.html\",\r\n styleUrls: [\"./job-misc-dialog.component.scss\"],\r\n providers: [\r\n { provide: \"IQuoteService\", useClass: QuoteService }\r\n ]\r\n})\r\nexport class JobMiscDialogComponent implements OnInit {\r\n @Input() customerId: number = 0;\r\n @Input() includeCharge: boolean = true;\r\n @Input() includeAddTo: boolean = false;\r\n @Input() currencySymbol: string = null;\r\n @Input() showActivities: boolean = false;\r\n @Input() title: string = \"label.quotes.newMaterialItem\";\r\n @Input() chargeDisabled: boolean = false;\r\n\r\n @Output() yes = new EventEmitter();\r\n @Output() no = new EventEmitter();\r\n\r\n IsQuoteLostOrWon: boolean;\r\n miscForm: UntypedFormGroup;\r\n descritpionControl: AbstractControl;\r\n miscTypeControl: AbstractControl;\r\n chargeControl: AbstractControl;\r\n costControl: AbstractControl;\r\n tempMiscTypeID: number;\r\n\r\n miscTypes: DataSource;\r\n showDialog = false;\r\n showError = false;\r\n\r\n public proEnabled: boolean = false;\r\n\r\n public currentAddTo: number[];\r\n public selectedActivityId: number;\r\n\r\n public item: IJobMisc = {\r\n Charge: 0.00,\r\n Cost: 0.00,\r\n Description: \"\",\r\n Selected: 0,\r\n MiscTypeID: 0,\r\n MiscType: {\r\n MiscTypeID: 0,\r\n Charge: 0,\r\n Cost: 0,\r\n Description: \"\"\r\n },\r\n AddTo: [],\r\n ActivityId: null\r\n };\r\n\r\n constructor(\r\n @Inject(\"IQuoteService\") protected quoteService: IQuoteService,\r\n private licenseService: LicenseService,\r\n private translate: TranslateService) { }\r\n\r\n public Show(IsQuoteLostOrWon: boolean) {\r\n this.IsQuoteLostOrWon = IsQuoteLostOrWon;\r\n this.currentAddTo = [];\r\n this.item = {\r\n MiscTypeID: null,\r\n Description: null,\r\n Selected: 0,\r\n MiscType: {\r\n Description: null,\r\n Charge: 0,\r\n Cost: 0,\r\n MiscTypeID: null\r\n },\r\n Charge: 0,\r\n Cost: 0,\r\n AddTo: [],\r\n ActivityId: null\r\n };\r\n this.selectedActivityId = null;\r\n this.miscForm.reset();\r\n this.item.Cost = 0;\r\n this.showError = false;\r\n this.showDialog = true;\r\n this.tempMiscTypeID = null;\r\n }\r\n\r\n public ShowEdit(item: IJobMisc, IsQuoteLostOrWon: boolean) {\r\n this.title = \"label.quotes.editMaterialItem\";\r\n this.IsQuoteLostOrWon = IsQuoteLostOrWon;\r\n this.quoteService.GetAllMiscTypes().subscribe((miscResult) => {\r\n this.miscTypes = new DataSource(miscResult.ModelCollection.map((x) => {\r\n return {\r\n MiscTypeID: x.MiscTypeID,\r\n Description: x.Description,\r\n Charge: x.Price,\r\n Cost: x.Cost ? x.Cost : 0\r\n };\r\n }));\r\n\r\n this.item = item;\r\n this.currentAddTo = (this.item.AddTo ?? []).slice();\r\n if (this.item.MiscID === undefined) {\r\n this.item.MiscID = 0;\r\n }\r\n this.selectedActivityId = this.item.ActivityId;\r\n this.tempMiscTypeID = item.MiscTypeID;\r\n this.showError = false;\r\n this.showDialog = true;\r\n });\r\n }\r\n\r\n public onCancelClick(): void {\r\n this.showDialog = false;\r\n this.no.emit();\r\n }\r\n\r\n onHide(): void {\r\n this.showDialog = false;\r\n }\r\n\r\n public onSaveClick() {\r\n this.descritpionControl.markAsDirty();\r\n this.miscTypeControl.markAsDirty();\r\n this.costControl.markAsDirty();\r\n if (this.chargeControl) {\r\n this.chargeControl.markAsDirty();\r\n }\r\n\r\n if (this.miscForm.valid) {\r\n this.showDialog = false;\r\n this.item.Charge = Number(this.item.Charge);\r\n this.item.Cost = Number(this.item.Cost);\r\n\r\n if (this.currentAddTo) {\r\n this.item.AddTo = this.currentAddTo.slice();\r\n this.currentAddTo = null;\r\n }\r\n\r\n if (this.showActivities) {\r\n this.item.ActivityId = this.selectedActivityId;\r\n }\r\n\r\n this.yes.emit(this.item);\r\n } else {\r\n this.showError = true;\r\n }\r\n }\r\n\r\n onValueChangedJobMiscType() {\r\n //for editing purposes\r\n if (this.tempMiscTypeID !== this.item.MiscTypeID || this.tempMiscTypeID === 0) {\r\n this.tempMiscTypeID = this.item.MiscTypeID;\r\n this.item.Charge = Number(this.item.MiscType ? this.item.MiscType.Charge : 0);\r\n if (this.customerId && this.item.MiscTypeID) {\r\n this.quoteService.GetMiscPrice(this.customerId, this.item.MiscTypeID, this.item.Cost)\r\n .subscribe((price) => { this.item.Charge = Number(price); });\r\n }\r\n }\r\n }\r\n\r\n public OnCostChanged() {\r\n if (this.customerId && this.item.MiscTypeID) {\r\n this.quoteService.GetMiscPrice(this.customerId, this.item.MiscTypeID, this.item.Cost)\r\n .subscribe((price) => { this.item.Charge = Number(price); });\r\n }\r\n }\r\n\r\n public ngOnInit() {\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(modules => {\r\n this.proEnabled = modules.ProEnabled;\r\n });\r\n\r\n if (this.includeCharge) {\r\n this.miscForm = new UntypedFormGroup({\r\n formMiscDescription: new UntypedFormControl(\"\", Validators.required),\r\n formMiscType: new UntypedFormControl(\"\", Validators.required),\r\n formMiscCharge: new UntypedFormControl(\"\", Validators.required),\r\n formMiscCost: new UntypedFormControl(\"\")\r\n });\r\n } else {\r\n this.miscForm = new UntypedFormGroup({\r\n formMiscDescription: new UntypedFormControl(\"\", Validators.required),\r\n formMiscType: new UntypedFormControl(\"\", Validators.required),\r\n formMiscCost: new UntypedFormControl(\"\")\r\n });\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/dot-notation\r\n this.descritpionControl = this.miscForm.controls[\"formMiscDescription\"];\r\n // eslint-disable-next-line @typescript-eslint/dot-notation\r\n this.miscTypeControl = this.miscForm.controls[\"formMiscType\"];\r\n // eslint-disable-next-line @typescript-eslint/dot-notation\r\n this.chargeControl = this.includeCharge ? this.miscForm.controls[\"formMiscCharge\"] : null;\r\n // eslint-disable-next-line @typescript-eslint/dot-notation\r\n this.costControl = this.miscForm.controls[\"formMiscCost\"];\r\n\r\n\r\n this.quoteService.GetAllMiscTypes().subscribe((miscResult) => {\r\n const miscs = miscResult.ModelCollection.map((x) => {\r\n return {\r\n MiscTypeID: x.MiscTypeID,\r\n Description: x.Description,\r\n Charge: this.chargeDisabled ? 0 : Number(x.Price),\r\n Cost: x.Cost ? x.Cost : 0\r\n };\r\n });\r\n this.miscTypes = new DataSource({\r\n store: {\r\n type: \"array\",\r\n data: miscs,\r\n key: \"MiscTypeID\"\r\n },\r\n sort: [\r\n { selector: \"Description\", desc: false }\r\n ]\r\n });\r\n });\r\n }\r\n\r\n public SetUpValue($event) {\r\n this.currentAddTo = $event;\r\n }\r\n\r\n public SelectedActivityChanged(activityId: number): void {\r\n this.selectedActivityId = activityId;\r\n }\r\n\r\n public AddToOptions = [{\r\n Id: MakeModelOptionAddTo.PurchaseOrder,\r\n Name: this.translate.instant(\"makemodel.option.add-to.purchase-order\")\r\n }, {\r\n Id: MakeModelOptionAddTo.InstallationDeliverJob,\r\n Name: this.translate.instant(\"makemodel.option.add-to.delivery-job\")\r\n }, {\r\n Id: MakeModelOptionAddTo.PreparationJob,\r\n Name: this.translate.instant(\"makemodel.option.add-to.preparation-job\")}];\r\n}\r\n","export enum GoodsReceivedDetailGridType {\r\n Parts = 0,\r\n Equipment = 1,\r\n Material = 2,\r\n Cylinder = 3\r\n}\r\n","import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular/ui/data-grid\";\r\nimport ArrayStore from \"devextreme/data/array_store\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { GoodsReceivedSerial } from \"../models/goods-received-serial.model\";\r\n\r\n@Component({\r\n selector: \"app-goods-received-serial-nos\",\r\n templateUrl: \"./goods-received-serial-nos.component.html\",\r\n styleUrls: [\"./goods-received-serial-nos.component.scss\"]\r\n})\r\nexport class GoodsReceivedSerialNosComponent implements OnInit, OnChanges {\r\n\r\n @ViewChild(\"grid\", { static: true }) public grid: DxDataGridComponent;\r\n @Input() public serialNos: GoodsReceivedSerial[];\r\n @Input() public adjustmentNumber: number;\r\n @Output() public update = new EventEmitter();\r\n\r\n public showDialog: boolean;\r\n public formDirty: boolean = false;\r\n public originalSerialNos: GoodsReceivedSerial[];\r\n\r\n public dataSource: DataSource;\r\n\r\n public get outstandingNo(): number {\r\n return this.serialNos ? this.adjustmentNumber - this.addedCount : 0;\r\n }\r\n\r\n private get addedCount(): number {\r\n return this.serialNos.length;\r\n }\r\n\r\n constructor(\r\n private translateService: TranslateService) { }\r\n\r\n public ngOnInit(): void {\r\n this.validateSerialNumber = this.validateSerialNumber.bind(this);\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.serialNos) {\r\n this.setupDataSource();\r\n }\r\n }\r\n\r\n public openDialog(serialNos: GoodsReceivedSerial[]): void {\r\n this.originalSerialNos = serialNos.slice(0);\r\n this.setupDataSource();\r\n this.showDialog = true;\r\n this.formDirty = false;\r\n }\r\n\r\n public save(): void {\r\n this.grid.instance.saveEditData().then(() => {\r\n this.update.emit(this.serialNos);\r\n this.showDialog = false;\r\n });\r\n }\r\n\r\n public cancel(): void {\r\n this.showDialog = false;\r\n // clear and push the original array back onto the same array reference\r\n this.serialNos.length = 0;\r\n this.serialNos.push(...this.originalSerialNos);\r\n }\r\n\r\n public startingAdd(): void {\r\n this.formDirty = true;\r\n }\r\n\r\n public removeSerialNo(): void {\r\n this.formDirty = true;\r\n }\r\n\r\n public validateSerialNumber(e): boolean {\r\n return !this.serialNos.some(s => s.SerialNo === e.value);\r\n }\r\n\r\n public onToolbarPreparing(e: any): void {\r\n const item = e.toolbarOptions.items.find(i => i.name === \"addRowButton\");\r\n item.options.icon = null;\r\n item.options.text = this.translateService.instant(\"stock.adjustment.serialno.add\");\r\n item.showText = \"always\";\r\n }\r\n\r\n private setupDataSource(): void {\r\n this.dataSource = new DataSource({\r\n store: new ArrayStore({\r\n data: this.serialNos,\r\n key: \"SerialId\",\r\n onInserting: (data) => {\r\n let lowestId = 0;\r\n\r\n if (this.serialNos.length > 0) {\r\n lowestId = Math.min(...this.serialNos.map(s => s.SerialId));\r\n\r\n if (lowestId > 0) {\r\n lowestId = 0;\r\n }\r\n }\r\n\r\n data.SerialId = --lowestId;\r\n },\r\n })\r\n });\r\n }\r\n}\r\n","\r\n
\r\n
\r\n

{{ 'stock.adjustment.serialno.outstanding' | translate }}

\r\n

{{ outstandingNo }}

\r\n
\r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n\r\n","import { GoodsReceivedCylinder } from \"./goods-received-cylinder.model\";\r\nimport { GoodsReceivedEquipment } from \"./goods-received-equipment.model\";\r\nimport { GoodsReceivedMaterial } from \"./goods-received-material.model\";\r\nimport { GoodsReceivedPart } from \"./goods-received-part.model\";\r\nimport { GoodsReceivedStatus } from \"../enums/goods-received-status.enum\";\r\n\r\nexport class GoodsReceived {\r\n GoodsReceivedNumber: number;\r\n PurchaseOrderId?: number;\r\n Status: GoodsReceivedStatus;\r\n ExpenseSupplierName: string;\r\n SupplierId: number;\r\n EmployeeId: number;\r\n DeliverToId: number;\r\n ContactId: number;\r\n ReceivedDate: Date;\r\n Carriage: number;\r\n ExchangeRate: number;\r\n IsForeignCustomer: boolean;\r\n InternalNotes: string;\r\n SupplierDeliveryRef: string;\r\n EquipAutoNumbering: boolean;\r\n CarrierId: number;\r\n CarrierRef: string;\r\n CarrierContactId: number;\r\n Instructions: string;\r\n IncludeParts: boolean;\r\n IncludeEquipment: boolean;\r\n IncludeMaterials: boolean;\r\n IncludeCylinders: boolean;\r\n Parts: GoodsReceivedPart[];\r\n Equipment: GoodsReceivedEquipment[];\r\n Materials: GoodsReceivedMaterial[];\r\n Cylinders: GoodsReceivedCylinder[];\r\n CancelDate?: Date;\r\n CancelReasonId?: number;\r\n DefaultStoreId: number;\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { Observable } from \"rxjs\";\r\nimport { map } from \"rxjs/operators\";\r\nimport { IAppConfig, APP_CONFIG, PageableDatastoreService } from \"servicesight-shared\";\r\nimport { QueuedEmailType } from \"src/app/shared/enums/queued-email-type.enum\";\r\nimport { Email } from \"src/app/shared/models/email.model\";\r\nimport { AuthService } from \"src/app/shared/services/auth/auth.service\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\nimport { GoodsReceived } from \"../models/goods-received.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class GoodsReceivedService extends PageableDatastoreService {\r\n\r\n private static readonly odataKey: string = \"GoodsReceivedNumber\";\r\n constructor(\r\n private odataService: ODataService,\r\n @Inject(APP_CONFIG) protected config: IAppConfig,\r\n private httpClient: HttpClient,\r\n private authService: AuthService\r\n ) {\r\n super(GoodsReceivedService.odataKey);\r\n }\r\n\r\n protected GetDataSourceObject(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.PurchaseOrdersOData}GoodsReceivedOData`,\r\n key: GoodsReceivedService.odataKey,\r\n keyType: \"String\"\r\n });\r\n }\r\n\r\n public GetByPurchaseOrder(purchaseOrderId: number): Observable {\r\n return this.httpClient.get(`${this.config.apiLocations.PurchaseOrders}GoodsReceived/FromPurchaseOrder/${purchaseOrderId}`);\r\n }\r\n\r\n public Get(grnId: number): Observable {\r\n return this.httpClient.get(`${this.config.apiLocations.PurchaseOrders}GoodsReceived/${grnId}`);\r\n }\r\n\r\n public Save(goodsReceived: GoodsReceived): Observable {\r\n if (goodsReceived.Equipment) {\r\n this.RecalculateLineIds(goodsReceived);\r\n }\r\n return this.httpClient.post(`${this.config.apiLocations.PurchaseOrders}GoodsReceived`, goodsReceived);\r\n }\r\n\r\n public BookIn(grnId: number): Observable {\r\n return this.httpClient.put(`${this.config.apiLocations.PurchaseOrders}GoodsReceived/${grnId}/BookIn`, null);\r\n }\r\n\r\n public Cancel(goodsReceived: GoodsReceived): Observable {\r\n return this.httpClient.put(`${this.config.apiLocations.PurchaseOrders}GoodsReceived/Cancel`, goodsReceived);\r\n }\r\n\r\n public GetStatus(id: number): Observable {\r\n return this.httpClient.get(`${this.config.apiLocations.PurchaseOrders}GoodsReceived/${id}`).pipe(map((res: GoodsReceived) => res.Status));\r\n }\r\n\r\n public GetGoodsReceivedEmailData(id: number): Observable {\r\n return this.httpClient.get(`${this.config.apiLocations.PurchaseOrders}GoodsReceivedEmail/${id}`);\r\n }\r\n\r\n public SendGoodsReceivedEmail(emailData: Email): Observable {\r\n emailData.EmailType = QueuedEmailType.GoodsReceived;\r\n emailData.SenderEmployeeId = this.authService.EmployeeId;\r\n return this.httpClient.post(`${this.config.apiLocations.ServiceSight}Email/QueueEmail`, emailData);\r\n }\r\n\r\n public AreAllLinesReturned(id: number): Observable {\r\n return this.httpClient.get(`${this.config.apiLocations.PurchaseOrders}GoodsReceived/AreAllLinesReturned/${id}`);\r\n }\r\n\r\n public Matched(id: number, invoiceDate: Date, invoiceReference: string): Observable {\r\n return this.httpClient.put(`${this.config.apiLocations.PurchaseOrders}GoodsReceived/${id}/Matched`, {invoiceDate, invoiceReference});\r\n }\r\n\r\n private RecalculateLineIds(model: GoodsReceived) {\r\n // null temp line ids before sending to server\r\n model.Equipment.forEach(equip => {\r\n const id = Number(equip.AdviceNoteLineId);\r\n if (isNaN(id)) {\r\n equip.AdviceNoteLineId = 0;\r\n }\r\n });\r\n\r\n model.Materials.forEach(misc => {\r\n const id = Number(misc.LineId);\r\n if (isNaN(id)) {\r\n misc.LineId = 0;\r\n }\r\n });\r\n }\r\n}\r\n","{{ 'accordion.supplier-not-provided' | translate }}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ 'accordion.supplier.account-number' | translate }}\r\n {{ supplier.Alpha }}\r\n
{{ 'accordion.supplier.name' | translate }}{{ supplier.Name }}
{{ 'accordion.supplier.address' | translate }}{{supplier.Address}}
{{ 'accordion.supplier.phone' | translate }}\r\n {{ supplier.Phone }}\r\n
{{ 'accordion.supplier.email' | translate }}\r\n {{ supplier.EmailGeneral }}\r\n
{{ 'accordion.supplier.website' | translate }}\r\n {{ supplier.WebGeneral }}\r\n
{{ 'accordion.supplier.Status' | translate }}{{ supplier.StatusName }}
\r\n\r\n","import { Component, Input, OnChanges, SimpleChanges } from \"@angular/core\";\r\nimport { Email } from \"src/app/shared/models/email.model\";\r\nimport { EmailService } from \"src/app/shared/services/email/email.service\";\r\nimport { AccordionDataService } from \"../accordion-data.service\";\r\nimport { AccordionSupplierModel } from \"../models/accordion-supplier.model\";\r\n\r\n@Component({\r\n selector: \"app-supplier-accordion-item\",\r\n templateUrl: \"./supplier-accordion-item.component.html\",\r\n styleUrls: [\"./supplier-accordion-item.component.scss\"]\r\n})\r\nexport class SupplierAccordionItemComponent implements OnChanges {\r\n @Input() supplierId: number;\r\n public supplier: AccordionSupplierModel;\r\n public showTemplateDialog: boolean = false;\r\n public emailData: Email = new Email();\r\n public showErrorSendMessage: boolean = false;\r\n\r\n constructor(\r\n private dataService: AccordionDataService,\r\n private emailService: EmailService) { }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n this.supplierId = changes.supplierId.currentValue;\r\n\r\n if (this.supplierId) {\r\n this.dataService.getSupplierData(this.supplierId).subscribe(x => this.supplier = x);\r\n } else {\r\n this.supplier = null;\r\n }\r\n }\r\n\r\n openEmailDialog(): void {\r\n this.emailService.GetGeneralEmailData(this.supplierId)\r\n .subscribe(x => {\r\n this.emailData = x;\r\n this.emailData.To = this.supplier.EmailGeneral;\r\n // todo\r\n // this.emailData.supplierID = this.supplierId;\r\n }, () => { }, () => {\r\n this.showErrorSendMessage = false;\r\n this.showTemplateDialog = true;\r\n });\r\n }\r\n\r\n send(): void {\r\n this.emailService.SendGeneralEmail(this.emailData).subscribe((res) => {\r\n if (res.IsSuccess) {\r\n this.showTemplateDialog = false;\r\n } else {\r\n this.showErrorSendMessage = true;\r\n }\r\n }, () => {\r\n this.showErrorSendMessage = true;\r\n });\r\n }\r\n\r\n closeDialog(): void {\r\n this.showTemplateDialog = false;\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ warningNoteText && !isSite ? warningNoteText : warningNotes.CustomerPopUpNotes }}
{{ warningNoteText && isSite ? warningNoteText : warningNotes.SitePopUpNotes }}
{{ 'accordion.warningNotes.Empty' | translate }}
\r\n\r\n{{ 'accordion.warningNotes.Empty' | translate }}\r\n\r\n{{ 'accordion.customerNotProvided' | translate }}\r\n","import { Component, EventEmitter, Input, OnChanges, Output } from \"@angular/core\";\r\nimport { AccordionDataService } from \"../accordion-data.service\";\r\nimport { AccordionWarningNotesModel } from \"../models/warning-notes-model\";\r\n\r\n@Component({\r\n selector: \"app-warning-notes-accordion-item\",\r\n templateUrl: \"./warning-notes-accordion-item.component.html\",\r\n styleUrls: [\"./warning-notes-accordion-item.component.scss\"]\r\n})\r\nexport class WarningNotesAccordionItemComponent implements OnChanges {\r\n @Input() customerId: number = null;\r\n @Input() supplierId: number = null;\r\n @Input() siteId: number = null;\r\n @Input() isSite: boolean = false;\r\n @Input() warningNoteText?: string = \"\";\r\n @Output() warningNotesExist = new EventEmitter();\r\n\r\n public get NoInformationProvided(): boolean {\r\n return !this.customerId &&\r\n !this.supplierId &&\r\n !this.siteId;\r\n }\r\n\r\n public warningNotes: AccordionWarningNotesModel;\r\n\r\n constructor(private dataService: AccordionDataService) { }\r\n\r\n ngOnChanges(): void {\r\n if (this.customerId && !this.warningNoteText) {\r\n this.dataService.getWarningNotes(this.siteId ? this.siteId : this.customerId).subscribe(x => {\r\n this.warningNotes = x;\r\n if (this.warningNotes.CustomerPopUpNotes || this.warningNotes.SitePopUpNotes) {\r\n this.warningNotesExist.emit(true);\r\n } else {\r\n this.warningNotesExist.emit(false);\r\n }\r\n });\r\n } else if (this.supplierId && !this.warningNoteText) {\r\n this.dataService.getSupplierWarningNotes(this.supplierId).subscribe(x => {\r\n this.warningNotes = x;\r\n if (this.warningNotes.CustomerPopUpNotes || this.warningNotes.SitePopUpNotes) {\r\n this.warningNotesExist.emit(true);\r\n } else {\r\n this.warningNotesExist.emit(false);\r\n }\r\n });\r\n } else if (!this.warningNoteText) {\r\n this.warningNotes = null;\r\n }\r\n }\r\n}\r\n","import { Component, Input, OnChanges } from \"@angular/core\";\r\nimport { AccordionDataService } from \"../accordion-data.service\";\r\n\r\n@Component({\r\n selector: \"app-receipt-details-accordion-item\",\r\n templateUrl: \"./receipt-details-accordion-item.component.html\",\r\n styleUrls: [\"./receipt-details-accordion-item.component.scss\"]\r\n})\r\nexport class ReceiptDetailsAccordionItemComponent implements OnChanges {\r\n @Input() employeeId: number;\r\n public employee: string;\r\n\r\n constructor(\r\n private dataService: AccordionDataService) { }\r\n\r\n public ngOnChanges(): void {\r\n if (this.employeeId) {\r\n this.dataService.getEmployeeName(this.employeeId).subscribe(result => {\r\n this.employee = result.Employee;\r\n });\r\n }\r\n }\r\n}\r\n","\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
{{ 'quotes.warning.dateRequired' | translate }}
\r\n
{{ 'quotes.warning.reasonRequired' | translate }}
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n","\r\n \r\n \r\n \r\n \r\n
\r\n {{\"accordion.receipt-details.entered-by\" | translate}}\r\n \r\n {{ employee }}\r\n
","import { Component, EventEmitter, Input, OnChanges, OnInit, Output } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { DocumentTypeEnum } from \"servicesight-shared\";\r\nimport { QuoteService } from \"src/app/quotes/services/quote.service\";\r\nimport { CancelData } from \"../../../quotes/models/CancelData\";\r\nimport { CancelReason } from \"../../../quotes/models/CancelReason\";\r\nimport { IQuoteModel } from \"../../../quotes/models/IQuoteModel\";\r\n\r\n@Component({\r\n selector: \"app-cancel\",\r\n templateUrl: \"./cancel.component.html\",\r\n styleUrls: [\"./cancel.component.scss\"]\r\n})\r\nexport class CancelComponent implements OnInit, OnChanges {\r\n public showCancelDialog: boolean = true;\r\n public cancelReasons: DataSource;\r\n public selectedCancellationReason: CancelReason;\r\n public selectedCancelDate: Date;\r\n public isReasonSelectedValid = true;\r\n public isSelectedDateValid = true;\r\n public label: string;\r\n private cancelData: CancelData;\r\n\r\n @Input() documentType: DocumentTypeEnum;\r\n @Input() showErrorSendMessage: boolean;\r\n @Input() salesQuote: IQuoteModel;\r\n @Output() save = new EventEmitter();\r\n @Output() discard = new EventEmitter();\r\n\r\n constructor(\r\n private quoteService: QuoteService,\r\n private translate: TranslateService) {\r\n this.selectedCancellationReason = {\r\n CancelReasonID: 0,\r\n Name: null,\r\n Description: translate.instant(\"label.quotes.cancel.nodescritpion\")\r\n };\r\n this.selectedCancelDate = new Date();\r\n this.cancelData = {\r\n SalesQuotationId: 0,\r\n CancelReasonID: 0,\r\n CancelDate: null\r\n };\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.quoteService.GetCancellationReason().subscribe((collection) => {\r\n this.cancelReasons = new DataSource(collection.ModelCollection);\r\n });\r\n this.SetLabel();\r\n }\r\n\r\n public ngOnChanges(): void {\r\n if (this.documentType) {\r\n this.SetLabel();\r\n }\r\n }\r\n\r\n public ActionSave(): void {\r\n if (this.selectedCancelDate && this.selectedCancellationReason.CancelReasonID !== 0) {\r\n this.cancelData.CancelDate = this.selectedCancelDate;\r\n this.cancelData.CancelReasonID = this.selectedCancellationReason.CancelReasonID;\r\n if (this.salesQuote) {\r\n this.cancelData.SalesQuotationId = this.salesQuote.Quote.SalesQuotationId;\r\n }\r\n\r\n return this.save.emit(this.cancelData);\r\n } else {\r\n this.isReasonSelectedValid = this.selectedCancellationReason.CancelReasonID !== 0;\r\n this.isSelectedDateValid = !!this.selectedCancelDate;\r\n this.showErrorSendMessage = true;\r\n }\r\n }\r\n\r\n public ActionDiscard(): void {\r\n return this.discard.emit();\r\n }\r\n\r\n public onValueChanged(): void {\r\n if (this.selectedCancellationReason.CancelReasonID !== 0) {\r\n this.isReasonSelectedValid = true;\r\n }\r\n this.isSelectedDateValid = !!this.selectedCancelDate;\r\n }\r\n\r\n private SetLabel(): void {\r\n switch (this.documentType) {\r\n case DocumentTypeEnum.PurchaseOrder:\r\n this.label = this.translate.instant(\"label.cancel.purchase-order\");\r\n break;\r\n case DocumentTypeEnum.AdviceNote:\r\n this.label = this.translate.instant(\"label.cancel.goods-received\");\r\n break;\r\n case DocumentTypeEnum.SalesOrder:\r\n this.label = this.translate.instant(\"label.cancel.sales-order\");\r\n break;\r\n case DocumentTypeEnum.ReturnsNote:\r\n this.label = this.translate.instant(\"label.cancel.returns-note\");\r\n break;\r\n default:\r\n this.label = this.translate.instant(\"label.quotes.cancel.title\");\r\n break;\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges\r\n} from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { EdmLiteral } from \"devextreme/data/odata/utils\";\r\nimport { map } from \"rxjs\";\r\nimport { DocumentTypeEnum, DocumentTypePipe, JobDataService, JobStatus } from \"servicesight-shared\";\r\nimport { JobMaterialListModel } from \"src/app/jobs/models/job-material-list\";\r\nimport { JobService } from \"src/app/jobs/services/job.service\";\r\nimport { SalesOrderService } from \"../../../sales-orders/services/sales-order.service\";\r\nimport { DocumentLinkModel } from \"../../models/document-link.model\";\r\n\r\n@Component({\r\n selector: \"app-document-link-select\",\r\n templateUrl: \"./document-link-select.component.html\",\r\n styleUrls: [\"./document-link-select.component.scss\"]\r\n})\r\nexport class DocumentLinkSelectComponent implements OnInit, OnChanges {\r\n public salesOrderDataSource: DataSource = null;\r\n public jobsDataSource: DataSource = null;\r\n public jobLines: JobMaterialListModel[] = [];\r\n public linkTypes = [];\r\n public DocumentTypeEnum = DocumentTypeEnum;\r\n\r\n @Input() LinkType: DocumentTypeEnum = null;\r\n @Input() LinkNumber: string = null;\r\n @Input() LineNumber?: number = null;\r\n @Input() LinkTypeLabel: string = null;\r\n @Input() LinkNumberLabel: string = null;\r\n @Input() LinkTypes = [];\r\n @Input() HideJobSelection: boolean = false;\r\n @Input() MaterialTypeId?: number = null;\r\n @Output() DocumentLinkSelected = new EventEmitter();\r\n\r\n constructor(\r\n private jobDataService: JobDataService,\r\n private salesOrderService: SalesOrderService,\r\n private translate: TranslateService,\r\n private documentTypePipe: DocumentTypePipe,\r\n private jobService: JobService\r\n ) {}\r\n\r\n public ngOnInit(): void {\r\n this.LinkNumber = String(this.LinkNumber);\r\n this.salesOrderDataSource = this.salesOrderService.GetDataSource();\r\n this.salesOrderDataSource.filter([\"Status\", \"=\", new EdmLiteral(\"ServiceSight.Shared.Enums.SalesOrderStatus'Pending'\")]);\r\n this.jobsDataSource = this.jobDataService.GetDataSource(true);\r\n this.jobsDataSource.filter([[\"Status\", \"<\", JobStatus.COMPLETED], \"and\", [\"Status\", \">\", JobStatus.CANCELLED]]);\r\n\r\n if (this.HideJobSelection) {\r\n this.linkTypes = [\r\n { id: DocumentTypeEnum.SalesOrder, name: this.translate.instant(this.documentTypePipe.transform(DocumentTypeEnum.SalesOrder)) }\r\n ];\r\n } else {\r\n this.linkTypes = [\r\n { id: DocumentTypeEnum.Job, name: this.translate.instant(this.documentTypePipe.transform(DocumentTypeEnum.Job)) },\r\n { id: DocumentTypeEnum.SalesOrder, name: this.translate.instant(this.documentTypePipe.transform(DocumentTypeEnum.SalesOrder)) }\r\n ];\r\n }\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if(changes.MaterialTypeId && !changes.MaterialTypeId.isFirstChange()) {\r\n this.LineNumber = null;\r\n this.LoadJobMaterials(Number(this.LinkNumber));\r\n }\r\n }\r\n\r\n public onLinkTypeValueChanged(event: any): void {\r\n if (event.event) {\r\n this.LinkNumber = null;\r\n this.RaiseEvent();\r\n }\r\n }\r\n\r\n public onLinkNumberValueChanged(e: any): void {\r\n if (e.event) {\r\n this.RaiseEvent();\r\n this.LineNumber = null;\r\n }\r\n\r\n if(e.value && this.MaterialTypeId) {\r\n this.LoadJobMaterials(e.value);\r\n }\r\n }\r\n\r\n public onLineNumberValueChanged(e: any): void {\r\n if (e.event) {\r\n this.RaiseEvent();\r\n }\r\n }\r\n\r\n public LineDisplayExpr(item: any): string {\r\n if(!item) {\r\n return \"\";\r\n }\r\n return item.MiscType + \" - \" + item.Description;\r\n }\r\n\r\n private RaiseEvent(): void {\r\n this.DocumentLinkSelected.emit({ LinkType: this.LinkType, LinkNumber: this.LinkNumber, LineNumber: this.LineNumber });\r\n }\r\n\r\n private LoadJobMaterials(jobId: number): void {\r\n if(this.LinkType === DocumentTypeEnum.Job && jobId && this.MaterialTypeId) {\r\n this.jobService.GetMaterials(jobId).pipe(map(res => res.filter(i => i.MiscTypeID === this.MaterialTypeId))).subscribe(res => this.jobLines = res);\r\n } else {\r\n this.jobLines = [];\r\n }\r\n }\r\n}\r\n","import { Component, EventEmitter, Output } from \"@angular/core\";\r\n\r\n@Component({\r\n selector: \"app-purchase-invoice-popup\",\r\n templateUrl: \"./purchase-invoice-popup.component.html\",\r\n styleUrls: [\"./purchase-invoice-popup.component.scss\"]\r\n})\r\nexport class PurchaseInvoicePopupComponent {\r\n\r\n @Output() cancel = new EventEmitter();\r\n @Output() commit = new EventEmitter<{ invoiceDate: Date; invoiceReference: string }>();\r\n\r\n public formData: { invoiceDate: Date; invoiceReference: string } = {\r\n invoiceDate: null,\r\n invoiceReference: \"\"\r\n };\r\n\r\n public Cancel(): void {\r\n this.cancel.emit();\r\n }\r\n\r\n public Commit(e: any): void {\r\n const validationResult = e.validationGroup.validate();\r\n if (validationResult.isValid) {\r\n this.commit.emit(this.formData);\r\n }\r\n }\r\n}\r\n","\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { GoodsReceivedStatus } from \"../enums/goods-received-status.enum\";\r\n\r\n@Pipe({\r\n name: \"goodsReceivedStatusBar\"\r\n})\r\nexport class GoodsReceivedStatusBarPipe implements PipeTransform {\r\n\r\n private readonly status = {\r\n [GoodsReceivedStatus.DetailsRequired]: \"bgredstatusshort\",\r\n [GoodsReceivedStatus.Pending]: \"bgredstatusshort\",\r\n [GoodsReceivedStatus.BookedIn]: \"bggreenstatusshort\",\r\n [GoodsReceivedStatus.PiMatchedBu]: \"bggreenstatuslong\",\r\n [GoodsReceivedStatus.Cancelled]: \"bggreenstatuslong\"\r\n };\r\n\r\n private readonly bgcolors = {\r\n [GoodsReceivedStatus.DetailsRequired]: \"clrred\",\r\n [GoodsReceivedStatus.Pending]: \"clrred\",\r\n [GoodsReceivedStatus.BookedIn]: \"clrgreen\",\r\n [GoodsReceivedStatus.PiMatchedBu]: \"clrgreen\",\r\n [GoodsReceivedStatus.Cancelled]: \"clrgreen\"\r\n };\r\n\r\n private readonly stringValueMapping = {\r\n DetailsRequired: GoodsReceivedStatus.DetailsRequired,\r\n Pending: GoodsReceivedStatus.Pending,\r\n BookedIn: GoodsReceivedStatus.BookedIn,\r\n Cancelled: GoodsReceivedStatus.Cancelled,\r\n PiMatchedBu: GoodsReceivedStatus.PiMatchedBu\r\n };\r\n\r\n transform(value: GoodsReceivedStatus, args?: any): string {\r\n if (value) {\r\n let safeValue = Number(value);\r\n if (isNaN(safeValue)) {\r\n safeValue = this.stringValueMapping[value];\r\n }\r\n\r\n const colors = {\r\n bg: this.bgcolors[safeValue],\r\n bar: this.status[safeValue]\r\n };\r\n\r\n return colors[args];\r\n }\r\n\r\n return null;\r\n }\r\n\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

{{ 'goods-received.detail.title' | translate }} {{ gn.GoodsReceivedNumber }}

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

{{ gn.Status | goodsReceivedStatus | translate }}

\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n {{ 'purchase-orders.parts.remove-part' | translate }}\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n
{{ 'purchase-orders.parts.part-number' | translate }}
\r\n
{{ 'goods-received.supplier-part-no' | translate }}
\r\n
\r\n
\r\n {{ data.displayValue }}\r\n
{{ getSupplierPartNumber(gn.SupplierId, data.data.StockId) }}
\r\n
\r\n
{{ prepareCurrencyValue(data.value) | currency: currencySymbol }}
\r\n
{{ prepareCurrencyValue(data.data.Received * data.data.UnitCost) | currency: currencySymbol }}
\r\n
{{ data.value | documentType | translate }}
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {{ 'purchase-orders.parts.description' | translate }}\r\n \r\n \r\n \r\n {{ 'purchase-orders.parts.store' | translate }}\r\n \r\n \r\n {{ 'purchase-orders.parts.outstanding' | translate }}\r\n \r\n \r\n {{ 'purchase-orders.parts.received' | translate }}\r\n \r\n \r\n \r\n
\r\n {{ currencySymbol }}\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n {{ 'stock.adjustment.part-serailno' | translate }}\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n {{ 'purchase-orders.equipment.remove-equipment' | translate }}\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ prepareCurrencyValue(data.value) | currency: currencySymbol }}
\r\n
{{ data.value | documentType | translate }}
\r\n \r\n
\r\n {{ data.displayValue }}\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {{ 'goods-received.equip-no' | translate }}\r\n \r\n \r\n {{ 'purchase-orders.equipment.serial-number' | translate }}\r\n \r\n \r\n {{ 'purchase-orders.fgas.store' | translate }}\r\n \r\n \r\n \r\n
\r\n {{ currencySymbol }}\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n {{ 'purchase-orders.equipment.received' | translate }}\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n {{ 'purchase-orders.materials.remove-materials' | translate }}\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ prepareCurrencyValue(data.value) | currency: currencySymbol }}
\r\n
{{ data.value | documentType | translate }}
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{ currencySymbol }}\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n {{ 'purchase-orders.materials.received' | translate }}\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n {{ 'purchase-orders.fgas.remove-cylinders' | translate }}\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{ data.value }} {{ units }}\r\n
\r\n
\r\n {{data.value | currency: baseCurrencySymbol }}\r\n
\r\n
\r\n {{ prepareCurrencyValue(data.value) | currency: currencySymbol }}\r\n
\r\n \r\n
\r\n \r\n {{ 'stock.adjustment.part-serailno' | translate }}\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\t \r\n \t \t {{ 'purchase-orders.parts.qty-required' | translate }}\r\n \r\n \r\n \r\n {{ 'purchase-orders.fgas.store' | translate }}\r\n \r\n \r\n {{ 'purchase-orders.fgas.quantity-required' | translate }}\r\n \r\n \r\n \r\n \r\n
\r\n {{ currencySymbol }}\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n {{ 'purchase-orders.fgas.received' | translate }}\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ 'goods-received.detail.receipt' | translate }}{{ 'purchase-orders.summary.header.items' | translate }}{{ 'goods-received.detail.required' | translate }}{{ 'purchase-orders.summary.header.cost' | translate }}{{ 'purchase-orders.summary.header.received' | translate }}{{ 'goods-received.detail.not-received' | translate }}
\r\n
\r\n
\r\n \r\n
\r\n
{{ 'purchase-orders.tab.parts' | translate }}
\r\n
\r\n
{{ partsCount }}{{ partsQuantity }}{{ currencyFormat(prepareCurrencyValue(partsCost)) }}{{ partsReceived }}{{ partsOutstanding }}
\r\n
\r\n
\r\n \r\n
\r\n
{{ 'purchase-orders.tab.equipment' | translate }}
\r\n
\r\n
{{ equipmentCount }}{{ equipmentQuantity }}{{ currencyFormat(prepareCurrencyValue(equipmentCost)) }}{{ equipmentReceived }}{{ equipmentOutstanding }}
\r\n
\r\n
\r\n \r\n
\r\n
{{ 'purchase-orders.tab.materials' | translate }}
\r\n
\r\n
{{ materialsCount }}{{ materialsQuantity }}{{ currencyFormat(prepareCurrencyValue(materialsCost)) }}{{ materialsReceived }}{{ materialsOutstanding }}
\r\n
\r\n
\r\n \r\n
\r\n
{{ 'purchase-orders.tab.fgas' | translate }}
\r\n
\r\n
{{ cylindersCount }}{{ cylindersQuantity }}{{ currencyFormat(prepareCurrencyValue(cylindersCost)) }}{{ cylindersReceived }}{{ cylindersOutstanding }}
{{ 'goods-received.detail.combined-total' | translate }}{{ itemCount }}{{ totalQuantity }}{{ currencyFormat(prepareCurrencyValue(totalCost)) }}{{ totalReceived }}{{ totalOutstanding }}
{{ 'purchase-orders.detail.carriage' | translate }}  {{ currencyFormat(prepareCurrencyValue(gn.Carriage)) }}  
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import { formatCurrency } from \"@angular/common\";\r\nimport { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent, DxSelectBoxComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Guid } from \"guid-typescript\";\r\nimport { Observable } from \"rxjs\";\r\nimport {\r\n ContactService,\r\n CustomerService,\r\n CustomerStatus,\r\n DateOnlyService,\r\n DocumentTypeEnum,\r\n DocumentTypePipe,\r\n FormMesssageService,\r\n MakeModelSharedService,\r\n PhraseBookType,\r\n SettingData,\r\n SettingId,\r\n SettingsService\r\n} from \"servicesight-shared\";\r\nimport { EquipmentService } from \"src/app/equipment/services/equipment.service\";\r\nimport { SupplierPriceService } from \"src/app/f-gas/services/supplier-price.service\";\r\nimport { JobService } from \"src/app/jobs/services/job.service\";\r\nimport { SupplierPartPriceService } from \"src/app/jobs/services/supplier-part-price.service\";\r\nimport { MessageService } from \"src/app/messages/services/message/message.service\";\r\nimport { CancelData } from \"src/app/quotes/models/CancelData\";\r\nimport { IJobMisc } from \"src/app/quotes/models/IJobMisc\";\r\nimport { RefrigerantTypeService } from \"src/app/settings/services/refrigerant-type.service\";\r\nimport { StoreService } from \"src/app/settings/services/store.service\";\r\nimport { BasePopSopDetailComponent } from \"src/app/shared-pop-sop/components/base-pop-sop-detail/base-pop-sop-detail.component\";\r\nimport { AddMakeModelDialogueComponent } from \"src/app/shared/components/add-make-model-dialogue/add-make-model-dialogue.component\";\r\nimport { ChildContactType } from \"src/app/shared/components/child-contacts-list/child-contact-type.enum\";\r\nimport { ConfirmationMessageComponent } from \"src/app/shared/components/confirmation-message/confirmation-message.component\";\r\nimport { JobMiscDialogComponent } from \"src/app/shared/components/job-misc-dialog/job-misc-dialog.component\";\r\nimport { ContactStatus } from \"src/app/shared/enums/contact-status.eum\";\r\nimport { MessageDocTypeIds } from \"src/app/shared/enums/messages/message-doc-type-ids.enum\";\r\nimport { MessageTypes } from \"src/app/shared/enums/messages/message-types.enum\";\r\nimport { DocumentLinkModel } from \"src/app/shared/models/document-link.model\";\r\nimport { ICurrency } from \"src/app/shared/models/icurrency.model\";\r\nimport { SupplierStatus } from \"src/app/shared/pipes/enums/supplier-status.enum\";\r\nimport { ChildContactsService } from \"src/app/shared/services/child-contacts/child-contracts.service\";\r\nimport { MaterialTypeService } from \"src/app/shared/services/material-type/material-type.service\";\r\nimport { Ng1ReminderService } from \"src/app/shared/services/ng1-reminder.service\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\nimport { SupplierService } from \"src/app/shared/services/supplier/supplier.service\";\r\nimport { StockService } from \"src/app/stock/services/stock.service\";\r\nimport { LicenseService } from \"../../shared/services/licence/license.service\";\r\nimport { PreviousRouteService } from \"../../shared/services/previous-route.service\";\r\nimport { GoodsReceivedDetailGridType } from \"../enums/goods-received-detail-grid-type.enum\";\r\nimport { GoodsReceivedStatus } from \"../enums/goods-received-status.enum\";\r\nimport { GoodsReceivedSerialNosComponent } from \"../goods-received-serial-nos/goods-received-serial-nos.component\";\r\nimport { GoodsReceivedCylinder } from \"../models/goods-received-cylinder.model\";\r\nimport { GoodsReceivedEquipment } from \"../models/goods-received-equipment.model\";\r\nimport { GoodsReceivedPart } from \"../models/goods-received-part.model\";\r\nimport { GoodsReceivedSerial } from \"../models/goods-received-serial.model\";\r\nimport { GoodsReceived } from \"../models/goods-received.model\";\r\nimport { GoodsReceivedService } from \"../services/goods-received.service\";\r\n\r\n@Component({\r\n selector: \"app-goods-received-detail\",\r\n templateUrl: \"./goods-received-detail.component.html\",\r\n styleUrls: [\"./goods-received-detail.component.scss\"]\r\n})\r\nexport class GoodsReceivedDetailComponent extends BasePopSopDetailComponent implements OnInit {\r\n\r\n @ViewChild(\"gnform\", { static: true }) form: NgForm;\r\n @ViewChild(JobMiscDialogComponent) AddMaterialDialog: JobMiscDialogComponent;\r\n @ViewChild(AddMakeModelDialogueComponent) AddMakeModelDialog: AddMakeModelDialogueComponent;\r\n @ViewChild(\"EquipmentGrid\", { static: false }) EquipmentGrid: DxDataGridComponent;\r\n @ViewChild(\"MaterialsGrid\", { static: false }) MaterialsGrid: DxDataGridComponent;\r\n @ViewChild(\"CylindersGrid\", { static: false }) CylindersGrid: DxDataGridComponent;\r\n @ViewChild(\"PartsGrid\", { static: false }) PartsGrid: DxDataGridComponent;\r\n @ViewChild(\"serialNoPopup\", { static: true }) serialNoPopup: GoodsReceivedSerialNosComponent;\r\n @ViewChild(\"cylinderSerialNoPopup\", { static: true }) cylinderSerialNoPopup: GoodsReceivedSerialNosComponent;\r\n @ViewChild(\"carrierContactSelectBox\", { static: false }) carrierContactSelectBoxComponent: DxSelectBoxComponent;\r\n @ViewChild(\"discardChangesMessage\") discardMessage: ConfirmationMessageComponent;\r\n\r\n public showAllLinesAlreadyReturned: boolean = false;\r\n public unspecifiedCylinderSerialNumbers: boolean = false;\r\n public showInForeignCurrency: boolean = false;\r\n public baseCurrencySymbol: string = null;\r\n\r\n public documentType = DocumentTypeEnum;\r\n public goodsStatus = GoodsReceivedStatus;\r\n public purchaseOrderId: number = null;\r\n\r\n public selectedPartIds: [] = [];\r\n public selectedMakeModelIds: [] = [];\r\n public selectedMaterialIds: [] = [];\r\n public selectedCylinderIds: [] = [];\r\n private supplierPartNumberLookup: string[] = [];\r\n\r\n public supplierDataSource: DataSource;\r\n public supplierContactsDataStore: ODataStore;\r\n public storeDataStore: ODataStore;\r\n public supplierContactsDataSource: DataSource;\r\n public customerDataSource: DataSource;\r\n public partsListDataSource: DataSource;\r\n public refrigerantTypeStore: ODataStore = null;\r\n\r\n public activeLinkType: DocumentTypeEnum = null;\r\n public gn: GoodsReceived = new GoodsReceived();\r\n\r\n public IsNew: boolean = false;\r\n public HasAccessToPro: boolean = false;\r\n public HasAccessToStock: boolean = false;\r\n public HasAccessToEquipment: boolean = false;\r\n public HasAccessToPurchaseOrders: boolean = false;\r\n public HasAccessToFGas: boolean = false;\r\n public additionalStoresEnabled: boolean = false;\r\n public showSupplierPartNumberEnabled: boolean = false;\r\n public CanNavigatePrevious: boolean = false;\r\n public CanNavigateNext: boolean = false;\r\n public IsRecordNavigationEnabled: boolean = false;\r\n public currentPart: GoodsReceivedPart;\r\n public currentCylinder: GoodsReceivedCylinder;\r\n public selectedPartSerialNos: GoodsReceivedSerial[];\r\n public selectedCylinderSerialNos: GoodsReceivedSerial[];\r\n public showCancelDialog: boolean = false;\r\n public showWarningNotesEye: boolean = false;\r\n public currency: ICurrency;\r\n public docType = DocumentTypeEnum;\r\n public phraseType = PhraseBookType;\r\n public units: string = \"\";\r\n public supplierPriceDataSource: DataSource = null;\r\n public supplierPriceStore: ODataStore = null;\r\n public piAllowManualMatchingEnabled: boolean = false;\r\n public isPurchaseInvoicePopupVisible: boolean = false;\r\n public currentMaterialTypeId: number;\r\n\r\n public showExistingEquipmentDuplicatedPopup: boolean = false;\r\n public showCurrentGRNLinesDuplicatedPopup: boolean = false;\r\n public duplicatedMessage: string;\r\n\r\n private editedAdviceNoteLineId: number = 0;\r\n\r\n public get showCreateSupplier(): boolean {\r\n return this.gn.SupplierId === null && this.gn.ExpenseSupplierName !== null;\r\n }\r\n\r\n public get formDisabled(): boolean {\r\n return this.gn.Status > GoodsReceivedStatus.Pending;\r\n }\r\n\r\n public get currencySymbol(): string {\r\n return this.showInForeignCurrency ? this.currency.CurrencySymbol : this.baseCurrencySymbol;\r\n }\r\n\r\n public get isForeignCustomer(): boolean {\r\n return this.currency && this.currency.IsForeignCustomer;\r\n }\r\n\r\n public get isFromPurchaseOrder(): boolean {\r\n return this.purchaseOrderId !== null;\r\n }\r\n\r\n public get partsCount(): number {\r\n let itemCount = 0;\r\n\r\n if (this.gn.Parts && this.gn.IncludeParts) {\r\n itemCount = this.gn.Parts.length;\r\n }\r\n\r\n return itemCount;\r\n }\r\n\r\n public get equipmentCount(): number {\r\n let itemCount = 0;\r\n\r\n if (this.gn.Equipment && this.gn.IncludeEquipment) {\r\n itemCount = this.gn.Equipment.length;\r\n }\r\n\r\n return itemCount;\r\n }\r\n\r\n public get materialsCount(): number {\r\n let itemCount = 0;\r\n\r\n if (this.gn.Materials && this.gn.IncludeMaterials) {\r\n itemCount = this.gn.Materials.length;\r\n }\r\n\r\n return itemCount;\r\n }\r\n\r\n public get cylindersCount(): number {\r\n let itemCount = 0;\r\n\r\n if (this.gn.Cylinders && this.gn.IncludeCylinders) {\r\n itemCount = this.gn.Cylinders.length;\r\n }\r\n\r\n return itemCount;\r\n }\r\n\r\n public get itemCount(): number {\r\n return this.partsCount +\r\n this.equipmentCount +\r\n this.materialsCount +\r\n this.cylindersCount;\r\n }\r\n\r\n public get partsQuantity(): number {\r\n let partsQuantity = 0;\r\n\r\n if (this.gn.Parts && this.gn.IncludeParts) {\r\n partsQuantity = this.gn.Parts.map(x => x.QtyRequired).reduce((a, b) => {\r\n return b ? a + b : a;\r\n }, 0);\r\n }\r\n\r\n return partsQuantity;\r\n }\r\n\r\n public get equipmentQuantity(): number {\r\n let equipmentQuantity = 0;\r\n\r\n if (this.gn.Equipment && this.gn.IncludeEquipment) {\r\n equipmentQuantity = this.gn.Equipment.length;\r\n }\r\n\r\n return equipmentQuantity;\r\n }\r\n\r\n public get materialsQuantity(): number {\r\n return this.materialsCount;\r\n }\r\n\r\n public get cylindersQuantity(): number {\r\n let cylindersQuantity = 0;\r\n\r\n if (this.gn.Cylinders && this.gn.IncludeCylinders) {\r\n cylindersQuantity = this.gn.Cylinders.map(x => x.QtyRequired).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return cylindersQuantity;\r\n }\r\n\r\n public get totalQuantity(): number {\r\n return this.partsQuantity +\r\n this.equipmentQuantity +\r\n this.materialsQuantity +\r\n this.cylindersQuantity;\r\n }\r\n\r\n public get partsCost(): number {\r\n let partsCost = 0;\r\n\r\n if (this.gn.Parts && this.gn.IncludeParts) {\r\n partsCost = this.gn.Parts.map(x => x.Received * x.UnitCost).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return partsCost;\r\n }\r\n\r\n public get equipmentCost(): number {\r\n let equipmentCost = 0;\r\n\r\n if (this.gn.Equipment && this.gn.IncludeEquipment) {\r\n equipmentCost = this.gn.Equipment.map(x => x.UnitCost).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return equipmentCost;\r\n }\r\n\r\n public get materialsCost(): number {\r\n let materialsCost = 0;\r\n\r\n if (this.gn.Materials && this.gn.IncludeMaterials) {\r\n materialsCost = this.gn.Materials.map(x => Number(x.Cost)).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return materialsCost;\r\n }\r\n\r\n public get cylindersCost(): number {\r\n let cylindersCost = 0;\r\n\r\n if (this.gn.Cylinders && this.gn.IncludeCylinders) {\r\n cylindersCost = this.gn.Cylinders.map(x => Number(x.TotalCost)).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return cylindersCost;\r\n }\r\n\r\n public get totalCost(): number {\r\n return this.partsCost +\r\n this.equipmentCost +\r\n this.materialsCost +\r\n this.cylindersCost;\r\n }\r\n\r\n public get partsReceived(): number {\r\n let partsReceived = 0;\r\n\r\n if (this.gn.Parts && this.gn.IncludeParts) {\r\n partsReceived = this.gn.Parts.map(x => x.Received).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return partsReceived;\r\n }\r\n\r\n public get equipmentReceived(): number {\r\n let equipmentReceived = 0;\r\n\r\n if (this.gn.Equipment && this.gn.IncludeEquipment) {\r\n equipmentReceived = this.gn.Equipment.filter(x => x.Received).length;\r\n }\r\n\r\n return equipmentReceived;\r\n }\r\n\r\n public get materialsReceived(): number {\r\n let materialsReceived = 0;\r\n\r\n if (this.gn.Materials && this.gn.IncludeMaterials) {\r\n materialsReceived = this.gn.Materials.filter(x => x.Received).length;\r\n }\r\n\r\n return materialsReceived;\r\n }\r\n\r\n public get cylindersReceived(): number {\r\n let cylindersReceived = 0;\r\n\r\n if (this.gn.Cylinders && this.gn.IncludeCylinders) {\r\n cylindersReceived = this.gn.Cylinders.map(x => x.Received).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return cylindersReceived;\r\n }\r\n\r\n public get totalReceived(): number {\r\n return this.partsReceived +\r\n this.equipmentReceived +\r\n this.materialsReceived +\r\n this.cylindersReceived;\r\n }\r\n\r\n public get partsOutstanding(): number {\r\n let partsOutstanding = 0;\r\n\r\n if (this.gn.Parts && this.gn.IncludeParts) {\r\n partsOutstanding = this.gn.Parts.map(x => (x.QtyRequired - x.Received)).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n if (partsOutstanding < 0) {\r\n partsOutstanding = 0;\r\n }\r\n\r\n return partsOutstanding;\r\n }\r\n\r\n public get equipmentOutstanding(): number {\r\n let equipmentOutstanding = 0;\r\n\r\n if (this.gn.Equipment && this.gn.IncludeEquipment) {\r\n equipmentOutstanding = this.gn.Equipment.filter(x => !x.Received).length;\r\n }\r\n\r\n return equipmentOutstanding;\r\n }\r\n\r\n public get materialsOutstanding(): number {\r\n let materialOutstanding = 0;\r\n\r\n if (this.gn.Materials && this.gn.IncludeMaterials) {\r\n materialOutstanding = this.gn.Materials.filter(x => !x.Received).length;\r\n }\r\n\r\n return materialOutstanding;\r\n }\r\n\r\n public get cylindersOutstanding(): number {\r\n let cylindersOutstanding = 0;\r\n\r\n if (this.gn.Cylinders && this.gn.IncludeCylinders) {\r\n cylindersOutstanding = this.gn.Cylinders.map(x => (x.QtyRequired - x.Received)).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n if (cylindersOutstanding < 0) {\r\n cylindersOutstanding = 0;\r\n }\r\n\r\n return cylindersOutstanding;\r\n }\r\n\r\n public get totalOutstanding(): number {\r\n return this.partsOutstanding +\r\n this.equipmentOutstanding +\r\n this.materialsOutstanding +\r\n this.cylindersOutstanding;\r\n }\r\n\r\n public get carriage(): number {\r\n return this.showInForeignCurrency ? this.gn.Carriage * this.gn.ExchangeRate : this.gn.Carriage;\r\n }\r\n\r\n public set carriage(value: number) {\r\n if (this.showInForeignCurrency) {\r\n this.gn.Carriage = value / this.gn.ExchangeRate;\r\n } else {\r\n this.gn.Carriage = value;\r\n }\r\n }\r\n\r\n constructor(\r\n private ng1reminderService: Ng1ReminderService,\r\n materialType: MaterialTypeService,\r\n customerService: CustomerService,\r\n contactService: ContactService,\r\n makeModelService: MakeModelSharedService,\r\n translate: TranslateService,\r\n supplierService: SupplierService,\r\n stockService: StockService,\r\n documentTypePipe: DocumentTypePipe,\r\n jobDataService: JobService,\r\n private formMessageService: FormMesssageService,\r\n private messageService: MessageService,\r\n private goodsReceivedService: GoodsReceivedService,\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private licenseService: LicenseService,\r\n private previousRouteService: PreviousRouteService,\r\n private equipmentService: EquipmentService,\r\n private storeService: StoreService,\r\n private childContactsService: ChildContactsService,\r\n private settingsService: SettingsService,\r\n private odataService: ODataService,\r\n private supplierPartPriceService: SupplierPartPriceService,\r\n private refrigerantTypeService: RefrigerantTypeService,\r\n private supplierPriceService: SupplierPriceService,\r\n private dateOnlyService: DateOnlyService\r\n ) {\r\n super(\r\n translate,\r\n documentTypePipe,\r\n materialType,\r\n customerService,\r\n contactService,\r\n makeModelService,\r\n jobDataService,\r\n supplierService,\r\n stockService);\r\n this.TotalCostFormatter = this.TotalCostFormatter.bind(this);\r\n this.EquipValidation = this.EquipValidation.bind(this);\r\n this.GetWarrantyDisplayValue = this.GetWarrantyDisplayValue.bind(this);\r\n this.TotalPartsCost = this.TotalPartsCost.bind(this);\r\n this.onPartsRowUpdating = this.onPartsRowUpdating.bind(this);\r\n this.onRowEditingStart = this.onRowEditingStart.bind(this);\r\n this.onEditorPreparing = this.onEditorPreparing.bind(this);\r\n this.onEquipRowUpdating = this.onEquipRowUpdating.bind(this);\r\n this.onCylinderRowUpdating = this.onCylinderRowUpdating.bind(this);\r\n this.calculateCustomSummary = this.calculateCustomSummary.bind(this);\r\n this.OnEquipDocumentLinkSelected = this.OnEquipDocumentLinkSelected.bind(this);\r\n this.OnPartsDocumentLinkSelected = this.OnPartsDocumentLinkSelected.bind(this);\r\n this.OnMaterialDocumentLinkSelected = this.OnMaterialDocumentLinkSelected.bind(this);\r\n this.onEditingStart = this.onEditingStart.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n super.ngOnInit();\r\n\r\n this.setupPartListDataSource();\r\n\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(x => {\r\n this.HasAccessToPro = x.ProEnabled;\r\n this.HasAccessToStock = x.StockEnabled;\r\n this.HasAccessToEquipment = x.EquipmentEnabled;\r\n this.HasAccessToPurchaseOrders = x.PurchaseOrdersEnabled;\r\n this.HasAccessToFGas = x.FGasEnabled;\r\n });\r\n\r\n this.supplierDataSource = new DataSource({\r\n store: this.supplierStore,\r\n filter: [\"Status\", \"=\", SupplierStatus.Active]\r\n });\r\n this.supplierContactsDataStore = this.childContactsService.GetDataStore(ChildContactType.Supplier);\r\n\r\n this.supplierContactsDataSource = new DataSource({\r\n store: this.supplierContactsDataStore,\r\n filter: [\"Status\", \"=\", ContactStatus.ACTIVE]\r\n });\r\n\r\n this.customerDataSource = new DataSource({\r\n store: this.customersStore,\r\n filter: [[\"Status\", \"=\", CustomerStatus.ACTIVE], \"and\", [\"IsCustomer\", \"=\", true]]\r\n });\r\n\r\n this.baseCurrencySymbol = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n this.route.params.subscribe(params => {\r\n if (params.purchaseOrderId) {\r\n this.purchaseOrderId = Number(params.purchaseOrderId);\r\n this.goodsReceivedService.GetByPurchaseOrder(this.purchaseOrderId).subscribe(grn => {\r\n this.gn = grn;\r\n this.setupPartListDataSource();\r\n this.GetCurrency(this.gn.SupplierId, null);\r\n });\r\n }\r\n\r\n if (params.id) {\r\n this.goodsReceivedService.Get(params.id).subscribe(grn => {\r\n this.gn = grn;\r\n if(this.gn.SupplierId) {\r\n this.GetCurrency(this.gn.SupplierId, null);\r\n }\r\n this.purchaseOrderId = grn.PurchaseOrderId;\r\n this.SetCurrentItem(params.id);\r\n this.setupPartListDataSource();\r\n });\r\n this.IsNew = false;\r\n } else {\r\n this.IsNew = true;\r\n }\r\n this.IsRecordNavigationEnabled = !this.IsNew && this.previousRouteService.PreviousUrlContains(\"/goods-received\");\r\n });\r\n\r\n this.settingsService.getSetting(SettingId.UseAdditionalStores).subscribe(res => {\r\n this.additionalStoresEnabled = res.ValueBool;\r\n if (this.additionalStoresEnabled) {\r\n this.storeDataStore = this.storeService.GetDataStore();\r\n }\r\n });\r\n\r\n this.settingsService.getSetting(SettingId.ShowSupplierPartNumberOnGrn).subscribe(res => {\r\n this.showSupplierPartNumberEnabled = res.ValueBool;\r\n });\r\n\r\n this.refrigerantTypeStore = this.refrigerantTypeService.GetDataStore();\r\n\r\n this.settingsService.getSetting(SettingId.FGasRefrigerantUnits).subscribe((settingData: SettingData) => {\r\n this.units = settingData.ValueListSelectedId === 1 ? \"kg\" : \"lb\";\r\n });\r\n\r\n this.supplierPriceDataSource = this.supplierPriceService.GetDataSource();\r\n this.supplierPriceStore = this.supplierPriceService.GetDataStore();\r\n\r\n this.settingsService.getSetting(SettingId.PIAllowManualMatching).subscribe((res: SettingData) => {\r\n this.piAllowManualMatchingEnabled = res.ValueBool;\r\n });\r\n }\r\n\r\n public prepareCurrencyValue(value: number): number {\r\n return this.showInForeignCurrency ? value * this.gn.ExchangeRate : value;\r\n }\r\n\r\n public onPartsRowUpdating(e: any): void {\r\n this.baseRowUpdating(e, GoodsReceivedDetailGridType.Parts);\r\n }\r\n\r\n public OnPartsDocumentLinkSelected(event: DocumentLinkModel, cellData: any): void {\r\n cellData.setValue(event.LinkType);\r\n this.PartsGrid.instance.cellValue(cellData.rowIndex, \"LinkNumber\", event.LinkNumber);\r\n }\r\n\r\n public onEquipRowUpdating(e: any): void {\r\n this.checkForDuplicatedEquipmentNumber(e);\r\n this.ValidateSerialNumber(e);\r\n e.preventDefault();\r\n e.stopPropagation();\r\n\r\n this.baseRowUpdating(e, GoodsReceivedDetailGridType.Equipment);\r\n }\r\n\r\n public OnEquipDocumentLinkSelected(event: DocumentLinkModel, cellData: any): void {\r\n cellData.setValue(event.LinkType);\r\n this.EquipmentGrid.instance.cellValue(cellData.rowIndex, \"LinkNumber\", event.LinkNumber);\r\n }\r\n\r\n public onMaterialRowUpdating(e: any): void {\r\n this.baseRowUpdating(e, GoodsReceivedDetailGridType.Material);\r\n }\r\n\r\n public OnMaterialDocumentLinkSelected(event: DocumentLinkModel, cellData: any): void {\r\n cellData.setValue(event.LinkType);\r\n this.MaterialsGrid.instance.cellValue(cellData.rowIndex, \"LinkNumber\", event.LinkNumber);\r\n this.MaterialsGrid.instance.cellValue(cellData.rowIndex, \"LinkLine\", event.LineNumber);\r\n }\r\n\r\n public onCylinderRowUpdating(e: any): void {\r\n this.baseRowUpdating(e, GoodsReceivedDetailGridType.Cylinder);\r\n }\r\n\r\n private baseRowUpdating(e: any, gridType: GoodsReceivedDetailGridType): void {\r\n const rawUnitCost = e.newData.UnitCost !== undefined ? e.newData.UnitCost : e.oldData.UnitCost;\r\n const rawCost = e.newData.Cost !== undefined ? e.newData.Cost : e.oldData.Cost;\r\n const isUnitCost = Boolean(rawUnitCost);\r\n let cost = (isUnitCost ? rawUnitCost : rawCost) || 0;\r\n\r\n if (this.showInForeignCurrency) {\r\n cost = cost / this.gn.ExchangeRate;\r\n\r\n if (isUnitCost) {\r\n e.newData.UnitCost = cost;\r\n } else {\r\n e.newData.Cost = cost;\r\n }\r\n }\r\n\r\n const qtyRequired = e.newData.QtyRequired !== undefined ? e.newData.QtyRequired : e.oldData.QtyRequired;\r\n const qtyReceived = e.newData.Received !== undefined ? e.newData.Received : e.oldData.Received;\r\n const outstanding = qtyRequired - qtyReceived;\r\n e.newData.Outstanding = outstanding >= 0 ? outstanding : 0;\r\n switch(gridType) {\r\n case GoodsReceivedDetailGridType.Parts:\r\n e.newData.TotalCost = cost * qtyReceived;\r\n break;\r\n case GoodsReceivedDetailGridType.Cylinder:\r\n e.newData.TotalCost = cost * qtyRequired;\r\n break;\r\n default:\r\n // No action required for Equipment or Material.\r\n break;\r\n }\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public Save(): void {\r\n this.InternalSave().subscribe((gn: GoodsReceived) => {\r\n this.gn = gn;\r\n });\r\n }\r\n\r\n public BookInWithChecks(): void {\r\n this.InternalSave().subscribe((gn: GoodsReceived) => {\r\n this.gn = gn;\r\n\r\n if (this.gn.Cylinders.some(cylinder => this.hasOutstandingCylinderSerialNo(cylinder))) {\r\n this.unspecifiedCylinderSerialNumbers = true; // Invoke confirmation dialog\r\n } else {\r\n this.BookIn();\r\n }\r\n });\r\n }\r\n\r\n public ConfirmBookInWithMissingSerialNumbers(confirmed: boolean): void {\r\n this.unspecifiedCylinderSerialNumbers = false;\r\n if (confirmed) {\r\n this.BookIn();\r\n }\r\n }\r\n\r\n public ShowPurchaseInvoicePopup(): void {\r\n this.isPurchaseInvoicePopupVisible = true;\r\n }\r\n\r\n public MarkAsPurchaseInvoiceMatched(data: { invoiceDate: Date; invoiceReference: string }): void {\r\n this.isPurchaseInvoicePopupVisible = false;\r\n const invoiceDate = this.dateOnlyService.RecalculateDateOnSave(data.invoiceDate);\r\n this.goodsReceivedService.Matched(this.gn.GoodsReceivedNumber, invoiceDate, data.invoiceReference)\r\n .subscribe(gnMatched => { this.gn = gnMatched; });\r\n }\r\n\r\n private BookIn(): void {\r\n this.formMessageService\r\n .RegisterObservable(this.goodsReceivedService.BookIn(this.gn.GoodsReceivedNumber), \"gnform\")\r\n .subscribe(gnBooked => {\r\n this.gn = gnBooked;\r\n this.setupPartListDataSource();\r\n });\r\n }\r\n\r\n public CreateReturnsNote(): void {\r\n this.goodsReceivedService.AreAllLinesReturned(this.gn.GoodsReceivedNumber).subscribe(allReturned => {\r\n if (allReturned) {\r\n this.showAllLinesAlreadyReturned = true;\r\n } else {\r\n this.router.navigate([\"/returns/detail/from-goods-received\", this.gn.GoodsReceivedNumber]);\r\n }\r\n });\r\n }\r\n\r\n public DiscardChanges(): void {\r\n if (!this.IsNew) {\r\n this.goodsReceivedService.Get(this.gn.GoodsReceivedNumber).subscribe(grn => {\r\n this.gn = grn;\r\n this.purchaseOrderId = grn.PurchaseOrderId;\r\n this.SetCurrentItem(this.gn.GoodsReceivedNumber);\r\n this.discardMessage.showPopup = false;\r\n });\r\n } else {\r\n this.router.navigate([\"/purchase-orders\"]);\r\n }\r\n }\r\n\r\n public InternalNotesChanged(internalNotes: string): void {\r\n if (this.gn.InternalNotes !== internalNotes) {\r\n this.gn.InternalNotes = internalNotes;\r\n this.form.form.markAsDirty();\r\n }\r\n }\r\n\r\n public InstructionsChanged(instructions: string): void {\r\n if (this.gn.Instructions !== instructions) {\r\n this.gn.Instructions = instructions;\r\n this.form.form.markAsDirty();\r\n }\r\n }\r\n\r\n public CancelReceipt(): void {\r\n this.showCancelDialog = true;\r\n }\r\n\r\n public SaveCancelDialog(data: CancelData): void {\r\n this.gn.CancelDate = data.CancelDate;\r\n this.gn.CancelReasonId = data.CancelReasonID;\r\n this.formMessageService.RegisterObservable(this.goodsReceivedService.Cancel(this.gn), \"gnform\")\r\n .subscribe(grn => {\r\n this.gn = grn;\r\n });\r\n this.showCancelDialog = false;\r\n }\r\n\r\n public CloseCancelDialog(): void {\r\n this.showCancelDialog = false;\r\n }\r\n\r\n public AddPart(): void {\r\n throw new Error(\"Not Implemented\");\r\n }\r\n\r\n public openSerialNo(part: GoodsReceivedPart): void {\r\n this.selectedPartSerialNos = part.SerialNumbers;\r\n this.serialNoPopup.openDialog(part.SerialNumbers);\r\n this.currentPart = part;\r\n }\r\n\r\n public openCylinderSerialNo(cylinder: GoodsReceivedCylinder): void {\r\n this.selectedCylinderSerialNos = cylinder.SerialNumbers;\r\n this.cylinderSerialNoPopup.openDialog(cylinder.SerialNumbers);\r\n this.currentCylinder = cylinder;\r\n }\r\n\r\n public hasOutstandingSerialNo(part: GoodsReceivedPart): boolean {\r\n return part.SerialNumbered && part.SerialNumbers.length !== part.Received;\r\n }\r\n\r\n public hasOutstandingCylinderSerialNo(cylinder: GoodsReceivedCylinder): boolean {\r\n return cylinder.SerialNumbers.length !== cylinder.Received;\r\n }\r\n\r\n public updatePartSerialNos(serialNumbers: GoodsReceivedSerial[]): void {\r\n this.currentPart.SerialNumbers = serialNumbers;\r\n this.currentPart = null;\r\n }\r\n\r\n public updateCylinderSerialNos(serialNumbers: GoodsReceivedSerial[]): void {\r\n this.currentCylinder.SerialNumbers = serialNumbers;\r\n this.currentCylinder = null;\r\n }\r\n\r\n public onRowEditingStart(e: any): void {\r\n this.activeLinkType = e.data.LinkType;\r\n this.SetFormDirty();\r\n }\r\n\r\n public onEditorPreparing(e) {\r\n const self = this;\r\n if (e.parentType === \"dataRow\" && e.dataField === \"MaterialTypeId\") {\r\n this.currentMaterialTypeId = e.row.data.MaterialTypeId;\r\n const onValueChanged = e.editorOptions.onValueChanged;\r\n e.editorOptions.onValueChanged = function(arg: any) {\r\n onValueChanged.apply(this, arguments);\r\n self.currentMaterialTypeId = arg.value;\r\n };\r\n }\r\n if (e.dataField === \"Cost\" || e.dataField === \"UnitCost\") {\r\n const val = this.prepareCurrencyValue(e.value);\r\n e.editorOptions.value = val;\r\n }\r\n }\r\n\r\n public DeleteSelectedParts(): void {\r\n this.selectedPartIds.forEach(id => {\r\n const index = this.gn.Parts.findIndex(x => x.AdviceNoteLineId === id);\r\n this.gn.Parts.splice(index, 1);\r\n this.partsListDataSource.reload();\r\n });\r\n this.selectedPartIds = [];\r\n }\r\n\r\n public AddEquipment(): void {\r\n this.AddMakeModelDialog.Show();\r\n }\r\n\r\n public DeleteSelectedEquipment(): void {\r\n this.selectedMakeModelIds.forEach(id => {\r\n const index = this.gn.Equipment.findIndex(x => x.AdviceNoteLineId === id);\r\n this.gn.Equipment.splice(index, 1);\r\n });\r\n this.SetFormDirty();\r\n }\r\n\r\n public async OnMakeModelIdsAdded(ids: number[]): Promise {\r\n for (const id of ids) {\r\n this.makeModelStore.byKey(id).then(makeModel => {\r\n this.gn.Equipment.push({\r\n Equip: null,\r\n MakeModelId: id,\r\n UnitCost: makeModel.Cost ?? 0,\r\n Received: true,\r\n LinkType: null,\r\n LinkNumber: null,\r\n SerialNo: null,\r\n StoreId: this.gn.DefaultStoreId,\r\n AdviceNoteLineId: Guid.create().toString(),\r\n PurchaseId: null,\r\n PurchaseLineId: null,\r\n Attributes: null\r\n });\r\n });\r\n }\r\n\r\n this.SetFormDirty();\r\n }\r\n\r\n public DeleteSelectedMaterials(): void {\r\n this.selectedMaterialIds.forEach(id => {\r\n const index = this.gn.Materials.findIndex(x => x.LineId === id);\r\n this.gn.Materials.splice(index, 1);\r\n });\r\n this.SetFormDirty();\r\n }\r\n\r\n public AddMaterial(): void {\r\n this.AddMaterialDialog.Show(false);\r\n }\r\n\r\n public DeleteSelectedCylinders(): void {\r\n this.selectedCylinderIds.forEach(id => {\r\n const index = this.gn.Cylinders.findIndex(x => x.AdviceNoteLineId === id);\r\n this.gn.Cylinders.splice(index, 1);\r\n });\r\n this.SetFormDirty();\r\n }\r\n\r\n public AddMisc(data: IJobMisc): void {\r\n this.gn.Materials.push({\r\n LineId: Guid.create().toString(),\r\n MaterialTypeId: data.MiscTypeID,\r\n Description: data.Description,\r\n Cost: this.showInForeignCurrency ? data.Cost / this.gn.ExchangeRate : data.Cost,\r\n Received: true,\r\n PurchaseOrderId: null,\r\n LinkType: null,\r\n LinkNumber: null,\r\n LinkLine: null\r\n });\r\n\r\n this.SetFormDirty();\r\n }\r\n\r\n public RefreshMisc(): void {\r\n if (this.MaterialsGrid && this.MaterialsGrid.instance) {\r\n this.MaterialsGrid.instance.refresh();\r\n }\r\n }\r\n\r\n public RefreshEquipment(): void {\r\n if (this.EquipmentGrid && this.EquipmentGrid.instance) {\r\n this.EquipmentGrid.instance.refresh();\r\n }\r\n }\r\n\r\n public RefreshCylinders(): void {\r\n if (this.CylindersGrid && this.CylindersGrid.instance) {\r\n this.CylindersGrid.instance.refresh();\r\n }\r\n }\r\n\r\n public RefreshParts(): void {\r\n if (this.PartsGrid && this.PartsGrid.instance) {\r\n this.PartsGrid.instance.refresh();\r\n }\r\n }\r\n\r\n public RefreshAllGrids(): void {\r\n this.RefreshMisc();\r\n this.RefreshEquipment();\r\n this.RefreshCylinders();\r\n this.RefreshParts();\r\n }\r\n\r\n public ViewOrder(): void {\r\n this.router.navigate([\"/goods-received/detail\", this.gn.GoodsReceivedNumber, \"document\"]);\r\n }\r\n\r\n public GetMakeModelDisplayValue(data: any): string {\r\n return `${data.Make} / ${data.Model}`;\r\n }\r\n\r\n public CreateReminder(): void {\r\n this.ng1reminderService.CreateGoodsReceivedNoteReminder(this.gn.GoodsReceivedNumber, this.gn.ContactId);\r\n }\r\n\r\n public CreateMessage(): void {\r\n this.messageService.SetNewMessageParameters(0, MessageTypes.RefMessage, false, MessageDocTypeIds.GoodsReceived, this.gn.GoodsReceivedNumber);\r\n this.router.navigate([\"messages/newmessage\"]);\r\n }\r\n\r\n public SetFormDirty(): void {\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public getSupplierPartNumber(supplierId, stockHeaderId): string {\r\n if (this.supplierPartNumberLookup[supplierId + \"|\" + stockHeaderId] === undefined) {\r\n this.supplierPartNumberLookup[supplierId + \"|\" + stockHeaderId] = \"\";\r\n const store = this.supplierPartPriceService.GetDataStore();\r\n store.byKey({ SupplierId: supplierId, StockHeaderId: stockHeaderId }).then(part => {\r\n this.supplierPartNumberLookup[supplierId + \"|\" + stockHeaderId] = part;\r\n });\r\n }\r\n const item = this.supplierPartNumberLookup[supplierId + \"|\" + stockHeaderId];\r\n if (typeof item === \"string\") {\r\n return item;\r\n }\r\n\r\n return item.PartNo;\r\n }\r\n\r\n public onWarningNotes(show: boolean): void {\r\n this.showWarningNotesEye = show;\r\n }\r\n\r\n private InternalSave(): Observable {\r\n return this.formMessageService\r\n .RegisterObservable(this.goodsReceivedService.Save(this.gn), \"gnform\");\r\n }\r\n\r\n private SetCurrentItem(id: number) {\r\n if (this.IsRecordNavigationEnabled) {\r\n this.goodsReceivedService.SetCurrentItem(id).then(() => {\r\n this.CanNavigatePrevious = this.goodsReceivedService.IsPreviousAvailable();\r\n this.CanNavigateNext = this.goodsReceivedService.IsNextAvailable();\r\n });\r\n }\r\n }\r\n\r\n public NavigateNext(): void {\r\n if (this.CanNavigateNext) {\r\n this.goodsReceivedService.GetNextId().then(nextId => {\r\n this.router.navigate([\"goods-received\", \"detail\", nextId]);\r\n });\r\n }\r\n }\r\n\r\n public NavigatePrevious(): void {\r\n if (this.CanNavigatePrevious) {\r\n this.goodsReceivedService.GetPreviousId().then(previousId => {\r\n this.router.navigate([\"goods-received\", \"detail\", previousId]);\r\n });\r\n }\r\n }\r\n\r\n public GetWarranty(data: any): string {\r\n return data.data.WarrantyMonth;\r\n }\r\n\r\n public GetWarrantyDisplayValue(data: any): string {\r\n const months = this.translate.instant(\"goods-received.months\");\r\n const meters = this.translate.instant(\"goods-received.meter-units\");\r\n return data.WarrantyMonth ?\r\n `${data.WarrantyMonth} ${months}` :\r\n data.WarrantyMeter ?\r\n `${data.WarrantyMeter} ${meters}` :\r\n `0 ${months}`;\r\n }\r\n\r\n public calculateCustomSummary(options): void {\r\n if (options.name === \"CostSummary\") {\r\n if (options.summaryProcess === \"start\") {\r\n options.totalValue = 0;\r\n } else if (options.summaryProcess === \"calculate\") {\r\n options.totalValue += this.prepareCurrencyValue(parseFloat(options.value.Cost));\r\n }\r\n } else if (options.name === \"TotalCostSummary\") {\r\n if (options.summaryProcess === \"start\") {\r\n options.totalValue = 0;\r\n } else if (options.summaryProcess === \"calculate\") {\r\n options.totalValue += this.prepareCurrencyValue(parseFloat(options.value.TotalCost));\r\n }\r\n } else if (options.name === \"UnitCostSummary\") {\r\n if (options.summaryProcess === \"start\") {\r\n options.totalValue = 0;\r\n } else if (options.summaryProcess === \"calculate\") {\r\n options.totalValue += this.prepareCurrencyValue(parseFloat(options.value.UnitCost));\r\n }\r\n }\r\n }\r\n\r\n public TotalCostFormatter(data: any): string {\r\n return this.currencyFormat(data.value);\r\n }\r\n\r\n public TotalPartsCost(): string {\r\n return formatCurrency(this.partsCost,\r\n JSON.parse(localStorage.getItem(\"ls.UserBrowserLocale\")),\r\n this.currencySymbol);\r\n }\r\n\r\n public EquipValidation(equip: any): Promise {\r\n if (equip.value) {\r\n return this.equipmentService.EquipDuplicated(0, equip.value).toPromise().then((duplicated) => !duplicated);\r\n }\r\n return Promise.resolve(true);\r\n }\r\n\r\n public onEditingStart(e) {\r\n this.editedAdviceNoteLineId = e.data.AdviceNoteLineId;\r\n }\r\n\r\n public currencyFormat(value: number): string {\r\n return formatCurrency(value,\r\n JSON.parse(localStorage.getItem(\"ls.UserBrowserLocale\")),\r\n this.currencySymbol);\r\n }\r\n\r\n public CarrierChanged(e: any): void {\r\n if (e.value) {\r\n const dataSource = this.carrierContactSelectBoxComponent.instance.getDataSource();\r\n dataSource.filter([[\"CustomerId\", \"=\", e.value], \"and\", [\"Status\", \"=\", ContactStatus.ACTIVE]]);\r\n dataSource.load().then(() => {\r\n if (e.event) {\r\n this.gn.CarrierContactId = null;\r\n }\r\n });\r\n }\r\n }\r\n\r\n public onSupplierChanged(e): void {\r\n if (e.value) {\r\n this.GetCurrency(e.value, (cur: ICurrency) => {\r\n if (this.gn && !this.gn.GoodsReceivedNumber || e.event) {\r\n this.gn.ExchangeRate = cur.ExchangeRateSales;\r\n }\r\n });\r\n }\r\n }\r\n\r\n public StoreChanged(e: any): void {\r\n if (e.value && e.event) { // make sure that this is not initialize change\r\n this.storeDataStore.byKey(e.value).then(store => {\r\n this.gn.DeliverToId = store.SiteId;\r\n });\r\n }\r\n }\r\n\r\n public GetCustomerDisplayExpr(item): string {\r\n if (!item) {\r\n return \"\";\r\n }\r\n\r\n return item.Customer + (item.Address ? `, ${item.Address}` : \"\");\r\n }\r\n\r\n public toggleCurrency(): void {\r\n this.showInForeignCurrency = !this.showInForeignCurrency;\r\n this.RefreshAllGrids();\r\n }\r\n\r\n public checkForDuplicatedEquipmentNumber(e: any): void {\r\n const data = e.newData as GoodsReceivedEquipment;\r\n const exists = data.Equip &&\r\n data.Equip.length > 0 &&\r\n this.gn.Equipment.find(x =>\r\n x.AdviceNoteLineId !== data.AdviceNoteLineId &&\r\n x.Equip === data.Equip);\r\n\r\n e.cancel = new Promise((resolve, reject) => {\r\n if (exists) {\r\n reject(`There is already an equipment with number ${data.Equip}. Equipment numbers must be unique.`);\r\n } else {\r\n resolve(null);\r\n }\r\n });\r\n }\r\n\r\n public HideAllLinesReturnedMessage(): void {\r\n this.showAllLinesAlreadyReturned = false;\r\n }\r\n\r\n public CanCreateReturnsNote(): boolean {\r\n return this.HasAccessToPro\r\n && this.HasAccessToPurchaseOrders\r\n && (this.gn.Status === GoodsReceivedStatus.BookedIn || this.gn.Status === GoodsReceivedStatus.PiMatchedBu);\r\n }\r\n\r\n private GetCurrency(supplierId: number, func: (cur: ICurrency) => void): void {\r\n this.supplierService.GetSupplierCurrency(supplierId).subscribe(currency => {\r\n this.currency = currency;\r\n if (func) {\r\n func(currency);\r\n }\r\n });\r\n }\r\n\r\n private setupPartListDataSource(): void {\r\n this.partsListDataSource = this.odataService.GetDataSourceWithLookups(\r\n this.gn.Parts,\r\n \"AdviceNoteLineId\",\r\n [\r\n {\r\n store: this.stockHeaderDataStore,\r\n dataKey: \"StockId\",\r\n lookupKey: \"StockHeaderId\",\r\n displayExprs: [\"PartNo\", \"Description\", \"PreferredSupplierPartNo\"]\r\n }\r\n ]);\r\n }\r\n\r\n private ValidateSerialNumber(e: any) {\r\n const data = e.newData as GoodsReceivedEquipment;\r\n this.CheckIfSerialNoDuplicatedForExistingEquipment(data.SerialNo);\r\n this.CheckIfSerialNoDuplicatedWithinCurrentGRNLines(data.SerialNo);\r\n }\r\n\r\n private CheckIfSerialNoDuplicatedForExistingEquipment(serialNo: string): void {\r\n this.equipmentService.GetSerialNoDuplicates(0, serialNo).subscribe(res => {\r\n const duplicates = res;\r\n if (duplicates.some(() => true)) {\r\n this.translate.get(\"equipment.detail.duplicated.serial.no.message\", { value: duplicates.map((v) => v.Equip).join(\", \") })\r\n .subscribe((t) => {\r\n this.duplicatedMessage = t;\r\n this.showExistingEquipmentDuplicatedPopup = true;\r\n });\r\n }\r\n });\r\n }\r\n\r\n private CheckIfSerialNoDuplicatedWithinCurrentGRNLines(serialNo: string): void {\r\n const duplicatesInside = this.gn.Equipment.filter(x =>\r\n x.AdviceNoteLineId !== this.editedAdviceNoteLineId &&\r\n x.SerialNo === serialNo);\r\n\r\n if (duplicatesInside.length) {\r\n this.showCurrentGRNLinesDuplicatedPopup = true;\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'goods-received.list.title' | translate }}

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n
{{ item.value | goodsReceivedStatus | translate }}
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DomSanitizer, SafeResourceUrl } from \"@angular/platform-browser\";\r\nimport { Router } from \"@angular/router\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { EdmLiteral } from \"devextreme/data/odata/utils\";\r\nimport { GridKind, GridService, PermissionsService } from \"servicesight-shared\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { GoodsReceivedStatus } from \"../enums/goods-received-status.enum\";\r\nimport { GoodsReceivedService } from \"../services/goods-received.service\";\r\n\r\n@Component({\r\n selector: \"app-goods-received-list\",\r\n templateUrl: \"./goods-received-list.component.html\",\r\n styleUrls: [\r\n \"./goods-received-list.component.scss\",\r\n \"../../../../projects/servicesight-shared/src/lib/styles/global.scss\",\r\n \"../../../../projects/servicesight-shared/src/lib/styles/backgrounds.scss\",\r\n \"../../../../projects/servicesight-shared/src/lib/styles/servicesight-shared.scss\"\r\n ]\r\n})\r\nexport class GoodsReceivedListComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n\r\n public SearchText: string = \"\";\r\n public isAllowedCreate: boolean = false;\r\n public isProEnabled: boolean = false;\r\n\r\n public filters: any = {\r\n 1: [\"Status\", \"=\", new EdmLiteral(\"PurchaseOrders.Enums.AdviceNoteStatus'Pending'\")],\r\n 2: [[\"Status\", \"=\", new EdmLiteral(\"PurchaseOrders.Enums.AdviceNoteStatus'BookedIn'\")],\r\n \"or\", [\"Status\", \"=\", new EdmLiteral(\"PurchaseOrders.Enums.AdviceNoteStatus'PiMatchedBu'\")]],\r\n 3: [\"Status\", \"=\", new EdmLiteral(\"PurchaseOrders.Enums.AdviceNoteStatus'Cancelled'\")]\r\n };\r\n\r\n public goodsReceivedStatus = GoodsReceivedStatus;\r\n\r\n public dataSource: DataSource;\r\n\r\n constructor(\r\n private permissionsService: PermissionsService,\r\n private sanitizer: DomSanitizer,\r\n private gridService: GridService,\r\n private goodReceivedService: GoodsReceivedService,\r\n private licenseService: LicenseService,\r\n private router: Router\r\n ) { }\r\n\r\n ngOnInit() {\r\n this.permissionsService.CurrentUserHasPermission(\"AdviceNoteAdd\").subscribe(hasPermission => {\r\n this.isAllowedCreate = hasPermission;\r\n });\r\n\r\n this.permissionsService.CurrentUserHasPermission(\"AdviceNoteView\").subscribe(isAllowedView => {\r\n if (isAllowedView) {\r\n this.gridService.GetLayout(GridKind.GoodReceived).subscribe(value => {\r\n if (value) {\r\n this.dataGrid.instance.state(value);\r\n }\r\n this.GetDataSources();\r\n }, () => this.GetDataSources());\r\n }\r\n });\r\n\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(x => {\r\n this.isProEnabled = x.ProEnabled;\r\n });\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public FilterChanged($event: any): void {\r\n const filterValue = $event.currentTarget.value;\r\n if (filterValue === \"0\") {\r\n this.dataGrid.instance.clearFilter();\r\n } else {\r\n this.dataGrid.instance.filter(this.filters[filterValue]);\r\n }\r\n }\r\n\r\n public SaveLayout(): void {\r\n const state = this.dataGrid.instance.state();\r\n this.gridService.SaveLayout(state, GridKind.GoodReceived);\r\n }\r\n\r\n public ResetLayout(): void {\r\n this.gridService.ResetLayout(GridKind.GoodReceived);\r\n this.dataGrid.instance.state(null);\r\n }\r\n\r\n public ViewDetails(event: any): void {\r\n this.router.navigate([\"/goods-received/detail/\", event.data.GoodsReceivedNumber]);\r\n }\r\n\r\n private GetDataSources(): void {\r\n this.dataSource = this.goodReceivedService.GetDataSource(true);\r\n }\r\n\r\n public GetImage(data: string): SafeResourceUrl {\r\n if (!data) {\r\n // eslint-disable-next-line max-len\r\n data = \"iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAIAAACRXR/mAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAd8SURBVFhH7VZ7UFTXGb/nPhZYsbIsDxNpOxlcpSjasVqQxEd8jA0+iRZLoHmQlrAgWFunphk0VowY46szWtOUaaeJkziGFYKCCe2IdZWXgrVtggi2migIu+zyuOzr3nNvv3P38ljzgLVpkz/2N8tw73e/832/853vcZAsy9TXD7T6/2uGAC1/EKDlDwK0/EGAlj8I0PIHnzETBUH4Egclx3EIIfVl3Lif1rVr//jZLwo9okwjhpJVexhRkvI0WtX7iZEpWlblmFZtyUhSdCVK8qSlrtmSn+cvs/tpFe87ZCo7K0k0IpzAI5iTZSSDnyEmw/rEFaxXpPAPVoDa8FeSHrLk/ubD4RWmEwzDeKXjxP20dhW/duq9qripsbkvZMEWfb59EUYUlSdCteV62+slf5rykL6i9J3/ltavgVZF5cbUNS/98ueq6EFR39iUu/lXoaEhaamrGYYFvkpkwZ3McfS6tSsjIyNU1U/Bh5bH4ynad6C88oMfrl21bUu+smnyFdKWpv2u2YbGZmPBS4imaCSCE/BEUyxCLBy3JAtLHk/eu3vH5+XcCK3mq1d37Npt6x/kHS6OYSeFhiKKRB4hceGCpMIXt/nLrOFyszG/kJLpuLgYmgb3mAWGFMMPOm/euq0N1ZYcOxA3fZqq7YsRWsfff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jf/sMSgj4YtC517ebNRsO0WCzh+stN7//5HGQ2SWoy6WgaLpZKSvlUYtGeVysqq6Mjo+PjvwPJ5vYItfVXPC53Qf5Pn3smHTrtgNOxYUN6b68D+s3k6Cjfi5RqSnFBWaw9//ywxe10zYiPZ1mmrb0dXD3946eMOVmwa7gRbMx8vsNimTTxG9+aMhkiC5y6LLZ73d2OgT7S5UeDYznI6857lnvdfRiqEfqJJGNRXvDYfEhJSJaJ2gkzZs6uq21sbW2/fr2N0FJTAwKvBhlu2JjCpMAoxHKathvtiIYDRzw/mDQ/CaSgqp0QkjBrZuc5c2+/kx/4Fw31JmFoXfAArev+aFms1vcqKj1uLJPuJzs9ztLyKo9bykhfnZ+XDTG22/s3pj3t4F0zZ8bNmztbkkR1JfhSLIFXALk9k7on1y14FbHwrum0w+WGE9y2NY+lka13IO2p5+x9g4bY2EXJc73r4CYGD1NjHxm7nb564MjJU2coJCxZulCv0/+1xmzt6tGGBJW88RuDYaqqNBbAy/ade85Wn5cQ/Why4iPfjqmrrWttaw8PjzxyaE/CjDhVbwhj0+rpsW3a8mLrzZsCFkA7mAtGWN6U+3xm5o/GqERf9Pb2bSvc1fz3FjJmRIGhqWCNJuvZDPipGqMwNi1Ab1+fqfx01fvV3RbLY4mJq1b+IHl+ol+cvBjg+bLyquq/nL/98a05303ISE+bN3fOZ9oZFy0vRGiIsgQz6wEIjQaGxoAxx32RHT9o/T8x5gD5ahCg5Q8CtPxBgJY/CNDyBwFa4wdF/QfZAQjMeRYiMwAAAABJRU5ErkJggg==\";\r\n }\r\n return this.sanitizer.bypassSecurityTrustResourceUrl(\"data:image/bmp;charset=utf-8;base64,\" + data);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n

{{ 'goods-received.preview.goods-received-note' | translate }} {{id}}

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

\r\n {{ status | goodsReceivedStatus | translate}}
\r\n \r\n

\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
{{ 'label.email.sendMessage' | translate }}
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n","import { Component, Inject, OnInit, ViewChild } from \"@angular/core\";\r\nimport { Email } from \"../../shared/models/email.model\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { IAppConfig, APP_CONFIG, ReportViewerComponent } from \"servicesight-shared\";\r\nimport { GoodsReceivedService } from \"../services/goods-received.service\";\r\n\r\n@Component({\r\n selector: \"app-goods-received-preview\",\r\n templateUrl: \"./goods-received-preview.component.html\",\r\n styleUrls: [\"./goods-received-preview.component.scss\"]\r\n})\r\nexport class GoodsReceivedPreviewComponent implements OnInit {\r\n\r\n @ViewChild(\"report\") report: ReportViewerComponent;\r\n\r\n public url: string;\r\n public hostUrl: string;\r\n public id: number;\r\n public status: number;\r\n public showTemplateDialog: boolean = false;\r\n public emailData: Email = new Email();\r\n public showSuccessSendMessage: boolean = false;\r\n public showErrorSendMessage: boolean = false;\r\n\r\n constructor(\r\n private route: ActivatedRoute,\r\n private goodsReceivedService: GoodsReceivedService,\r\n private router: Router,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) {\r\n this.id = Number(this.route.snapshot.paramMap.get(\"id\"));\r\n this.url = `goods-received/${this.id}`;\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.goodsReceivedService.GetStatus(this.id).subscribe(res => this.status = res);\r\n this.hostUrl = this.appConfig.apiLocations.PurchaseOrders.substr(0, this.appConfig.apiLocations.PurchaseOrders.lastIndexOf(\"/api/\") + 1);\r\n }\r\n\r\n public CallPrint(): void {\r\n this.report.print();\r\n }\r\n\r\n public CallDownload(): void {\r\n this.report.download();\r\n }\r\n\r\n public GoBack(): void {\r\n this.router.navigate([`/goods-received/detail/${this.id}`]);\r\n }\r\n\r\n public OpenEmailDialog(): void {\r\n this.send();\r\n }\r\n\r\n public OpenDialog(): void {\r\n this.goodsReceivedService\r\n .GetGoodsReceivedEmailData(this.id)\r\n .subscribe(x => this.emailData = x, () => { }, () => {\r\n this.showErrorSendMessage = false;\r\n this.showTemplateDialog = true;\r\n });\r\n }\r\n\r\n public send(): void {\r\n this.goodsReceivedService.SendGoodsReceivedEmail(this.emailData).subscribe(() => {\r\n this.showTemplateDialog = false;\r\n this.showSuccessSendMessage = true;\r\n }, () => {\r\n this.showErrorSendMessage = true;\r\n });\r\n }\r\n\r\n public CloseDialog(): void {\r\n this.showTemplateDialog = false;\r\n }\r\n}\r\n","import { NgModule } from \"@angular/core\";\r\nimport { RouterModule, Routes } from \"@angular/router\";\r\nimport { GoodsReceivedDetailComponent } from \"./goods-received-detail/goods-received-detail.component\";\r\nimport { GoodsReceivedListComponent } from \"./goods-received-list/goods-received-list.component\";\r\nimport { GoodsReceivedPreviewComponent } from \"./goods-received-preview/goods-received-preview.component\";\r\n\r\n\r\nconst routes: Routes = [\r\n { path: \"from-purchase-order/:purchaseOrderId\", component: GoodsReceivedDetailComponent },\r\n { path: \"detail/:id\", component: GoodsReceivedDetailComponent },\r\n { path: \"list\", component: GoodsReceivedListComponent },\r\n { path: \"detail/:id/document\", component: GoodsReceivedPreviewComponent },\r\n { path: \"\", redirectTo: \"list\", pathMatch: \"full\" },\r\n { path: \"**\", redirectTo: \"list\" }\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\n\r\nexport class GoodsReceivedRoutingModule {\r\n public static readonly Routes: Routes = routes;\r\n}\r\n","import { Component } from \"@angular/core\";\r\n\r\n@Component({\r\n selector: \"app-inspections-list\",\r\n templateUrl: \"./inspections-list.component.html\",\r\n styleUrls: [\"./inspections-list.component.scss\"]\r\n})\r\nexport class InspectionsListComponent {\r\n}\r\n","","import { Inject, Injectable } from \"@angular/core\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { Email } from \"src/app/shared/models/email.model\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { QueuedEmailType } from \"src/app/shared/enums/queued-email-type.enum\";\r\nimport { AuthService } from \"src/app/shared/services/auth/auth.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class EmailService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private authService: AuthService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) { }\r\n\r\n public GetEmailData(inspectionId: number): Observable {\r\n return this.http.get(this.appConfig.apiLocations.Inspections + \"Email/\" + inspectionId);\r\n }\r\n\r\n public SendEmail(emailData: Email): Observable {\r\n emailData.EmailType = QueuedEmailType.Inspection;\r\n emailData.SenderEmployeeId = this.authService.EmployeeId;\r\n return this.http.post(this.appConfig.apiLocations.ServiceSight + \"Email/QueueEmail\", emailData);\r\n }\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { Observable } from \"rxjs\";\r\nimport { InspectionSummary } from \"../models/inspection-summary\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class InspectionSummaryService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) { }\r\n\r\n public Get(inspectionId: number): Observable {\r\n return this.http.get(this.appConfig.apiLocations.Inspections + \"Inspection/\" + inspectionId);\r\n }\r\n\r\n public GetByJob(jobId: number): Observable {\r\n return this.http.get(this.appConfig.apiLocations.Inspections + \"Job/\" + jobId);\r\n }\r\n\r\n public AddInspectionToJob(jobId: number, templateIds: Array): Observable {\r\n return this.http.post(this.appConfig.apiLocations.Inspections + \"Job/\" + jobId, templateIds);\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { IAppConfig, APP_CONFIG, InspectionStatus } from \"servicesight-shared\";\r\nimport { InspectionSummary } from \"../models/inspection-summary\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class InspectionTitleService {\r\n private statusCode: number;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) { }\r\n\r\n public GetStatusCode(inspectionId: number): Promise {\r\n if (!this.statusCode && inspectionId) {\r\n return this.GetById(inspectionId).then((res) => {\r\n return res.Status;\r\n });\r\n } else {\r\n return new Promise((resolve) => {\r\n if (!this.statusCode) {\r\n this.statusCode = InspectionStatus.Outstanding;\r\n }\r\n resolve(this.statusCode);\r\n });\r\n }\r\n }\r\n\r\n private GetById(inspectionId: number): Promise {\r\n return this.http.get(this.appConfig.apiLocations.Inspections + \"Inspection/\" + inspectionId).toPromise();\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ 'accordion.inspection.Job' | translate }}\r\n {{inspection.JobId}}\r\n
{{ 'accordion.inspection.ReasonNotDone' | translate }}{{inspection.ReasonNotDone}}
{{ 'accordion.inspection.SkippedDate' | translate }}{{inspection.SkippedDate | date:'dd/MM/yyyy hh:mm a'}}
{{ 'accordion.inspection.SkippedBy' | translate }}\r\n {{inspection.SkippedByEmployee}}\r\n
\r\n","import { Component, Input, OnChanges } from \"@angular/core\";\r\nimport { AccordionDataService } from \"../accordion-data.service\";\r\nimport { AccordionInspectionModel } from \"../models/inspection-model\";\r\n\r\n@Component({\r\n selector: \"app-inspection-accordion-item\",\r\n templateUrl: \"./inspection-accordion-item.component.html\",\r\n styleUrls: [\"./inspection-accordion-item.component.scss\"]\r\n})\r\nexport class InspectionAccordionItemComponent implements OnChanges {\r\n @Input() inspectionId: number;\r\n public inspection: AccordionInspectionModel;\r\n\r\n constructor(private dataService: AccordionDataService) { }\r\n\r\n public ngOnChanges(): void {\r\n if (this.inspectionId !== undefined) {\r\n this.dataService.getInspectionData(this.inspectionId).subscribe(x => this.inspection = x);\r\n }\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { CertificateIssueReason } from \"../models/certificate-issue-reason.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class CertificateIssueReasonsService {\r\n\r\n private certificateIssueReasons: Array = [\r\n { id: 1, value: \"Work completed\" }\r\n ];\r\n\r\n public GetReasons(): Array {\r\n return this.certificateIssueReasons;\r\n }\r\n\r\n public GetReasonById(reasonId: number): CertificateIssueReason {\r\n return this.certificateIssueReasons.find(x => x.id === reasonId);;\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ 'accordion.inspection.CertificateReissuedBy' | translate }}{{ inspection.PassOverrideBy }}
{{ 'accordion.inspection.Reason' | translate }}{{ certificateIssueReason }}
","import { Component, Input, OnInit } from \"@angular/core\";\r\nimport { AccordionDataService } from \"src/app/shared/components/accordion/accordion-data.service\";\r\nimport { AccordionInspectionModel } from \"src/app/shared/components/accordion/models/inspection-model\";\r\nimport { CertificateIssueReasonsService } from \"../../../../inspections/services/certificate-issue-reasons.service\";\r\n\r\n@Component({\r\n selector: \"app-cfts-accordion-item\",\r\n templateUrl: \"./cfts-accordion-item.component.html\",\r\n styleUrls: [\"./cfts-accordion-item.component.scss\"]\r\n})\r\nexport class CftsAccordionItemComponent implements OnInit {\r\n\r\n @Input() inspectionId: number;\r\n public inspection: AccordionInspectionModel;\r\n public certificateIssueReason: string;\r\n\r\n constructor(private dataService: AccordionDataService,\r\n private certificateIssueReasonsService: CertificateIssueReasonsService) { }\r\n\r\n public ngOnInit(): void {\r\n if (this.inspectionId) {\r\n this.dataService.getInspectionData(this.inspectionId).subscribe((inspection: AccordionInspectionModel) => {\r\n this.inspection = inspection;\r\n this.certificateIssueReason = this.certificateIssueReasonsService.GetReasonById(inspection.PassOverrideReason).value;\r\n });\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n

\r\n {{ 'inspections.heading.inspection' | translate }}\r\n {{ inspectionId }}\r\n {{ 'inspection.title.preview' | translate }}\r\n

\r\n
\r\n

{{ status | inspectionStatusValue | translate }}

\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{ 'inspection.email.senMessage' | translate }}\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n   {{attachment}}    \r\n \r\n \r\n   {{attachment.DisplayName}}    \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
0\" class=\"col-lg-6 col-pd6\">\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
{{ 'messages.error.genericError' | translate }}
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n","import { Location } from \"@angular/common\";\r\nimport { Component, Inject, OnInit, ViewChild, ViewEncapsulation } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { ajaxSetup } from \"@devexpress/analytics-core/analytics-utils\";\r\nimport { DxReportViewerComponent } from \"devexpress-reporting-angular\";\r\nimport { ActionId } from \"devexpress-reporting/dx-webdocumentviewer\";\r\nimport {\r\n DocumentTypeEnum,\r\n IAppConfig, APP_CONFIG,\r\n InspectionDataService,\r\n InspectionStatus,\r\n Module,\r\n ModuleService,\r\n PermissionsService,\r\n SettingId,\r\n SettingsService\r\n} from \"servicesight-shared\";\r\nimport { JobFileListModel } from \"src/app/jobs/models/job-file-list\";\r\nimport { JobDocumentDataService } from \"src/app/jobs/services/job-document-data.service\";\r\nimport { JobService } from \"src/app/jobs/services/job.service\";\r\nimport { LicenseService } from \"./../../shared/services/licence/license.service\";\r\nimport { AuthService } from \"../../shared/services/auth/auth.service\";\r\nimport { PreviousRouteService } from \"../../shared/services/previous-route.service\";\r\nimport { Email } from \"src/app/shared/models/email.model\";\r\nimport { InspectionSummary } from \"../models/inspection-summary\";\r\nimport { EmailService } from \"../services/email.service\";\r\nimport { InspectionSummaryService } from \"../services/inspection-summary.service\";\r\nimport { InspectionTitleService } from \"../services/inspection-title.service\";\r\n\r\n@Component({\r\n selector: \"app-inspections-report-viewer\",\r\n templateUrl: \"./inspections-report-viewer.component.html\",\r\n encapsulation: ViewEncapsulation.None,\r\n styleUrls: [\r\n \"./inspections-report-viewer.component.scss\",\r\n \"../../../../node_modules/@devexpress/analytics-core/dist/css/dx-analytics.common.css\",\r\n \"../../../../node_modules/@devexpress/analytics-core/dist/css/dx-analytics.light.css\",\r\n \"../../../../node_modules/devexpress-reporting/dist/css/dx-webdocumentviewer.css\"\r\n ]\r\n})\r\n\r\nexport class InspectionsReportViewerComponent implements OnInit {\r\n @ViewChild(DxReportViewerComponent, { static: true }) viewer: DxReportViewerComponent;\r\n @ViewChild(\"emailform\", { static: true }) emailform: NgForm;\r\n public inspectionId: number;\r\n public customerId: number;\r\n public contactId: number;\r\n public inspectionTemplate: string;\r\n public authBodyId: number;\r\n\r\n public status: number;\r\n\r\n // The URL of a report to open in the Report Designer when the application starts.\r\n public reportUrl: string = null;\r\n\r\n // URI of your backend project.\r\n public hostUrl: string;\r\n\r\n // ASP.NET Core backend\r\n public invokeAction: string = \"DXXRDV\";\r\n\r\n public showTemplateDialog: boolean = false;\r\n public showSuccessMessage: boolean = false;\r\n public showErrorSendMessage: boolean = false;\r\n public disableEmailButtons: boolean = false;\r\n public EmailData: Email = new Email();\r\n\r\n public IsNew: boolean = false;\r\n public HasAccessToPro: boolean = false;\r\n public CanNavigatePrevious: boolean = false;\r\n public CanNavigateNext: boolean = false;\r\n public IsRecordNavigationEnabled: boolean = false;\r\n public InspectionPhotosAttachments: JobFileListModel[] = [];\r\n public AttachInspectionPhotos: boolean = false;\r\n public isRecurringJobsModuleEnabled: boolean = false;\r\n public plannerBoardEnabled: boolean = false;\r\n public isCftsModuleEnabled: boolean = false;\r\n public isPassed: boolean = false;\r\n\r\n constructor(\r\n private route: ActivatedRoute,\r\n auth: AuthService,\r\n private titleService: InspectionTitleService,\r\n private emailService: EmailService,\r\n private inspectionSummaryService: InspectionSummaryService,\r\n private location: Location,\r\n private jobDataService: JobService,\r\n private licenseService: LicenseService,\r\n private router: Router,\r\n private inspectionDataService: InspectionDataService,\r\n private previousRouteService: PreviousRouteService,\r\n private jobDocumentDataService: JobDocumentDataService,\r\n private settingsService: SettingsService,\r\n private permissionsService: PermissionsService,\r\n private moduleService: ModuleService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) {\r\n ajaxSetup.ajaxSettings = {\r\n headers: { Authorization: \"Bearer \" + auth.Token }\r\n };\r\n this.EmailData.Emails = [];\r\n }\r\n\r\n public CustomizeMenuActions(event) {\r\n const zoomAction = event.args.GetById(ActionId.ZoomSelector);\r\n if (zoomAction) {\r\n zoomAction.zoom(1);\r\n }\r\n\r\n const multipageAction = event.args.GetById(ActionId.MultipageToggle);\r\n if (multipageAction) {\r\n multipageAction.clickAction();\r\n }\r\n }\r\n\r\n ngOnInit() {\r\n this.hostUrl = this.appConfig.apiLocations.Inspections.substr(0, this.appConfig.apiLocations.Inspections.lastIndexOf(\"/api/\") + 1);\r\n\r\n this.licenseService.GetCompanyHasAccessToModule(Module.Pro).subscribe(x => this.HasAccessToPro = x);\r\n this.moduleService.GetEnabledModules().subscribe(enabledModules => {\r\n this.isRecurringJobsModuleEnabled = enabledModules.includes(Module.RecurringJobs);\r\n });\r\n\r\n this.moduleService.GetEnabledModules().subscribe(enabledModules => {\r\n this.isCftsModuleEnabled = enabledModules.includes(Module.CFTS);\r\n });\r\n\r\n this.IsRecordNavigationEnabled = this.previousRouteService.PreviousUrlContains(\"/inspections\");\r\n\r\n this.permissionsService.CurrentUserHasPermission(\"JobPlannerboard\").subscribe(isAllowedView => {\r\n this.plannerBoardEnabled = isAllowedView;\r\n });\r\n\r\n this.route.params.subscribe(params => {\r\n this.inspectionId = parseInt(params.inspectionId, 10);\r\n const templateId = params.templateId;\r\n if (templateId) {\r\n this.reportUrl = `Inspection/${this.inspectionId}/${parseInt(templateId, 10)}`;\r\n } else {\r\n this.reportUrl = `Inspection/${this.inspectionId}`;\r\n }\r\n\r\n this.titleService.GetStatusCode(this.inspectionId).then((res) => {\r\n this.status = res;\r\n });\r\n\r\n if (this.inspectionId) {\r\n this.inspectionSummaryService.Get(this.inspectionId).subscribe((x: InspectionSummary) => {\r\n this.inspectionTemplate = x.TemplateName;\r\n this.authBodyId = x.AuthBodyId;\r\n this.isPassed = x.Pass;\r\n\r\n this.jobDataService.get(x.JobId).then(y => {\r\n this.customerId = y.CustomerID;\r\n this.contactId = y.ContactID;\r\n });\r\n });\r\n\r\n this.SetCurrentItem(this.inspectionId);\r\n this.jobDocumentDataService\r\n .GetDocuments(DocumentTypeEnum.Inspections, this.inspectionId)\r\n .subscribe(a => {\r\n this.InspectionPhotosAttachments = a;\r\n if (this.InspectionPhotosAttachments.length > 0) {\r\n this.settingsService\r\n .getSetting(SettingId.IncludeInspectionPhotosAsEmailAttachments)\r\n .subscribe(setting => this.AttachInspectionPhotos = setting.ValueBool);\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n print(): void {\r\n this.viewer.bindingSender.Print();\r\n }\r\n\r\n openDialog(): void {\r\n this.emailService\r\n .GetEmailData(this.inspectionId)\r\n .subscribe(x => this.EmailData = x, () => { }, () => { this.showTemplateDialog = true; });\r\n }\r\n\r\n closeDialog(): boolean {\r\n this.showTemplateDialog = false;\r\n this.showErrorSendMessage = false;\r\n return false;\r\n }\r\n\r\n send(): void {\r\n this.disableEmailButtons = true;\r\n this.EmailData.AttachInspectionPhotos = this.AttachInspectionPhotos;\r\n this.emailService.SendEmail(this.EmailData).subscribe(() => {\r\n this.showTemplateDialog = false;\r\n this.showSuccessMessage = true;\r\n }, () => this.showErrorSendMessage = true).add(() => this.disableEmailButtons = false);\r\n }\r\n\r\n goBack(): void {\r\n this.location.back();\r\n }\r\n\r\n private SetCurrentItem(id: number) {\r\n if (this.IsRecordNavigationEnabled) {\r\n this.inspectionDataService.SetCurrentItem(id).then(() => {\r\n this.CanNavigatePrevious = this.inspectionDataService.IsPreviousAvailable();\r\n this.CanNavigateNext = this.inspectionDataService.IsNextAvailable();\r\n });\r\n }\r\n }\r\n\r\n public NavigateNext(): void {\r\n if (this.CanNavigateNext) {\r\n this.inspectionDataService.GetNextId().then(nextId => {\r\n this.router.navigate([\"inspections\", \"report\", nextId]);\r\n });\r\n }\r\n }\r\n\r\n public NavigatePrevious(): void {\r\n if (this.CanNavigatePrevious) {\r\n this.inspectionDataService.GetPreviousId().then(previousId => {\r\n this.router.navigate([\"inspections\", \"report\", previousId]);\r\n });\r\n }\r\n }\r\n\r\n public isCftsAccordionVisible(): boolean {\r\n return this.inspectionId\r\n && this.isCftsModuleEnabled\r\n && this.status === InspectionStatus.Completed\r\n && !this.isPassed\r\n && this.authBodyId === 1;\r\n }\r\n}\r\n","import { NgModule } from \"@angular/core\";\r\nimport { Routes, RouterModule } from \"@angular/router\";\r\nimport { InspectionsListComponent } from \"./inspections-list/inspections-list.component\";\r\nimport { InspectionsReportViewerComponent } from \"./inspections-report-viewer/inspections-report-viewer.component\";\r\n\r\nconst routes: Routes = [{\r\n path: \"list\",\r\n component: InspectionsListComponent,\r\n}, {\r\n path: \"report/:inspectionId/:templateId\",\r\n component: InspectionsReportViewerComponent,\r\n}, {\r\n path: \"report/:inspectionId\",\r\n component: InspectionsReportViewerComponent,\r\n}, {\r\n path: \"\",\r\n redirectTo: \"list\",\r\n pathMatch: \"full\"\r\n}];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class InspectionsRoutingModule {\r\n public static Routes: Routes = routes;\r\n}\r\n","export enum NoteOutputType {\r\n Posting = 1,\r\n Proforma = 2,\r\n Preview = 3\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n 0\">\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n 0\">\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ \"invoice.status.accordion.outstanding-balance\" | translate }}{{ accItems.OutstandingBalance | currency: accItems.CurrencySymbol }}
{{ \"invoice.status.accordion.emailed-on\" | translate }}{{ accItems.EmailDate | date: \"short\" }}
{{ \"invoice.status.accordion.emailed-to\" | translate }}{{ accItems.EmailAddress }}
{{ \"invoice.status.accordion.documents\" | translate }}
{{ docTypeTitle(doc) }}{{doc.DocumentID}}
{{ \"invoice.status.accordion.payment-amount\" | translate }}{{ pay.PaymentAmount | currency: accItems.CurrencySymbol }}
{{ \"invoice.status.accordion.payment-method\" | translate }}{{ pay.PaymentMethod }}
{{ \"invoice.status.accordion.payment-paid-by\" | translate }}{{ pay.PaidBy }}
{{ \"invoice.status.accordion.payment-provider\" | translate }}{{ pay.PaymentProvider }}
{{ \"invoice.status.accordion.payment-date\" | translate }}{{ pay.PaymentDate | date: \"short\" }}
\r\n","import { Component, Input, OnInit } from \"@angular/core\";\r\nimport { AccordionDocument } from \"../models/accordion-document-data.model\";\r\nimport { Location } from \"@angular/common\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DocumentTypeEnum } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-invoice-status-accordion-item\",\r\n templateUrl: \"./invoice-status-accordion-item.component.html\",\r\n styleUrls: [\"./invoice-status-accordion-item.component.scss\"]\r\n})\r\nexport class InvoiceStatusAccordionItemComponent implements OnInit {\r\n @Input() accItems: any;\r\n @Input() accInvDocuments: any;\r\n constructor(\r\n private translate: TranslateService,\r\n private location: Location) { }\r\n\r\n public ngOnInit(): void {\r\n }\r\n\r\n public goDocument(doc: AccordionDocument): void {\r\n switch (doc.System) {\r\n case DocumentTypeEnum.ServiceContract:\r\n this.location.go(\"/contracts/detail/\" + doc.DocumentID);\r\n break;\r\n case DocumentTypeEnum.Job:\r\n this.location.go(\"/jobs/job/\" + doc.DocumentID);\r\n break;\r\n case DocumentTypeEnum.SalesOrder:\r\n this.location.go(\"/despatch-notes/detail/\" + doc.DocumentID);\r\n break;\r\n }\r\n }\r\n\r\n private docTypeLookup: any = {\r\n service: this.translate.instant(\"invoice.status.accordion.contract-no\"),\r\n job: this.translate.instant(\"invoice.status.accordion.job-no\"),\r\n sales: this.translate.instant(\"invoice.status.accordion.despatch-no\")\r\n };\r\n\r\n public docTypeTitle(doc: AccordionDocument): string {\r\n switch (doc.System) {\r\n case DocumentTypeEnum.ServiceContract:\r\n return this.docTypeLookup.service;\r\n case DocumentTypeEnum.Job:\r\n return this.docTypeLookup.job;\r\n case DocumentTypeEnum.SalesOrder:\r\n return this.docTypeLookup.sales;\r\n default:\r\n return \"Document\";\r\n }\r\n }\r\n\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n {{ title }} \r\n {{invoice?.NoteNo}}\r\n

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

\r\n {{ (isMarkedPaid ? 'invoice-detail.status-paid-text' : 'invoice-detail.status-unpaid-text') | translate }}\r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
{{successMessage}}
\r\n
{{errorMessage}}
\r\n
{{alertMessage}}
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n","import { Location } from \"@angular/common\";\r\nimport { Component, Inject, OnInit, ViewChild } from \"@angular/core\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport {\r\n DocumentTypeEnum,\r\n IAppConfig, APP_CONFIG,\r\n InvoiceDataService,\r\n InvoiceDocument,\r\n InvoiceHeader,\r\n InvoiceMetadata,\r\n IProteanResponse,\r\n ModuleAccessModel,\r\n ReportViewerComponent\r\n} from \"servicesight-shared\";\r\nimport { CreditNotesService } from \"src/app/credit-notes/credit-notes.service\";\r\nimport { Email } from \"src/app/shared/models/email.model\";\r\nimport { EmailService } from \"src/app/shared/services/email/email.service\";\r\nimport { LicenseService } from \"../../shared/services/licence/license.service\";\r\nimport { PreviousRouteService } from \"../../shared/services/previous-route.service\";\r\nimport { NoteOutputType } from \"../enums/note-output-type.enum\";\r\n\r\n@Component({\r\n selector: \"app-invoice-detail\",\r\n templateUrl: \"./invoice-detail.component.html\",\r\n styleUrls: [\"./invoice-detail.component.scss\"]\r\n})\r\nexport class InvoiceDetailComponent implements OnInit {\r\n @ViewChild(\"report\", { static: true }) report: ReportViewerComponent;\r\n public invoice: InvoiceHeader;\r\n public invoiceMetadata: InvoiceMetadata;\r\n public invoiceDocuments: InvoiceDocument[];\r\n public hostUrl: string;\r\n public emailData: Email;\r\n\r\n public isRecordNavigationEnabled: boolean = false;\r\n public canNavigatePrevious: boolean = false;\r\n public canNavigateNext: boolean = false;\r\n public hasAccessToPro: boolean = false;\r\n public showMarkAsPrintedConfirmation: boolean = false;\r\n public showEmailDialogue: boolean = false;\r\n public showCreditRaisedEye: boolean = false;\r\n public showErrorSendMessage: boolean = false;\r\n\r\n private sendMethod: (emailData: Email) => Observable;\r\n private includeJobDocuments: boolean = false;\r\n\r\n private alertText: string;\r\n private errorText: string;\r\n private successText: string;\r\n\r\n private invoiceId: number;\r\n private templateId: number = 0;\r\n\r\n public get title(): string {\r\n switch (this.invoice?.NoteOutputTypeID) {\r\n case NoteOutputType.Proforma:\r\n return this.translate.instant(\"invoice-detail.proforma.title\");\r\n case NoteOutputType.Preview:\r\n return this.translate.instant(\"invoice-detail.preview.title\");\r\n case NoteOutputType.Posting:\r\n default:\r\n return this.translate.instant(\"invoice-detail.posting.title\");\r\n }\r\n }\r\n\r\n public get isPreview(): boolean {\r\n return this.invoice?.NoteOutputTypeID === NoteOutputType.Preview;\r\n }\r\n\r\n public get invoiceUrl(): string {\r\n return `Invoice/${this.invoiceId}/${this.templateId}`;\r\n }\r\n\r\n public get showPaidUnpaidToggleButton(): boolean {\r\n return this.invoice &&\r\n !this.isPreview &&\r\n !this.invoice.isAccountingSystemConnected &&\r\n this.invoice.isAllowedMarkAsPaid;\r\n }\r\n\r\n public get showAddCreditButton(): boolean {\r\n return this.invoice &&\r\n !this.isPreview &&\r\n this.hasAccessToPro;\r\n }\r\n\r\n public get showViewInLedgerSystemButton(): boolean {\r\n return !this.isPreview && this.invoice && this.invoice.ShowDeepLinkingUrl;\r\n }\r\n\r\n public get isDocumentTypeJob(): boolean {\r\n return this.invoice && this.invoice.DocumentType === DocumentTypeEnum.Job;\r\n }\r\n\r\n public get isMarkedPaid(): boolean {\r\n return this.invoice && this.invoice.isMarkedPaid;\r\n }\r\n\r\n public get alertMessage(): string {\r\n return this.alertText;\r\n }\r\n\r\n public set alertMessage(message: string) {\r\n this.alertText = message;\r\n this.errorText = null;\r\n this.successText = null;\r\n }\r\n\r\n public get errorMessage(): string {\r\n return this.errorText;\r\n }\r\n\r\n public set errorMessage(message: string) {\r\n this.alertText = null;\r\n this.errorText = message;\r\n this.successText = null;\r\n }\r\n\r\n public get successMessage(): string {\r\n return this.successText;\r\n }\r\n\r\n public set successMessage(message: string) {\r\n this.alertText = null;\r\n this.errorText = null;\r\n this.successText = message;\r\n }\r\n\r\n constructor(\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private previousRouteService: PreviousRouteService,\r\n private location: Location,\r\n private translate: TranslateService,\r\n private licenseService: LicenseService,\r\n private invoiceDataService: InvoiceDataService,\r\n private creditNoteService: CreditNotesService,\r\n private emailService: EmailService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig\r\n ) {\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe((response: ModuleAccessModel) => {\r\n this.hasAccessToPro = response.ProEnabled;\r\n });\r\n\r\n this.hostUrl = this.appConfig.apiLocations.ServiceSightReports;\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.route.params.subscribe(params => {\r\n this.invoiceId = params.id;\r\n if (params.templateId) {\r\n this.templateId = params.templateId;\r\n }\r\n this.onLoad();\r\n });\r\n }\r\n\r\n public onLoad(): void {\r\n if (this.invoiceId) {\r\n this.invoiceDataService.GetInvoiceHeader(this.invoiceId)\r\n .subscribe((response: InvoiceHeader) => {\r\n this.invoice = response;\r\n\r\n // Enable previous/next navigation.\r\n if (this.previousRouteService.PreviousUrlContains(\"/invoices\")) {\r\n this.isRecordNavigationEnabled = true;\r\n this.SetCurrentItem();\r\n }\r\n });\r\n\r\n this.GetMetadata();\r\n this.GetDocuments();\r\n }\r\n }\r\n\r\n private SetCurrentItem(): void {\r\n if (this.isRecordNavigationEnabled) {\r\n this.invoiceDataService.SetCurrentItem(this.invoiceId).then(() => {\r\n this.canNavigatePrevious = this.invoiceDataService.IsPreviousAvailable();\r\n this.canNavigateNext = this.invoiceDataService.IsNextAvailable();\r\n });\r\n }\r\n }\r\n\r\n public NavigateNext(): void {\r\n if (this.canNavigateNext) {\r\n this.invoiceDataService.GetNextId().then(nextId => {\r\n this.router.navigate([\"invoices\", \"invoice\", nextId]);\r\n });\r\n }\r\n }\r\n\r\n public NavigatePrevious(): void {\r\n if (this.canNavigatePrevious) {\r\n this.invoiceDataService.GetPreviousId().then(previousId => {\r\n this.router.navigate([\"invoices\", \"invoice\", previousId]);\r\n });\r\n }\r\n }\r\n\r\n public GoBack(): void {\r\n this.location.back();\r\n }\r\n\r\n public AddCredit(): void {\r\n this.creditNoteService.AddCreditNote(this.invoiceId).subscribe(addCreditResult => {\r\n if (addCreditResult.IsSuccess) {\r\n if (addCreditResult.EntityId) {\r\n this.router.navigate([\"credit-notes\", \"credit-note\", addCreditResult.EntityId]);\r\n } else {\r\n this.router.navigate([\"credit-notes\", \"list\"]);\r\n }\r\n } else {\r\n this.errorMessage = this.translate.instant(\"invoice-detail.credit.note.could.not.be.added\");\r\n }\r\n });\r\n }\r\n\r\n public onExistingRaisedCredits(areCreditsRaised): void {\r\n this.showCreditRaisedEye = areCreditsRaised;\r\n }\r\n\r\n public TogglePaidUnpaid(): void {\r\n if (this.isMarkedPaid) {\r\n this.invoiceDataService.MarkAsUnpaid(this.invoiceId).subscribe(response => {\r\n this.HandlePaidUnpaidResponse(response);\r\n });\r\n } else {\r\n this.invoiceDataService.MarkAsPaid(this.invoiceId).subscribe(response => {\r\n this.HandlePaidUnpaidResponse(response);\r\n });\r\n }\r\n }\r\n\r\n public Print(): void {\r\n this.report.print();\r\n if (!this.isPreview) {\r\n this.showMarkAsPrintedConfirmation = true;\r\n }\r\n }\r\n\r\n public Download(): void {\r\n this.report.download();\r\n }\r\n\r\n public OnConfirmMarkPrinted(confirmed: boolean): void {\r\n if (confirmed) {\r\n this.invoiceDataService.MarkPrinted(this.invoiceId).subscribe((response: IProteanResponse) => {\r\n if (response.IsSuccess) {\r\n this.successMessage = this.translate.instant(\"invoice-detail.successfully.marked.as.printed\");\r\n this.showMarkAsPrintedConfirmation = false;\r\n }\r\n });\r\n } else {\r\n this.alertMessage = this.translate.instant(\"invoice-detail.not.marked.as.printed\") ;\r\n this.showMarkAsPrintedConfirmation = false;\r\n }\r\n }\r\n\r\n public ViewInExternalSystem(): void {\r\n window.open(this.invoice.AccountUrl, \"_blank\");\r\n }\r\n\r\n public PrepareEmailWithJobSheet(): void {\r\n this.includeJobDocuments = true;\r\n this.sendMethod = this.SendInvoiceWithJobDocumentsEmail;\r\n this.OpenEmailDialogue();\r\n }\r\n\r\n public PrepareEmail(): void {\r\n this.includeJobDocuments = false;\r\n this.sendMethod = this.SendInvoiceEmail;\r\n this.OpenEmailDialogue();\r\n }\r\n\r\n public SendEmail(): void {\r\n this.sendMethod(this.emailData).subscribe({\r\n next: () => {\r\n this.successMessage = this.translate.instant(\"invoice-detail.successfully.sent\");\r\n },\r\n error: () => {\r\n this.showErrorSendMessage = true;\r\n this.errorMessage = this.translate.instant(\"invoice-detail.send.unsuccessful\");\r\n },\r\n complete: () => {\r\n this.showEmailDialogue = false;\r\n this.GetMetadata();\r\n }\r\n });\r\n }\r\n\r\n public CloseEmailDialogue(): void {\r\n this.showEmailDialogue = false;\r\n }\r\n\r\n private OpenEmailDialogue(): void {\r\n this.emailService.GetInvoiceEmailData(this.invoiceId, this.templateId).subscribe({\r\n next: (invoiceEmail: Email) => {\r\n this.emailData = invoiceEmail;\r\n const translatedInvoice = this.translate.instant(\"invoice-detail\");\r\n if (this.includeJobDocuments && invoiceEmail.Attachments && invoiceEmail.Attachments.length > 0) {\r\n this.emailData.Attachments.unshift(`${translatedInvoice} ${this.invoice.NoteNo}`);\r\n } else {\r\n this.emailData.Attachments = [`${translatedInvoice} ${this.invoice.NoteNo}`];\r\n }\r\n\r\n if (!this.includeJobDocuments) {\r\n this.emailData.JobSheetIds = null;\r\n }\r\n\r\n this.showErrorSendMessage = false;\r\n this.showEmailDialogue = true;\r\n },\r\n error: () => {\r\n this.errorMessage = this.translate.instant(\"invoice-detail.could.not.load.email.data\");\r\n },\r\n complete: () => {\r\n }\r\n });\r\n }\r\n\r\n private SendInvoiceEmail(emailData: Email): Observable {\r\n return this.emailService.SendInvoiceEmail(emailData);\r\n }\r\n\r\n private SendInvoiceWithJobDocumentsEmail(emailData: Email): Observable {\r\n return this.emailService.SendInvoiceWithJobDocumentsEmail(emailData);\r\n }\r\n\r\n private HandlePaidUnpaidResponse(response: IProteanResponse): void {\r\n if (response.IsSuccess) {\r\n this.invoice.isMarkedPaid = !this.invoice.isMarkedPaid;\r\n this.GetMetadata();\r\n } else {\r\n this.errorMessage = this.translate.instant(\"invoice-detail.paid-unpaid.status.could.not.be.changed\");\r\n }\r\n }\r\n\r\n private GetMetadata(): void {\r\n this.invoiceDataService.GetInvoiceMetadata(this.invoiceId)\r\n .subscribe((metadata: InvoiceMetadata) => {\r\n this.invoiceMetadata = metadata;\r\n });\r\n }\r\n\r\n private GetDocuments(): void {\r\n this.invoiceDataService.GetInvoiceDocuments(this.invoiceId)\r\n .subscribe((documents: InvoiceDocument[]) => {\r\n this.invoiceDocuments = documents;\r\n });\r\n }\r\n}\r\n","export enum BatchInvoiceStatus {\r\n Processing = 1,\r\n Ready = 2,\r\n Sent = 3\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport ArrayStore from \"devextreme/data/array_store\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable, Subject } from \"rxjs\";\r\nimport { distinctUntilChanged, map } from \"rxjs/operators\";\r\nimport { APP_CONFIG, IAppConfig, IProteanResponse } from \"servicesight-shared\";\r\nimport { QueuedEmailType } from \"src/app/shared/enums/queued-email-type.enum\";\r\nimport { Email } from \"src/app/shared/models/email.model\";\r\nimport { AuthService } from \"src/app/shared/services/auth/auth.service\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\nimport { QuoteServiceContractModel } from \"../../quotes/models/quote-service-contract.model\";\r\nimport { CustomerCurrencyModel } from \"../models/customer-currency.model\";\r\nimport { ServiceContractInvoice } from \"../models/service-contract-invoice.model\";\r\nimport { ServiceContractModel } from \"../models/service-contract.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class ServiceContractService {\r\n public contractCustomerChanged$ = new Subject();\r\n public contractInvCycleChanged = new Subject();\r\n\r\n public get contractCustomerChanged(): Observable {\r\n return this.contractCustomerChanged$.pipe(distinctUntilChanged());\r\n }\r\n\r\n public ContractCustomerChanged(customerId: number) {\r\n return this.contractCustomerChanged$.next(customerId);\r\n }\r\n\r\n public ContractInvCycleChanged(invCycleId: string) {\r\n return this.contractInvCycleChanged.next(invCycleId);\r\n }\r\n\r\n constructor(\r\n @Inject(APP_CONFIG) private config: IAppConfig,\r\n private http: HttpClient,\r\n private odataService: ODataService,\r\n private authService: AuthService) {\r\n }\r\n\r\n private get contractsUrl() {\r\n return this.config.apiLocations.ServiceContracts + \"Contract\";\r\n }\r\n\r\n public Get(id: number): Observable {\r\n return this.http.get(`${this.contractsUrl}/${id}`);\r\n }\r\n\r\n public CancelContract(model: ServiceContractModel): Observable {\r\n return this.http.put(this.contractsUrl + \"/CancelContract\", model);\r\n }\r\n\r\n public StartContract(model: ServiceContractModel): Observable {\r\n return this.http.put(this.contractsUrl + \"/StartContract\", model);\r\n }\r\n\r\n public TerminateContract(model: ServiceContractModel): Observable {\r\n return this.http.put(this.contractsUrl + \"/TerminateContract\", model);\r\n }\r\n\r\n public GetNoteIdsForContract(contractId: number): Observable> {\r\n return this.http.get>(`${this.contractsUrl}/${contractId}/GetNoteIds/`);\r\n }\r\n\r\n /**\r\n * Returns the OData store for Site OData\r\n */\r\n public GetSiteDataStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: this.config.apiLocations.ServiceSightOData + \"SiteOD\",\r\n key: \"SiteId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n /**\r\n * Returns the OData source for Site OData\r\n */\r\n public GetSiteDataSource(customerId?: number): DataSource {\r\n const url = `${this.config.apiLocations.ServiceSightOData}SiteOD`;\r\n\r\n const dataSource = this.odataService.GetDataSource({\r\n url,\r\n key: \"SiteId\",\r\n keyType: \"Int32\",\r\n fieldTypes: {\r\n InvoiceId: \"Int32\",\r\n }\r\n });\r\n\r\n if (customerId) {\r\n dataSource.filter([\"InvoiceId\", \"=\", customerId]);\r\n }\r\n\r\n return dataSource;\r\n }\r\n\r\n public GetSiteArrayStore(): Promise {\r\n return this.GetSiteDataStore().load().then(sites => new ArrayStore({ key: \"SiteId\", data: sites }));\r\n }\r\n\r\n public GetContractTypesDataSource(keyType: string = \"Single\"): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: this.config.apiLocations.ServiceContractsOData + \"ContractTypeOData\",\r\n key: \"ContractTypeId\",\r\n keyType,\r\n paging: false\r\n });\r\n }\r\n\r\n public GetContractTypesDataStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: this.config.apiLocations.ServiceContractsOData + \"ContractTypeOData\",\r\n key: \"ContractTypeId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public SaveQuote(model: QuoteServiceContractModel): Observable {\r\n return this.http.post(`${this.contractsUrl}/CreateQuote`, model);\r\n }\r\n\r\n public Save(model: ServiceContractModel): Observable {\r\n if (model.ContractId) {\r\n return this.http.put(this.contractsUrl, model);\r\n } else {\r\n return this.http.post(this.contractsUrl, model);\r\n }\r\n }\r\n\r\n public GetLocationsDataStore(customerId: number): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.config.apiLocations.ServiceSightOData}LocationOD`,\r\n key: [\"LocationId\", \"CustomerID\"],\r\n keyType: {\r\n LocationId: \"Int32\",\r\n CustomerID: \"Int32\"\r\n },\r\n queryStringParams: {\r\n customerId\r\n }\r\n });\r\n }\r\n\r\n public GetCurrency(customerId: number): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Customer/GetCustomerCurrencyModel?customerId=${customerId}`;\r\n return this.http.get(url);\r\n }\r\n\r\n public GetContractEmailData(contractId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceContracts}Email/${contractId}`);\r\n }\r\n\r\n public SendContractEmail(emailData: Email): Observable {\r\n emailData.EmailType = QueuedEmailType.ServiceContract;\r\n emailData.SenderEmployeeId = this.authService.EmployeeId;\r\n return this.http.post(`${this.config.apiLocations.ServiceSight}Email/QueueEmail`, emailData);\r\n }\r\n\r\n public GetStatus(id: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceContracts}Contract/${id}`).pipe(map((res: any) => res.Status));\r\n }\r\n\r\n public InvoiceContract(model: ServiceContractInvoice): Observable {\r\n return this.http.post(`${this.config.apiLocations.ServiceSight}ServiceContract/InvoiceImmediate`, model);\r\n }\r\n\r\n public OkToInvoiceContract(contractId: number): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}ServiceContract/CheckOrderNoRequired?contractId=${contractId}`;\r\n return this.http.get(url);\r\n }\r\n}\r\n","export enum ContractInvoiceCycleEnum {\r\n Immediate = 1,\r\n Daily = 2,\r\n Weekly = 3,\r\n Monthly = 5,\r\n Quarterly = 6,\r\n SemiAnnually = 7,\r\n Annually = 8,\r\n BiMonthly = 9,\r\n FourWeekly = 10,\r\n TwoYearly = 11,\r\n ThreeYearly = 12,\r\n FourYearly = 13,\r\n FiveYearly = 14,\r\n FourMonthly = 15\r\n}\r\n","export enum InvoiceGrouping {\r\n Individual = 1,\r\n Site = 2,\r\n Customer = 4,\r\n OrderRef = 6\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\n\r\n@Pipe({\r\n name: \"invoiceGrouping\"\r\n})\r\nexport class InvoiceGroupingPipe implements PipeTransform {\r\n\r\n private readonly enum = {\r\n 1 : \"batch-invoice.invoice-grouping.none\",\r\n 2 : \"batch-invoice.invoice-grouping.site\",\r\n 4 : \"batch-invoice.invoice-grouping.customer\",\r\n 6 : \"batch-invoice.invoice-grouping.order-ref\"\r\n };\r\n\r\n transform(value: any): string {\r\n return this.enum[value];\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { EdmLiteral } from \"devextreme/data/odata/utils\";\r\nimport * as moment from \"moment\";\r\nimport { Observable } from \"rxjs\";\r\nimport {\r\n CurrencyPipe,\r\n CustomerService,\r\n IAppConfig, APP_CONFIG,\r\n ServiceContractStatus,\r\n ServiceContractStatusPipe,\r\n UICustomisation,\r\n UserReferenceService,\r\n UserRefType\r\n} from \"servicesight-shared\";\r\nimport { ServiceContractService } from \"src/app/service-contracts/services/service-contract.service\";\r\nimport { ContractInvoiceCycleEnum } from \"src/app/shared/enums/contract-invoice-cycle.enum\";\r\nimport { ISelectOption } from \"src/app/shared/models/iselect-option.model\";\r\nimport { ODataService } from \"../../shared/services/odata/odata.service\";\r\nimport { InvoiceGrouping } from \"../enums/invoice-grouping.enum\";\r\nimport { FilterLookup } from \"../models/filter-lookup.model\";\r\nimport { InvoiceGroupingPipe } from \"../pipes/invoice-grouping.pipe\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class BatchInvoiceService {\r\n private readonly serviceSightODataBaseUrl: string;\r\n private readonly baseCurrencyCode: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencyCode\"));\r\n\r\n public invoiceUpToDate: Date;\r\n\r\n constructor(\r\n private odataService: ODataService,\r\n private translateService: TranslateService,\r\n private currencyPipe: CurrencyPipe,\r\n private customerService: CustomerService,\r\n private serviceContractStatusPipe: ServiceContractStatusPipe,\r\n private invoiceGroupinPipe: InvoiceGroupingPipe,\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) protected config: IAppConfig,\r\n private contractService: ServiceContractService,\r\n private userRefService: UserReferenceService) {\r\n this.serviceSightODataBaseUrl = config.apiLocations.ServiceSightOData;\r\n }\r\n\r\n public GetBatchInvoiceDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.serviceSightODataBaseUrl}BatchInvoiceOD`,\r\n key: \"BatchInvoiceId\",\r\n keyType: \"Int32\",\r\n paging: true,\r\n pageSize: 50\r\n });\r\n }\r\n\r\n public GetJobFields(jobTypes: ISelectOption[]): Array {\r\n return [{\r\n caption: this.translateService.instant(\"job.detail.job.type\"),\r\n dataField: \"JobTypeId\",\r\n dataType: \"number\",\r\n lookup: {\r\n dataSource: {\r\n key: \"Id\",\r\n byKey: (key) => {\r\n return Promise.resolve(jobTypes.find(t => t.Id === key));\r\n },\r\n load: () => {\r\n return Promise.resolve(jobTypes);\r\n }\r\n },\r\n displayExpr: \"Name\",\r\n valueExpr: \"Id\"\r\n }\r\n }, {\r\n caption: this.translateService.instant(\"quotes.heading.customer\"),\r\n dataField: \"CustomerID\",\r\n dataType: \"number\",\r\n lookup: {\r\n dataSource: {\r\n store: this.customerService.GetCustomerDataStore(),\r\n filter: [\"InvoiceId\", \"=\", new EdmLiteral(\"CustomerId\")]\r\n },\r\n displayExpr: \"Customer\",\r\n valueExpr: \"CustomerId\"\r\n }\r\n }, {\r\n caption: this.translateService.instant(\"quotes.heading.site\"),\r\n dataField: \"SiteID\",\r\n dataType: \"number\",\r\n lookup: {\r\n dataSource: this.customerService.GetCustomerDataStore(),\r\n displayExpr: \"Customer\",\r\n valueExpr: \"CustomerId\"\r\n }\r\n }, {\r\n caption: this.translateService.instant(\"batch-invoice.gridcolumn.consolidation-type\"),\r\n dataField: \"InvoiceGroupingId\",\r\n dataType: \"number\",\r\n lookup: this.InvoiceGroupingLookup()\r\n }, {\r\n caption: this.translateService.instant(\"job.invoicing.order.no\"),\r\n dataField: \"OrderNo\",\r\n dataType: \"string\"\r\n }, {\r\n caption: this.translateService.instant(\"label.jobs.grid.job.no\"),\r\n dataField: \"JobID\",\r\n dataType: \"number\"\r\n }, {\r\n caption: this.translateService.instant(\"label.jobs.grid.completeddate\"),\r\n dataField: \"CompletedDate\",\r\n dataType: \"date\",\r\n filterOperations: [\"<\", \">\", \"between\"]\r\n }, {\r\n caption: this.userRefService.getLabel(UICustomisation.JOB_REF1),\r\n dataField: \"UserRef1Job\",\r\n dataType: \"number\",\r\n lookup: {\r\n dataSource: this.userRefService.getListDataStore(UserRefType.JOB_1),\r\n displayExpr: \"UserReferenceListItem\",\r\n valueExpr: \"UserReferenceListItem\"\r\n }\r\n }, {\r\n caption: this.userRefService.getLabel(UICustomisation.JOB_REF2),\r\n dataField: \"UserRef2Job\",\r\n dataType: \"string\"\r\n }\r\n ];\r\n }\r\n\r\n public GetJobColumns(): Array {\r\n return [{\r\n caption: this.translateService.instant(\"label.jobs.grid.job.no\"),\r\n width: 100,\r\n alignment: \"left\",\r\n dataField: \"JobID\",\r\n dataType: \"number\",\r\n sortOrder: \"desc\"\r\n }, {\r\n dataField: \"CustomerID\",\r\n dataType: \"number\",\r\n visible: false\r\n }, {\r\n caption: this.translateService.instant(\"quotes.heading.customer\"),\r\n alignment: \"left\",\r\n dataField: \"CustomerName\",\r\n dataType: \"string\"\r\n }, {\r\n alignment: \"left\",\r\n dataField: \"SiteID\",\r\n dataType: \"number\",\r\n visible: false\r\n }, {\r\n caption: this.translateService.instant(\"batch-invoice.gridcolumn.consolidation-type\"),\r\n dataField: \"InvoiceGroupingId\",\r\n alignment: \"left\",\r\n dataType: \"number\",\r\n lookup: this.InvoiceGroupingLookup(),\r\n calculateSortValue: (row: any) => {\r\n return this.translateService.instant(this.invoiceGroupinPipe.transform(row.InvoiceGroupingId));\r\n }\r\n }, {\r\n caption: this.translateService.instant(\"job.detail.job.type\"),\r\n alignment: \"left\",\r\n dataField: \"JobType\",\r\n dataType: \"string\"\r\n }, {\r\n caption: this.translateService.instant(\"job.invoicing.order.no\"),\r\n alignment: \"left\",\r\n dataField: \"OrderNo\",\r\n dataType: \"string\",\r\n width: 150\r\n }, {\r\n caption: this.translateService.instant(\"batch-invoice.job.net\"),\r\n alignment: \"left\",\r\n dataField: \"JobTotal\",\r\n dataType: \"number\",\r\n width: 250,\r\n customizeText: (data) => {\r\n return this.currencyPipe.transform(data.value, this.baseCurrencyCode);\r\n }\r\n }, {\r\n dataField: \"CompletedDate\",\r\n alignment: \"left\",\r\n dataType: \"datetime\",\r\n visible: false,\r\n calculateFilterExpression(filterValue, selectedFilterOperation) {\r\n if (Array.isArray(filterValue)) {\r\n filterValue[0] = moment(filterValue[0]).startOf(\"day\").toDate();\r\n filterValue[1] = moment(filterValue[1]).endOf(\"day\").toDate();\r\n } else {\r\n filterValue = moment(filterValue).endOf(\"day\").toDate();\r\n }\r\n // Invokes the default filtering behavior\r\n return this.defaultCalculateFilterExpression.apply(this, [filterValue, selectedFilterOperation]);\r\n }\r\n }, {\r\n dataField: \"JobTypeId\",\r\n alignment: \"left\",\r\n dataType: \"number\",\r\n visible: false\r\n }, {\r\n dataField: \"UserRef1Job\",\r\n alignment: \"left\",\r\n dataType: \"string\",\r\n visible: false\r\n }, {\r\n dataField: \"UserRef2Job\",\r\n alignment: \"left\",\r\n dataType: \"string\",\r\n visible: false\r\n }];\r\n }\r\n\r\n public GetContractFields(): Array {\r\n return [{\r\n caption: this.translateService.instant(\"service.contract.invoicing.invoice.cycle\"),\r\n dataField: \"InvoiceCycle\",\r\n dataType: \"number\",\r\n lookup: {\r\n dataSource: [{\r\n Name: \"Daily\",\r\n Value: ContractInvoiceCycleEnum.Daily\r\n }, {\r\n Name: \"Weekly\",\r\n Value: ContractInvoiceCycleEnum.Weekly\r\n }, {\r\n Name: \"Monthly\",\r\n Value: ContractInvoiceCycleEnum.Monthly\r\n }, {\r\n Name: \"Quarterly\",\r\n Value: ContractInvoiceCycleEnum.Quarterly\r\n }, {\r\n Name: \"Yearly\",\r\n Value: ContractInvoiceCycleEnum.Annually\r\n }],\r\n displayExpr: \"Name\",\r\n valueExpr: \"Value\"\r\n }\r\n }, {\r\n caption: this.translateService.instant(\"batch-invoice.contract.type\"),\r\n dataField: \"TypeId\",\r\n dataType: \"number\",\r\n lookup: {\r\n dataSource: this.contractService.GetContractTypesDataStore(),\r\n displayExpr: \"Name\",\r\n valueExpr: \"ContractTypeId\"\r\n }\r\n }, {\r\n caption: this.translateService.instant(\"batch-invoice.contract.status\"),\r\n dataField: \"Status\",\r\n dataType: \"number\",\r\n lookup: this.contractStatusLookup()\r\n }, {\r\n caption: this.translateService.instant(\"batch-invoice.contract.customer\"),\r\n dataField: \"CustomerName\",\r\n dataType: \"string\"\r\n }, {\r\n caption: this.translateService.instant(\"batch-invoice.gridcolumn.consolidation-type\"),\r\n dataField: \"InvoiceGroupingId\",\r\n alignment: \"left\",\r\n dataType: \"number\",\r\n lookup: this.InvoiceGroupingLookup()\r\n }, {\r\n caption: this.translateService.instant(\"service.contract.list.reference\"),\r\n dataField: \"Reference\",\r\n dataType: \"string\"\r\n }, {\r\n caption: this.translateService.instant(\"batch-invoice.gridcolumn.contract-no\"),\r\n dataField: \"MaintContractId\",\r\n dataType: \"number\"\r\n }, {\r\n caption: this.userRefService.getLabel(UICustomisation.MAINT_CONTRACT_REF1),\r\n dataField: \"UserRef1Id\",\r\n dataType: \"number\",\r\n lookup: {\r\n dataSource: this.userRefService.getListDataStore(UserRefType.MAINTENANCE_CONTRACT_1),\r\n displayExpr: \"UserReferenceListItem\",\r\n valueExpr: \"UserReferenceListItemID\"\r\n }\r\n }, {\r\n caption: this.userRefService.getLabel(UICustomisation.MAINT_CONTRACT_REF2),\r\n dataField: \"UserRef2\",\r\n dataType: \"string\"\r\n }];\r\n }\r\n\r\n public GetContractColumns(): Array {\r\n return [{\r\n caption: this.translateService.instant(\"batch-invoice.gridcolumn.contract-no\"),\r\n width: 100,\r\n alignment: \"left\",\r\n dataField: \"MaintContractId\",\r\n dataType: \"number\",\r\n sortOrder: \"desc\"\r\n }, {\r\n caption: this.translateService.instant(\"service.contract.list.type\"),\r\n alignment: \"left\",\r\n dataField: \"Type\",\r\n dataType: \"string\"\r\n }, {\r\n caption: this.translateService.instant(\"service.contract.list.customer\"),\r\n alignment: \"left\",\r\n dataField: \"CustomerName\",\r\n dataType: \"string\"\r\n }, {\r\n caption: this.translateService.instant(\"batch-invoice.gridcolumn.consolidation-type\"),\r\n dataField: \"InvoiceGroupingId\",\r\n alignment: \"left\",\r\n dataType: \"number\",\r\n lookup: this.InvoiceGroupingLookup(),\r\n calculateSortValue: (row: any) => {\r\n return this.translateService.instant(this.invoiceGroupinPipe.transform(row.InvoiceGroupingId));\r\n }\r\n }, {\r\n caption: this.translateService.instant(\"batch-invoice.gridcolumn.order-no\"),\r\n alignment: \"left\",\r\n dataField: \"Reference\",\r\n dataType: \"string\",\r\n width: 150\r\n }, {\r\n caption: this.translateService.instant(\"batch-invoice.gridcolumn.from-date\"),\r\n alignment: \"left\",\r\n dataField: \"InvoiceFromDate\",\r\n dataType: \"date\",\r\n width: 150\r\n }, {\r\n caption: this.translateService.instant(\"batch-invoice.gridcolumn.to-date\"),\r\n alignment: \"left\",\r\n dataType: \"date\",\r\n width: 150,\r\n calculateCellValue: (row: any) => {\r\n const contractEndInformation = this.CalculateContractEndInformation(row);\r\n row.noOfCycles = contractEndInformation.noOfCycles;\r\n return contractEndInformation.endDate;\r\n }\r\n }, {\r\n caption: this.translateService.instant(\"service.contract.list.status\"),\r\n alignment: \"left\",\r\n dataField: \"Status\",\r\n dataType: \"number\",\r\n width: 150,\r\n lookup: this.contractStatusLookup()\r\n }, {\r\n caption: this.translateService.instant(\"service.contract.list.value\"),\r\n alignment: \"left\",\r\n dataField: \"NetTotal\", //This is so a total can be applied to the column\r\n dataType: \"number\",\r\n width: 250,\r\n calculateCellValue: (row: any) => {\r\n return row.Total * (row.noOfCycles ?? 0);\r\n },\r\n customizeText: (data) => {\r\n return this.currencyPipe.transform(data.value, this.baseCurrencyCode);\r\n },\r\n allowSorting: true,\r\n calculateSortValue: (row: any) => {\r\n const contractEndInformation = this.CalculateContractEndInformation(row);\r\n return row.Total * contractEndInformation.noOfCycles;\r\n }\r\n }, {\r\n caption: this.translateService.instant(\"service.contract.invoicing.invoice.cycle\"),\r\n dataField: \"InvoiceCycle\",\r\n alignment: \"left\",\r\n dataType: \"number\",\r\n lookup: {\r\n dataSource: this.EnumToArray(ContractInvoiceCycleEnum),\r\n displayExpr: \"Name\",\r\n valueExpr: \"Value\"\r\n },\r\n visible: false\r\n }, {\r\n caption: this.translateService.instant(\"batch-invoice.contract.type\"),\r\n alignment: \"left\",\r\n dataField: \"TypeId\",\r\n dataType: \"number\",\r\n visible: false\r\n }, {\r\n dataField: \"UserRef1Id\",\r\n alignment: \"left\",\r\n dataType: \"number\",\r\n visible: false,\r\n lookup: {\r\n dataSource: this.userRefService.getListDataStore(UserRefType.MAINTENANCE_CONTRACT_1),\r\n displayExpr: \"UserReferenceListItem\",\r\n valueExpr: \"UserReferenceListItemID\"\r\n }\r\n }, {\r\n dataField: \"UserRef2\",\r\n alignment: \"left\",\r\n dataType: \"string\",\r\n visible: false\r\n }];\r\n }\r\n\r\n public GetDespatchFields(): Array {\r\n return [{\r\n caption: this.translateService.instant(\"despatch-notes.list.customer\"),\r\n dataField: \"CustomerId\",\r\n dataType: \"number\",\r\n lookup: {\r\n dataSource: {\r\n store: this.customerService.GetCustomerDataStore(),\r\n filter: [\"InvoiceId\", \"=\", new EdmLiteral(\"CustomerId\")]\r\n },\r\n displayExpr: \"Customer\",\r\n valueExpr: \"CustomerId\"\r\n }\r\n }, {\r\n caption: this.translateService.instant(\"despatch-notes.list.deliver-to\"),\r\n dataField: \"DeliveryId\",\r\n dataType: \"number\",\r\n lookup: {\r\n dataSource: this.customerService.GetCustomerDataStore(),\r\n displayExpr: \"Customer\",\r\n valueExpr: \"CustomerId\"\r\n }\r\n }, {\r\n caption: this.translateService.instant(\"batch-invoice.gridcolumn.consolidation-type\"),\r\n dataField: \"InvoiceGroupingId\",\r\n dataType: \"number\",\r\n lookup: this.InvoiceGroupingLookup(),\r\n calculateSortValue: (row: any) => {\r\n return this.translateService.instant(this.invoiceGroupinPipe.transform(row.InvoiceGroupingId));\r\n }\r\n }, {\r\n caption: this.translateService.instant(\"job.invoicing.order.no\"),\r\n dataField: \"CustomerRef\",\r\n dataType: \"string\"\r\n }, {\r\n caption: this.translateService.instant(\"despatch-notes.list.despatchid\"),\r\n dataField: \"DespatchNumber\",\r\n dataType: \"string\"\r\n }];\r\n }\r\n\r\n public GetDespatchColumns(): Array {\r\n return [{\r\n caption: this.translateService.instant(\"despatch-notes.list.despatchid\"),\r\n width: 100,\r\n alignment: \"left\",\r\n dataField: \"DespatchNumber\",\r\n dataType: \"string\",\r\n sortOrder: \"desc\"\r\n }, {\r\n caption: this.translateService.instant(\"despatch-notes.list.customer\"),\r\n alignment: \"left\",\r\n dataField: \"CustomerName\",\r\n dataType: \"string\"\r\n }, {\r\n dataField: \"CustomerID\",\r\n dataType: \"number\",\r\n visible: false\r\n }, {\r\n caption: this.translateService.instant(\"despatch-notes.list.deliver-to\"),\r\n alignment: \"left\",\r\n dataField: \"DeliveryId\",\r\n dataType: \"number\",\r\n lookup: {\r\n dataSource: this.customerService.GetCustomerDataStore(),\r\n displayExpr: \"Customer\",\r\n valueExpr: \"CustomerId\"\r\n }\r\n }, {\r\n caption: this.translateService.instant(\"batch-invoice.gridcolumn.consolidation-type\"),\r\n dataField: \"InvoiceGroupingId\",\r\n alignment: \"left\",\r\n dataType: \"number\",\r\n lookup: this.InvoiceGroupingLookup()\r\n }, {\r\n caption: this.translateService.instant(\"job.invoicing.order.no\"),\r\n alignment: \"left\",\r\n dataField: \"CustomerRef\",\r\n dataType: \"string\",\r\n width: 150\r\n }, {\r\n caption: this.translateService.instant(\"service.contract.list.value\"),\r\n alignment: \"left\",\r\n dataField: \"Total\",\r\n dataType: \"string\",\r\n width: 250,\r\n customizeText: (data) => {\r\n return this.currencyPipe.transform(data.value, this.baseCurrencyCode);\r\n }\r\n }];\r\n }\r\n\r\n public CalculateContractEndInformation(row: any): { endDate: Date; noOfCycles: number } {\r\n let endDate = new Date(row.InvoiceFromDate);\r\n let noOfCycles = 0;\r\n if (this.invoiceUpToDate && row.InvoiceFromDate && endDate < this.invoiceUpToDate) {\r\n const cycleUnit = this.invoiceCycleToUnit(row.InvoiceCycle);\r\n const upToDate = moment(this.invoiceUpToDate).add(1, \"day\").toDate(); // Include the next day to include upto cycles upto the date\r\n while (endDate <= upToDate) {\r\n endDate = moment(endDate).add(1, cycleUnit).toDate();\r\n noOfCycles++;\r\n }\r\n noOfCycles--;\r\n endDate = moment(endDate).add(-1, cycleUnit).add(-1, \"day\").toDate(); // remove one day to go the end of the cycle\r\n } else {\r\n endDate = null;\r\n }\r\n return {\r\n endDate,\r\n noOfCycles\r\n };\r\n }\r\n\r\n private contractStatusLookup(): object {\r\n return {\r\n dataSource: [{\r\n Name: this.translateService.instant(this.serviceContractStatusPipe.transform(ServiceContractStatus.Active)),\r\n Value: ServiceContractStatus.Active\r\n }, {\r\n Name: this.translateService.instant(this.serviceContractStatusPipe.transform(ServiceContractStatus.Terminated)),\r\n Value: ServiceContractStatus.Terminated\r\n }],\r\n displayExpr: \"Name\",\r\n valueExpr: \"Value\"\r\n };\r\n }\r\n\r\n private InvoiceGroupingLookup(): object {\r\n return {\r\n dataSource: [{\r\n Name: this.translateService.instant(\"batch-invoice.invoice-grouping.customer\"),\r\n Value: InvoiceGrouping.Customer\r\n }, {\r\n Name: this.translateService.instant(\"batch-invoice.invoice-grouping.site\"),\r\n Value: InvoiceGrouping.Site\r\n }, {\r\n Name: this.translateService.instant(\"batch-invoice.invoice-grouping.none\"),\r\n Value: InvoiceGrouping.Individual\r\n }, {\r\n Name: this.translateService.instant(\"batch-invoice.invoice-grouping.order-ref\"),\r\n Value: InvoiceGrouping.OrderRef\r\n }],\r\n displayExpr: \"Name\",\r\n valueExpr: \"Value\"\r\n };\r\n }\r\n\r\n private EnumToArray(obj: object, transform: (str) => string = (str) => str): Array {\r\n const arr = [];\r\n for (const key in obj) {\r\n if (isNaN(Number(key))) {\r\n arr.push({ Name: transform(key), Value: obj[key] });\r\n }\r\n }\r\n return arr;\r\n }\r\n\r\n public invoiceCycleToUnit(cycle: ContractInvoiceCycleEnum): moment.unitOfTime.DurationConstructor {\r\n let unit;\r\n switch (cycle) {\r\n case ContractInvoiceCycleEnum.Daily:\r\n unit = \"day\";\r\n break;\r\n case ContractInvoiceCycleEnum.Weekly:\r\n unit = \"week\";\r\n break;\r\n case ContractInvoiceCycleEnum.Monthly:\r\n unit = \"month\";\r\n break;\r\n case ContractInvoiceCycleEnum.Quarterly:\r\n unit = \"quarter\";\r\n break;\r\n case ContractInvoiceCycleEnum.Annually:\r\n unit = \"year\";\r\n break;\r\n }\r\n return unit;\r\n }\r\n\r\n public RaiseInvoices(model: object): Observable {\r\n return this.http.post(`${this.config.apiLocations.ServiceSight}BatchInvoicing/RunBatchInvoicing/`, model);\r\n }\r\n\r\n public DownloadDocument(noteRunId: number): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}BatchInvoicing/DownloadAsync?noteRunId=${noteRunId}`;\r\n return this.http.get(url, { observe: \"response\", responseType: \"blob\" as \"json\" });\r\n }\r\n\r\n public EmailInvoices(noteRunId: number): Observable {\r\n return this.http.post(`${this.config.apiLocations.ServiceSight}BatchInvoicing/EmailDocuments?noteRunId=${noteRunId}`, null);\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\n\r\n@Pipe({\r\n name: \"batchInvoiceStatus\"\r\n})\r\nexport class BatchInvoiceStatusPipe implements PipeTransform {\r\n\r\n private readonly system = {\r\n [100]: \"batch-invoice.status.processing\",\r\n [700]: \"batch-invoice.status.ready\",\r\n [800]: \"batch-invoice.status.sent\"\r\n };\r\n\r\n transform(value: any, printDate: any): string {\r\n let out = this.system[value];\r\n if (value === 800) {\r\n out = printDate ? \"batch-invoice.status.sent\" : \"batch-invoice.status.ready\";\r\n }\r\n return out;\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'batch-invoices.list.title' | translate }}

\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n\r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n
\r\n {{ data.value | customDate: 'shortDate' }}\r\n
\r\n\r\n
\r\n {{ data.value | customCurrency: data.data.CurrencyCode}}\r\n
\r\n\r\n
\r\n \r\n \r\n \r\n
\r\n\r\n
\r\n {{ data.value | documentType | translate }}\r\n
\r\n\r\n
\r\n {{ data.value | batchInvoiceStatus: data.data.PrintDate | translate }}\r\n
\r\n\r\n
\r\n {{data.data.NoteCount}} / {{ data.value }}\r\n
\r\n\r\n
\r\n","import { Component, Inject, OnInit, ViewChild } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { DocumentTypeEnum, GridKind, GridService, IRouterLinkService } from \"servicesight-shared\";\r\nimport { BatchInvoiceStatus } from \"../enums/batch-invoice-status.enum\";\r\nimport { BatchInvoiceService } from \"../services/batch-invoices.service\";\r\n\r\n@Component({\r\n selector: \"app-batch-invoice-list\",\r\n templateUrl: \"./batch-invoice-list.component.html\",\r\n styleUrls: [\r\n \"./batch-invoice-list.component.scss\",\r\n \"../../../../projects/servicesight-shared/src/lib/styles/global.scss\",\r\n \"../../../../projects/servicesight-shared/src/lib/styles/backgrounds.scss\",\r\n \"../../../../projects/servicesight-shared/src/lib/styles/servicesight-shared.scss\"\r\n ]\r\n})\r\nexport class BatchInvoiceListComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n //The default value for combo\r\n public selectedItem: number = 0;\r\n public filterValue: any;\r\n public invoiceDataSource: DataSource;\r\n public SearchText: string = \"\";\r\n public baseLink: string;\r\n\r\n public filters: any = {\r\n 1: [\"documentTypeId\", \"=\", 4],\r\n 2: [\"documentTypeId\", \"=\", 10],\r\n 3: [\"documentTypeId\", \"=\", 3]\r\n };\r\n\r\n public Download(noteRunId: number): void {\r\n this.batchInvoiceService.DownloadDocument(noteRunId).subscribe(response => {\r\n const downloadLink = document.createElement(\"a\");\r\n downloadLink.href = URL.createObjectURL(new Blob([response.body], { type: response.type }));\r\n downloadLink.setAttribute(\"download\", this.translateService.instant(\"batch-invoice.download-filename\", { noteRun: noteRunId }));\r\n document.body.appendChild(downloadLink);\r\n downloadLink.click();\r\n downloadLink.remove();\r\n });\r\n }\r\n\r\n public Email(noteRunId: number): void {\r\n this.batchInvoiceService.EmailInvoices(noteRunId).subscribe();\r\n }\r\n\r\n constructor(\r\n private batchInvoiceService: BatchInvoiceService,\r\n private gridService: GridService,\r\n @Inject(\"RouterLinkService\") private routerLink: IRouterLinkService,\r\n private translateService: TranslateService) {\r\n this.routerLink.baseLink.subscribe(link => this.baseLink = link);\r\n this.calculateStatusFilter = this.calculateStatusFilter.bind(this);\r\n this.calculateDocumentTypeFilter = this.calculateDocumentTypeFilter.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.gridService.GetLayout(GridKind.InvoiceBatch).subscribe(value => {\r\n if (value) {\r\n this.dataGrid.instance.state(value);\r\n }\r\n this.GetDataSources();\r\n }, () => this.GetDataSources());\r\n }\r\n\r\n private GetDataSources() {\r\n this.invoiceDataSource = this.batchInvoiceService.GetBatchInvoiceDataSource();\r\n this.filterValue = this.filters[this.selectedItem];\r\n }\r\n\r\n searchTextChanged() {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n filterChanged($event) {\r\n const filterValue = $event.currentTarget.value;\r\n this.dataGrid.instance.clearFilter();\r\n if (filterValue !== \"0\") {\r\n this.dataGrid.instance.filter(this.filters[filterValue]);\r\n }\r\n }\r\n\r\n saveLayout() {\r\n const state = this.dataGrid.instance.state();\r\n this.gridService.SaveLayout(state, GridKind.InvoiceBatch);\r\n }\r\n\r\n resetLayout() {\r\n this.gridService.ResetLayout(GridKind.InvoiceBatch);\r\n this.dataGrid.instance.state(null);\r\n }\r\n\r\n calculateStatusFilter(filterValue, selectedFilterOperation, filterType) {\r\n const column = this as any;\r\n const filters = [];\r\n\r\n if (filterType === \"search\") {\r\n filterValue = filterValue.toUpperCase();\r\n this.createStatusFilter(filterValue, BatchInvoiceStatus.Processing, filters);\r\n this.createStatusFilter(filterValue, BatchInvoiceStatus.Ready, filters);\r\n this.createStatusFilter(filterValue, BatchInvoiceStatus.Sent, filters);\r\n return filters.length === 0 ? null : filters;\r\n }\r\n return column.defaultCalculateFilterExpression(filterValue, selectedFilterOperation, filterType);\r\n }\r\n\r\n createStatusFilter(filterValue: string, batchInvoiceStatus: BatchInvoiceStatus, filters: any[]) {\r\n if (BatchInvoiceStatus[batchInvoiceStatus].toUpperCase().indexOf(filterValue) !== -1) {\r\n if (filters.length > 0) {\r\n filters.push(\"OR\");\r\n }\r\n filters.push([\"BatchInvoiceStatusId\", \"=\", Number(batchInvoiceStatus)]);\r\n }\r\n }\r\n\r\n calculateDocumentTypeFilter(filterValue, selectedFilterOperation, filterType) {\r\n const column = this as any;\r\n const filters = [];\r\n\r\n if (filterType === \"search\") {\r\n filterValue = filterValue.toUpperCase();\r\n this.createDocumentTypeFilter(filterValue, DocumentTypeEnum.Job, filters);\r\n this.createDocumentTypeFilter(filterValue, DocumentTypeEnum.ServiceContract, filters);\r\n this.createDocumentTypeFilter(filterValue, DocumentTypeEnum.DespatchNote, filters);\r\n return filters.length === 0 ? null : filters;\r\n }\r\n return column.defaultCalculateFilterExpression(filterValue, selectedFilterOperation, filterType);\r\n }\r\n\r\n createDocumentTypeFilter(filterValue: string, documentTypeEnum: DocumentTypeEnum, filters: any[]) {\r\n if (DocumentTypeEnum[documentTypeEnum].toUpperCase().indexOf(filterValue) !== -1) {\r\n if (filters.length > 0) {\r\n filters.push(\"OR\");\r\n }\r\n filters.push([\"DocumentTypeId\", \"=\", Number(documentTypeEnum)]);\r\n }\r\n }\r\n}\r\n\r\n","import { NgModule } from \"@angular/core\";\r\nimport { RouterModule, Routes } from \"@angular/router\";\r\nimport { InvoiceDetailComponent } from \"./invoice-detail/invoice-detail.component\";\r\nimport { BatchInvoiceListComponent } from \"./batch-invoice-list/batch-invoice-list.component\";\r\n\r\nconst routes: Routes = [\r\n { path: \"invoice/:id\", component: InvoiceDetailComponent },\r\n { path: \"invoice/:id/:templateId\", component: InvoiceDetailComponent },\r\n { path: \"batch-list\", component: BatchInvoiceListComponent },\r\n { path: \"\", redirectTo: \"list\", pathMatch: \"full\" },\r\n { path: \"**\", redirectTo: \"list\" }\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\n\r\nexport class InvoicesRoutingModule {\r\n public static readonly Routes: Routes = routes;\r\n}\r\n","export class JobCreateModel {\r\n public CustomerId: number;\r\n public SiteId: number;\r\n public ContactId?: number;\r\n public JobTypeId: number;\r\n public Reference: string;\r\n public ToDo: string;\r\n public EquipmentId?: number;\r\n public UserRef1JobID?: number;\r\n public UserRef2JobID?: string;\r\n public Due?: Date;\r\n public Notes: string;\r\n public SalesOpportunityID?: number;\r\n public WhatThreeWords: string;\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\n\r\n@Pipe({\r\n name: \"boolToString\"\r\n})\r\nexport class BoolToStringPipe implements PipeTransform {\r\n\r\n transform(value: any): any {\r\n return value === true ? \"pipe.YesNoFilter.Yes\" : \"pipe.YesNoFilter.No\";\r\n }\r\n}\r\n","{{'accordion.customerNotProvided' | translate}}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ 'accordion.creditControl.CreditHold' | translate }}{{creditData.IsLimited | boolToString | translate}}
{{ 'accordion.creditControl.CreditLimit' | translate }}{{ creditData.CreditLimit | currency: currencySymbol }}
{{ 'accordion.creditControl.CurrentBalance' | translate }}{{ creditData.CurrentBalance | currency: currencySymbol }}
","import { Component, OnInit, Input, OnChanges, SimpleChanges, Output, EventEmitter } from \"@angular/core\";\r\nimport { AccordionDataService } from \"../accordion-data.service\";\r\nimport { AccordionCustomerJobDetailsModel } from \"../models/customer-job-details-model\";\r\nimport { CreditControlModel } from \"../../../models/credit-control.model\";\r\n\r\n@Component({\r\n selector: \"app-credit-control-accordion-item\",\r\n templateUrl: \"./credit-control-accordion-item.component.html\",\r\n styleUrls: [\"./credit-control-accordion-item.component.scss\"]\r\n})\r\nexport class CreditControlAccordionItemComponent implements OnInit, OnChanges {\r\n\r\n @Input() customerId: number;\r\n @Input() siteId: number;\r\n @Output() creditHold = new EventEmitter();\r\n @Output() creditControl = new EventEmitter();\r\n\r\n public creditData: AccordionCustomerJobDetailsModel;\r\n public currencySymbol: string;\r\n\r\n constructor(private dataService: AccordionDataService) { }\r\n\r\n ngOnInit() {\r\n this.currencySymbol = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.customerId) {\r\n this.customerId = changes.customerId.currentValue;\r\n this.siteId = changes.customerId.currentValue;\r\n }\r\n\r\n if (changes.siteId) {\r\n this.siteId = changes.siteId.currentValue;\r\n }\r\n\r\n if (this.customerId && this.siteId) {\r\n this.dataService.getCustomerJobDetailsData(this.customerId, this.siteId).subscribe(x => {\r\n this.creditData = x;\r\n this.creditControl.emit({ CreditLimit: x.CreditLimit, CurrentBalance: x.CurrentBalance });\r\n if (this.creditData.IsLimited || this.creditData.CreditLimit <= this.creditData.CurrentBalance) {\r\n this.creditHold.emit(true);\r\n } else {\r\n this.creditHold.emit(false);\r\n }\r\n });\r\n } else {\r\n this.creditData = null;\r\n }\r\n }\r\n}\r\n","{{'accordion.customerNotProvided' | translate}}\r\n
\r\n \r\n
\r\n
{{job.Date | customDate: 'shortDate'}}
\r\n
{{job.JobCat}}
\r\n
\r\n {{ job.StatusID | jobStatus | translate }}\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
{{ 'label.jobs.grid.job.no' | translate }}
\r\n
\r\n {{job.JobID}}\r\n
\r\n
\r\n
\r\n
{{ 'label.jobType' | translate }}
\r\n
\r\n {{job.JobType}}\r\n
\r\n
\r\n
\r\n
{{ 'label.site' | translate }}
\r\n
\r\n {{job.Site}}\r\n
\r\n
\r\n
\r\n
{{ 'label.contact' | translate }}
\r\n
\r\n {{job.Contact}}\r\n
\r\n
\r\n
\r\n
{{ 'label.todo' | translate }}
\r\n
\r\n {{job.ToDo}}\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n","import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges } from \"@angular/core\";\r\nimport { JobStatus } from \"servicesight-shared\";\r\nimport { RecentJob } from \"../models/recent-job\";\r\nimport { JobService } from \"../services/job.service\";\r\n\r\n@Component({\r\n selector: \"app-recent-jobs-accordion\",\r\n templateUrl: \"./recent-jobs-accordion.component.html\",\r\n styleUrls: [\"./recent-jobs-accordion.component.scss\"]\r\n})\r\nexport class RecentJobsAccordionComponent implements OnChanges {\r\n @Input() customerId: number;\r\n @Input() siteId: number;\r\n @Output() copyJob = new EventEmitter();\r\n @Output() recentJobs = new EventEmitter();\r\n public jobCount = 0;\r\n public show: boolean[] = [];\r\n public model: RecentJob[];\r\n\r\n constructor(private jobService: JobService) { }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.customerId) {\r\n this.customerId = changes.customerId.currentValue;\r\n }\r\n\r\n if (this.customerId && this.siteId) {\r\n this.getCustomerDetails(this.customerId, this.siteId);\r\n }\r\n }\r\n\r\n public copySelectedJob(job: RecentJob): void {\r\n this.copyJob.emit(job);\r\n }\r\n\r\n public details(index: number): void {\r\n if (this.show[index]) {\r\n this.show[index] = false;\r\n } else {\r\n this.hideAllRecentJobDetails();\r\n this.show[index] = true;\r\n }\r\n }\r\n\r\n public hideAllRecentJobDetails(): void {\r\n for (let i = 0; i < this.jobCount; i++) {\r\n this.show[i] = false;\r\n }\r\n }\r\n\r\n public getCustomerDetails(customerId: number, siteId: number): void {\r\n this.jobService.GetRecentJobsAccordion(customerId, siteId).subscribe((res) => {\r\n this.model = res;\r\n this.jobCount = res.length;\r\n this.recentJobs.emit(false);\r\n this.model.map((item) => {\r\n if (item.StatusID < JobStatus.COMPLETED) {\r\n this.recentJobs.emit(true);\r\n }\r\n return item;\r\n });\r\n this.hideAllRecentJobDetails();\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'buttons.new.job' | translate }}

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
{{ 'message.select.customer.from.the.list' | translate }}
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n + {{ 'label.new.site' | translate }}\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n + {{ 'label.new.contact' | translate }}\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import { Component, HostListener, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable } from \"rxjs\";\r\nimport { map } from \"rxjs/operators\";\r\nimport {\r\n ContactService,\r\n CustomerService,\r\n CustomerStatus,\r\n FormMesssageService,\r\n PermissionsService,\r\n SettingId,\r\n SettingsService\r\n} from \"servicesight-shared\";\r\nimport { ISelectOption } from \"src/app/shared/models/iselect-option.model\";\r\nimport { Ng1ContactService } from \"src/app/shared/services/ng1-contact.service\";\r\nimport { Ng1CustomerService } from \"src/app/shared/services/ng1-customer.service\";\r\nimport { ContactStatus } from \"../../shared/enums/contact-status.eum\";\r\nimport { CreditControlModel } from \"../../shared/models/credit-control.model\";\r\nimport { JobCreateModel } from \"../models/job-create\";\r\nimport { JobCreateMetadata } from \"../models/job-create-metadata\";\r\nimport { RecentJob } from \"../models/recent-job\";\r\nimport { JobService } from \"../services/job.service\";\r\n\r\n@Component({\r\n selector: \"app-job-create\",\r\n templateUrl: \"./job-create.component.html\",\r\n styleUrls: [\"./job-create.component.scss\"]\r\n})\r\nexport class JobCreateComponent implements OnInit {\r\n\r\n @ViewChild(\"createjobform\") form: NgForm;\r\n public prefillValues = new JobCreateModel();\r\n public customersDataSource: DataSource;\r\n public sitesDataSource: DataSource;\r\n public contactsDataSource: DataSource;\r\n public jobTypes: ISelectOption[];\r\n public Job: JobCreateModel = new JobCreateModel();\r\n public busy = false;\r\n public saveAndPlan = false;\r\n public pressedKeyCode: number;\r\n public showInactiveCustomerPopup = false;\r\n public showInactiveSitePopup = false;\r\n public showCreditHoldPopup = false;\r\n public showWarningNotesEye = false;\r\n public showCreditControlEye = false;\r\n public showRecentJobsEye = false;\r\n public JobId: number;\r\n public readonly formName: string = \"createjobform\";\r\n public readonly CustomerSeachExpr: Array = [\"Customer\", \"Address\"];\r\n public creditHoldConfirmationDialog: boolean = false;\r\n public plannerBoardEnabled: boolean = false;\r\n public inspectionViewPermission: boolean = false;\r\n public hasManagingAgentOptionEnabled: boolean = null;\r\n public isNewFromPlanner: boolean = false;\r\n\r\n private customerBalance: CreditControlModel = { CreditLimit: 0, CurrentBalance: 0 };\r\n private get customerActiveStatuses(): CustomerStatus[] {\r\n const statuses: CustomerStatus[] = [\r\n CustomerStatus.ACTIVE\r\n ];\r\n\r\n if (this.hasManagingAgentOptionEnabled) {\r\n statuses.push(CustomerStatus.MANAGING_AGENT);\r\n }\r\n\r\n return statuses;\r\n }\r\n\r\n constructor(\r\n private jobService: JobService,\r\n private formMessageService: FormMesssageService,\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private customerService: CustomerService,\r\n private contactService: ContactService,\r\n private permissionsService: PermissionsService,\r\n private settingsService: SettingsService,\r\n private ng1CustomerService: Ng1CustomerService,\r\n private ng1ContactService: Ng1ContactService) {\r\n }\r\n\r\n @HostListener(\"window:beforeunload\")\r\n public canDeactivate(): Observable | boolean {\r\n return !this.form.form.dirty;\r\n }\r\n\r\n ngOnInit() {\r\n this.route.params.subscribe(params => {\r\n if (!isNaN(params.customerid)) {\r\n this.prefillValues.CustomerId = +params.customerid;\r\n }\r\n\r\n if (!isNaN(params.siteid)) {\r\n this.prefillValues.SiteId = +params.siteid;\r\n }\r\n\r\n if (!isNaN(params.contactid)) {\r\n this.prefillValues.ContactId = +params.contactid;\r\n }\r\n\r\n this.route.queryParams.subscribe(queryParams => {\r\n this.isNewFromPlanner = queryParams.isNewFromPlanner;\r\n });\r\n });\r\n\r\n this.permissionsService.CurrentUserHasPermission(\"JobPlannerboard\").subscribe(isAllowedView => {\r\n this.plannerBoardEnabled = isAllowedView;\r\n });\r\n\r\n this.permissionsService.CurrentUserHasPermission(\"InspectionView\").subscribe(permission => {\r\n this.inspectionViewPermission = permission;\r\n });\r\n\r\n // small hack, because setting and module status response are to late\r\n // about 1sec later after when logic below is executed\r\n this.settingsService.getSetting(SettingId.CustomerManagingAgents).subscribe(setting => {\r\n // Only update datasources when setting value has changed\r\n if (this.hasManagingAgentOptionEnabled !== setting.ValueBool) {\r\n this.hasManagingAgentOptionEnabled = setting.ValueBool;\r\n this.SetDataSources();\r\n }\r\n });\r\n }\r\n\r\n public onSelectCustomer(): void {\r\n if (this.Job.CustomerId) {\r\n if (this.customersDataSource.isLoaded()) {\r\n this.CheckSelectedCustomer();\r\n } else {\r\n this.customersDataSource.load().then(() => this.CheckSelectedCustomer());\r\n }\r\n }\r\n }\r\n\r\n private CheckSelectedCustomer(): void {\r\n const customerStore = this.customersDataSource.store() as ODataStore;\r\n customerStore.byKey(this.Job.CustomerId).then((selectedCustomer) => {\r\n if (!this.customerActiveStatuses.includes(selectedCustomer.Status)) {\r\n this.showInactiveCustomerPopup = true;\r\n } else {\r\n if (selectedCustomer.CustomerId !== selectedCustomer.InvoiceId) {\r\n this.Job.CustomerId = selectedCustomer.InvoiceId;\r\n this.Job.SiteId = selectedCustomer.CustomerId;\r\n }\r\n this.sitesDataSource.filter([\"InvoiceId\", \"=\", this.Job.CustomerId]);\r\n this.sitesDataSource.reload().then(() => {\r\n if (this.Job.SiteId) {\r\n const store = this.sitesDataSource.store() as ODataStore;\r\n store.byKey(this.Job.SiteId).then((v) => {\r\n if (v.InvoiceId !== this.Job.CustomerId) {\r\n this.Job.SiteId = selectedCustomer.CustomerId;\r\n }\r\n });\r\n } else {\r\n this.Job.SiteId = selectedCustomer.CustomerId;\r\n }\r\n this.onSelectSite();\r\n });\r\n }\r\n });\r\n }\r\n\r\n public onSelectSite(): void {\r\n if (this.Job.SiteId) {\r\n this.Job.ContactId = null;\r\n const siteStore = this.sitesDataSource.store();\r\n siteStore.byKey(this.Job.SiteId).then((selectedSite) => {\r\n if (!this.customerActiveStatuses.includes(selectedSite.Status)) {\r\n this.Job.SiteId = 0;\r\n this.showInactiveSitePopup = true;\r\n } else {\r\n this.filterAndReloadContacts().then(() => {\r\n if (this.prefillValues && this.Job.CustomerId === this.prefillValues.CustomerId && this.Job.SiteId === this.prefillValues.SiteId) {\r\n this.Job.ContactId = this.prefillValues.ContactId;\r\n } else {\r\n this.jobService.GetDefaultContactID(this.Job.SiteId).subscribe((res) => {\r\n if(res) {\r\n this.Job.ContactId = res;\r\n }\r\n });\r\n }\r\n });\r\n }\r\n });\r\n }\r\n }\r\n\r\n public newCustomer(): void {\r\n let customerId = 0;\r\n this.ng1CustomerService.openCustomerModal(\"customer\")\r\n .then((id: number) => {\r\n customerId = id;\r\n return this.customersDataSource.reload();\r\n })\r\n .then(() => {\r\n this.Job.CustomerId = customerId;\r\n this.onSelectCustomer();\r\n });\r\n }\r\n\r\n public newSite() {\r\n let siteId = 0;\r\n this.ng1CustomerService.openCustomerModal(\"site\", this.Job.CustomerId)\r\n .then((id: number) => {\r\n siteId = id;\r\n this.sitesDataSource.filter([\"InvoiceId\", \"=\", this.Job.CustomerId]);\r\n return this.sitesDataSource.reload();\r\n })\r\n .then(() => {\r\n this.Job.ContactId = 0;\r\n this.Job.SiteId = siteId;\r\n this.onSelectSite();\r\n });\r\n }\r\n\r\n public newContact() {\r\n let contactId = 0;\r\n this.ng1ContactService.openContactModal(0, this.Job.SiteId)\r\n .then((id: number) => {\r\n contactId = id;\r\n return this.filterAndReloadContacts();\r\n })\r\n .then(() => {\r\n this.Job.ContactId = contactId;\r\n });\r\n }\r\n\r\n public editContact() {\r\n const contactId = this.Job.ContactId;\r\n if (contactId) {\r\n this.Job.ContactId = 0;\r\n this.ng1ContactService.openContactModal(contactId)\r\n .then(() => {\r\n return this.filterAndReloadContacts();\r\n })\r\n .finally(() => {\r\n this.Job.ContactId = contactId;\r\n });\r\n }\r\n }\r\n\r\n public mousedDownSaveAndPlan(): void {\r\n this.saveAndPlan = true;\r\n }\r\n\r\n public onKeypress(event: any): void {\r\n this.pressedKeyCode = event.charCode;\r\n }\r\n\r\n public save(): void {\r\n if (this.pressedKeyCode === 13) {\r\n return;\r\n }\r\n\r\n this.busy = true; // Disable buttons\r\n this.formMessageService\r\n .RegisterObservable(this.jobService.Save(this.Job), this.formName)\r\n .subscribe((res) => {\r\n this.JobId = res.EntityId;\r\n if (this.saveAndPlan) {\r\n if (this.JobId) {\r\n this.jobService.GetJobStatus(this.JobId).subscribe((status) => {\r\n if (status.trim() === \"Credit hold\") {\r\n this.showCreditHoldPopup = true;\r\n } else {\r\n window.location.href = \"/#/planner/calendar\";\r\n }\r\n });\r\n }\r\n } else {\r\n window.location.href = \"/#/jobs/job/\" + this.JobId;\r\n }\r\n }).add(() => this.busy = false);\r\n }\r\n\r\n public onWarningNotes(show: boolean): void {\r\n this.showWarningNotesEye = show;\r\n }\r\n\r\n public onCreditControl(show: boolean): void {\r\n this.showCreditControlEye = show;\r\n }\r\n\r\n public onRecentJobs(show: boolean): void {\r\n this.showRecentJobsEye = show;\r\n }\r\n\r\n public onCopyJob(job: RecentJob) {\r\n this.Job.SiteId = job.SiteID;\r\n this.Job.ContactId = job.ContactID;\r\n this.Job.JobTypeId = job.JobTypeID;\r\n this.Job.ToDo = job.ToDo;\r\n }\r\n\r\n public onCloseInactiveCustomer() {\r\n this.onLoad();\r\n }\r\n\r\n public onCloseInactiveSite() {\r\n this.showInactiveSitePopup = false;\r\n }\r\n\r\n public onCloseCreditHold() {\r\n window.location.href = \"/#/jobs/job/\" + this.JobId;\r\n }\r\n\r\n private onLoad(): void {\r\n this.Job = new JobCreateModel();\r\n if (this.prefillValues) {\r\n this.Job.CustomerId = this.prefillValues.CustomerId;\r\n this.Job.SiteId = this.prefillValues.SiteId;\r\n this.Job.ContactId = this.prefillValues.ContactId;\r\n }\r\n this.showCreditControlEye = false;\r\n this.showWarningNotesEye = false;\r\n this.showRecentJobsEye = false;\r\n this.showInactiveCustomerPopup = false;\r\n this.showInactiveSitePopup = false;\r\n this.showCreditHoldPopup = false;\r\n this.jobService.GetNewJobMetadata().pipe(map((res: JobCreateMetadata) => {\r\n this.jobTypes = res.JobTypes.sort((a, b) => (a.Name > b.Name ? 1 : -1));\r\n this.Job.JobTypeId = res.DefaultJobTypeID;\r\n })).subscribe();\r\n\r\n if (this.customersDataSource) {\r\n this.customersDataSource.load();\r\n }\r\n }\r\n\r\n private filterAndReloadContacts(): Promise {\r\n const filterPromise = this.customerService.GetCustomerAndSite(this.Job.CustomerId, this.Job.SiteId)\r\n .pipe(map(((result) => {\r\n const filter: any[] = [\r\n [\"CustomerId\", \"=\", this.Job.SiteId]\r\n , \"or\",\r\n [\"CustomerId\", \"=\", this.Job.CustomerId]\r\n ];\r\n if (this.hasManagingAgentOptionEnabled) {\r\n if (result.customer.ManagingAgentID) {\r\n filter.push(\"or\", [\"CustomerId\", \"=\", result.customer.ManagingAgentID]);\r\n }\r\n if (result.site.ManagingAgentID && result.site.ManagingAgentID !== result.customer.ManagingAgentID) {\r\n filter.push(\"or\", [\"CustomerId\", \"=\", result.site.ManagingAgentID]);\r\n }\r\n }\r\n this.contactsDataSource.filter([filter, \"and\", [\"Status\", \"=\", ContactStatus.ACTIVE]]);\r\n return this.contactsDataSource.reload();\r\n }))).toPromise();\r\n\r\n return filterPromise;\r\n }\r\n\r\n public confirmCredit(ev) {\r\n if (ev) {\r\n this.creditHoldConfirmationDialog = false;\r\n } else if (ev !== undefined && !ev) {\r\n this.router.navigate([\"/jobs/list\"]);\r\n }\r\n }\r\n\r\n public onCreditLimit($event: CreditControlModel) {\r\n this.customerBalance = $event;\r\n this.creditHoldConfirmationDialog = this.IsCustomerOverCreditLimit();\r\n }\r\n\r\n private IsCustomerOverCreditLimit(): boolean {\r\n return this.customerBalance.CreditLimit > 0 && this.customerBalance.CurrentBalance > this.customerBalance.CreditLimit;\r\n }\r\n\r\n private SetDataSources(): void {\r\n this.customersDataSource = this.customerService.GetCustomersDataSource();\r\n this.sitesDataSource = this.customerService.GetCustomersDataSource();\r\n this.contactsDataSource = this.contactService.GetContactsDataSource();\r\n\r\n const filter = [];\r\n this.customerActiveStatuses.forEach((el, index) => {\r\n if (this.customerActiveStatuses.length > 1) {\r\n filter.push([\"Status\", \"=\", el]);\r\n if (index < this.customerActiveStatuses.length - 1) {\r\n filter.push(\"or\");\r\n }\r\n } else {\r\n filter.push(\"Status\", \"=\", el);\r\n }\r\n });\r\n this.customersDataSource.filter(filter);\r\n this.sitesDataSource.filter(filter);\r\n this.customersDataSource.load();\r\n this.sitesDataSource.load();\r\n this.onLoad();\r\n }\r\n}\r\n","export enum LayoutType {\r\n JobInvoice = 1,\r\n ContractInvoice = 2,\r\n Inspection = 3,\r\n JobSheet = 4,\r\n QuoteMixed = 6,\r\n ServiceContract = 7,\r\n CreditNote = 8,\r\n PurchaseOrder = 9,\r\n GoodsReceivedNote = 10,\r\n ServiceContractCreditNote = 11,\r\n DespatchNote = 12,\r\n ReturnsNote = 13,\r\n PickingNote = 14,\r\n QuotationCover = 15\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { ODataService } from \"../../shared/services/odata/odata.service\";\r\nimport { LayoutType } from \"../enums/layout-type.enum\";\r\nimport { LayoutTemplateModel } from \"../models/layout-template.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class LayoutTemplateService {\r\n private readonly serviceSightODataBaseUrl: string;\r\n private readonly serviceSightBaseUrl: string;\r\n private readonly templateDesignerBaseUrl: string;\r\n\r\n constructor(\r\n private odataService: ODataService,\r\n private http: HttpClient,\r\n private translateService: TranslateService,\r\n @Inject(APP_CONFIG) appConfig: IAppConfig) {\r\n this.serviceSightODataBaseUrl = appConfig.apiLocations.ServiceSightOData;\r\n this.serviceSightBaseUrl = appConfig.apiLocations.ServiceSight;\r\n this.templateDesignerBaseUrl = appConfig.apiLocations.TemplateDesigner;\r\n }\r\n\r\n public ODataLayoutTemplates(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.serviceSightODataBaseUrl}LayoutTemplateOD`,\r\n key: \"TemplateId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetLayoutTemplates(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.serviceSightODataBaseUrl}LayoutTemplateOD`,\r\n key: \"TemplateId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetAll(): Observable {\r\n return this.http.get(`${this.templateDesignerBaseUrl}LayoutTemplate`);\r\n }\r\n\r\n public Create(layoutTemplate: LayoutTemplateModel): Observable {\r\n return this.http.post(`${this.templateDesignerBaseUrl}LayoutTemplate/Create`, layoutTemplate);\r\n }\r\n\r\n public Delete(templateId: number): Observable {\r\n return this.http.delete(`${this.serviceSightBaseUrl}LayoutTemplate/Delete?templateId=${templateId}`);\r\n }\r\n\r\n public GetTemplateName(templateId: number | string): Observable {\r\n return this.http.get(`${this.serviceSightBaseUrl}LayoutTemplate/GetTemplateName?templateId=${templateId}`);\r\n }\r\n\r\n public TemplateTypes(): Array {\r\n return [{\r\n Name: this.translateService.instant(\"layout-template.type.job-invoice\"),\r\n Value: 1\r\n }, {\r\n Name: this.translateService.instant(\"layout-template.type.contract-invoice\"),\r\n Value: 2\r\n }, {\r\n Name: this.translateService.instant(\"layout-template.type.inspection\"),\r\n Value: 3\r\n }, {\r\n Name: this.translateService.instant(\"layout-template.type.job-sheet\"),\r\n Value: 4\r\n }, {\r\n Name: this.translateService.instant(\"layout-template.type.quote-job\"),\r\n Value: 5\r\n }, {\r\n Name: this.translateService.instant(\"layout-template.type.quote-mixed\"),\r\n Value: 6\r\n }, {\r\n Name: this.translateService.instant(\"layout-template.type.service-contract\"),\r\n Value: 7\r\n }, {\r\n Name: this.translateService.instant(\"layout-template.type.credit-note\"),\r\n Value: 8\r\n }, {\r\n Name: this.translateService.instant(\"layout-template.type.purchase-order\"),\r\n Value: 9\r\n }, {\r\n Name: this.translateService.instant(\"layout-template.type.goods-received-note\"),\r\n Value: 10\r\n }, {\r\n Name: this.translateService.instant(\"layout-template.type.service-contract-credit-note\"),\r\n Value: 11\r\n }, {\r\n Name: this.translateService.instant(\"layout-template.type.despatch-note\"),\r\n Value: 12\r\n }, {\r\n Name: this.translateService.instant(\"layout-template.type.returns-note\"),\r\n Value: 13\r\n }, {\r\n Name: this.translateService.instant(\"layout-template.type.picking-note\"),\r\n Value: 14\r\n }];\r\n }\r\n\r\n public GetLayouts(layoutType: LayoutType): Observable {\r\n return this.http.get(`${this.serviceSightBaseUrl}LayoutTemplate/GetTemplatesByType?layoutType=${layoutType}`);\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG, IProteanResponse } from \"servicesight-shared\";\r\nimport { IListItemModel } from \"../../models/ilist-item.model\";\r\nimport { IContactService } from \"../interfaces/IContactService\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class ContactService implements IContactService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) { }\r\n\r\n GetContacts(customerId: number, siteId: number): Observable {\r\n return this.http.get(this.appConfig.apiLocations.ServiceSight + \"Job/GetContacts?customerId=\" + customerId + \"&siteId=\" + siteId);\r\n }\r\n\r\n public GetContact(contactId: number): Observable {\r\n return this.http.get(this.appConfig.apiLocations.ServiceSight + \"CustomerContact/GetContact?customerContactID=\" + contactId + \"&customerID=null\");\r\n }\r\n}\r\n","export enum WalkthroughPosition {\r\n Top = \"top\",\r\n Left = \"left\",\r\n Right = \"right\",\r\n Bottom = \"bottom\",\r\n BottomMiddle = \"bottom-middle-aligned\",\r\n Auto = \"auto\"\r\n}\r\n\r\nexport interface WalkthroughStep {\r\n ElementId: string;\r\n Intro: string;\r\n Position: WalkthroughPosition;\r\n targetSelector?: string;\r\n}\r\n\r\nexport class IntroJsStep {\r\n element: any;\r\n intro: string;\r\n position: string;\r\n}\r\n","export enum WelcomeStatus {\r\n NotApplicable = 0,\r\n NotWelcomed = 1,\r\n Skipped = 2,\r\n StartedNotComplete = 3,\r\n Complete = 4\r\n}\r\n","/* eslint-disable no-underscore-dangle */\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable, Renderer2 } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { Subject } from \"rxjs\";\r\nimport * as introJs from \"./intro.js\";\r\nimport { IntroJsStep, WalkthroughPosition, WalkthroughStep } from \"./walkthrough.models\";\r\nimport { WelcomeStatus } from \"../../pipes/enums/welcome-status-enum\";\r\nimport { APP_CONFIG } from \"servicesight-shared\";\r\nimport { WebAppConfig } from \"../../models/web-app-config.model.js\";\r\n//this is a custom version DO NOT use the one in node modules\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class WalkthoughService {\r\n\r\n private get baseIntroJsOptions(): { [key: string]: any } {\r\n return {\r\n nextLabel: this.translate.instant(\"walkthrough.tooltip.next\"),\r\n prevLabel: this.translate.instant(\"walkthrough.tooltip.previous\"),\r\n skipLabel: this.translate.instant(\"walkthrough.tooltip.skip\"),\r\n doneLabel: this.translate.instant(\"walkthrough.tooltip.done\"),\r\n exitOnEsc: true,\r\n exitOnOverlayClick: true,\r\n hidePrev: false,\r\n hideNext: true,\r\n tooltipClass: \"hide-next hide-prev\",\r\n showButtons: true,\r\n showBullets: false,\r\n showProgress: false,\r\n scrollTo: \"tooltip\",\r\n overlayOpacity: 0.3\r\n };\r\n }\r\n\r\n private jobSteps: Array = [{\r\n ElementId: \"#form-button-2\",\r\n Intro: \"walkthrough.job.complete\",\r\n Position: WalkthroughPosition.Top\r\n }, {\r\n ElementId: \"#invoice-button\",\r\n Intro: \"walkthrough.job.invoicebutton\",\r\n Position: WalkthroughPosition.Auto\r\n }, {\r\n ElementId: \".modal-content\",\r\n Intro: \"walkthrough.job.invoicereal\",\r\n Position: WalkthroughPosition.Auto\r\n }, {\r\n ElementId: \"#invoice-viewer\",\r\n Intro: \"walkthrough.job.invoicedocument\",\r\n Position: WalkthroughPosition.Right\r\n }, {\r\n ElementId: \"#email-job-documents\",\r\n Intro: \"walkthrough.job.invoiceemail\",\r\n Position: WalkthroughPosition.Auto\r\n }, {\r\n ElementId: \".modal-content\",\r\n Intro: \"walkthrough.job.invoicesend\",\r\n Position: WalkthroughPosition.BottomMiddle\r\n }];\r\n\r\n public WelcomeIsShowing: boolean = false;\r\n public JobWalkthoughEnabled: boolean = false;\r\n public JobWalkthroughCompleted: Subject = new Subject();\r\n public renderer: Renderer2;\r\n private jobWalkThroughStarted: boolean = false;\r\n\r\n //We should imort the intro js types\r\n private walkthrough: any;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private translate: TranslateService,\r\n @Inject(APP_CONFIG) private appConfig: WebAppConfig) {\r\n }\r\n\r\n /**\r\n * This will Show the welcome dialog\r\n */\r\n ShowWelcome(): void {\r\n this.WelcomeIsShowing = true;\r\n this.renderer.addClass(document.body, \"dialog-opened\");\r\n }\r\n\r\n /**\r\n * This updates the welcome status column on a company on the server\r\n */\r\n UpdateWelcomeStatus(status: WelcomeStatus): void {\r\n this.http.put(this.appConfig.apiLocations.GateKeeper + `Company/SetWelcomeStatus?status=${status}`, null).subscribe();\r\n }\r\n\r\n /**\r\n * Will start or call next step on the job walk through\r\n * It is important the next step's element has been rendered before calling this\r\n * @param: canStart allows the start to be called\r\n */\r\n NextJobStep(canStart: boolean) {\r\n if (this.jobWalkThroughStarted) {\r\n this.walkthrough.nextStep();\r\n }\r\n if (this.JobWalkthoughEnabled && canStart) {\r\n this.jobWalkThroughStarted = true;\r\n this.JobWalkthoughEnabled = false;\r\n\r\n this.walkthrough = this.StartIntro(this.jobSteps);\r\n this.walkthrough.onexit(() => {\r\n this.jobWalkThroughStarted = false;\r\n //This is a potenial bug\r\n this.UpdateWelcomeStatus(WelcomeStatus.StartedNotComplete);\r\n });\r\n\r\n this.walkthrough.onbeforechange(() => {\r\n if (this.walkthrough._currentStep === 3) {\r\n this.walkthrough.setOption(\"tooltipClass\", \"hide-prev\");\r\n } else {\r\n this.walkthrough.setOption(\"tooltipClass\", \"hide-next hide-prev\");\r\n }\r\n });\r\n\r\n // dirty hack to fix tooltip position when used with bootstrap dialog\r\n this.walkthrough.onafterchange(() => {\r\n if (this.walkthrough._currentStep === 5 || this.walkthrough._currentStep === 2) {\r\n // bootstrap dialogs are always at top: 30px\r\n const dialogTop = \"25px\";\r\n $(\".introjs-helperLayer.introjs-fixedTooltip\").css(\"top\", dialogTop);\r\n $(\".introjs-tooltipReferenceLayer.introjs-fixedTooltip\").css(\"top\", dialogTop);\r\n $(\"html\").scrollTop(0);\r\n }\r\n });\r\n\r\n this.walkthrough.oncomplete(() => {\r\n this.WelcomeIsShowing = true;\r\n this.JobWalkthroughCompleted.next(true);\r\n });\r\n\r\n }\r\n }\r\n\r\n /**\r\n * Generic base method to create and start a new IntoJs object\r\n */\r\n private StartIntro(walkthoughSteps: Array): any {\r\n const steps = walkthoughSteps.map(s => {\r\n return {\r\n element: s.ElementId,\r\n intro: this.translate.instant(s.Intro),\r\n position: s.Position\r\n };\r\n });\r\n return introJs().setOptions(this.baseIntroJsOptions).addSteps(steps).start();\r\n }\r\n}\r\n\r\n\r\n\r\n","import { Injectable } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { Subject } from \"rxjs\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class GoToJobEquipService {\r\n\r\n public caller = new Subject();\r\n\r\n constructor(private router: Router) { }\r\n\r\n public NavigateToJob(jobId: number) {\r\n this.router.navigate([\"jobs/job\", jobId]).then(() => {\r\n this.caller.next();\r\n });\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG, IProteanResponse } from \"servicesight-shared\";\r\nimport { AddJobPartModel } from \"../models/add-job-part\";\r\nimport { JobPartModel } from \"../models/job-part\";\r\nimport { JobPartIssueModel } from \"../models/job-part-issue.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class JobPartDataService {\r\n\r\n private readonly jobPartBaseUrl: string;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) appConfig: IAppConfig) {\r\n this.jobPartBaseUrl = appConfig.apiLocations.ServiceSight + \"jobpart\";\r\n }\r\n\r\n GetJobParts(jobId: number): Observable {\r\n return this.http.get(`${this.jobPartBaseUrl}/GetJobParts?jobid=${jobId}`);\r\n }\r\n\r\n UpdateJobPart(part: JobPartModel): Observable {\r\n return this.http.post(`${this.jobPartBaseUrl}/UpdateJobPart`, part);\r\n }\r\n\r\n AddJobParts(jobId: number, jobParts: AddJobPartModel[]): Observable {\r\n return this.http.post(`${this.jobPartBaseUrl}/AddJobParts?jobid=${jobId}`, jobParts);\r\n }\r\n\r\n RemoveJobParts(jobId: number, partIds: number[]): Observable {\r\n return this.http.post(`${this.jobPartBaseUrl}/RemoveJobParts?jobid=${jobId}`, partIds);\r\n }\r\n\r\n IssueJobParts(jobId: number, partIds: number[]): Observable {\r\n return this.http.post(`${this.jobPartBaseUrl}/IssueJobParts?jobid=${jobId}`, partIds);\r\n }\r\n\r\n UpdateJobPartSerialNos(jobId: number, partId: number, serialIds: number[]): Observable {\r\n return this.http.post(`${this.jobPartBaseUrl}/UpdateJobPartSerialNos?jobid=${jobId}&partId=${partId}`, serialIds);\r\n }\r\n\r\n AddJobPartsAndIssue(jobId: number, jobParts: JobPartIssueModel[]): Observable {\r\n return this.http.post(`${this.jobPartBaseUrl}/AddJobPartsAndIssue?jobid=${jobId}`, jobParts);\r\n }\r\n}\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { DateOnlyService, FormMesssageService } from \"servicesight-shared\";\r\nimport { WalkthoughService } from \"src/app/shared/services/walkthough/walkthough.service\";\r\nimport { JobDetail } from \"../models/job-detail\";\r\nimport { JobService } from \"../services/job.service\";\r\n\r\n@Component({\r\n selector: \"app-job-invoice-dialogue\",\r\n templateUrl: \"./job-invoice-dialogue.component.html\",\r\n styleUrls: [\"./job-invoice-dialogue.component.scss\"]\r\n})\r\nexport class JobInvoiceDialogueComponent implements OnChanges {\r\n @Input() job: JobDetail;\r\n @Output() invoicing = new EventEmitter();\r\n\r\n @ViewChild(\"invoicejobform\", { static: true }) form: NgForm;\r\n public readonly formName: string = \"invoicejobform\";\r\n\r\n public model: Date = new Date();\r\n public isLoading = true;\r\n\r\n constructor(private formMessageService: FormMesssageService,\r\n private jobDataService: JobService,\r\n private walkthoughService: WalkthoughService,\r\n private dateOnlyService: DateOnlyService) { }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.job.currentValue.JobID) {\r\n this.isLoading = false;\r\n }\r\n }\r\n\r\n public Save(): void {\r\n this.isLoading = true;\r\n this.job.Invoiced = this.dateOnlyService.RecalculateDateOnSave(this.model);\r\n this.formMessageService\r\n .RegisterObservable(this.jobDataService.InvoiceImmediate(this.job), this.formName)\r\n .subscribe((res) => {\r\n this.invoicing.emit(res.EntityId);\r\n });\r\n }\r\n\r\n public Discard(): void {\r\n this.invoicing.emit();\r\n }\r\n\r\n public OnShown(): void {\r\n //Focus on invoice dialog\r\n this.walkthoughService.NextJobStep(false);\r\n }\r\n}\r\n","\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n","
\r\n
\r\n

{{ 'job.invoicing.charges' | translate }}

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

{{ 'job.invoicing.summary' | translate }}

\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n {{ data.value ? data.value.toFixed(2) + \"%\" : null }}\r\n
\r\n\r\n
\r\n {{ data.value | currency: data.data.isBaseCurrency ? baseCurrencySymbol : job.CurrencySymbol }}\r\n {{ data.value ? data.value.toFixed(2) + \"%\" : null }}\r\n
\r\n\r\n
\r\n {{ data.value | translate }}\r\n
\r\n\r\n
\r\n {{ data.value + equipmentFlatChargeTotal | currency: data.data.isBaseCurrency ? baseCurrencySymbol : job.CurrencySymbol }}\r\n {{ data.value | currency: data.data.isBaseCurrency ? baseCurrencySymbol : job.CurrencySymbol }}\r\n
\r\n\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n + {{ equipmentFlatChargeTotal | currency: cellData.data.isBaseCurrency ? baseCurrencySymbol : job.CurrencySymbol }}\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n

{{ 'job.invoicing.formatting.options' | translate }}

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

{{ 'job.invoicing.invoice.header.detail' | translate }}

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

{{ 'job.invoicing.invoice.options' | translate }}

\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewEncapsulation\r\n} from \"@angular/core\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { zip } from \"rxjs\";\r\nimport {\r\n AccountingService,\r\n EquipmentDataService,\r\n FormMesssageService,\r\n Module,\r\n ModuleService,\r\n PermissionsService,\r\n PhraseBookType,\r\n SettingId,\r\n SettingsService\r\n} from \"servicesight-shared\";\r\nimport { LayoutType } from \"src/app/settings/enums/layout-type.enum\";\r\nimport { LayoutTemplateModel } from \"src/app/settings/models/layout-template.model\";\r\nimport { LayoutTemplateService } from \"src/app/settings/services/layout-template.service\";\r\nimport { CustomerService } from \"src/app/shared/services/customer/customer.service\";\r\nimport { JobDetail } from \"../models/job-detail\";\r\nimport { JobInvoicingModel } from \"../models/job-invoicing\";\r\nimport { JobInvoicingTotal } from \"../models/job-invoicing-totals.model\";\r\nimport { JobPartDataService } from \"../services/job-part-data.service\";\r\nimport { JobRefrigerantService } from \"../services/job-refrigerant.service\";\r\nimport { JobService } from \"../services/job.service\";\r\n\r\n@Component({\r\n selector: \"app-job-invoicing\",\r\n templateUrl: \"./job-invoicing.component.html\",\r\n styleUrls: [\"./job-invoicing.component.scss\"],\r\n // devexpress doesn't handle encapsulated css\r\n encapsulation: ViewEncapsulation.None\r\n})\r\nexport class JobInvoicingComponent implements OnChanges, OnInit {\r\n @Input() job: JobDetail;\r\n @Input() jobForm: any;\r\n @Output() load = new EventEmitter();\r\n private readonly formName: string = \"jobform\";\r\n public labourCharge: number;\r\n public partsCharge: number;\r\n public materialCharge: number;\r\n public refrigerantsCharges: number;\r\n public totalSum: number;\r\n public showCustomerCurrency: boolean;\r\n public isEditableFlatCharge: boolean;\r\n public currencySymbol: string;\r\n public baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n public invoicingBlocked: boolean;\r\n public currentRate = 1;\r\n public showInvoiceDialogue = false;\r\n public equipmentModuleEnabled: boolean = false;\r\n public stockModuleEnabled: boolean = false;\r\n public proEnabled: boolean = false;\r\n public fgasModuleEnabled: boolean = false;\r\n public showCreditColumn: boolean = false;\r\n public totals: JobInvoicingTotal[] = [];\r\n public phraseType = PhraseBookType;\r\n public reverseChargeVatEnabled: boolean = false;\r\n public customerTaxCodesStore: ODataStore;\r\n public equipmentFlatChargeTotal: number = 0;\r\n private invoiceDetails: JobInvoicingModel;\r\n private partsCost: number;\r\n private refrigerantsCosts: number;\r\n private hasJobChangeTaxCodePermission: boolean = false;\r\n private isUSCompany: boolean = false;\r\n public layouts: LayoutTemplateModel[] = [];\r\n private immediateInvoiceTemplateId: number = 0;\r\n\r\n public get canChangeTaxCode(): boolean {\r\n return this.proEnabled && this.hasJobChangeTaxCodePermission && !this.isUSCompany;\r\n }\r\n\r\n constructor(\r\n private jobService: JobService,\r\n private jobPartService: JobPartDataService,\r\n private formMessageService: FormMesssageService,\r\n private moduleService: ModuleService,\r\n private settingService: SettingsService,\r\n private jobRefrigerantService: JobRefrigerantService,\r\n private accountingService: AccountingService,\r\n private customerService: CustomerService,\r\n private permissionService: PermissionsService,\r\n private equipmentDataService: EquipmentDataService,\r\n private layoutTemplateService: LayoutTemplateService) {\r\n this.showEditButton = this.showEditButton.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.moduleService.GetEnabledModules().subscribe(o => {\r\n this.equipmentModuleEnabled = o.includes(Module.Equipment);\r\n this.stockModuleEnabled = o.includes(Module.Stock);\r\n this.proEnabled = o.includes(Module.Pro);\r\n this.fgasModuleEnabled = o.includes(Module.FGas);\r\n\r\n if (this.job && this.job.JobID) {\r\n this.UpdateEquipmentFlatChargeTotal();\r\n }\r\n });\r\n\r\n this.settingService.getSetting(SettingId.ReverseChargeVat).subscribe((setting) => {\r\n this.reverseChargeVatEnabled = setting.ValueBool;\r\n });\r\n\r\n this.accountingService.GetAccountsInfo().subscribe(response => {\r\n this.isUSCompany = response.IsUsaTaxSystem;\r\n });\r\n\r\n this.customerTaxCodesStore = this.customerService.GetCustomerTaxCodesStore();\r\n\r\n this.permissionService.CurrentUserHasPermission(\"JobChangeTaxCode\")\r\n .subscribe(result => {\r\n this.hasJobChangeTaxCodePermission = result;\r\n });\r\n\r\n this.layoutTemplateService.GetLayouts(LayoutType.JobInvoice).subscribe(layouts => {\r\n this.layouts = layouts;\r\n });\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.job.currentValue.JobID) {\r\n this.loadJobInvoiceData();\r\n }\r\n }\r\n\r\n public SetFlatRate(value: any, cellData: any): void {\r\n cellData.setValue(value);\r\n }\r\n\r\n public OnFlatRateChanged(): void {\r\n this.totalSum =\r\n Number(this.labourCharge) +\r\n Number(this.materialCharge) +\r\n this.partsCharge +\r\n this.refrigerantsCharges +\r\n this.equipmentFlatChargeTotal;\r\n\r\n if (this.job.FlatCharge) {\r\n this.totalSum += Number(this.job.FlatCharge);\r\n }\r\n\r\n this.recalculateProfit();\r\n this.SetFormDirty();\r\n }\r\n\r\n public SetEquip(name: string): void {\r\n\r\n if (name === \"InvEquipList\") {\r\n this.job.InvEquipCategory = 0;\r\n this.job.InvEquipGroup = 0;\r\n }\r\n\r\n if (name === \"InvEquipCategory\") {\r\n this.job.InvEquipList = 0;\r\n this.job.InvEquipGroup = 0;\r\n }\r\n\r\n if (name === \"InvEquipGroup\") {\r\n this.job.InvEquipList = 0;\r\n this.job.InvEquipCategory = 0;\r\n }\r\n }\r\n\r\n public OnExchangeRateChanged(): void {\r\n if (this.showCustomerCurrency) {\r\n this.currentRate = this.job.ExchangeRate;\r\n }\r\n this.SetFormDirty();\r\n }\r\n\r\n public OnSummarisePartsChanged(): void {\r\n this.SetFormDirty();\r\n }\r\n\r\n public ShowBaseCurrency(): void {\r\n this.showCustomerCurrency = !this.showCustomerCurrency;\r\n this.isEditableFlatCharge = this.job.IsEditableFlatCharge && !this.showCustomerCurrency;\r\n if (this.showCustomerCurrency) {\r\n this.currencySymbol = this.job.CurrencySymbol;\r\n this.currentRate = this.job.ExchangeRate;\r\n } else {\r\n this.currencySymbol = this.baseCurrencySymbol;\r\n this.currentRate = 1;\r\n }\r\n }\r\n\r\n public ChangeInvCombineLabourRates(): void {\r\n if (!this.job.InvCombineLabourRates) {\r\n this.job.InvSummariseLabour = false;\r\n this.job.InvCombineTravel = false;\r\n }\r\n this.SetFormDirty();\r\n }\r\n\r\n public VisitSummaryChanged(): void {\r\n if (this.job.InvSessionSummary) {\r\n this.job.InvShowSessionText = false;\r\n }\r\n this.SetFormDirty();\r\n }\r\n public PreviewInvoice(event: any): void {\r\n this.InvoicePreview(event.itemData.TemplateId);\r\n }\r\n\r\n public PreviewInvoiceWithDefaultLayout(): void {\r\n this.InvoicePreview(0);\r\n }\r\n\r\n private InvoicePreview(templateId: number): void {\r\n this.invoicingBlocked = true;\r\n this.job.Invoiced = new Date();\r\n this.jobService.InvoicePreview(this.job)\r\n .subscribe((res) => {\r\n if (res.IsSuccess) {\r\n this.invoicingBlocked = false;\r\n this.GoToInvoice(res.EntityId, templateId);\r\n }\r\n }, () => this.invoicingBlocked = false);\r\n }\r\n\r\n public GoToInvoice(noteId: number, templateId: number): void {\r\n if (noteId > 0) {\r\n location.href = `/#/invoices/invoice/${noteId}/${templateId}`;\r\n }\r\n }\r\n\r\n public InvoiceImmediateWithDefaultLayout(): void {\r\n this.immediateInvoiceTemplateId = 0;\r\n this.CreateImmediateInvoice();\r\n }\r\n\r\n public InvoiceImmediate(event: any): void {\r\n this.immediateInvoiceTemplateId = event.itemData.TemplateId;\r\n this.CreateImmediateInvoice();\r\n }\r\n\r\n private CreateImmediateInvoice(): void {\r\n this.invoicingBlocked = true;\r\n // First check if it's ok to invoice, then display dialog to capture a date and then create a invoice\r\n this.formMessageService.RegisterObservable(this.jobService.OkToInvoiceImmediate(this.job), this.formName)\r\n .subscribe((res) => {\r\n if (res.IsSuccess) {\r\n this.invoicingBlocked = false;\r\n this.doInvoice();\r\n }\r\n }, () => this.invoicingBlocked = false);\r\n }\r\n\r\n public SetFormDirty(): void {\r\n this.jobForm.form.markAsDirty();\r\n }\r\n\r\n public OnCloseInvoiceDialogue(noteId: number): void {\r\n if (noteId) {\r\n this.GoToInvoice(noteId, this.immediateInvoiceTemplateId);\r\n } else {\r\n this.load.emit();\r\n }\r\n this.showInvoiceDialogue = false;\r\n this.invoicingBlocked = false;\r\n }\r\n\r\n public UpdateHeaderDetail(headerDetail: string): void {\r\n this.job.InvHeaderText = headerDetail;\r\n this.SetFormDirty();\r\n }\r\n\r\n private doInvoice(): void {\r\n this.showInvoiceDialogue = true;\r\n }\r\n\r\n private loadJobInvoiceData(): void {\r\n if (this.stockModuleEnabled && this.fgasModuleEnabled) {\r\n zip(this.jobService.GetJobInvoiceDetails(this.job.JobID),\r\n this.jobPartService.GetJobParts(this.job.JobID),\r\n this.jobRefrigerantService.GetJobRefrigerants(this.job.JobID))\r\n .subscribe(([invoiceDetails, partDetails, refrigerants]) => {\r\n const partsCharge = partDetails.reduce((sum, part) => sum + (part.Qty * part.Price), 0);\r\n const partsCost = partDetails.reduce((sum, part) => sum + (part.Cost > 0 ? part.Cost : part.EstimatedCost), 0);\r\n const partsOnOrder = partDetails.reduce((sum, part) => sum + part.CostOnOrder, 0);\r\n const refrigerantsCharge = refrigerants.reduce((sum, fgas) => sum + fgas.Charge ?? 0, 0);\r\n const refrigerantCost = refrigerants.reduce((sum, fgas) => sum + fgas.Cost ?? 0, 0);\r\n\r\n this.setValues(invoiceDetails, partsCharge, partsCost, partsOnOrder, refrigerantsCharge, refrigerantCost);\r\n });\r\n } else if (this.stockModuleEnabled) {\r\n zip(this.jobService.GetJobInvoiceDetails(this.job.JobID),\r\n this.jobPartService.GetJobParts(this.job.JobID))\r\n .subscribe(([invoiceDetails, partDetails]) => {\r\n const partsCharge = partDetails.reduce((sum, part) => sum + (part.Qty * part.Price), 0);\r\n const partsCost = partDetails.reduce((sum, part) => sum + (part.Cost > 0 ? part.Cost : part.EstimatedCost), 0);\r\n const partsOnOrder = partDetails.reduce((sum, part) => sum + part.CostOnOrder, 0);\r\n\r\n this.setValues(invoiceDetails, partsCharge, partsCost, partsOnOrder, 0, 0);\r\n });\r\n } else if (this.fgasModuleEnabled) {\r\n zip(this.jobService.GetJobInvoiceDetails(this.job.JobID), this.jobRefrigerantService.GetJobRefrigerants(this.job.JobID))\r\n .subscribe(([invoiceDetails, refrigerants]) => {\r\n const refrigerantsCharge = refrigerants.reduce((sum, fgas) => sum + fgas.Charge ?? 0, 0);\r\n const refrigerantCost = refrigerants.reduce((sum, fgas) => sum + fgas.Cost ?? 0, 0);\r\n\r\n this.setValues(invoiceDetails, 0, 0, 0, refrigerantsCharge, refrigerantCost);\r\n });\r\n } else {\r\n this.jobService.GetJobInvoiceDetails(this.job.JobID)\r\n .subscribe((invoiceDetails) => {\r\n this.setValues(invoiceDetails, 0, 0, 0, 0, 0);\r\n });\r\n }\r\n }\r\n\r\n private setValues(\r\n invoiceDetails: JobInvoicingModel,\r\n partsCharge: number,\r\n partsCost: number,\r\n partsOnOrder: number,\r\n refrigerantsCharge: number,\r\n refrigerantCost: number): void {\r\n this.invoiceDetails = invoiceDetails;\r\n this.job.FlatCharge = invoiceDetails.FlatRate;\r\n this.labourCharge = invoiceDetails.LabourCharge;\r\n this.partsCharge = partsCharge;\r\n this.partsCost = partsCost;\r\n this.refrigerantsCharges = refrigerantsCharge;\r\n this.refrigerantsCosts = refrigerantCost;\r\n this.materialCharge = invoiceDetails.MaterialCharge;\r\n this.totalSum =\r\n invoiceDetails.FlatRate +\r\n invoiceDetails.LabourCharge +\r\n partsCharge +\r\n invoiceDetails.MaterialCharge +\r\n this.equipmentFlatChargeTotal +\r\n (this.fgasModuleEnabled ? refrigerantsCharge : 0);\r\n this.isEditableFlatCharge = this.job.IsEditableFlatCharge && !this.showCustomerCurrency;\r\n this.showCreditColumn = this.proEnabled && invoiceDetails.IsInvoiceCredited;\r\n const self = this;\r\n\r\n const totalCost = invoiceDetails.LabourCosts + invoiceDetails.MaterialCosts + partsCost + (this.fgasModuleEnabled ? refrigerantCost : 0);\r\n\r\n this.totals[0] = {\r\n Title: \"job.invoicing.costs\",\r\n FlatRate: null,\r\n Hours: invoiceDetails.CostHours,\r\n Labour: invoiceDetails.LabourCosts,\r\n Parts: partsCost,\r\n Refrigerants: refrigerantCost,\r\n Misc: invoiceDetails.MaterialCosts,\r\n Total: totalCost,\r\n Credits: invoiceDetails.CreditCosts,\r\n isBaseCurrency: true,\r\n ShowAsPercentage: false,\r\n ShowAsTotal: false,\r\n AllowEdit: false\r\n };\r\n\r\n this.totals[1] = {\r\n Title: \"job.invoicing.charges\",\r\n get FlatRate() {\r\n return invoiceDetails.FlatRate * self.currentRate;\r\n },\r\n set FlatRate(val: number) {\r\n invoiceDetails.FlatRate = val;\r\n self.job.FlatCharge = val;\r\n },\r\n Hours: invoiceDetails.ChargeHours,\r\n get Labour() {\r\n return invoiceDetails.LabourCharge * self.currentRate;\r\n },\r\n get Parts() {\r\n return partsCharge * self.currentRate;\r\n },\r\n get Refrigerants() {\r\n return refrigerantsCharge * self.currentRate;\r\n },\r\n get Misc() {\r\n return invoiceDetails.MaterialCharge * self.currentRate;\r\n },\r\n get Total() {\r\n return self.totalSum * self.currentRate;\r\n },\r\n get isBaseCurrency() {\r\n return !self.showCustomerCurrency;\r\n },\r\n Credits: invoiceDetails.CreditCharges,\r\n ShowAsPercentage: false,\r\n ShowAsTotal: false,\r\n AllowEdit: true\r\n };\r\n\r\n this.recalculateProfit();\r\n\r\n this.totals[4] = {\r\n Title: \"job.invoicing.onorder\",\r\n FlatRate: null,\r\n Hours: null,\r\n Labour: null,\r\n Parts: partsOnOrder,\r\n Refrigerants: null,\r\n Misc: invoiceDetails.MaterialCostsOnOrder,\r\n Total: partsOnOrder + invoiceDetails.MaterialCostsOnOrder,\r\n Credits: null,\r\n isBaseCurrency: true,\r\n ShowAsPercentage: false,\r\n ShowAsTotal: false,\r\n AllowEdit: false\r\n };\r\n }\r\n\r\n private recalculateProfit(): void {\r\n const totalCost = this.invoiceDetails.LabourCosts + this.invoiceDetails.MaterialCosts + this.partsCost + (this.fgasModuleEnabled ? this.refrigerantsCosts : 0);\r\n const totalCreditedCost = totalCost + this.invoiceDetails.CreditCosts;\r\n const totalCreditedCharge = this.totalSum + this.invoiceDetails.CreditCharges;\r\n this.totals[2] = {\r\n Title: \"job.invoicing.profit\",\r\n FlatRate: this.invoiceDetails.FlatRate + this.equipmentFlatChargeTotal,\r\n Hours: null,\r\n Labour: this.invoiceDetails.LabourCharge - this.invoiceDetails.LabourCosts,\r\n Parts: this.partsCharge - this.partsCost,\r\n Refrigerants: this.refrigerantsCharges - this.refrigerantsCosts,\r\n Misc: this.invoiceDetails.MaterialCharge - this.invoiceDetails.MaterialCosts,\r\n Total: this.totalSum - (this.invoiceDetails.LabourCosts + this.invoiceDetails.MaterialCosts + this.partsCost + (this.fgasModuleEnabled ? this.refrigerantsCosts : 0)),\r\n Credits: totalCreditedCharge - totalCreditedCost,\r\n isBaseCurrency: true,\r\n ShowAsPercentage: false,\r\n ShowAsTotal: true,\r\n AllowEdit: false\r\n };\r\n\r\n if (this.totals.length > 3) {\r\n this.totals[3].Credits = this.calculatePercentage(totalCreditedCharge, totalCreditedCost);\r\n }\r\n\r\n this.totals[3] = {\r\n Title: \"job.invoicing.margin\",\r\n FlatRate: null,\r\n Hours: null,\r\n Labour: this.calculatePercentage(this.invoiceDetails.LabourCharge, this.invoiceDetails.LabourCosts),\r\n Parts: this.calculatePercentage(this.partsCharge, this.partsCost),\r\n Refrigerants: this.calculatePercentage(this.refrigerantsCharges, this.refrigerantsCosts),\r\n Misc: this.calculatePercentage(this.invoiceDetails.MaterialCharge, this.invoiceDetails.MaterialCosts),\r\n Total: this.calculatePercentage(this.totalSum, totalCost),\r\n Credits: this.calculatePercentage(totalCreditedCharge, totalCreditedCost),\r\n isBaseCurrency: true,\r\n ShowAsPercentage: true,\r\n ShowAsTotal: true,\r\n AllowEdit: false\r\n };\r\n }\r\n\r\n public onRowPrepared(e: any): void {\r\n if (e.data && e.data.ShowAsTotal) {\r\n e.rowElement.style.backgroundColor = \"#f7f7f7\";\r\n e.rowElement.classList.remove(\"dx-row-alt\");\r\n e.rowElement.classList.add(\"last-row\");\r\n }\r\n }\r\n\r\n public showEditButton(e: any): boolean {\r\n return e.row.data && e.row.data.AllowEdit && !this.showCustomerCurrency && !e.row.isEditing && this.isEditableFlatCharge;\r\n }\r\n\r\n public UpdateEquipmentFlatChargeTotal(): void {\r\n this.equipmentDataService.GetJobEquipment(this.job.JobID).subscribe(equip => {\r\n this.equipmentFlatChargeTotal = equip.reduce((sum, jobEquip) => sum + jobEquip.Price ?? 0, 0);\r\n this.loadJobInvoiceData();\r\n });\r\n }\r\n\r\n private calculatePercentage(value: number, cost: number): number {\r\n return value > 0 ? ((value - cost) / value) * 100 : null;\r\n }\r\n}\r\n","import { GenericAttribute } from \"servicesight-shared\";\r\nimport { JobTypeTabsModel } from \"src/app/settings/job-settings/models/job-type-tabs.model\";\r\n\r\nexport class JobDetail {\r\n public JobID: number;\r\n public JobTypeID: number;\r\n public JobType: string;\r\n public SvcTypeID?: number;\r\n public DepotID: number;\r\n public CustomerID: number;\r\n public Customer: string;\r\n public SiteID: number;\r\n public Site: string;\r\n public EquipID?: number;\r\n public Attributes: GenericAttribute[] = [];\r\n public Reference: string; // Order Number\r\n public Authority: string;\r\n public QuoteDate?: Date;\r\n public CancelDate?: Date;\r\n public Instructed?: Date;\r\n public Logged: Date;\r\n public Due?: Date;\r\n public Completed?: Date;\r\n public ClosedDate?: Date;\r\n public Invoiced?: Date;\r\n public InvoiceNo?: number;\r\n public NoteId?: number;\r\n public InvCycleID?: number;\r\n public InvGroupingID?: number;\r\n public Status: number;\r\n public StatusDesc: string;\r\n public ToDo: string;\r\n public MaintContractID?: number;\r\n public MaintSvcGroupID: number;\r\n public HireContractID: number;\r\n public ContactName: string;\r\n public ContactTel: string;\r\n public ContactEmail: string;\r\n public ContactID?: number;\r\n public Contact: string;\r\n public EmployeeID: number;\r\n public CancelReasonID: number;\r\n public UserRef1JobLabel: string;\r\n public UserRef1JobID: number;\r\n public UserRef2JobLabel: string;\r\n public UserRef2JobID: string;\r\n public PartsEstimate: number;\r\n public LabourEstimate: number;\r\n public LabourEstimateHours: number;\r\n public MiscEstimate: number;\r\n public FlatChargeEstimate: number;\r\n public PartsQuote: number;\r\n public LabourQuote: number;\r\n public LabourQuoteHours: number;\r\n public MiscQuote: number;\r\n public FlatChargeQuote: number;\r\n public FixedPriceQuote: number;\r\n public FixedPriceParts: number;\r\n public FixedPriceMisc: number;\r\n public FixedPriceLabour: number;\r\n public FixedPriceFlatCharge: number;\r\n public PartsBudget: number;\r\n public LabourBudget: number;\r\n public LabourBudgetHours: number;\r\n public LabourBudgetFixed: number;\r\n public MiscBudget: number;\r\n public FlatCharge: number;\r\n public JobFaultID: number;\r\n public JobCauseID: number;\r\n public JobActionID: number;\r\n public LabourProfileID: number;\r\n public InvShowHeaderText: boolean;\r\n public InvSessionSummary: boolean;\r\n public InvShowSessionText: boolean;\r\n public InvHeaderText: string;\r\n public InvShowFault: string;\r\n public InvCombineLabourRates: boolean;\r\n public InvCombineTravel: boolean;\r\n public InvAverageLabourRates: boolean;\r\n public InvHideZeroPricedItems: boolean;\r\n public InvSummariseParts: boolean;\r\n public InvSummariseLabour: boolean;\r\n public InvEquipList: number;\r\n public InvEquipCategory: number;\r\n public InvEquipGroup: number;\r\n public SvcJobRunID: number;\r\n public Priority: number;\r\n public SalesOpportunityID?: number;\r\n public RecordModified: Date;\r\n public SalesQuotationId?: number;\r\n public SalesQuotationRevisionId?: string;\r\n public CancelledByID?: number;\r\n public CustomerTaxCodeID: number;\r\n public ExchangeRate: number;\r\n public ExchangeRateFixed: number;\r\n public Notes: string;\r\n public CompletedByID?: number;\r\n public SalesEmployeeID?: number;\r\n public MultiEquip: number;\r\n public NewWork: number;\r\n public EstimatedLabourCost: number;\r\n public EstimatedPartsCost: number;\r\n public EstimatedMiscCost: number;\r\n public IsInvoiceable: boolean;\r\n public IsBaseCurrency: boolean;\r\n public CurrencySymbol: string;\r\n public IsEditableReference: boolean;\r\n public IsEditableUserRef1JobID: boolean;\r\n public IsEditableUserRef2JobID: boolean;\r\n public IsEditableToDo: boolean;\r\n public IsEditableFlatCharge: boolean;\r\n public IsEditableInvHeaderText: boolean;\r\n public IsAllowedAddAttachment: boolean;\r\n public IsAllowedAddMiscItem: boolean;\r\n public IsAllowedAddSession: boolean;\r\n public IsAllowedChangeJobType: boolean;\r\n public IsAllowedChangeCustomer: boolean;\r\n public IsAllowedChangeSite: boolean;\r\n public IsAllowedPlace: boolean;\r\n public IsAllowedCancel: boolean;\r\n public IsAllowedComplete: boolean;\r\n public IsAllowedPreviewInvoice: boolean;\r\n public IsAllowedUncomplete: boolean;\r\n public IsAllowedInvoiceImmediate: boolean;\r\n public IsAllowedExchangeRate: boolean;\r\n public IsAllowedDue: boolean;\r\n public IsAllowedInspection: boolean;\r\n public HasJobActivityTypes: boolean;\r\n public Chargeable: boolean;\r\n public CustomerHasContract: boolean;\r\n public SkipCheckFixedPrices: boolean;\r\n public WhatThreeWords: string;\r\n public Latitude: number;\r\n public Longitude: number;\r\n public Timestamp?: string;\r\n public ReverseChargeVat: boolean;\r\n public Tabs: JobTypeTabsModel[];\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { Observable } from \"rxjs\";\r\nimport { InsepectionTemplate } from \"../models/insepection-template\";\r\nimport { JobTypeTemplateItem } from \"../models/jobtype-template-item\";\r\nimport { InspectionsAutoComplete } from \"../models/inspections-autocomplete\";\r\nimport { TemplateListItem } from \"src/app/inspections/models/inspection-template-list-item\";\r\nimport { IAppConfig, APP_CONFIG, IODataService } from \"servicesight-shared\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class InspectionTemplateService {\r\n private readonly serviceSightODataBaseUrl: string;\r\n private readonly baseUrl: string;\r\n private readonly templateUrl: string;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(\"ODataService\") protected odataService: IODataService,\r\n @Inject(APP_CONFIG) appConfig: IAppConfig) {\r\n this.baseUrl = appConfig.apiLocations.Inspections;\r\n this.templateUrl = this.baseUrl + \"template\";\r\n this.serviceSightODataBaseUrl = appConfig.apiLocations.ServiceSightOData;\r\n }\r\n\r\n public GetAll(excludeJobId: number = null): Observable> {\r\n const query = excludeJobId ? \"?excludeJobId=\" + excludeJobId : \"\";\r\n return this.http.get>(this.templateUrl + query);\r\n }\r\n\r\n public GetAllByJobTypeId(jobTypeId: number): Observable {\r\n return this.http\r\n .get(`${this.baseUrl}jobtype/${jobTypeId}`);\r\n }\r\n\r\n public GetById(id: number): Observable {\r\n return this.http.get(`${this.templateUrl}/${id}`);\r\n }\r\n\r\n public GetAllAutoComplete(): Observable {\r\n return this.http.get(this.baseUrl + \"TemplateAutoComplete\");\r\n }\r\n\r\n public Save(template: InsepectionTemplate, isImport: boolean = false): Observable {\r\n return this.http.post(`${this.templateUrl}?isImport=${isImport}`, template);\r\n }\r\n\r\n public DeleteById(id: number): Observable {\r\n return this.http.delete(`${this.templateUrl}/${id}`);\r\n }\r\n\r\n public CloneTemplate(id: number): Promise {\r\n return this.http.post(`${this.templateUrl}/${id}/Clone`, null).toPromise();\r\n }\r\n\r\n public GetLayoutTemplateDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: this.serviceSightODataBaseUrl + \"LayoutTemplateOD\",\r\n key: \"TemplateId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { BehaviorSubject } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { ReasonNotDonePermissions } from \"../../settings/models/reason-not-done-permissions\";\r\nimport { InspectionPermissions } from \"../models/inspection-permissions\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class InspectionPermissionsService {\r\n public HasSkipPermission: BehaviorSubject = new BehaviorSubject(false);\r\n public HasOutstandingPermission: BehaviorSubject = new BehaviorSubject(false);\r\n public HasAddPermission: BehaviorSubject = new BehaviorSubject(false);\r\n public HasDeletePermission: BehaviorSubject = new BehaviorSubject(false);\r\n public HasAddPermissionReasonNotDone: BehaviorSubject = new BehaviorSubject(false);\r\n\r\n constructor(\r\n http: HttpClient,\r\n @Inject(APP_CONFIG) appConfig: IAppConfig) {\r\n http.get(appConfig.apiLocations.Inspections + \"Permissions\").subscribe(x => {\r\n this.HasSkipPermission.next(x.MarkAsSkipped);\r\n this.HasOutstandingPermission.next(x.MarkAsOutstanding);\r\n this.HasAddPermission.next(x.AddInspection);\r\n this.HasDeletePermission.next(x.DeleteInspection);\r\n });\r\n\r\n http.get(appConfig.apiLocations.Inspections + \"Permissions/reasonpermission\")\r\n .subscribe( x => {\r\n this.HasAddPermissionReasonNotDone.next(x.Add);\r\n });\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\nimport { InspectionSummary } from \"../models/inspection-summary\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class InspectionsService {\r\n private readonly inspectionUrl: string;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private odataService: ODataService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) {\r\n this.inspectionUrl = this.appConfig.apiLocations.Inspections + \"Inspection/\";\r\n }\r\n\r\n public GetAll(): Observable {\r\n return this.http.get(this.inspectionUrl);\r\n }\r\n\r\n public GetDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: this.appConfig.apiLocations.InspectionsOData + \"Inspections\",\r\n key: \"InspectionId\",\r\n keyType: \"String\",\r\n paging: true,\r\n pageSize: 50\r\n });\r\n }\r\n\r\n public MarkAsSkipped(inspectionId: number): Promise {\r\n return this.http.put(this.inspectionUrl + inspectionId + \"/Skipped\", null).toPromise();\r\n }\r\n\r\n public MarkAsOutstanding(inspectionId: number): Promise {\r\n return this.http.put(this.inspectionUrl + inspectionId + \"/Outstanding\", null).toPromise();\r\n }\r\n\r\n public Delete(inspectionId: number): Promise {\r\n return this.http.delete(this.inspectionUrl + inspectionId).toPromise();\r\n }\r\n\r\n public AddToJobSession(inspectionId: number, jobId: number): Promise {\r\n return this.http.put(this.inspectionUrl + inspectionId + \"/AddToJobSession/\" + jobId, null).toPromise();\r\n }\r\n\r\n public AddEquipment(inspectionId: number, equipmentItemId: number): Promise {\r\n return this.http.put(this.inspectionUrl + inspectionId + \"/AddEquipment/\" + equipmentItemId, null).toPromise();\r\n }\r\n\r\n public IssueCertificate(inspectionId: number, reasonId: number): Promise {\r\n return this.http.put(this.inspectionUrl + inspectionId + \"/IssueCertificate/\" + reasonId, null).toPromise();\r\n }\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG, JobVisitListItem } from \"servicesight-shared\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class JobVisitService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private odataService: ODataService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) { }\r\n\r\n public GetDataStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: this.appConfig.apiLocations.ServiceSightOData + \"JobVisitOD\",\r\n key: \"CompositeKey\",\r\n keyType: \"String\"\r\n });\r\n }\r\n\r\n //TODO: move to Jobs service\r\n public GetJobsDataStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: this.appConfig.apiLocations.ServiceSightOData + \"JobOD\",\r\n key: \"JobID\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetInspectionAvailable(jobId: number): Observable {\r\n return this.http.get(this.appConfig.apiLocations.ServiceSight + \"JobVisit/GetJobVisits?jobId=\" + jobId);\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\n\r\nexport enum InspectionType {\r\n PreVisit = 1,\r\n InVisit = 2,\r\n PostVisit = 3\r\n //,Feedback = 4\r\n}\r\n\r\n@Pipe({\r\n name: \"inspectionType\"\r\n})\r\nexport class InspectionTypePipe implements PipeTransform {\r\n transform(value: any): any {\r\n return \"inspections.type.\" + InspectionType[value];\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\n\r\nexport enum InspectionAutocomplete {\r\n None = 1,\r\n UseDefaults = 2,\r\n FromPrevious = 3,\r\n}\r\n\r\n@Pipe({\r\n name: \"inspectionAutocomplete\"\r\n})\r\nexport class InspectionAutocompletePipe implements PipeTransform {\r\n\r\n transform(value: any): any {\r\n return \"inspections.autocomplete.\" + InspectionAutocomplete[value];\r\n }\r\n\r\n}\r\n","\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n
\r\n {{ data.value | inspectionType | translate }}\r\n
\r\n\r\n
\r\n {{ data.value | inspectionAutocomplete | translate }}\r\n
\r\n \r\n\r\n
\r\n \r\n \r\n
\r\n","import { Component, EventEmitter, Input, Output, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport { TemplateListItem } from \"src/app/inspections/models/inspection-template-list-item\";\r\n\r\n@Component({\r\n selector: \"app-inspection-template-dialog\",\r\n templateUrl: \"./inspection-template-dialog.component.html\",\r\n styleUrls: [\"./inspection-template-dialog.component.scss\"]\r\n})\r\nexport class InspectionTemplateDialogComponent {\r\n @Input() public addableTemplates: TemplateListItem[] = [];\r\n @Input() public showTemplateDialog: boolean = false;\r\n @Output() public showTemplateDialogChange: EventEmitter = new EventEmitter();\r\n @Output() public inspectionsAdded: EventEmitter = new EventEmitter();\r\n\r\n @ViewChild(\"templategrid\") private templategrid: DxDataGridComponent;\r\n\r\n public SearchText: string = \"\";\r\n public selectedTemplateIds: number[] = [];\r\n\r\n constructor() { }\r\n\r\n public DialogClosed(): void {\r\n this.showTemplateDialog = false;\r\n this.showTemplateDialogChange.emit(this.showTemplateDialog);\r\n this.selectedTemplateIds = [];\r\n this.SearchText = \"\";\r\n }\r\n\r\n public AddInspections(): void {\r\n this.inspectionsAdded.emit(this.selectedTemplateIds);\r\n this.DialogClosed();\r\n }\r\n\r\n public OnSearchValueChange(): void {\r\n this.templategrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n}\r\n","import { Component, EventEmitter, OnInit, Output } from \"@angular/core\";\r\nimport { CertificateIssueReason } from \"../models/certificate-issue-reason.model\";\r\nimport { CertificateIssueReasonsService } from \"../services/certificate-issue-reasons.service\";\r\n\r\n@Component({\r\n selector: \"app-issue-certificate-popup\",\r\n templateUrl: \"./issue-certificate-popup.component.html\",\r\n styleUrls: [\"./issue-certificate-popup.component.scss\"]\r\n})\r\nexport class IssueCertificatePopupComponent implements OnInit {\r\n\r\n @Output() cancel = new EventEmitter();\r\n @Output() confirm = new EventEmitter();\r\n public isIssueCertificateDialogVisible: boolean = true;\r\n public certificateIssueReasons: Array;\r\n public selectedCertificateIssueReason: string = null;\r\n\r\n constructor(private reasonsService: CertificateIssueReasonsService) { }\r\n\r\n public ngOnInit(): void {\r\n this.certificateIssueReasons = this.reasonsService.GetReasons();\r\n }\r\n\r\n public Cancel(): void {\r\n this.cancel.emit();\r\n }\r\n\r\n public Confirm(): void {\r\n this.confirm.emit(this.selectedCertificateIssueReason);\r\n }\r\n}\r\n","\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n","
\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n {{data.value}}\r\n {{data.value}}\r\n
\r\n
\r\n {{data.value}}\r\n
\r\n
{{data.value | inspectionStatusValue | translate}}
\r\n \r\n
\r\n \r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n

{{ \"job.save-job-first.inspections\" | translate }}

\r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n\r\n\r\n\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport {\r\n AssignableEquipmentListItem,\r\n FormMesssageService,\r\n InspectionService,\r\n InspectionStatus,\r\n JobVisitListItem,\r\n Module,\r\n ModuleService\r\n} from \"servicesight-shared\";\r\nimport { EquipmentService } from \"src/app/equipment/services/equipment.service\";\r\nimport { InspectionTemplateService } from \"src/app/settings/services/inspection-template.service\";\r\nimport { InspectionSummary } from \"../models/inspection-summary\";\r\nimport { TemplateListItem } from \"../models/inspection-template-list-item\";\r\nimport { InspectionPermissionsService } from \"../services/inspection-permissions.service\";\r\nimport { InspectionSummaryService } from \"../services/inspection-summary.service\";\r\nimport { InspectionsService } from \"../services/inspections.service\";\r\nimport { JobVisitService } from \"../services/job-visit.service\";\r\n\r\n@Component({\r\n selector: \"app-inspections-job-list\",\r\n templateUrl: \"./inspections-job-list.component.html\",\r\n styleUrls: [\"./inspections-job-list.component.scss\"]\r\n})\r\nexport class InspectionsJobListComponent implements OnInit {\r\n @Input() public jobId: number = null;\r\n @Input() public recentlyDeletedId: number;\r\n @Output() openVisit = new EventEmitter();\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n public readonly formName: string = \"jobform\";\r\n\r\n public showWarning: boolean = false;\r\n public isLoading: boolean = false;\r\n public showTemplateDialog: boolean = false;\r\n public showVisitDialog: boolean = false;\r\n public showEquipmentDialog: boolean = false;\r\n public selectedInspectionDisplay: string;\r\n public hasSkipPermission: boolean;\r\n public hasOutstandingPermission: boolean;\r\n public hasDeletePermission: boolean;\r\n public hasAddPermission: boolean;\r\n public inspections: InspectionSummary[];\r\n public addableTemplates: Array;\r\n public assignableVisits: Array;\r\n public assignableEquipments: Array;\r\n public selectedVisitIds: Array = [];\r\n public selectedInspectionIds: Array = [];\r\n public selectedEquipmentIds: Array = [];\r\n public addToEquipDisabled: boolean = true;\r\n public addToVisitDisabled: boolean = true;\r\n public equipmentModuleEnabled: boolean = false;\r\n public showDeleteMessage: boolean = false;\r\n public cftsModuleEnabled: boolean = false;\r\n public selectedInspectionId: number;\r\n public isIssueCertificateDialogVisible: boolean = false;\r\n\r\n private loadedJobId: number = null;\r\n\r\n constructor(\r\n private inspectionSummaryService: InspectionSummaryService,\r\n private permissionsService: InspectionPermissionsService,\r\n private inspectionService: InspectionService,\r\n private inspectionsService: InspectionsService,\r\n private inspectionTemplateService: InspectionTemplateService,\r\n private jobVisitService: JobVisitService,\r\n private equipmentService: EquipmentService,\r\n private formMessageService: FormMesssageService,\r\n private moduleService: ModuleService) { }\r\n\r\n ngOnInit() {\r\n this.permissionsService.HasSkipPermission.subscribe(x => this.hasSkipPermission = x);\r\n this.permissionsService.HasOutstandingPermission.subscribe(x => this.hasOutstandingPermission = x);\r\n this.permissionsService.HasDeletePermission.subscribe(x => this.hasDeletePermission = x);\r\n this.permissionsService.HasAddPermission.subscribe(x => this.hasAddPermission = x);\r\n\r\n if (this.loadedJobId !== this.jobId) {\r\n this.loadList();\r\n }\r\n\r\n this.inspectionService.equipmentChanged.subscribe(() => {\r\n this.loadList();\r\n });\r\n\r\n this.inspectionService.inspectionChanged.subscribe(() => {\r\n this.loadList();\r\n });\r\n\r\n this.moduleService.GetEnabledModules().subscribe(o => {\r\n this.equipmentModuleEnabled = o.includes(Module.Equipment);\r\n });\r\n\r\n this.moduleService.GetEnabledModules().subscribe(o => {\r\n this.cftsModuleEnabled = o.includes(Module.CFTS);\r\n });\r\n }\r\n\r\n // eslint-disable-next-line\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (changes.jobId && changes.jobId.currentValue && changes.jobId.currentValue !== this.loadedJobId) {\r\n this.loadList();\r\n } else if (changes.recentlyDeletedId && changes.recentlyDeletedId.currentValue && changes.recentlyDeletedId.currentValue !== changes.recentlyDeletedId.previousValue) {\r\n this.loadList();\r\n }\r\n }\r\n\r\n MarkAsSkipped() {\r\n this.isLoading = true;\r\n const inspections = this.getSelectedInspections();\r\n const promises: Promise[] = [];\r\n inspections.forEach(element => {\r\n const markAsSkippedPromise = this.formMessageService.RegisterPromise(this.inspectionsService.MarkAsSkipped(element.InspectionId), this.formName);\r\n promises.push(markAsSkippedPromise);\r\n });\r\n Promise.all(promises).then(this.loadList.bind(this));\r\n }\r\n\r\n MarkAsOutstanding() {\r\n this.isLoading = true;\r\n const inspections = this.getSelectedInspections();\r\n const promises: Promise[] = [];\r\n inspections.forEach(element => {\r\n const markAsOutstandingPromise = this.formMessageService.RegisterPromise(this.inspectionsService.MarkAsOutstanding(element.InspectionId), this.formName);\r\n promises.push(markAsOutstandingPromise);\r\n });\r\n Promise.all(promises).then(this.loadList.bind(this));\r\n }\r\n\r\n Delete() {\r\n this.showDeleteMessage = true;\r\n }\r\n\r\n public ConfirmDeleteAction(confirm: boolean): void {\r\n if (confirm) {\r\n this.isLoading = true;\r\n const inspections = this.getSelectedInspections();\r\n const promises: Promise[] = [];\r\n inspections.forEach(element => {\r\n const deletePromise = this.formMessageService.RegisterPromise(this.inspectionsService.Delete(element.InspectionId), this.formName);\r\n promises.push(deletePromise);\r\n });\r\n Promise.all(promises)\r\n .then(this.loadList.bind(this))\r\n .then(() => this.inspectionService.InspectionChanged());\r\n }\r\n this.showDeleteMessage = false;\r\n }\r\n\r\n OpenVisitDialog() {\r\n const inspections = this.getSelectedInspections();\r\n this.selectedInspectionDisplay = inspections.map(i => i.InspectionId).join(\",\");\r\n this.showVisitDialog = true;\r\n this.jobVisitService.GetInspectionAvailable(this.jobId).subscribe((val) => this.assignableVisits = val);\r\n document.querySelector(\"body\").style.overflow = \"hidden\";\r\n }\r\n\r\n OpenEquipmentDialog() {\r\n const inspections = this.getSelectedInspections();\r\n this.selectedInspectionDisplay = inspections.map(i => i.InspectionId).join(\",\");\r\n this.showEquipmentDialog = true;\r\n this.equipmentService.GetAssignableEquipment(this.jobId).subscribe((val) => this.assignableEquipments = val);\r\n document.querySelector(\"body\").style.overflow = \"hidden\";\r\n }\r\n\r\n AddToSession() {\r\n this.isLoading = true;\r\n const jobSessionId = this.selectedVisitIds[0];\r\n const inspections = this.getSelectedInspections();\r\n const promises: Promise[] = [];\r\n inspections.forEach(element => {\r\n const addToSessionPromise = this.formMessageService.RegisterPromise(this.inspectionsService.AddToJobSession(element.InspectionId, jobSessionId), this.formName);\r\n promises.push(addToSessionPromise);\r\n });\r\n Promise.all(promises)\r\n .then(() => {\r\n this.showVisitDialog = false;\r\n this.selectedVisitIds = [];\r\n })\r\n .then(this.loadList.bind(this));\r\n }\r\n\r\n AddToEquipment() {\r\n this.isLoading = true;\r\n const equipmentItemId = this.selectedEquipmentIds[0];\r\n const inspections = this.getSelectedInspections();\r\n const promises: Promise[] = [];\r\n inspections.forEach(element => {\r\n const addToEquipmentPromise = this.formMessageService.RegisterPromise(this.inspectionsService.AddEquipment(element.InspectionId, equipmentItemId), this.formName);\r\n promises.push(addToEquipmentPromise);\r\n });\r\n Promise.all(promises)\r\n .then(() => {\r\n this.showEquipmentDialog = false;\r\n this.selectedEquipmentIds = [];\r\n })\r\n .then(() => this.inspectionService.InspectionChanged())\r\n .then(this.loadList.bind(this));\r\n }\r\n\r\n CloseVisitDialog() {\r\n this.showVisitDialog = false;\r\n }\r\n\r\n CloseEquipmentDialog() {\r\n this.showEquipmentDialog = false;\r\n }\r\n\r\n public OpenInspectionDialog(): void {\r\n if (!this.jobId) {\r\n this.showWarning = true;\r\n } else {\r\n this.showTemplateDialog = true;\r\n this.inspectionTemplateService.GetAll(this.jobId).subscribe((res: Array) => {\r\n this.addableTemplates = res;\r\n });\r\n document.querySelector(\"body\").style.overflow = \"hidden\";\r\n }\r\n }\r\n\r\n public CloseInspectionDialog(): void {\r\n this.showTemplateDialog = false;\r\n this.DialogClosed();\r\n }\r\n\r\n public DialogClosed(): void {\r\n document.querySelector(\"body\").style.overflow = \"\";\r\n }\r\n\r\n public AddInspecitons(selectedTemplateIds: number[]): void {\r\n if (selectedTemplateIds.length > 0) {\r\n this.formMessageService.RegisterObservable(\r\n this.inspectionSummaryService.AddInspectionToJob(this.jobId, selectedTemplateIds), this.formName\r\n ).subscribe(value => {\r\n this.showTemplateDialog = false;\r\n this.inspections = value;\r\n }, () => this.showTemplateDialog = false);\r\n } else {\r\n // TODO: there was none selected\r\n this.showTemplateDialog = false;\r\n }\r\n }\r\n\r\n GoToVisit(visitId: number) {\r\n this.openVisit.emit(visitId);\r\n }\r\n\r\n getSelectedInspections(): InspectionSummary[] {\r\n return this.dataGrid ? this.dataGrid.instance.getSelectedRowsData() : [];\r\n }\r\n\r\n onInspectionSelectionChanged(value: any) {\r\n this.addToEquipDisabled = value.selectedRowsData.length === 0 || value.selectedRowsData.some(x => x.EquipItemId !== null && x.Status !== InspectionStatus.Outstanding);\r\n this.addToVisitDisabled = value.selectedRowsData.length === 0 || value.selectedRowsData.some(x => x.EquipItemId !== null);\r\n }\r\n\r\n public showIssueCertificateDialog(data: InspectionSummary): void {\r\n this.selectedInspectionId = data.InspectionId;\r\n this.isIssueCertificateDialogVisible = true;\r\n }\r\n\r\n public isIssueCertificateButtonVisible(data: InspectionSummary): boolean {\r\n return this.cftsModuleEnabled\r\n && data.Status === InspectionStatus.Fail\r\n && data.AuthBodyId === 1;\r\n }\r\n\r\n public issueCertificate(reasonId: number): void {\r\n this.inspectionsService.IssueCertificate(this.selectedInspectionId, reasonId)\r\n .then(() => { this.isIssueCertificateDialogVisible = false; });\r\n }\r\n\r\n private loadList() {\r\n if (this.dataGrid.instance) {\r\n this.dataGrid.instance.clearSelection();\r\n }\r\n if (this.jobId != null) {\r\n this.loadedJobId = this.jobId;\r\n this.inspectionSummaryService.GetByJob(this.jobId)\r\n .subscribe(value => {\r\n this.inspections = value;\r\n this.isLoading = false;\r\n });\r\n }\r\n if (this.recentlyDeletedId) {\r\n this.recentlyDeletedId = 0;\r\n }\r\n }\r\n}\r\n","export class JobDetailsAcoordionModel {\r\n public JobId: number;\r\n public SalesQuotationId: number;\r\n public SalesQuotationRevisionId: number;\r\n public Logged: Date;\r\n public EnteredBy: string;\r\n public SalesQuotationTotal: number;\r\n public Completed: Date;\r\n public CancelDate: Date;\r\n public CancelledBy: string;\r\n public CancelReason: string;\r\n public Invoiced: Date;\r\n public InvoiceNo: string;\r\n public NoteId: number;\r\n public OrderNo: number;\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ 'job.detail.accordion.quote.no' | translate }}\r\n \r\n {{ job.SalesQuotationId }}/{{ job.SalesQuotationRevisionId }}\r\n \r\n
{{ 'job.detail.accordion.entered' | translate }}\r\n {{ job.Logged | date: 'short' }}\r\n
{{ 'job.detail.accordion.entered.by' | translate }}\r\n {{ job.EnteredBy }}\r\n
{{ 'job.detail.accordion.quote.total' | translate }}\r\n {{ job.SalesQuotationTotal | currency: currencySymbol }}\r\n
{{ 'job.detail.accordion.completed' | translate }}\r\n {{ job.Completed | date: 'short' }}\r\n
{{ 'job.detail.accordion.cancelled' | translate }}\r\n {{ job.CancelDate | date: 'shortDate' }}\r\n
{{ 'job.detail.accordion.cancelled.by' | translate }}\r\n {{ job.CancelledBy }}\r\n
{{ 'job.detail.accordion.cancel.reason' | translate }}\r\n {{ job.CancelReason }}\r\n
{{ 'job.detail.accordion.invoiced' | translate }}\r\n {{ job.Invoiced | date: 'shortDate' }}\r\n
{{ 'job.detail.accordion.quote.orderNumber' | translate }}\r\n {{ job.OrderNo }}\r\n
{{ 'job.detail.accordion.invoice.no' | translate }}\r\n \r\n {{ job.InvoiceNo }}\r\n \r\n
\r\n","import { Component, Input, OnChanges, OnInit, SimpleChanges } from \"@angular/core\";\r\nimport { AccordionDataService } from \"../accordion-data.service\";\r\nimport { JobDetailsAcoordionModel } from \"../models/job-details-accordion-model\";\r\n\r\n@Component({\r\n selector: \"app-job-details-accordion-item\",\r\n templateUrl: \"./job-details-accordion-item.component.html\",\r\n styleUrls: [\"./job-details-accordion-item.component.scss\"]\r\n})\r\nexport class JobDetailsAccordionItemComponent implements OnInit, OnChanges {\r\n @Input() jobId: number;\r\n public job = new JobDetailsAcoordionModel();\r\n public currencySymbol: string;\r\n\r\n constructor(private service: AccordionDataService) { }\r\n\r\n ngOnInit() {\r\n this.currencySymbol = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n this.service.jobCancelledChanged.subscribe(() => {\r\n this.service.getJobDetail(this.jobId).subscribe(res => {\r\n this.job = res;\r\n });\r\n });\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.jobId && changes.jobId.currentValue) {\r\n this.service.getJobDetail(changes.jobId.currentValue).subscribe(res => {\r\n this.job = res;\r\n });\r\n }\r\n }\r\n\r\n goQuote(): void {\r\n if (this.job.SalesQuotationId && this.job.SalesQuotationRevisionId) {\r\n location.href = `/#/quotes/details/${this.job.SalesQuotationId}/${this.job.SalesQuotationRevisionId}`;\r\n }\r\n }\r\n\r\n goInvoice(): void {\r\n if (this.job.InvoiceNo) {\r\n location.href = `/#/invoices/invoice/${this.job.NoteId}`;\r\n }\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG, Survey, SurveyBase } from \"servicesight-shared\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class SurveyService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private config: IAppConfig\r\n ) { }\r\n\r\n public GetAll(): Observable {\r\n return this.http.get(`${this.config.apiLocations.Consumers}Survey`);\r\n }\r\n\r\n public Get(surveyId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.Consumers}Survey/${surveyId}`);\r\n }\r\n\r\n public Save(survey: Survey): Observable {\r\n return this.http.post(`${this.config.apiLocations.Consumers}Survey`, survey);\r\n }\r\n\r\n public Send(surveyId: any, inviteEmail: string, customerId: number, jobId: number | null): Observable {\r\n return this.http.post(`${this.config.apiLocations.Consumers}Survey/${surveyId}/Send`, {\r\n ContactEmail: inviteEmail,\r\n CustomerId: customerId,\r\n JobId: jobId\r\n });\r\n }\r\n}\r\n","import { Component, Input, OnInit } from \"@angular/core\";\r\nimport { SurveyBase } from \"servicesight-shared\";\r\nimport { SurveyService } from \"src/app/settings/services/survey.service\";\r\n\r\n@Component({\r\n selector: \"app-survey-dialog\",\r\n templateUrl: \"./survey-dialog.component.html\",\r\n styleUrls: [\"./survey-dialog.component.scss\"]\r\n})\r\nexport class SurveyDialogComponent implements OnInit {\r\n @Input() public showDialog: boolean;\r\n @Input() public inviteEmail: string;\r\n @Input() public customerId: number;\r\n @Input() public jobId: number | null = null;\r\n\r\n public surveys: SurveyBase[] = [];\r\n\r\n constructor(\r\n private surveyService: SurveyService\r\n ) {\r\n this.sendSurveyClick = this.sendSurveyClick.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.surveyService.GetAll().subscribe(surveys => {\r\n this.surveys = surveys;\r\n });\r\n }\r\n\r\n public Dismiss(): void {\r\n this.showDialog = false;\r\n }\r\n\r\n public sendSurveyClick(e: any): void {\r\n if (this.inviteEmail && this.inviteEmail.length > 0) {\r\n const surveyId = e.row.data.SurveyId;\r\n\r\n this.surveyService.Send(\r\n surveyId,\r\n this.inviteEmail,\r\n this.customerId,\r\n this.jobId).subscribe(() => {\r\n });\r\n } else {\r\n alert(\"Contact must have a valid email address.\");\r\n }\r\n\r\n e.event.preventDefault();\r\n }\r\n}\r\n","\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n","import { Component, Input, OnInit } from \"@angular/core\";\r\n\r\n@Component({\r\n selector: \"app-surveys-accordion-item\",\r\n templateUrl: \"./surveys-accordion-item.component.html\",\r\n styleUrls: [\"./surveys-accordion-item.component.scss\"]\r\n})\r\nexport class SurveysAccordionItemComponent implements OnInit {\r\n @Input() public jobId: number;\r\n\r\n constructor() { }\r\n\r\n public ngOnInit(): void {\r\n }\r\n\r\n}\r\n","

surveys-accordion-item works!

\r\n","import { Component, EventEmitter, Input, Output, ViewChild } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport { JobTypeTabsModel } from \"src/app/settings/job-settings/models/job-type-tabs.model\";\r\n\r\n@Component({\r\n selector: \"app-job-tabs-popup\",\r\n templateUrl: \"./job-tabs-popup.component.html\",\r\n styleUrls: [\"./job-tabs-popup.component.scss\"]\r\n})\r\nexport class JobTabsPopupComponent {\r\n @ViewChild(\"dataGrid\", { static: true }) grid: DxDataGridComponent;\r\n\r\n @Input() public showDialog: boolean;\r\n @Input() public jobTabs: JobTypeTabsModel[] = [];\r\n @Output() tabsAdded = new EventEmitter();\r\n\r\n public SearchText: string = \"\";\r\n private addedTabs: JobTypeTabsModel[] = [];\r\n\r\n constructor(private translateService: TranslateService) {\r\n this.GetTabName = this.GetTabName.bind(this);\r\n }\r\n\r\n public OnSearchChanged(): void {\r\n if (this.SearchText.length > 0) {\r\n const filter = [\r\n [ \"DisplayText\", \"contains\", this.SearchText ]\r\n ];\r\n this.grid.instance.filter(filter);\r\n } else {\r\n this.grid.instance.clearFilter();\r\n }\r\n }\r\n\r\n public GetTabName(item: JobTypeTabsModel): string {\r\n return this.translateService.instant(item.DisplayText);\r\n }\r\n\r\n public SelectionChangedHandler(e): void {\r\n const selectedData = e.selectedRowsData;\r\n this.addedTabs = selectedData;\r\n }\r\n\r\n public Hide(): void {\r\n this.tabsAdded.emit(this.addedTabs);\r\n }\r\n}\r\n","\r\n \r\n \r\n\r\n \r\n
\r\n \r\n
\r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n
\r\n\r\n\r\n\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { APP_CONFIG, IAppConfig, IProteanResponse } from \"servicesight-shared\";\r\nimport { ODataService } from \"../../../shared/services/odata/odata.service\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { Observable } from \"rxjs\";\r\nimport { PriorityModel } from \"../models/priority.model\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class PriorityService {\r\n private readonly baseUrl = this.appConfig.apiLocations.ServiceSight;\r\n private readonly priorityUrl = this.baseUrl + \"Priority/\";\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private odataService: ODataService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) {\r\n }\r\n\r\n public ODataPriorities(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.appConfig.apiLocations.ServiceSightOData}PriorityOD`,\r\n key: \"PriorityId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public OrderedPrioritiesDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.appConfig.apiLocations.ServiceSightOData}PriorityOD`,\r\n key: \"PriorityId\",\r\n keyType: \"Int32\",\r\n sortSelector: \"SortOrder\",\r\n });\r\n }\r\n\r\n public GetPriority(priorityId: number): Observable {\r\n return this.http.get(`${this.priorityUrl}GetPriority?priorityId=${priorityId}`);\r\n }\r\n\r\n public DeletePriority(priorityId: number): Observable {\r\n return this.http.post(`${this.priorityUrl}DeletePriority?priorityId=${priorityId}`, priorityId);\r\n }\r\n\r\n public CreatePriority(model: PriorityModel): Observable {\r\n return this.http.post(`${this.priorityUrl}CreatePriority`, model);\r\n }\r\n\r\n public UpdatePriority(model: PriorityModel): Observable {\r\n return this.http.post(`${this.priorityUrl}UpdatePriority`, model);\r\n }\r\n\r\n public UpdateSortOrder(fromIndex: number, toIndex: number): Observable {\r\n return this.http.put(`${this.priorityUrl}/UpdateSortOrder`, { fromIndex, toIndex });\r\n }\r\n\r\n public GetPriorityUsageCount(priorityId: number): Observable {\r\n return this.http.get(`${this.priorityUrl}/PriorityInUse?priorityId=${priorityId}`);\r\n }\r\n\r\n}\r\n","\r\n\r\n","import { Component, Input, OnChanges, SimpleChanges } from \"@angular/core\";\r\nimport { PriorityModel } from \"src/app/settings/job-settings/models/priority.model\";\r\nimport { PriorityService } from \"src/app/settings/job-settings/services/priority.service\";\r\n\r\n@Component({\r\n selector: \"app-priority-icon\",\r\n templateUrl: \"./priority-icon.component.html\",\r\n styleUrls: [\"./priority-icon.component.scss\"]\r\n})\r\nexport class PriorityIconComponent implements OnChanges {\r\n @Input() priorityId: number;\r\n @Input() size: number = 30;\r\n public iconDetails: PriorityModel;\r\n\r\n constructor(private priorityService: PriorityService) {}\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.priorityId) {\r\n this.SetIconDetails();\r\n }\r\n }\r\n\r\n private SetIconDetails(): void {\r\n if (this.priorityId) {\r\n this.priorityService.GetPriority(this.priorityId).subscribe(icon => {\r\n this.iconDetails = icon;\r\n });\r\n }\r\n }\r\n}\r\n","
\r\n \r\n \r\n
\r\n
\r\n \r\n
{{ infoText }}
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n\r\n\r\n","import {\r\n AfterViewInit,\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnInit,\r\n Output,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { NgForm, NgModel } from \"@angular/forms\";\r\nimport { Email } from \"../../models/email.model\";\r\nimport { EmailService } from \"../../services/email/email.service\";\r\n\r\n@Component({\r\n selector: \"app-input-with-button\",\r\n templateUrl: \"./input-with-button.component.html\",\r\n styleUrls: [\"./input-with-button.component.scss\"]\r\n})\r\nexport class InputWithButtonComponent implements OnInit, AfterViewInit {\r\n\r\n @Input() form: NgForm = null;\r\n @Input() controlId: string = null;\r\n @Input() inputType: string = \"text\";\r\n @Input() labelText: string = null;\r\n @Input() labelImgSrc: string = null;\r\n @Input() iconClass: string = null;\r\n @Input() mode: string = \"custom\";\r\n @Input() infoText: string = null;\r\n @Input() iconActive: boolean = false;\r\n @Input() action: () => void = null;\r\n\r\n @Input() value: string = null;\r\n @Output() valueChange: EventEmitter = new EventEmitter();\r\n\r\n @ViewChild(\"inputControl\") inputControl: NgModel;\r\n\r\n public emailData: Email = new Email();\r\n public showEmailDialog: boolean = false;\r\n\r\n public get useImgLabel(): boolean {\r\n return this.labelImgSrc !== null && this.labelImgSrc !== undefined;\r\n }\r\n\r\n constructor(\r\n private emailService: EmailService) { }\r\n\r\n public ngOnInit(): void {\r\n this.emailService.GetGeneralEmailData(0).subscribe(data => {\r\n this.emailData = data;\r\n });\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n if (this.form !== null) {\r\n this.form.control.addControl(this.controlId, this.inputControl.control);\r\n }\r\n }\r\n\r\n public ClickButton(): void {\r\n if (this.mode === \"custom\") {\r\n this.action();\r\n } else if (this.mode === \"web\") {\r\n this.WebAction();\r\n } else if (this.mode === \"email\") {\r\n this.EmailAction();\r\n } else {\r\n throw new Error(`Unknown button mode: ${this.mode}`);\r\n }\r\n }\r\n\r\n public onValueChanged(): void {\r\n this.valueChange.emit(this.value);\r\n }\r\n\r\n public SendEmail(): void {\r\n this.emailService.SendGeneralEmail(this.emailData)\r\n .subscribe(result => {\r\n // eslint-disable-next-line no-console\r\n console.log(result);\r\n });\r\n }\r\n\r\n public CloseEmailDialog(): void {\r\n this.showEmailDialog = false;\r\n }\r\n\r\n private WebAction(): void {\r\n if (this.value && this.value.length > 0) {\r\n let url = this.value;\r\n\r\n if (url.indexOf(\"http://\") === -1 && url.indexOf(\"https://\") === -1) {\r\n url = \"http://\" + url;\r\n }\r\n\r\n window.open(url, \"_blank\");\r\n }\r\n }\r\n\r\n private EmailAction(): void {\r\n this.emailData.To = this.value;\r\n this.showEmailDialog = true;\r\n }\r\n\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject } from \"@angular/core\";\r\nimport { Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG, PageableDatastoreService } from \"servicesight-shared\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\nimport { SalesOpportunityLostDetail } from \"../models/sales-opportunity-lost-detail.model\";\r\nimport { SalesOpportunity } from \"../models/sales-opportunity.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class SalesOpportunityService extends PageableDatastoreService {\r\n private static readonly odataKey: string = \"SalesOpportunityId\";\r\n\r\n constructor(\r\n @Inject(APP_CONFIG) protected config: IAppConfig,\r\n private http: HttpClient,\r\n private odataService: ODataService\r\n ) {\r\n super(SalesOpportunityService.odataKey);\r\n }\r\n\r\n public Get(id: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.SalesOpportunity}SalesOpportunity/${id}`);\r\n }\r\n\r\n public Cancel(id: number): Observable {\r\n return this.http.put(`${this.config.apiLocations.SalesOpportunity}SalesOpportunity/cancel/${id}`, null);\r\n }\r\n\r\n public Lost(id: number, model: SalesOpportunityLostDetail): Observable {\r\n return this.http.put(`${this.config.apiLocations.SalesOpportunity}SalesOpportunity/lost/${id}`, model);\r\n }\r\n\r\n public Won(id: number): Observable {\r\n return this.http.put(`${this.config.apiLocations.SalesOpportunity}SalesOpportunity/won/${id}`, null);\r\n }\r\n\r\n public Create(model: SalesOpportunity): Observable {\r\n this.SetIds(model);\r\n return this.http.post(`${this.config.apiLocations.SalesOpportunity}SalesOpportunity`, model);\r\n }\r\n\r\n public Update(model: SalesOpportunity): Observable {\r\n this.SetIds(model);\r\n return this.http.put(`${this.config.apiLocations.SalesOpportunity}SalesOpportunity`, model);\r\n }\r\n\r\n public GetCompetitorsStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.config.apiLocations.SalesOpportunityOData}CompetitorOData`,\r\n key: \"CompetitorId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetBarriersStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.config.apiLocations.SalesOpportunityOData}BarrierOData`,\r\n key: \"BarrierId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public StatusDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.SalesOpportunityOData}SalesOpportunityStatus`,\r\n key: \"Status\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetSalesOpportunityHistory(opportunityId: number): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.ServiceSightOData}SalesOpportunityHistoryOD`,\r\n key: \"ElementId\",\r\n keyType: \"String\",\r\n paging: true,\r\n pageSize: 50,\r\n queryStringParams: {\r\n opportunityId\r\n }\r\n });\r\n }\r\n\r\n private SetIds(model: SalesOpportunity): void {\r\n model.Competitors.forEach(c => c.Id = c.CompetitorId);\r\n model.Barriers.forEach(b => b.Id = b.BarrierId);\r\n }\r\n\r\n protected GetDataSourceObject(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.SalesOpportunityOData}SalesOpportunities`,\r\n key: SalesOpportunityService.odataKey,\r\n keyType: \"Int32\"\r\n });\r\n }\r\n}\r\n","
\r\n \r\n \r\n
\r\n
\r\n
{{ salesOpp.SalesOpportunityNumber }}
\r\n
{{ salesOpp.Description }}
\r\n
{{ salesOpp.ForecastCloseDate | customDate:'shortDate' }}
\r\n
{{ salesOpp.StatusName }}
\r\n
\r\n
\r\n \r\n
\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges\r\n} from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { Module, SystemSalesOpportunityStatus } from \"servicesight-shared\";\r\nimport { SalesOpportunityService } from \"src/app/sales-opportunity/services/sales-opportunity.service\";\r\nimport { LicenseService } from \"../../services/licence/license.service\";\r\n\r\n@Component({\r\n selector: \"app-sales-opportunity-select-box\",\r\n templateUrl: \"./sales-opportunity-select-box.component.html\",\r\n styleUrls: [\"./sales-opportunity-select-box.component.scss\"]\r\n})\r\nexport class SalesOpportunitySelectBoxComponent implements OnInit, OnChanges {\r\n\r\n @Input() value: string = null;\r\n @Input() customerId: number;\r\n @Input() disabled: boolean = false;\r\n @Input() apply95Width: boolean = true;\r\n @Output() valueChange: EventEmitter = new EventEmitter();\r\n\r\n public salesOppDataSource: DataSource;\r\n public salesOppEnabled: boolean = false;\r\n\r\n constructor(\r\n private licenseService: LicenseService,\r\n private salesOpportunityService: SalesOpportunityService) { }\r\n\r\n public ngOnInit(): void {\r\n this.licenseService.GetCompanyHasAccessToModule(Module.SalesOpportunity).subscribe(hasAccess => {\r\n this.salesOppEnabled = hasAccess;\r\n });\r\n this.salesOppDataSource = this.salesOpportunityService.GetDataSource(true);\r\n this.ApplyFilter();\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.customerId && changes.customerId.currentValue) {\r\n this.ApplyFilter();\r\n }\r\n }\r\n\r\n public ApplyFilter(): void {\r\n if (this.customerId && this.salesOppDataSource) {\r\n this.salesOppDataSource.filter(\r\n [[\"Status\", \"<>\", SystemSalesOpportunityStatus.Canncelled], \"and\", [ \"CustomerId\", \"=\", this.customerId ]]);\r\n this.salesOppDataSource.sort({ selector: \"SalesOpportunityId\", desc: true });\r\n this.salesOppDataSource.reload();\r\n }\r\n }\r\n\r\n public OnModelChanged(e: number): void {\r\n this.valueChange.emit(e);\r\n }\r\n}\r\n","\r\n
\r\n
\r\n
\r\n {{data.Name}}\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n","import { Component, EventEmitter, Input, OnInit, Output, forwardRef } from \"@angular/core\";\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from \"@angular/forms\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { PriorityService } from \"src/app/settings/job-settings/services/priority.service\";\r\n\r\n@Component({\r\n selector: \"app-priority-select-box\",\r\n templateUrl: \"./priority-select-box.component.html\",\r\n styleUrls: [\"./priority-select-box.component.scss\"],\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => PrioritySelectBoxComponent),\r\n multi: true\r\n }\r\n ]\r\n})\r\nexport class PrioritySelectBoxComponent implements OnInit, ControlValueAccessor {\r\n @Input() value: number;\r\n @Output() selectBoxOpened = new EventEmitter();\r\n public prioritiesStore: ODataStore;\r\n public prioritiesDataSource: DataSource;\r\n\r\n constructor(private priorityService: PriorityService) {}\r\n\r\n onChange: (v: number) => void;\r\n onTouched: () => void;\r\n\r\n public registerOnChange(fn: (v: number) => void): void {\r\n this.onChange = fn;\r\n }\r\n\r\n public writeValue(initialValue: number): void {\r\n this.value = initialValue;\r\n }\r\n\r\n public registerOnTouched(fn: () => void): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.prioritiesStore = this.priorityService.ODataPriorities();\r\n this.prioritiesStore.load();\r\n this.prioritiesDataSource = this.priorityService.OrderedPrioritiesDataSource();\r\n }\r\n\r\n public PriorityChanged(e): void {\r\n this.value = e.value;\r\n if (e.event) {\r\n this.onTouched();\r\n this.onChange(this.value);\r\n }\r\n }\r\n\r\n public OpenSelectBox(e): void {\r\n this.selectBoxOpened.emit(e);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges\r\n} from \"@angular/core\";\r\nimport { ControlContainer, NgForm } from \"@angular/forms\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport {\r\n ContactService,\r\n CustomerService,\r\n CustomerStatus,\r\n FormMesssageService,\r\n InspectionService,\r\n JobStatus,\r\n PermissionsService,\r\n PhraseBookType,\r\n PriorityService,\r\n SettingData,\r\n SettingId,\r\n SettingsService,\r\n UICustomisation,\r\n UserReferenceService,\r\n UserRefType\r\n} from \"servicesight-shared\";\r\nimport { ISelectOption } from \"src/app/shared/models/iselect-option.model\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { Ng1ContactService } from \"src/app/shared/services/ng1-contact.service\";\r\nimport { Ng1CustomerService } from \"src/app/shared/services/ng1-customer.service\";\r\nimport { ContactStatus } from \"../../shared/enums/contact-status.eum\";\r\nimport { JobDetail } from \"../models/job-detail\";\r\nimport { JobService } from \"../services/job.service\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\n\r\nenum JobDetailWarning {\r\n Save,\r\n SelectedCustomer,\r\n SelectedSite,\r\n SelectedManagingAgent,\r\n SelectedSitePriority\r\n}\r\n\r\n@Component({\r\n selector: \"app-job-detail\",\r\n templateUrl: \"./job-detail.component.html\",\r\n styleUrls: [\"./job-detail.component.scss\"],\r\n viewProviders: [ { provide: ControlContainer, useExisting: NgForm } ]\r\n})\r\nexport class JobDetailComponent implements OnInit, OnChanges {\r\n @Input() job: JobDetail;\r\n @Input() jobForm: any;\r\n @Output() load = new EventEmitter();\r\n @Output() contactChanged = new EventEmitter();\r\n @Output() tabsChanged = new EventEmitter();\r\n\r\n public userRef1DataSource: DataSource;\r\n public customersDataSource: DataSource;\r\n public sitesDataSource: DataSource;\r\n public prioritiesDataSource: DataSource;\r\n public contactsDataSource: DataSource;\r\n public jobTypes: ISelectOption[];\r\n public showInactiveCustomerPopup = false;\r\n public showInactiveSitePopup = false;\r\n public showWarningPopup = false;\r\n public salesOppEnabled: boolean = false;\r\n public proEnabled: boolean = false;\r\n public warningMessage: string;\r\n public warningTitle: string;\r\n public warningOkText: string;\r\n public warningVisibleNo: boolean;\r\n public warningCancelText: string;\r\n public userRefJob1Label: string;\r\n public userRefJob2Label: string;\r\n public oldCustomerId: number;\r\n public oldSiteId: number;\r\n public confirmAction: (isConfirmed: boolean) => void;\r\n public readonly formName: string = \"jobform\";\r\n public phraseType = PhraseBookType;\r\n public newCustomerVisible: boolean = false;\r\n public canCreateSite: boolean = false;\r\n public canCreateContact: boolean = false;\r\n private selectedSitePriorityId: number;\r\n private managingAgentsEnabled: boolean = false;\r\n private get customerActiveStatuses(): CustomerStatus[] {\r\n const statuses: CustomerStatus[] = [\r\n CustomerStatus.ACTIVE\r\n ];\r\n if (this.managingAgentsEnabled) {\r\n statuses.push(CustomerStatus.MANAGING_AGENT);\r\n }\r\n return statuses;\r\n }\r\n\r\n public get WhatThreeWordsActive(): boolean {\r\n const hasValue = this.job.WhatThreeWords !== null &&\r\n this.job.WhatThreeWords !== undefined &&\r\n this.job.WhatThreeWords.length > 0;\r\n\r\n // eslint-disable-next-line max-len\r\n const regex = /^\\/{0,}[^0-9`~!@#$%^&*()+\\-_=[{\\]}\\\\|'<,.>?/\";:£§º©®\\s]{1,}[.。。・・︒។։။۔።।][^0-9`~!@#$%^&*()+\\-_=[{\\]}\\\\|'<,.>?/\";:£§º©®\\s]{1,}[.。。・・︒។։။۔።।][^0-9`~!@#$%^&*()+\\-_=[{\\]}\\\\|'<,.>?/\";:£§º©®\\s]{1,}$/;\r\n return hasValue && regex.test(this.job.WhatThreeWords);\r\n }\r\n\r\n public get isComplete(): boolean {\r\n return this.job.Status >= JobStatus.COMPLETED;\r\n }\r\n\r\n public get isInvoiced(): boolean {\r\n return this.job.Status >= JobStatus.INVOICED;\r\n }\r\n\r\n constructor(\r\n private customerService: CustomerService,\r\n private contactService: ContactService,\r\n private jobService: JobService,\r\n private formMessageService: FormMesssageService,\r\n private userRefsService: UserReferenceService,\r\n private licenseService: LicenseService,\r\n private inspectionService: InspectionService,\r\n private ng1CustomerService: Ng1CustomerService,\r\n private ng1ContactService: Ng1ContactService,\r\n private permissionsService: PermissionsService,\r\n private settingsService: SettingsService,\r\n private priorityService: PriorityService,\r\n private translateService: TranslateService) {\r\n this.OpenWhatThreeWords = this.OpenWhatThreeWords.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.getUserReferenceLabels();\r\n this.userRef1DataSource = this.userRefsService.getListDataSource(UserRefType.JOB_1);\r\n this.contactsDataSource = this.contactService.GetContactsDataSource();\r\n this.customersDataSource = this.customerService.GetCustomersDataSource();\r\n this.sitesDataSource = this.customerService.GetCustomersDataSource();\r\n this.prioritiesDataSource = this.priorityService.OrderedPrioritiesDataSource();\r\n this.prioritiesDataSource.load();\r\n this.jobService.GetJobTypes().subscribe((res) => this.jobTypes = res);\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(result => {\r\n this.salesOppEnabled = result.SalesOpportunityEnabled;\r\n this.proEnabled = result.ProEnabled;\r\n });\r\n this.settingsService.getSetting(SettingId.CustomerManagingAgents)\r\n .subscribe((setting: SettingData) => {\r\n this.managingAgentsEnabled = setting.ValueBool;\r\n const filter = [];\r\n this.customerActiveStatuses.forEach((el, index) => {\r\n if (this.customerActiveStatuses.length > 1) {\r\n filter.push([\"Status\", \"=\", el]);\r\n if (index < this.customerActiveStatuses.length - 1) {\r\n filter.push(\"or\");\r\n }\r\n } else {\r\n filter.push(\"Status\", \"=\", el);\r\n }\r\n });\r\n this.customersDataSource.filter(filter);\r\n this.sitesDataSource.filter(filter);\r\n this.customersDataSource.reload();\r\n this.sitesDataSource.reload();\r\n });\r\n if (!this.job) {\r\n this.job = new JobDetail();\r\n this.job.ContactID = -1;\r\n this.job.CustomerID = -1;\r\n }\r\n\r\n this.permissionsService.CurrentUserHasPermission(\"CustomerCreateInvoiceAccount\").subscribe(canCreateCustomer => {\r\n this.newCustomerVisible = canCreateCustomer;\r\n });\r\n\r\n this.permissionsService.CurrentUserHasPermission(\"CustomerCreateSite\").subscribe(canCreateSite => {\r\n this.canCreateSite = canCreateSite;\r\n });\r\n\r\n this.permissionsService.CurrentUserHasPermission(\"CustomerContactAdd\").subscribe(canCreateContact => {\r\n this.canCreateContact = canCreateContact;\r\n });\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.job.currentValue.CustomerID) {\r\n this.jobForm.form.markAsPristine();\r\n }\r\n }\r\n\r\n public OpenWhatThreeWords(): void {\r\n let url = \"https://what3words.com/\";\r\n\r\n if (this.job.WhatThreeWords) {\r\n url += this.job.WhatThreeWords.replace(\"///\", \"\");\r\n }\r\n\r\n window.open(url);\r\n }\r\n\r\n private getUserReferenceLabels(): void {\r\n this.userRefJob1Label = this.userRefsService.getLabel(UICustomisation.JOB_REF1);\r\n this.userRefJob2Label = this.userRefsService.getLabel(UICustomisation.JOB_REF2);\r\n }\r\n\r\n public IsSite(customer: any): boolean {\r\n return customer.CustomerId !== customer.InvoiceId;\r\n }\r\n\r\n public ChangeCustomer(e: any): void {\r\n if (this.job.IsAllowedChangeCustomer && e.event) { // if e.event checks whether the change is from user interaction\r\n this.ValidateInactiveCustomer(e);\r\n } else if (e.previousValue && !e.value && this.job.JobID) {\r\n this.customersDataSource.reload().then(() => this.job.CustomerID = e.previousValue);\r\n }\r\n\r\n if (!this.job.SiteID) {\r\n this.job.SiteID = e.value;\r\n }\r\n\r\n if (!e.value) {\r\n return;\r\n }\r\n\r\n this.sitesDataSource.store().byKey(e.value).then(site => {\r\n if (site.CustomerId !== site.InvoiceId) {\r\n this.job.CustomerID = site.InvoiceId;\r\n this.job.SiteID = e.value;\r\n }\r\n });\r\n\r\n if (!this.job.JobID) {\r\n this.sitesDataSource.load();\r\n this.jobForm.form.markAsDirty();\r\n this.job.CustomerID = e.value;\r\n this.sitesDataSource.filter([\"InvoiceID\", \"=\", e.value]);\r\n this.sitesDataSource.reload();\r\n }\r\n\r\n this.contactsDataSource.filter([[\"CustomerID\", \"=\", this.job.CustomerID], \"and\", [\"Status\", \"=\", ContactStatus.ACTIVE]]);\r\n this.contactsDataSource.reload();\r\n }\r\n\r\n public ValidateInactiveCustomer(e: any): void {\r\n const store = this.customersDataSource.store() as ODataStore;\r\n store.byKey(this.job.CustomerID).then(selectedCustomer => {\r\n if (!this.customerActiveStatuses.includes(selectedCustomer.Status)) {\r\n this.customersDataSource.reload().then(() => this.job.CustomerID = e.previousValue);\r\n this.showInactiveCustomerPopup = true;\r\n } else if (e.previousValue) {\r\n this.oldCustomerId = e.previousValue;\r\n this.ValidateChangeCustomer(selectedCustomer);\r\n }\r\n });\r\n }\r\n\r\n public ValidateChangeCustomer(selectedCustomer: any): void {\r\n if (!this.job.CustomerID) {\r\n return;\r\n }\r\n if (selectedCustomer.InvoiceID === this.job.CustomerID) {\r\n this.ChangeCustomerInDatabase();\r\n return;\r\n }\r\n if (this.job.JobID) {\r\n const customerStatus: JobDetailWarning = selectedCustomer.Status === CustomerStatus.MANAGING_AGENT && this.managingAgentsEnabled ?\r\n JobDetailWarning.SelectedManagingAgent :\r\n JobDetailWarning.SelectedCustomer;\r\n this.setupWarningPopup(customerStatus);\r\n this.showWarningPopup = true;\r\n this.confirmAction = this.onConirmChangeCustomer;\r\n } else {\r\n this.job.SiteID = this.job.CustomerID;\r\n }\r\n }\r\n\r\n public ChangeCustomerInDatabase(): void {\r\n this.formMessageService.RegisterObservable(this.jobService.ChangeJobCustomer(this.job.JobID, this.job.CustomerID), this.formName).subscribe((res) => {\r\n if (res.IsSuccess) {\r\n this.job.CustomerID = res.ViewModel.CustomerID;\r\n this.job.Timestamp = res.ViewModel.Timestamp;\r\n this.onLoad();\r\n this.load.emit();\r\n }\r\n });\r\n }\r\n\r\n public ChangeSite(e: any): void {\r\n if (!e.value) {\r\n return;\r\n }\r\n\r\n if (this.job.IsAllowedChangeSite && e.event && this.job.JobID) {\r\n this.ValidateInactiveSite(e);\r\n } else if (e.previousValue && !e.value && this.job.JobID) {\r\n this.sitesDataSource.reload().then(() => this.job.SiteID = e.previousValue);\r\n }\r\n\r\n if (e.event) { // only do this if it's a user driven event\r\n this.job.SiteID = e.value;\r\n if (!this.job.Priority) {\r\n this.job.Priority = this.sitesDataSource.items().find((v) => v.CustomerId === this.job.SiteID).PriorityId;\r\n }\r\n }\r\n\r\n this.customerService.GetCustomerAndSite(this.job.CustomerID, this.job.SiteID)\r\n .subscribe(result => {\r\n const filter: any[] = [\r\n [\"CustomerID\", \"=\", this.job.CustomerID], \"or\",\r\n [\"CustomerID\", \"=\", this.job.SiteID],\r\n ];\r\n\r\n if (this.managingAgentsEnabled) {\r\n if (result.customer && result.customer.ManagingAgentID) {\r\n filter.push(\"or\", [\"CustomerId\", \"=\", result.customer.ManagingAgentID]);\r\n }\r\n if (result.site && result.site.ManagingAgentID && result.customer.ManagingAgentID !== result.site.ManagingAgentID) {\r\n filter.push(\"or\", [\"CustomerId\", \"=\", result.site.ManagingAgentID]);\r\n }\r\n }\r\n\r\n this.contactsDataSource.filter([filter, \"and\", [\"Status\", \"=\", ContactStatus.ACTIVE]]);\r\n this.contactsDataSource.reload();\r\n });\r\n }\r\n\r\n public ValidateInactiveSite(e: any): void {\r\n const selectedSite = this.sitesDataSource.items().find((v) => v.CustomerId === this.job.SiteID);\r\n if (this.job && this.job.SiteID > 0) {\r\n if (!this.customerActiveStatuses.includes(selectedSite.Status)) {\r\n this.sitesDataSource.reload().then(() => this.job.SiteID = e.previousValue);\r\n this.showInactiveSitePopup = true;\r\n } else {\r\n this.oldSiteId = e.previousValue;\r\n this.ValidateSiteChange();\r\n }\r\n }\r\n }\r\n\r\n public ValidateSiteChange(): void {\r\n const selectedSite = this.sitesDataSource.items().find((v) => v.CustomerId === this.job.SiteID);\r\n if (this.job && this.job.SiteID > 0) {\r\n const areAssociated = selectedSite.InvoiceId === this.job.CustomerID;\r\n this.selectedSitePriorityId = selectedSite.PriorityId;\r\n const hasNewSiteDifferentPriority = this.selectedSitePriorityId !== this.job.Priority;\r\n\r\n if (!areAssociated) {\r\n this.setupWarningPopup(JobDetailWarning.SelectedSite);\r\n this.confirmAction = this.onConfirmChangeSite;\r\n } else if (this.job.JobID) {\r\n if (hasNewSiteDifferentPriority && this.proEnabled) {\r\n this.setupWarningPopup(JobDetailWarning.SelectedSitePriority);\r\n this.confirmAction = this.confirmChangePriorityCustomerNotChanged;\r\n } else {\r\n this.ChangeSiteInDatabase(this.job.SiteID, false, false);\r\n }\r\n }\r\n }\r\n }\r\n\r\n public ChangeSiteInDatabase(siteId: number, changeCustomer: boolean, changePriority: boolean): void {\r\n this.formMessageService.RegisterObservable(this.jobService.ChangeJobSite(this.job.JobID, siteId, changeCustomer, changePriority), this.formName).subscribe((res) => {\r\n if (res.IsSuccess) {\r\n this.job.CustomerID = res.ViewModel.CustomerID;\r\n this.job.Timestamp = res.ViewModel.Timestamp;\r\n this.job.Priority = res.ViewModel.Priority;\r\n this.onLoad();\r\n }\r\n });\r\n }\r\n\r\n public ChangeJobType(e: any): void {\r\n if (e.previousValue && this.job.IsAllowedChangeJobType && this.job.JobID) {\r\n this.formMessageService.RegisterObservable(this.jobService.ChangeJobType(this.job.JobID, this.job.JobTypeID), this.formName).subscribe((res) => {\r\n if (res.IsSuccess) {\r\n this.inspectionService.InspectionChanged();\r\n this.load.emit();\r\n }\r\n });\r\n } else if (e.previousValue && this.job.IsAllowedChangeJobType && !this.job.JobID) {\r\n this.tabsChanged.emit(e.value);\r\n } else if (!this.job.JobID) {\r\n this.job.JobTypeID = e.value;\r\n }\r\n }\r\n\r\n public ChangeContact(e: any): void {\r\n // same permission applied to change contact as to change customer\r\n // e.event prevents this from triggering a call to the api while we're still loading.\r\n if (this.job.IsAllowedChangeCustomer && this.job.JobID && e.value && e.event) {\r\n this.job.ContactID = e.value;\r\n this.ChangeContactInDatabase(this.job.ContactID);\r\n }\r\n\r\n if (!this.job.JobID) {\r\n this.job.ContactID = e.value;\r\n }\r\n\r\n this.contactChanged.emit();\r\n }\r\n\r\n public ChangeContactInDatabase(contactId: number): void {\r\n this.formMessageService.RegisterObservable(this.jobService.ChangeJobContact(this.job.JobID, contactId), this.formName).subscribe((res) => {\r\n if (res.IsSuccess) {\r\n this.onLoad();\r\n this.load.emit();\r\n }\r\n });\r\n }\r\n\r\n public onCloseInactive(): void {\r\n this.onLoad();\r\n }\r\n\r\n public onConfirmSave(isConfirmed: boolean): void {\r\n const self = this;\r\n if (isConfirmed) {\r\n this.jobService.SaveJob(this.job).subscribe(() => {\r\n self.showWarningPopup = false;\r\n self.jobForm.form.markAsPristine();\r\n self.load.emit();\r\n });\r\n } else {\r\n this.showWarningPopup = false;\r\n }\r\n }\r\n\r\n public confirmChangePriorityCustomerChanged(isConfirmed: boolean): void {\r\n this.confirmChangePriorityAndCustomer(isConfirmed, true);\r\n }\r\n\r\n public confirmChangePriorityCustomerNotChanged(isConfirmed: boolean): void {\r\n this.confirmChangePriorityAndCustomer(isConfirmed, false);\r\n }\r\n\r\n private confirmChangePriorityAndCustomer(isConfirmed: boolean, customerChanged: boolean): void {\r\n if (isConfirmed){\r\n this.ChangeSiteInDatabase(this.job.SiteID, customerChanged, true);\r\n } else if (isConfirmed === undefined) {\r\n this.job.SiteID = this.oldSiteId;\r\n this.showWarningPopup = false;\r\n } else {\r\n this.ChangeSiteInDatabase(this.job.SiteID, customerChanged, false);\r\n }\r\n }\r\n\r\n public onConirmChangeCustomer(isConfirmed: boolean): void {\r\n if (isConfirmed) {\r\n this.ChangeCustomerInDatabase();\r\n } else {\r\n this.job.CustomerID = this.oldCustomerId;\r\n this.showWarningPopup = false;\r\n }\r\n }\r\n\r\n public onConirmChangeCustomerNoJob(isConfirmed: boolean): void {\r\n this.showWarningPopup = false;\r\n\r\n if (!isConfirmed) {\r\n this.job.CustomerID = this.oldCustomerId;\r\n }\r\n }\r\n\r\n public onConfirmChangeSite(isConfirmed: boolean): void {\r\n if (isConfirmed) {\r\n const priorityChanged = this.selectedSitePriorityId !== this.job.Priority;\r\n if (priorityChanged && this.proEnabled) {\r\n this.setupWarningPopup(JobDetailWarning.SelectedSitePriority);\r\n this.confirmAction = this.confirmChangePriorityCustomerChanged;\r\n } else {\r\n this.ChangeSiteInDatabase(this.job.SiteID, true, false);\r\n }\r\n } else if (isConfirmed === undefined) {\r\n this.job.SiteID = this.oldSiteId;\r\n this.showWarningPopup = false;\r\n } else {\r\n const priorityChanged = this.selectedSitePriorityId !== this.job.Priority;\r\n if (priorityChanged && this.proEnabled) {\r\n this.setupWarningPopup(JobDetailWarning.SelectedSitePriority);\r\n this.confirmAction = this.confirmChangePriorityCustomerNotChanged;\r\n } else {\r\n this.ChangeSiteInDatabase(this.job.SiteID, false, false);\r\n }\r\n }\r\n }\r\n\r\n // closes opened select box when there are pending changes\r\n public OpenSelectBox($event: any): void {\r\n if (this.jobForm.form.dirty && this.job.JobID) {\r\n $event.component.close();\r\n this.setupWarningPopup(JobDetailWarning.Save);\r\n this.confirmAction = this.onConfirmSave;\r\n }\r\n }\r\n\r\n public UpdateDueDate(due: Date | any): void {\r\n let date: Date = null;\r\n\r\n if (due.value) {\r\n date = new Date(due.value);\r\n } else if (due) {\r\n date = new Date(due);\r\n }\r\n\r\n if (date instanceof Date && !isNaN(date.getTime())) {\r\n this.job.Due = date;\r\n } else {\r\n this.job.Due = null;\r\n }\r\n }\r\n\r\n public Ref1ValueChanged(e): void {\r\n if (e.event) {\r\n this.SetFormDirty();\r\n }\r\n }\r\n\r\n public UpdateWorkRequired(workRequired: string): void {\r\n this.job.ToDo = workRequired;\r\n this.SetFormDirty();\r\n }\r\n\r\n public UpdateInternalNotes(internalNotes: string): void {\r\n this.job.Notes = internalNotes;\r\n this.SetFormDirty();\r\n }\r\n\r\n public SetFormDirty(): void {\r\n this.jobForm.form.markAsDirty();\r\n }\r\n\r\n public salesOpportunityValueChanged(salesOpportunityId: number): void {\r\n if (this.job.SalesOpportunityID !== salesOpportunityId) {\r\n this.job.SalesOpportunityID = salesOpportunityId;\r\n this.jobForm.form.markAsDirty();\r\n }\r\n }\r\n\r\n public newCustomer(): void {\r\n this.ng1CustomerService.openCustomerModal(\"customer\")\r\n .then((customerId: number) => {\r\n this.job.CustomerID = customerId;\r\n this.changeSite(customerId, true, true);\r\n this.customersDataSource.reload();\r\n });\r\n }\r\n\r\n public newSite(): void {\r\n this.ng1CustomerService.openCustomerModal(\"site\", this.job.CustomerID)\r\n .then((siteId: number) => {\r\n this.changeSite(siteId, false, false);\r\n this.sitesDataSource.reload();\r\n });\r\n }\r\n\r\n public newContact(): void {\r\n this.ng1ContactService.openContactModal(0, this.job.SiteID)\r\n .then((id: number) => {\r\n this.job.ContactID = id;\r\n this.contactsDataSource.reload();\r\n });\r\n }\r\n\r\n private changeSite(siteId: number, changeCustomer: boolean, changePriority: boolean): void {\r\n this.job.SiteID = siteId;\r\n if(this.job.JobID) {\r\n this.ChangeSiteInDatabase(this.job.SiteID, changeCustomer, changePriority);\r\n }\r\n\r\n this.jobService.GetDefaultContactID(this.job.SiteID).subscribe((res: number) => {\r\n if (res) {\r\n this.job.ContactID = res;\r\n }\r\n });\r\n }\r\n\r\n private onLoad(): void {\r\n this.showInactiveCustomerPopup = false;\r\n this.showWarningPopup = false;\r\n this.showInactiveSitePopup = false;\r\n }\r\n\r\n private setupWarningPopup(messageToDisplay: JobDetailWarning): void {\r\n this.warningTitle = \"job.detail.save.warning.title\";\r\n switch (messageToDisplay) {\r\n case JobDetailWarning.Save:\r\n this.warningMessage = \"job.detail.save.warning.message\";\r\n this.warningOkText = \"job.detail.warning.ok\";\r\n this.warningCancelText = \"job.detail.warning.cancel\";\r\n this.warningVisibleNo = false;\r\n break;\r\n case JobDetailWarning.SelectedCustomer:\r\n this.warningMessage = \"job.detail.select.customer.warning.message\";\r\n this.warningOkText = \"job.detail.warning.ok\";\r\n this.warningCancelText = \"job.detail.warning.cancel\";\r\n this.warningVisibleNo = false;\r\n break;\r\n case JobDetailWarning.SelectedManagingAgent:\r\n this.warningMessage = \"job.detail.select.managing-agent.warning.message\";\r\n this.warningOkText = \"job.detail.warning.ok\";\r\n this.warningCancelText = \"job.detail.warning.cancel\";\r\n this.warningVisibleNo = false;\r\n break;\r\n case JobDetailWarning.SelectedSite:\r\n this.warningMessage = \"job.detail.select.site.warning.message\";\r\n this.warningOkText = \"job.detail.warning.yes\";\r\n this.warningCancelText = \"job.detail.warning.cancel\";\r\n this.warningVisibleNo = true;\r\n break;\r\n case JobDetailWarning.SelectedSitePriority:\r\n const selectedSitePriorityName = this.prioritiesDataSource.items().find((v) => v.PriorityId === this.selectedSitePriorityId).Name;\r\n const currentSitePriorityName = this.prioritiesDataSource.items().find((v) => v.PriorityId === this.job.Priority).Name;\r\n this.warningTitle = \"job.detail.save.priority.warning.title\";\r\n\r\n this.warningMessage = this.translateService.instant(\"job.detail.select.site.priority.warning.message\", {\r\n currentSitePriority: currentSitePriorityName,\r\n newSitePriority: selectedSitePriorityName\r\n });\r\n\r\n this.warningOkText = \"job.detail.warning.yes\";\r\n this.warningCancelText = \"job.detail.warning.cancel\";\r\n this.warningVisibleNo = true;\r\n this.showWarningPopup = this.proEnabled;\r\n return;\r\n }\r\n\r\n this.showWarningPopup = true;\r\n }\r\n}\r\n","export enum LabourTypes {\r\n FollowOnHours = 1,\r\n InitialRate = 2,\r\n Mileage = 3,\r\n Travelling = 4\r\n}\r\n","import { JobVisitChargeModel } from \"./job-visit-charge\";\r\nimport { JobVisitFurtherWorkModel } from \"./job-visit-further-work\";\r\n\r\nexport class JobVisitModel {\r\n JobID: number;\r\n SessionID: number;\r\n EmployeeID: number;\r\n Employee: string;\r\n EmployeeIdOld: number;\r\n VisitDate: Date;\r\n TimeOn1: Date;\r\n TimeOff1: Date;\r\n TimeWorked1: Date;\r\n TravelTime: Date;\r\n TravelTime1Actual: Date;\r\n TravelTime2Actual: Date;\r\n Mileage: number;\r\n MileageActual: number;\r\n Status: number;\r\n StatusDesc: string;\r\n ArrivalTimeEstimated: Date;\r\n ArrivalTimeTarget: Date;\r\n ArrivalTimeTypeID: number;\r\n EstimatedDuration: Date;\r\n CustomerNotPresent: boolean;\r\n LabourChargeID: number;\r\n Charges: JobVisitChargeModel[];\r\n RecalculateCharges: boolean;\r\n SiteJobMileage: number;\r\n SiteJobTravelTime: Date;\r\n IsAllowedNotify: boolean;\r\n IsAllowedReSync: boolean;\r\n IsAllowedComplete: boolean;\r\n IsAllowedUncomplete: boolean;\r\n IsEditable: boolean;\r\n IsAllowedEmployeeID: boolean;\r\n IsAllowedVisitDate: boolean;\r\n IsAllowedTimeOn1: boolean;\r\n IsAllowedTimeOff1: boolean;\r\n IsAllowedTimeWorked1: boolean;\r\n IsAllowedTravelTime1Actual: boolean;\r\n IsAllowedTravelTime2Actual: boolean;\r\n IsAllowedMileageActual: boolean;\r\n IsAllowedWorkReport: boolean;\r\n IsAllowedArrivalTimeEstimated: boolean;\r\n IsAllowedArrivalTimeTarget: boolean;\r\n IsAllowedEstimatedDuration: boolean;\r\n IsAllowedLabourChargeID: boolean;\r\n IsAllowedEditRate: boolean;\r\n IsAllowedEditMultiplier: boolean;\r\n IsAllowedEditUnits: boolean;\r\n IsAllowedEdit: boolean;\r\n IsAllowedAdd: boolean;\r\n IsAllowedDelete: boolean;\r\n IsAllowedView: boolean;\r\n HasJobActivityTypes: boolean;\r\n Timestamp: string;\r\n FurtherWork: JobVisitFurtherWorkModel[];\r\n WorkReport: string;\r\n CustomerSignatureName: string;\r\n CustomerSignature: string;\r\n EngineerSignature: string;\r\n StoreId: number;\r\n}\r\n","import { LabourTypes } from \"../enums/labour-type.enum\";\r\n\r\nexport class JobVisitChargeModel {\r\n LineID: number;\r\n Type: LabourTypes;\r\n Multiplier: number;\r\n Rate: number;\r\n Units: number;\r\n UnitsUI: number;\r\n Total: number;\r\n IsDeleted: boolean;\r\n IsAllowedEdit: boolean;\r\n IsAllowedAdd: boolean;\r\n IsAllowedDelete: boolean;\r\n IsAllowedView: boolean;\r\n Timestamp: string;\r\n hasDuplicateError: boolean;\r\n selected: boolean;\r\n description: string;\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { ODataService } from \"../../shared/services/odata/odata.service\";\r\nimport { EngineerSkillModel } from \"../models/engineer-skill\";\r\nimport { EngineerSkillCheck } from \"../models/engineer-skill-check.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class EngineerSkillService {\r\n private readonly serviceSightODataBaseUrl: string;\r\n private readonly serviceSightBaseUrl: string;\r\n\r\n constructor(\r\n private odataService: ODataService,\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) appConfig: IAppConfig) {\r\n this.serviceSightODataBaseUrl = appConfig.apiLocations.ServiceSightOData;\r\n this.serviceSightBaseUrl = appConfig.apiLocations.ServiceSight;\r\n }\r\n\r\n public ODataEngineerSkills(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.serviceSightODataBaseUrl}EngineerSkillOD`,\r\n key: \"SkillID\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetEngineerSkills(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.serviceSightODataBaseUrl}EngineerSkillOD`,\r\n key: \"SkillID\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public Get(skillId: number): Observable {\r\n return this.http.get(`${this.serviceSightBaseUrl}EngineerSkill/GetEngineerSkill?engineerSkillId=${skillId}`);\r\n }\r\n\r\n public GetAll(): Observable {\r\n return this.http.get(`${this.serviceSightBaseUrl}EngineerSkill/GetAllEngineerSkills`);\r\n }\r\n\r\n public Update(engineerSkill: EngineerSkillModel): Observable {\r\n return this.http.put(`${this.serviceSightBaseUrl}EngineerSkill/UpdateEngineerSkill`, engineerSkill);\r\n }\r\n\r\n public Create(engineerSkill: EngineerSkillModel): Observable {\r\n return this.http.post(`${this.serviceSightBaseUrl}EngineerSkill/CreateEngineerSkill`, engineerSkill);\r\n }\r\n\r\n public Delete(skillId: number): Observable {\r\n return this.http.delete(`${this.serviceSightBaseUrl}EngineerSkill/DeleteEngineerSkill?skillId=${skillId}`);\r\n }\r\n\r\n public EngineerSkillsCheckForJob(employeeId: number, jobId: number): Observable {\r\n return this.http.get(`${this.serviceSightBaseUrl}EngineerSkill/EngineerSkillsCheckForJob?employeeId=${employeeId}&jobId=${jobId}`);\r\n }\r\n\r\n public EngineerSkillsCheckForCustomer(employeeId: number, customerId: number): Observable {\r\n return this.http.get(`${this.serviceSightBaseUrl}EngineerSkill/EngineerSkillsCheckForCustomer?employeeId=${employeeId}&customerId=${customerId}`);\r\n }\r\n}\r\n","import { Component, forwardRef, HostBinding, Input, Renderer2, ViewChild } from \"@angular/core\";\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from \"@angular/forms\";\r\n\r\n@Component({\r\n selector: \"app-duration\",\r\n templateUrl: \"./duration.component.html\",\r\n styleUrls: [\"./duration.component.scss\"],\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => DurationComponent),\r\n multi: true\r\n }\r\n ]\r\n})\r\n\r\nexport class DurationComponent implements ControlValueAccessor {\r\n @Input() hourStep: number = 1;\r\n @Input() minuteStep: number = 1;\r\n @Input() name: string;\r\n @Input() value: Date;\r\n @Input() disabled = false;\r\n\r\n @ViewChild(\"hoursEl\", { static: true }) hoursElement: any;\r\n @ViewChild(\"minutesEl\", { static: true }) minutesElement: any;\r\n private internalId = \"\";\r\n public hours: number = 0;\r\n public minutes: number = 0;\r\n\r\n constructor(private renderer: Renderer2) { }\r\n\r\n @HostBinding(\"attr.id\")\r\n externalId = \"\";\r\n\r\n @Input()\r\n set id(value: string) {\r\n this.internalId = value;\r\n this.externalId = null;\r\n }\r\n\r\n get id(): string {\r\n return this.internalId;\r\n }\r\n\r\n onChange: any = () => { };\r\n onTouched: any = () => { };\r\n\r\n public registerOnChange(fn: () => any): void {\r\n this.onChange = fn;\r\n }\r\n\r\n public writeValue(initialValue: Date): void {\r\n if (initialValue) {\r\n this.hours = new Date(initialValue).getUTCHours();\r\n this.minutes = new Date(initialValue).getUTCMinutes();\r\n }\r\n }\r\n\r\n public registerOnTouched(fn: () => any): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n public setDisabledState(isDisabled: boolean): void {\r\n this.renderer.setProperty(this.hoursElement.nativeElement, \"disabled\", isDisabled);\r\n this.renderer.setProperty(this.minutesElement.nativeElement, \"disabled\", isDisabled);\r\n }\r\n\r\n public onMouseWheel(e: any): void {\r\n const delta = Math.max(-1, Math.min(1, (e.wheelDelta || -e.detail))); // Mouse wheel direction calculations\r\n\r\n // In firefox is event.target but in chrome is event.srcElement\r\n const input = (e.srcElement === undefined || isNaN(e.srcElement)) ? e.target : e.srcElement;\r\n\r\n // First check if number is present in field\r\n input.value = (isNaN(parseInt(input.value, 10)) || input.value === \"\") ? 0 : input.value;\r\n\r\n if (delta > 0) {\r\n input.value = parseInt(input.value, 10) + 1;\r\n } else if (delta < 0) {\r\n input.value = parseInt(input.value, 10) - 1;\r\n }\r\n\r\n if (input.name === this.name + \"_hours\") {\r\n this.hours = input.value;\r\n } else if (input.name === this.name + \"_minutes\") {\r\n this.minutes = input.value;\r\n }\r\n\r\n this.calculate(this.hours, this.minutes);\r\n\r\n // if mouse is on input field disable scroling page\r\n if (e.preventDefault) {\r\n e.preventDefault();\r\n }\r\n }\r\n\r\n public calculateDuration(e: any, isHours: boolean): void {\r\n const changedValue = e.target.value;\r\n const regex = /[^\\d.-]/g;\r\n const parsedValue = parseInt((!parseInt(changedValue.replace(regex, \"\"), 10)) ? 0 : changedValue.replace(regex, \"\"), 10);\r\n if (isHours) {\r\n this.hours = parsedValue;\r\n } else {\r\n this.minutes = parsedValue;\r\n }\r\n this.calculate(this.hours, this.minutes);\r\n }\r\n\r\n public keyHours(e: any): void {\r\n if (e.keyCode === 38) {\r\n this.hours = this.hours + this.hourStep;\r\n } else if (e.keyCode === 40) {\r\n this.hours = this.hours - this.hourStep;\r\n }\r\n this.calculate(this.hours, this.minutes);\r\n }\r\n\r\n public keyMinutes(e: any): void {\r\n if (e.keyCode === 38) {\r\n this.minutes = this.minutes + this.minuteStep;\r\n } else if (e.keyCode === 40) {\r\n this.minutes = this.minutes - this.minuteStep;\r\n }\r\n this.calculate(this.hours, this.minutes);\r\n }\r\n\r\n private calculate(hours: number, minutes: number): void {\r\n if (hours > 23) {\r\n hours = 0;\r\n this.hours = 0;\r\n } else if (hours < 0) {\r\n hours = 23;\r\n this.hours = 23;\r\n }\r\n\r\n if (minutes > 59) {\r\n minutes = 0;\r\n this.minutes = 0;\r\n } else if (minutes < 0) {\r\n minutes = 59;\r\n this.minutes = 59;\r\n }\r\n\r\n const utc = new Date();\r\n utc.setUTCFullYear(1970);\r\n utc.setUTCMonth(0);\r\n utc.setUTCDate(1);\r\n utc.setUTCHours(hours ? hours : 0);\r\n utc.setUTCMinutes(minutes ? minutes : 0);\r\n utc.setUTCSeconds(0);\r\n utc.setUTCMilliseconds(0);\r\n\r\n this.onChange(utc);\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n :\r\n \r\n
\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n

{{ 'job.visit.further.work.parts' | translate }}

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

{{ 'job.visit.further.work.materials' | translate }}

\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n {{ data.data.Make }} / {{ data.data.Model }}\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n","import { formatCurrency } from \"@angular/common\";\r\nimport { Component, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport ArrayStore from \"devextreme/data/array_store\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { DocumentTypeEnum, Module } from \"servicesight-shared\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\nimport { StockService } from \"src/app/stock/services/stock.service\";\r\nimport { JobVisitFurtherWorkModel } from \"../models/job-visit-further-work\";\r\nimport { JobVisitDataService } from \"../services/job-visit-data.service\";\r\n\r\n@Component({\r\n selector: \"app-job-further-work\",\r\n templateUrl: \"./job-further-work.component.html\",\r\n styleUrls: [\"./job-further-work.component.scss\"]\r\n})\r\nexport class JobFurtherWorkComponent implements OnInit {\r\n\r\n @Input() jobFurtherWork: JobVisitFurtherWorkModel[];\r\n @Output() load = new EventEmitter();\r\n\r\n public showMenu: boolean = false;\r\n public addFurtheWorkToNewQuoteDisbaled: boolean = false;\r\n public showJobSelectDialog: boolean = false;\r\n public selectedJob: any;\r\n public DocTypeEnum = DocumentTypeEnum;\r\n public selectedIds: number[];\r\n public equipmentDataStore: ODataStore;\r\n public partsDataStore: ODataStore;\r\n public baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n\r\n public furtherWorkDataSource: DataSource;\r\n\r\n private partsDataSourceLookup: DataSource[] = [];\r\n\r\n constructor(\r\n private stockService: StockService,\r\n private service: JobVisitDataService,\r\n private licenseService: LicenseService,\r\n private router: Router,\r\n private odataService: ODataService) { }\r\n\r\n public ngOnInit(): void {\r\n this.partsDataStore = this.stockService.GetStockHeaders();\r\n this.licenseService.GetCompanyHasAccessToModule(Module.Equipment)\r\n .subscribe(equipmentEnabled => {\r\n if (equipmentEnabled) {\r\n this.equipmentDataStore = this.service.GetEquipmentDataStore();\r\n this.furtherWorkDataSource = this.odataService.GetDataSourceWithLookups(\r\n this.jobFurtherWork,\r\n \"FurtherWorkID\",\r\n [\r\n {\r\n store: this.equipmentDataStore,\r\n dataKey: \"EquipID\",\r\n lookupKey: \"EquipId\",\r\n displayExprs: [\"EquipNumber\", \"Make\", \"Model\"]\r\n }\r\n ]);\r\n } else {\r\n this.furtherWorkDataSource = new DataSource({\r\n store: new ArrayStore({\r\n key: \"FurtherWorkID\",\r\n data: this.jobFurtherWork\r\n })\r\n });\r\n }\r\n });\r\n }\r\n\r\n public GetFurtherWorkPartsDataSource(furtherWork: JobVisitFurtherWorkModel): DataSource {\r\n if (!this.partsDataSourceLookup[furtherWork.FurtherWorkID]) {\r\n this.partsDataSourceLookup[furtherWork.FurtherWorkID] = this.odataService.GetDataSourceWithLookups(\r\n furtherWork.Parts,\r\n \"PartNumber\",\r\n [\r\n {\r\n store: this.partsDataStore,\r\n dataKey: \"PartNumber\",\r\n lookupKey: \"StockHeaderId\",\r\n displayExprs: [\"PartNo\"]\r\n }\r\n ]\r\n );\r\n }\r\n\r\n return this.partsDataSourceLookup[furtherWork.FurtherWorkID];\r\n }\r\n\r\n public AddFurtherWorkToCurrentJob(): void {\r\n const selected = this.filterSelected(e => {\r\n e.FurtherWorkDocumentID = e.JobID;\r\n e.FurtherWorkDocTypeID = DocumentTypeEnum.Job;\r\n });\r\n if (selected) {\r\n this.service.addFurtherWorkToJob(selected)\r\n .subscribe(this.reload.bind(this));\r\n }\r\n }\r\n\r\n public ShowFurtherWorkJobSelectionDialog(): void {\r\n this.showJobSelectDialog = true;\r\n }\r\n\r\n public OnSelectedJob(job: any): void {\r\n this.selectedJob = job;\r\n }\r\n\r\n public AddFurtherWorkToOtherJob(selectedJob: any): void {\r\n const selected = this.filterSelected(e => {\r\n e.FurtherWorkDocumentID = selectedJob.JobID;\r\n e.FurtherWorkDocTypeID = DocumentTypeEnum.Job;\r\n });\r\n if (selected) {\r\n this.service.addFurtherWorkToJob(selected)\r\n .subscribe(() => {\r\n this.showJobSelectDialog = false;\r\n this.reload();\r\n });\r\n }\r\n }\r\n\r\n public AddFurtherWorkToNewJob(): void {\r\n const selected = this.filterSelected(e => e.FurtherWorkDocumentID = null);\r\n if (selected) {\r\n this.service.addFurtherWorkToJob(selected)\r\n .subscribe(x => {\r\n this.CloseAndNavigateTo(\"/jobs/job/\", x.EntityId);\r\n });\r\n }\r\n }\r\n\r\n public AddFurtheWorkToNewQuote(): void {\r\n const selected = this.filterSelected(e => {\r\n e.FurtherWorkDocumentID = null;\r\n this.addFurtheWorkToNewQuoteDisbaled = true;\r\n });\r\n if (selected) {\r\n this.service.addFurtherWorkToNewQuote(selected)\r\n .subscribe(result => {\r\n this.addFurtheWorkToNewQuoteDisbaled = true;\r\n this.CloseAndNavigateTo(`/quotes/details/${result.EntityId}`, 1);\r\n }, () => this.addFurtheWorkToNewQuoteDisbaled = true);\r\n }\r\n }\r\n\r\n public FurtherWorkNoActionRequired(): void {\r\n const selected = this.filterSelected(e => {\r\n e.FurtherWorkDocumentID = null;\r\n this.addFurtheWorkToNewQuoteDisbaled = true;\r\n });\r\n if (selected) {\r\n this.service.furtherWorkNoActionRequired(selected)\r\n .subscribe(this.reload.bind(this));\r\n }\r\n }\r\n\r\n public ViewFurtherWorkJob(furtherWork: JobVisitFurtherWorkModel): void {\r\n this.CloseAndNavigateTo(\"/jobs/job/\", furtherWork.FurtherWorkDocumentID);\r\n }\r\n\r\n public ViewReminder(furtherWork: JobVisitFurtherWorkModel): void {\r\n this.CloseAndNavigateTo(\"/tasks/task\", furtherWork.FurtherWorkDocumentID);\r\n }\r\n\r\n public ViewFurtherWorkQuote(furtherWork: JobVisitFurtherWorkModel): void {\r\n this.CloseAndNavigateTo(`/quotes/details/${furtherWork.FurtherWorkDocumentID}`, furtherWork.FurtherWorkSubDocID);\r\n }\r\n\r\n public GoToEquipment(furtherWork: JobVisitFurtherWorkModel | number): void {\r\n const id = typeof furtherWork === \"number\" ? furtherWork : furtherWork.EquipID;\r\n this.CloseAndNavigateTo(\"/equipment/detail\", id);\r\n }\r\n\r\n public ToggleShow(): void {\r\n this.showMenu = !this.showMenu;\r\n }\r\n\r\n public DialogClosed(): void {\r\n this.showJobSelectDialog = false;\r\n }\r\n\r\n public SetCssClass(info: any): void {\r\n if (info.rowType === \"data\") {\r\n info.rowElement.classList.add(\"labour-row\");\r\n }\r\n }\r\n\r\n public OnSelectionChanged(e: any): void {\r\n const disabledKeys = e.selectedRowsData\r\n .filter(i => i.FurtherWorkInitiated)\r\n .map(fw => fw.FurtherWorkID);\r\n if (disabledKeys.length > 0) {\r\n e.component.deselectRows(disabledKeys);\r\n }\r\n }\r\n\r\n public TotalChargeFormatter(data: any): string {\r\n return formatCurrency(data.value,\r\n JSON.parse(localStorage.getItem(\"ls.UserBrowserLocale\")),\r\n JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\")));\r\n }\r\n\r\n private filterSelected(callback: (i: JobVisitFurtherWorkModel) => void): JobVisitFurtherWorkModel[] {\r\n if (this.selectedIds) {\r\n const selected = this.jobFurtherWork.filter((e) => this.selectedIds.indexOf(e.FurtherWorkID) >= 0);\r\n selected.forEach(callback);\r\n return selected;\r\n }\r\n }\r\n\r\n private reload(): void {\r\n this.selectedIds = null;\r\n this.load.emit();\r\n }\r\n\r\n private CloseAndNavigateTo(url: string, id: number): void {\r\n this.service.JobVisitHide();\r\n this.router.navigate([url, id]);\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG, IProteanResponse } from \"servicesight-shared\";\r\nimport { JobActivityModel } from \"../models/job-activity.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class JobActivityService {\r\n\r\n constructor(private http: HttpClient, @Inject(APP_CONFIG) protected config: IAppConfig) { }\r\n\r\n public GetJobActivities(jobId: number): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Activity/GetForJob?jobId=${jobId}`;\r\n return this.http.get(url);\r\n }\r\n\r\n public DeleteJobActivity(jobActivityId: number): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Activity/Delete?jobActivityId=${jobActivityId}`;\r\n return this.http.delete(url);\r\n }\r\n\r\n public DeleteJobActivities(jobActivityIds: number[]): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Activity/Delete`;\r\n return this.http.post(url, jobActivityIds);\r\n }\r\n\r\n public GetJobActivity(jobActivityId: number): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Activity/Get?jobActivityId=${jobActivityId}`;\r\n return this.http.get(url);\r\n }\r\n\r\n public AddToVisit(jobSessionId: number, jobActivityIds: number[]): Observable {\r\n return this.http.post(`${this.config.apiLocations.ServiceSight}Activity/AddToVisit?jobSessionId=${jobSessionId}`, jobActivityIds);\r\n }\r\n\r\n public UpdateJobActivity(jobActivity: JobActivityModel): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Activity/Update`;\r\n return this.http.post(url, jobActivity);\r\n }\r\n}\r\n","
\r\n

{{\"label.jobs.analysis.chart.title\" | translate}}

\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
","import { Component, Input, OnChanges, OnDestroy, OnInit } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { Subscription } from \"rxjs\";\r\nimport { ActivityTypeModel, LabourService } from \"servicesight-shared\";\r\nimport { JobActivityModel } from \"src/app/jobs/models/job-activity.model\";\r\nimport { JobService } from \"src/app/jobs/services/job.service\";\r\nimport { AnalysisChartDataModel } from \"./analysis-chart-data.model\";\r\n\r\n@Component({\r\n selector: \"app-labour-analysis-chart\",\r\n templateUrl: \"./labour-analysis-chart.component.html\",\r\n styleUrls: [\"./labour-analysis-chart.component.scss\"]\r\n})\r\nexport class LabourAnalysisChartComponent implements OnInit, OnChanges, OnDestroy {\r\n @Input() jobId: number;\r\n @Input() jobSessionId: number;\r\n @Input() jobActivities: JobActivityModel[];\r\n @Input() ActivityTypes: ActivityTypeModel[];\r\n\r\n public visitTimeMinutes: number = 0;\r\n public showChart: boolean;\r\n public chartDataSource: AnalysisChartDataModel[] = [];\r\n private labourSub: Subscription;\r\n\r\n constructor(\r\n private translate: TranslateService,\r\n private jobService: JobService,\r\n private labourService: LabourService\r\n ) {\r\n this.customizeLegend = this.customizeLegend.bind(this);\r\n }\r\n\r\n\r\n public ngOnInit(): void {\r\n this.labourSub = this.labourService.labourChanged.subscribe(changed => {\r\n if (changed) {\r\n this.loadVisit();\r\n }\r\n });\r\n }\r\n\r\n public ngOnChanges(): void {\r\n if (this.ActivityTypes && this.jobActivities && this.jobId) {\r\n this.loadVisit();\r\n }\r\n }\r\n\r\n private loadVisit() {\r\n this.jobService.GetVisits(this.jobId).subscribe(visits => {\r\n this.visitTimeMinutes = 0;\r\n if (this.isJobSessionSet()) {\r\n visits = visits.filter(x => x.SessionID === this.jobSessionId);\r\n }\r\n visits.forEach(visit => {\r\n const time = this.getDatesDifferenceInMinutes(visit.TimeOn, visit.TimeOff);\r\n this.visitTimeMinutes += time;\r\n });\r\n this.showChart = this.visitTimeMinutes > 0;\r\n this.prepareChartData();\r\n });\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.labourSub.unsubscribe();\r\n }\r\n\r\n public customizeLegend(arg: any): string {\r\n const activity = this.chartDataSource.find(x => x.ActivityName === arg.seriesName);\r\n const timetoDisplay = this.prepareTimeToDisplay(activity.Time);\r\n const activityTimePercent = this.calculateActivityPercent(activity.Time);\r\n\r\n return `${activity.ActivityName}: ${activityTimePercent}% - ${timetoDisplay}`;\r\n }\r\n\r\n private prepareChartData(): void {\r\n this.chartDataSource = [];\r\n let activitiesTime = 0;\r\n this.jobActivities.forEach(activity => {\r\n if (!this.isActivityCompleted(activity)) {\r\n return;\r\n }\r\n\r\n const time = this.getDatesDifferenceInMinutes(activity.StartTime, activity.EndTime);\r\n activitiesTime += time;\r\n\r\n const activityName = this.getActivityName(activity.ActivityTypeId);\r\n const activityNameInDataSource = this.chartDataSource.find(x => x.ActivityName === activityName);\r\n\r\n if (activityNameInDataSource) {\r\n activityNameInDataSource.Time += time;\r\n } else {\r\n this.chartDataSource.push({\r\n JobId: activity.JobId,\r\n ActivityName: activityName,\r\n Time: time\r\n });\r\n }\r\n });\r\n\r\n this.addOnSiteLabour(activitiesTime);\r\n }\r\n\r\n private isActivityCompleted(activity: JobActivityModel): boolean {\r\n return !!activity.StartTime && !!activity.EndTime;\r\n }\r\n\r\n private getActivityName(activityId: number): string {\r\n return this.ActivityTypes.find(x => x.ActivityTypeID === activityId).ActivityName;\r\n }\r\n\r\n private getDatesDifferenceInMinutes(firstDate: Date, secondDate: Date): number {\r\n const firstTime = new Date(firstDate).getTime();\r\n const secondTime = new Date(secondDate).getTime();\r\n return Math.floor((secondTime - firstTime) / 60000);\r\n }\r\n\r\n private addOnSiteLabour(activitiesTime: number): void {\r\n const onSiteTime = this.visitTimeMinutes - activitiesTime;\r\n\r\n this.chartDataSource.unshift({\r\n JobId: this.jobId,\r\n ActivityName: this.translate.instant(\"label.jobs.analysis.chart.labour-on-site\"),\r\n Time: onSiteTime\r\n });\r\n }\r\n\r\n private prepareTimeToDisplay(time: number): string {\r\n const h = Math.floor(time / 60);\r\n const m = Math.floor(time % 60);\r\n const hDisplay = h > 0 ? `${h}h` : \"\";\r\n const mDisplay = m > 0 ? `${m}m` : \"\";\r\n return `${hDisplay} ${mDisplay}`;\r\n }\r\n\r\n private calculateActivityPercent(activityTime: number): number {\r\n return Math.floor(activityTime / this.visitTimeMinutes * 100 + 0.5);\r\n }\r\n\r\n private isJobSessionSet(): boolean {\r\n return this.jobSessionId !== null && this.jobSessionId !== undefined;\r\n }\r\n}\r\n","export class JobActivityModel {\r\n JobActivityId: number;\r\n JobId: number;\r\n JobSessionId?: number;\r\n ActivityTypeId: number;\r\n Notes: number;\r\n StartTime: Date;\r\n EndTime: Date;\r\n}\r\n","\r\n
\r\n\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n {{ GetVisitDisplayValue(visit) }}\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n {{ activityType.ActivityName }}\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n","import { formatDate } from \"@angular/common\";\r\nimport {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport moment from \"moment\";\r\nimport { ActivityService, ActivityTypeModel, FormMesssageService, IProteanResponse, JobStatus } from \"servicesight-shared\";\r\nimport { JobActivityModel } from \"../models/job-activity.model\";\r\nimport { JobVisitListModel } from \"../models/job-visit-list\";\r\nimport { JobActivityService } from \"../services/job-activity.service\";\r\nimport { JobService } from \"../services/job.service\";\r\n\r\n@Component({\r\n selector: \"app-job-activity-dialogue\",\r\n templateUrl: \"./job-activity-dialogue.component.html\",\r\n styleUrls: [\"./job-activity-dialogue.component.scss\"]\r\n})\r\nexport class JobActivityDialogueComponent implements OnChanges, OnInit {\r\n @Input() jobId: number;\r\n @Input() activityId: number;\r\n @Input() title: string;\r\n\r\n @Output() save = new EventEmitter();\r\n @Output() cancel = new EventEmitter();\r\n\r\n @ViewChild(\"jobactivityform\", { static: true }) form: NgForm;\r\n public readonly formName: string = \"jobactivityform\";\r\n\r\n public activity: JobActivityModel;\r\n public isLoading: boolean = true;\r\n public visits: JobVisitListModel[];\r\n public miscTypes: DataSource;\r\n public ActivityTypes: ActivityTypeModel[];\r\n public timesInvalid: boolean = false;\r\n private status: JobStatus;\r\n\r\n public get ModifyEnabled(): boolean {\r\n return !this.isLoading && this.jobId && this.status < JobStatus.COMPLETED && !this.timesInvalid;\r\n }\r\n\r\n constructor(\r\n private formMessagesService: FormMesssageService,\r\n private jobActivityService: JobActivityService,\r\n private activityService: ActivityService,\r\n private jobService: JobService) {\r\n this.activity = new JobActivityModel();\r\n }\r\n\r\n ngOnInit(): void {\r\n this.activityService.GetJobActivityTypes().subscribe(data => {\r\n this.ActivityTypes = data;});\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.jobId.currentValue || (changes.jobId.currentValue && changes.miscId)) {\r\n this.onLoad(this.activityId, this.jobId);\r\n }\r\n }\r\n\r\n public Save(): void {\r\n this.isLoading = true;\r\n\r\n this.formMessagesService.RegisterObservable(this.jobActivityService.UpdateJobActivity(this.activity), this.formName)\r\n .subscribe(() => {\r\n this.isLoading = false;\r\n this.save.emit();\r\n }, () => this.isLoading = false);\r\n }\r\n\r\n public Dismiss(): void {\r\n this.cancel.emit();\r\n }\r\n\r\n public GetVisitDisplayValue(visit: JobVisitListModel): string {\r\n if (visit) {\r\n return `${visit.SessionID}. ${visit.Employee ? visit.Employee : \"\"}${visit.VisitDate ? \" on \" + formatDate(visit.VisitDate, \"shortDate\", navigator.language) : \"\"}`;\r\n } else {\r\n return \"\";\r\n }\r\n }\r\n\r\n public GetActivityTypeDisplayValue(activityType: ActivityTypeModel): string {\r\n if (activityType) {\r\n return activityType.ActivityName;\r\n } else {\r\n return \"\";\r\n }\r\n }\r\n\r\n public ValidateTimes(): void {\r\n if (this.activity.EndTime && this.activity.EndTime !== null) {\r\n\r\n // If there's an EndTime, ensure a Visit has been specified\r\n if (!this.activity.JobSessionId) {\r\n this.timesInvalid = true;\r\n } else {\r\n this.timesInvalid = !this.EndTimeHasValidStartTime() || !this.WithinLabourHours();\r\n }\r\n } else {\r\n this.timesInvalid = false;\r\n }\r\n }\r\n\r\n private WithinLabourHours(): boolean {\r\n if (this.activity.StartTime && this.activity.EndTime) {\r\n const visit = this.visits.find(x => x.SessionID === this.activity.JobSessionId);\r\n const activityStartTime = moment(this.activity.StartTime);\r\n const activityEndTime = moment(this.activity.EndTime);\r\n const visitTimeOn = moment(visit.TimeOn);\r\n const visitTimeOff = moment(visit.TimeOff);\r\n\r\n const isWithinLabourHours = (!visit.TimeOn || activityStartTime.isSameOrAfter(visitTimeOn)) && (!visit.TimeOff || activityEndTime.isSameOrBefore(visitTimeOff));\r\n return isWithinLabourHours;\r\n }\r\n }\r\n\r\n private EndTimeHasValidStartTime(): boolean {\r\n if (this.activity.StartTime && this.activity.StartTime !== null) {\r\n const timeDifference = new Date(this.activity.EndTime).getTime() - new Date(this.activity.StartTime).getTime();\r\n const resultInMinutes = Math.round(timeDifference / 60000);\r\n const isTheSameDate = new Date(this.activity.EndTime).setHours(0, 0, 0, 0) === new Date(this.activity.StartTime).setHours(0, 0, 0, 0);\r\n\r\n return resultInMinutes > 0 && isTheSameDate;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n private onLoad(jobActivityId: number, jobId: number): void {\r\n this.isLoading = true;\r\n\r\n if (jobId) {\r\n this.jobService.GetVisits(jobId).subscribe((result) => {\r\n this.visits = result;\r\n });\r\n\r\n this.jobService.GetJob(this.jobId).subscribe(data => {\r\n this.status = data.Status;\r\n });\r\n\r\n if (jobActivityId) {\r\n this.jobActivityService.GetJobActivity(jobActivityId).subscribe((result) => {\r\n this.activity = result;\r\n this.isLoading = false;\r\n }, () => this.isLoading = false);\r\n } else {\r\n this.activity = new JobActivityModel();\r\n this.activity.JobId = jobId;\r\n this.isLoading = false;\r\n }\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n\r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n
\r\n \r\n {{ data.data.Notes.length > 50 ? (data.data.Notes | slice:0:50) + \"...\" : data.data.Notes }}\r\n \r\n
\r\n\r\n \r\n\r\n
\r\n {{ CalculateHoursAndMinutes(data.value) }}\r\n
\r\n\r\n \r\n
\r\n
\r\n {{visit.data.Notes}}\r\n
\r\n
\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnDestroy,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { Subscription } from \"rxjs\";\r\nimport { ActivityService, ActivityTypeModel, FormMesssageService, JobStatus, Module, ModuleService, SelectJobVisitComponent } from \"servicesight-shared\";\r\nimport { JobActivityModel } from \"../models/job-activity.model\";\r\nimport { JobActivityService } from \"../services/job-activity.service\";\r\n\r\n@Component({\r\n selector: \"app-job-activity\",\r\n templateUrl: \"./job-activity.component.html\",\r\n styleUrls: [\"./job-activity.component.scss\"]\r\n})\r\nexport class JobActivityComponent implements OnChanges, OnInit, OnDestroy {\r\n @ViewChild(\"selectJobVisitComponent\", { static: true }) selectJobVisitComponent: SelectJobVisitComponent;\r\n\r\n @Input() jobId: number;\r\n @Input() jobSessionId: number;\r\n @Input() jobStatus: JobStatus;\r\n @Output() openVisit = new EventEmitter();\r\n\r\n public jobActivities: JobActivityModel[];\r\n public selectedIds: Array = [];\r\n public showDeleteMessage: boolean = false;\r\n public showJobActivityDialogue: boolean = false;\r\n public ActivityTypes: ActivityTypeModel[];\r\n public isProEnabled = false;\r\n public activityDialogueTitle: string;\r\n public selectedActivityId: number;\r\n private readonly formName: string = \"jobform\";\r\n private activitySub: Subscription;\r\n\r\n public get ControlsEnabled(): boolean {\r\n return !this.isJobSessionSet();\r\n }\r\n\r\n public get ModifyEnabled(): boolean {\r\n return this.jobId && this.jobStatus < JobStatus.COMPLETED;\r\n }\r\n\r\n public get selectionMode(): string {\r\n return this.ControlsEnabled ? \"multiple\": \"none\";\r\n }\r\n\r\n constructor(\r\n private jobActivityService: JobActivityService,\r\n private moduleService: ModuleService,\r\n private activityService: ActivityService,\r\n private formMessageService: FormMesssageService) {\r\n this.HoursTotalText = this.HoursTotalText.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.activityService.GetJobActivityTypes().subscribe(data => {\r\n this.ActivityTypes = data;\r\n });\r\n this.moduleService.GetEnabledModules().subscribe(o => {\r\n this.isProEnabled = o.includes(Module.Pro);\r\n });\r\n\r\n this.activitySub = this.activityService.activityChanged.subscribe(() => {\r\n this.LoadActivities();\r\n });\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.jobId || changes.jobSessionId) {\r\n this.LoadActivities();\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.activitySub.unsubscribe();\r\n }\r\n\r\n public HoursTotalText(data: any): string {\r\n return this.CalculateHoursAndMinutes(data.value);\r\n }\r\n\r\n public GoToVisit(visitId: number): void {\r\n this.openVisit.emit(visitId);\r\n }\r\n\r\n public CalculateHoursAndMinutes(data: number): string {\r\n if (!data) {\r\n return null;\r\n }\r\n\r\n const hour = Math.floor(data / 60);\r\n const minutes = data - (hour * 60);\r\n return hour.toString().padStart(2, \"0\") + \":\" + minutes.toString().padStart(2, \"0\");\r\n }\r\n\r\n public UpsertActivity(activity: number): void {\r\n if (this.jobId) {\r\n if (activity) {\r\n this.openActivityDialogue(activity);\r\n } else {\r\n this.openActivityDialogue(0);\r\n }\r\n }\r\n }\r\n\r\n public OnSaveActivity(): void {\r\n this.showJobActivityDialogue = false;\r\n this.activityService.ActivityChanged();\r\n }\r\n\r\n public OnCancelActivity(): void {\r\n this.showJobActivityDialogue = false;\r\n }\r\n\r\n public RemoveActivites() {\r\n this.showDeleteMessage = true;\r\n }\r\n\r\n public ConfirmDeleteAction(confirm: boolean): void {\r\n if (confirm) {\r\n this.formMessageService.RegisterObservable(\r\n this.jobActivityService.DeleteJobActivities(this.selectedIds), this.formName).subscribe(() => {\r\n this.LoadActivities();\r\n });\r\n }\r\n this.showDeleteMessage = false;\r\n }\r\n\r\n public AddToVisit() {\r\n this.selectJobVisitComponent.Show();\r\n }\r\n\r\n public OnJobVisitSelected(jobSessionId: number): void {\r\n this.jobActivityService.AddToVisit(jobSessionId, this.selectedIds).subscribe(() => {\r\n this.selectedIds = [];\r\n this.LoadActivities();\r\n });\r\n }\r\n\r\n private LoadActivities(): void {\r\n if (this.jobId) {\r\n this.jobActivityService.GetJobActivities(this.jobId).subscribe((data)=> {\r\n if (this.isJobSessionSet()) {\r\n data = data.filter(a => a.JobSessionId === this.jobSessionId);\r\n }\r\n this.jobActivities = data;\r\n });\r\n }\r\n }\r\n\r\n private openActivityDialogue(activity: number): void {\r\n if (this.jobId) {\r\n this.selectedActivityId = activity ? activity : 0;\r\n this.activityDialogueTitle = \"job.activity.add.activity\";\r\n if (activity) {\r\n this.activityDialogueTitle = this.ModifyEnabled ? \"job.activity.update.activity\" : \"job.activity.view.activity\";\r\n }\r\n this.showJobActivityDialogue = true;\r\n }\r\n }\r\n\r\n private isJobSessionSet(): boolean {\r\n return this.jobSessionId !== null && this.jobSessionId !== undefined;\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\n\r\n@Pipe({\r\n name: \"durationFromDate\"\r\n})\r\nexport class DurationFromDatePipe implements PipeTransform {\r\n\r\n transform(value: any): any {\r\n if (!value) {\r\n return \"\";\r\n }\r\n\r\n return new Date(value).toISOString().substring(11, 16);\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { JobVisitStatus } from \"../enums/JobVisitStatus\";\r\n\r\n@Pipe({\r\n name: \"jobVisitStatus\"\r\n})\r\nexport class JobVisitStatusPipe implements PipeTransform {\r\n\r\n private readonly stringValueMapping = {\r\n Entry: JobVisitStatus.Entry,\r\n Unallocated: JobVisitStatus.Unalloc,\r\n Unalloc: JobVisitStatus.Unalloc,\r\n NotificationRequired: JobVisitStatus.NotificationRequired,\r\n NotificationSent: JobVisitStatus.NotificationSent,\r\n WaitingAcceptance: JobVisitStatus.WaitingAcceptance,\r\n Alloc: JobVisitStatus.Allocated,\r\n Allocated: JobVisitStatus.Allocated,\r\n EnRoute: JobVisitStatus.EnRoute,\r\n OnSite: JobVisitStatus.OnSite,\r\n Visited: JobVisitStatus.Visited,\r\n NeedsChecking: JobVisitStatus.NeedsChecking,\r\n DetailsReq: JobVisitStatus.NeedsChecking,\r\n Complete: JobVisitStatus.Complete\r\n };\r\n\r\n transform(value: any): any {\r\n const status = {\r\n [JobVisitStatus.Entry]: \"job.visit.status.entry\",\r\n [JobVisitStatus.Unalloc]: \"job.visit.status.unallocated\",\r\n [JobVisitStatus.NotificationRequired]: \"job.visit.status.notification.required\",\r\n [JobVisitStatus.NotificationSent]: \"job.visit.status.notification.sent\",\r\n [JobVisitStatus.WaitingAcceptance]: \"job.visit.status.waiting.acceptance\",\r\n [JobVisitStatus.Allocated]: \"job.visit.status.allocated\",\r\n [JobVisitStatus.EnRoute]: \"job.visit.status.en.route\",\r\n [JobVisitStatus.OnSite]: \"job.visit.status.on.site\",\r\n [JobVisitStatus.Visited]: \"job.visit.status.visited\",\r\n [JobVisitStatus.NeedsChecking]: \"job.visit.status.needs.checking\",\r\n [JobVisitStatus.Complete]: \"job.visit.status.complete\"\r\n };\r\n\r\n let safeValue = Number(value);\r\n if (isNaN(safeValue)) {\r\n safeValue = this.stringValueMapping[value];\r\n }\r\n\r\n return status[safeValue] || \"\";\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { LabourTypes } from \"../enums/labour-type.enum\";\r\n\r\n@Pipe({\r\n name: \"labourType\"\r\n})\r\nexport class LabourTypePipe implements PipeTransform {\r\n\r\n transform(value: any): any {\r\n const status = {\r\n [LabourTypes.FollowOnHours]: \"job.visit.labour.type.follow.on.hours\",\r\n [LabourTypes.InitialRate]: \"job.visit.labour.type.initial-rate\",\r\n [LabourTypes.Mileage]: \"job.visit.labour.type.mileage\",\r\n [LabourTypes.Travelling]: \"job.visit.labour.type.travelling\"\r\n };\r\n return status[value] || \"\";\r\n }\r\n\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { JobVisitStatus } from \"../../shared/enums/JobVisitStatus\";\r\n\r\n@Pipe({\r\n name: \"jobVisitStatusBar\"\r\n})\r\nexport class JobVisitStatusBarPipe implements PipeTransform {\r\n\r\n private readonly status = {\r\n [JobVisitStatus.Entry]: \"clrred\",\r\n [JobVisitStatus.Unalloc]: \"clrred\",\r\n [JobVisitStatus.NotificationRequired]: \"clrred\",\r\n [JobVisitStatus.NotificationSent]: \"clrred\",\r\n [JobVisitStatus.WaitingAcceptance]: \"clrred\",\r\n [JobVisitStatus.Allocated]: \"clryellow\",\r\n [JobVisitStatus.EnRoute]: \"clryellow\",\r\n [JobVisitStatus.OnSite]: \"clryellow\",\r\n [JobVisitStatus.Visited]: \"clryellow\",\r\n [JobVisitStatus.NeedsChecking]: \"clryellow\",\r\n [JobVisitStatus.Complete]: \"clrgreen\"\r\n };\r\n\r\n private readonly bgcolors = {\r\n [JobVisitStatus.Entry]: \"bgredstatusshort\",\r\n [JobVisitStatus.Unalloc]: \"bgredstatusshort\",\r\n [JobVisitStatus.NotificationRequired]: \"bgredstatusshort\",\r\n [JobVisitStatus.NotificationSent]: \"bgredstatuslong\",\r\n [JobVisitStatus.WaitingAcceptance]: \"bgredstatuslong\",\r\n [JobVisitStatus.Allocated]: \"bgyellowstatusshort\",\r\n [JobVisitStatus.EnRoute]: \"bgyellowstatuslong\",\r\n [JobVisitStatus.OnSite]: \"bgyellowstatuslong\",\r\n [JobVisitStatus.Visited]: \"bgyellowstatuslong\",\r\n [JobVisitStatus.NeedsChecking]: \"bgyellowstatuslong\",\r\n [JobVisitStatus.Complete]: \"bggreenstatuslong\"\r\n };\r\n\r\n transform(value: any, args?: any): string {\r\n if (value) {\r\n if (args === \"bg\") {\r\n return this.bgcolors[value];\r\n } else if (args === \"bar\") {\r\n return this.status[value];\r\n }\r\n }\r\n return null;\r\n }\r\n}\r\n\r\n","\r\n
\r\n
\r\n
\r\n

{{ 'job.visit.add.visit' | translate }}

\r\n

{{ 'job.visit.edit.visit' | translate }}

\r\n

\r\n
\r\n

{{ Visit.Status | jobVisitStatus | translate }}

\r\n
\r\n

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

{{ 'job.visit.planning' | translate }}

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

{{ 'job.visit.actual' | translate }}

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
 {{ 'job.visit.charges.type' | translate }}{{ 'job.visit.charges.units' | translate }}{{ 'job.visit.charges.rate' | translate }}{{ 'job.visit.charges.overtime.multiplier' | translate }}{{ 'job.visit.charges.total' | translate }}
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{currencySymbol}}\r\n \r\n
\r\n
\r\n

Total {{totalCharges | currency:currencySymbol}}

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

{{ 'job.visit.charges.site.mileage.message' | translate: { value: Visit.SiteJobMileage } }}

\r\n

{{ 'job.visit.charges.site.travel.time.message' | translate: { value: Visit.SiteJobTravelTime | durationFromDate } }}

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n 0)\" >\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n

{{ 'job.visit.signature' | translate }}

\r\n
\r\n
\r\n
\r\n {{ 'job.visit.customer.not.present' | translate }}\r\n
\r\n
\r\n \r\n
{{Visit.CustomerSignatureName}}
\r\n
\r\n
\r\n \r\n
\r\n \r\n {{ 'job.visit.no.customer.signature' | translate }}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

{{ 'job.visit.engineer' | translate }}

\r\n
\r\n
\r\n
\r\n \r\n
{{Visit.Employee}}
\r\n
\r\n
\r\n \r\n
\r\n \r\n
{{ 'job.visit.no.engineer.signature' | translate }}
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n

{{ 'job.visit.recalculate.charges.message' | translate}}

\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { DomSanitizer, SafeResourceUrl } from \"@angular/platform-browser\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport moment from \"moment\";\r\nimport { Observable } from \"rxjs\";\r\nimport { distinctUntilChanged } from \"rxjs/operators\";\r\nimport {\r\n EngineerChanged,\r\n FormMesssageService,\r\n IProteanResponse,\r\n JobVisitEngineer,\r\n PermissionsService,\r\n SettingId,\r\n SettingsService\r\n} from \"servicesight-shared\";\r\nimport { StoreService } from \"src/app/settings/services/store.service\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { JobVisitStatus } from \"../../shared/enums/JobVisitStatus\";\r\nimport { LabourTypes } from \"../enums/labour-type.enum\";\r\nimport { JobVisitModel } from \"../models/job-visit\";\r\nimport { JobVisitChargeModel } from \"../models/job-visit-charge\";\r\nimport { JobVisitDataService } from \"../services/job-visit-data.service\";\r\nimport { ConfirmationDialogueComponent } from \"src/app/shared/components/confirmation-dialogue/confirmation-dialogue.component\";\r\nimport { EngineerSkillService } from \"./../../settings/services/engineer-skill.service\";\r\n\r\n@Component({\r\n selector: \"app-job-visit-dialogue\",\r\n templateUrl: \"./job-visit-dialogue.component.html\",\r\n styleUrls: [\"./job-visit-dialogue.component.scss\"]\r\n})\r\nexport class JobVisitDialogueComponent implements OnChanges, OnInit {\r\n\r\n @Input() jobID: number;\r\n @Input() sessionID: number;\r\n @Output() cancel = new EventEmitter();\r\n @Output() save = new EventEmitter();\r\n @ViewChild(\"visitform\", { static: true }) form: NgForm;\r\n @ViewChild(\"skillCheckConfirmationDialogue\") skillCheckConfirmationDialogue: ConfirmationDialogueComponent;\r\n\r\n public Visit = new JobVisitModel();\r\n public Engineers: JobVisitEngineer[] = [];\r\n public totalCharges = 0;\r\n public currentDataContextAction: (visit: JobVisitModel) => Observable;\r\n public needToAsk = false;\r\n public workedTimeError = false;\r\n public isActive = false;\r\n public FieldsDisabled = false;\r\n public allSelected = false;\r\n public anySelected = false;\r\n public activeTab = 0;\r\n public currencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n public LabourTypes = LabourTypes;\r\n public showRecalculateCharges = false;\r\n public showEngineerWarningPopup = false;\r\n public showStoreWarningPopup = false;\r\n public showMenu = false;\r\n public reloadVisitsList = false;\r\n public formName = \"visitform\";\r\n public isLoading = false;\r\n public additionalStoresEnabled = false;\r\n public stockStoreDataStore: ODataStore;\r\n public minDate: Date;\r\n public workTimeEditDisabled: boolean = false;\r\n public overrideTimesheetRestrictions: boolean = false;\r\n public hasAccessToPro: boolean = false;\r\n\r\n private oldMileage: number;\r\n private oldStoreId: number;\r\n private isTravelToLoaded = true;\r\n private isTravelFromLoaded = true;\r\n private selectedEngineer: any;\r\n\r\n public dataToConfirm: any;\r\n public showSkillCheckWarningMessage: boolean = false;\r\n public skillCheckWarningMessage: string;\r\n public engineerSkillsCallbackFunction: Function;\r\n\r\n public get hasJobLevelActivities(): boolean {\r\n let access = false;\r\n\r\n if (this.Visit) {\r\n access = this.hasAccessToPro && this.Visit.HasJobActivityTypes;\r\n }\r\n\r\n return access;\r\n }\r\n\r\n constructor(\r\n private permissionsService: PermissionsService,\r\n private service: JobVisitDataService,\r\n private sanitizer: DomSanitizer,\r\n private formMessageService: FormMesssageService,\r\n private storeService: StoreService,\r\n private settingsService: SettingsService,\r\n private licenseService: LicenseService,\r\n private engineerSkillService: EngineerSkillService) {\r\n this.ChangeEngineer = this.ChangeEngineer.bind(this);\r\n }\r\n\r\n ngOnInit() {\r\n this.service.jobVisitHide.subscribe(() => this.cancel.emit());\r\n this.stockStoreDataStore = this.storeService.GetDataStore();\r\n this.settingsService.getSetting(SettingId.UseAdditionalStores).subscribe(res => {\r\n this.additionalStoresEnabled = res.ValueBool;\r\n });\r\n this.permissionsService.CurrentUserHasPermission(\"TimesheetCannotChangeAfterSubmit\").subscribe(x => this.overrideTimesheetRestrictions = x);\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe((res) => {\r\n this.hasAccessToPro = res.ProEnabled;\r\n });\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.jobID.currentValue) {\r\n this.onLoad();\r\n }\r\n }\r\n\r\n public jobVisitLabourTypes(): Array {\r\n const keys = Object.keys(this.LabourTypes);\r\n return keys.filter(k => !isNaN(Number(k)));\r\n }\r\n\r\n public onLoad(reloadJob: boolean = false): void {\r\n if (reloadJob) {\r\n this.save.emit();\r\n }\r\n return this.loadFormData(this.jobID, this.sessionID);\r\n }\r\n\r\n public ReSyncVisit(): void {\r\n this.formMessageService.RegisterObservable(this.service.reSyncVisitEngineer(this.Visit), this.formName).subscribe(response => {\r\n // open url in new tab\r\n window.open(`https://app.elmah.io/errorlog/search?logId=b6d268c5-82df-4f37-9a17-210ef8a8dd0d&freeText=data.ErrorTackingId%3A%22${response.ViewModel}%22#searchTab`, \"_blank\");\r\n });\r\n }\r\n\r\n public NotifyVisitEngineer(): void {\r\n this.updateVisit(this.service.notifyVisitEngineer, false);\r\n }\r\n\r\n public CompleteJobVisit(): void {\r\n this.updateVisit(this.service.completeVisit, false);\r\n }\r\n\r\n public UncompleteJobVisit(): void {\r\n this.commitSave(this.service.uncompleteVisit, true);\r\n }\r\n\r\n public Dismiss(): void {\r\n this.isLoading = false;\r\n if (this.reloadVisitsList) {\r\n this.save.emit();\r\n } else {\r\n this.cancel.emit();\r\n }\r\n }\r\n\r\n public Save(): void {\r\n this.updateVisit(this.service.updateJobVisit, false);\r\n }\r\n\r\n public RecalculateCharges(): void {\r\n this.Visit.RecalculateCharges = true;\r\n this.commitSave(this.currentDataContextAction, false);\r\n }\r\n\r\n public SaveCharges(): void {\r\n this.Visit.RecalculateCharges = false;\r\n this.commitSave(this.currentDataContextAction, false);\r\n }\r\n\r\n public OnConfirmChangeEngineer(confirmed: boolean): void {\r\n if (!confirmed) {\r\n this.Visit.EmployeeID = this.Visit.EmployeeIdOld;\r\n this.Visit.StoreId = this.oldStoreId;\r\n this.setMinimumDate();\r\n }\r\n\r\n this.showEngineerWarningPopup = false;\r\n }\r\n\r\n public GetImage(base64string: string): SafeResourceUrl {\r\n return this.sanitizer.bypassSecurityTrustResourceUrl(\"data:image/bmp;charset=utf-8;base64,\" + base64string);\r\n }\r\n\r\n public OnEngineerChanged(engineerChanged: EngineerChanged) {\r\n this.engineerSkillService.EngineerSkillsCheckForJob(engineerChanged.CurrentEngineerId ,this.Visit.JobID).subscribe(x => {\r\n this.engineerSkillsCallbackFunction = this.ChangeEngineer;\r\n this.dataToConfirm = engineerChanged;\r\n if (x.IsSuccess) {\r\n this.ChangeEngineer(engineerChanged);\r\n } else {\r\n this.skillCheckWarningMessage = x.Message;\r\n this.showSkillCheckWarningMessage = true;\r\n }\r\n });\r\n }\r\n\r\n public onConfirmEngineerSkills(isConfirmed: any): void {\r\n if (isConfirmed === false) {\r\n this.Visit.EmployeeID = null;\r\n }\r\n\r\n this.showSkillCheckWarningMessage = false;\r\n }\r\n\r\n // Add New Charge\r\n public AddNewCharge(): void {\r\n const newCharge = new JobVisitChargeModel();\r\n newCharge.Multiplier = 1;\r\n this.initialChargeUpdate(newCharge);\r\n this.Visit.Charges.push(newCharge);\r\n this.SelectionChanged();\r\n }\r\n\r\n // Delete Charges\r\n public DeleteSelectedCharges(): void {\r\n this.Visit.Charges.forEach((charge) => {\r\n if (charge.selected) {\r\n charge.selected = false;\r\n charge.IsDeleted = true;\r\n charge.Total = 0;\r\n }\r\n });\r\n this.recalcTotalOfAll();\r\n this.SelectionChanged();\r\n }\r\n\r\n // Charge type select changed\r\n public ChangeChargeType(charge: JobVisitChargeModel): void {\r\n charge.Units = 0;\r\n charge.UnitsUI = 0;\r\n if (Number(charge.Type) === LabourTypes.Mileage) {\r\n charge.Multiplier = 1;\r\n }\r\n this.RecalcTotalCharges(charge);\r\n this.validateChargeTypes();\r\n }\r\n\r\n // Select All Charges\r\n public SelectAllCharges(): void {\r\n this.Visit.Charges.forEach((item) => {\r\n if (!item.IsDeleted) { item.selected = this.allSelected; }\r\n });\r\n this.SelectionChanged();\r\n }\r\n\r\n // Selection Changed\r\n public SelectionChanged(): void {\r\n let some = false;\r\n let all = true;\r\n if (this.Visit.Charges) {\r\n this.Visit.Charges.forEach((item) => {\r\n if (item.selected) {\r\n some = true;\r\n } else {\r\n all = false;\r\n }\r\n });\r\n }\r\n this.anySelected = some;\r\n this.allSelected = all;\r\n }\r\n\r\n // Recalculate Total of One\r\n public RecalcTotalCharges(charge: JobVisitChargeModel): void {\r\n if (charge.Multiplier < 0) {\r\n charge.Multiplier = null;\r\n }\r\n\r\n if (charge.UnitsUI < 0 && Number(charge.Type) === LabourTypes.Mileage) {\r\n charge.UnitsUI = 0;\r\n }\r\n charge.Units = charge.UnitsUI;\r\n if (Number(charge.Type) === LabourTypes.Mileage) {\r\n charge.Total = (charge.Multiplier * charge.Rate) * charge.Units;\r\n } else {\r\n charge.Total = (charge.Multiplier * charge.Rate) * (new Date(charge.Units).getUTCHours() + new Date(charge.Units).getUTCMinutes() / 60);\r\n }\r\n this.recalcTotalOfAll();\r\n }\r\n\r\n public RecalcTimeWorked(e: any): void {\r\n if (e && e.event) {\r\n if (this.Visit.TimeOn1 && this.Visit.TimeOff1) {\r\n this.needToAsk = true;\r\n const difference = new Date(this.Visit.TimeOff1).getTime() - new Date(this.Visit.TimeOn1).getTime();\r\n const resultInMinutes = Math.round(difference / 60000);\r\n const isTheSameDate = new Date(this.Visit.TimeOff1).setHours(0, 0, 0, 0) === new Date(this.Visit.TimeOn1).setHours(0, 0, 0, 0);\r\n if (resultInMinutes > 0 && isTheSameDate) {\r\n this.Visit.TimeWorked1 = new Date(difference);\r\n this.setTimeWorked1Validity(true);\r\n } else {\r\n this.Visit.TimeWorked1 = null;\r\n this.setTimeWorked1Validity(false);\r\n }\r\n } else if (!this.Visit.TimeOn1 && this.Visit.TimeOff1) {\r\n this.Visit.TimeWorked1 = null;\r\n this.setTimeWorked1Validity(false);\r\n this.needToAsk = false;\r\n } else {\r\n this.Visit.TimeWorked1 = null;\r\n this.setTimeWorked1Validity(true);\r\n }\r\n }\r\n }\r\n\r\n public Cancel(): void {\r\n this.showRecalculateCharges = false;\r\n this.isLoading = false;\r\n }\r\n\r\n public OnMileageChanged(e: any): void {\r\n if (e && e.target) {\r\n const newValue = e.target.value;\r\n this.needToAsk = (newValue && this.oldMileage && newValue !== this.oldMileage);\r\n this.oldMileage = newValue;\r\n }\r\n }\r\n\r\n public OnChangeTravelTime(e: any): void {\r\n if (e && e.target) {\r\n this.needToAsk = true;\r\n }\r\n }\r\n\r\n public OnTitleRendered(event): void {\r\n let testId = \"unknown\";\r\n switch (event.itemIndex) {\r\n case 0:\r\n testId = \"main\";\r\n break;\r\n case 1:\r\n testId = \"charges\";\r\n break;\r\n case 2:\r\n testId = \"futherwork\";\r\n break;\r\n case 3:\r\n testId = \"signature\";\r\n break;\r\n }\r\n event.itemElement.setAttribute(\"data-test-id\", testId);\r\n }\r\n\r\n public StoreChanged(e: any): void {\r\n if (e.value && e.event) {\r\n this.oldStoreId = e.previousValue;\r\n if (this.selectedEngineer && e.value !== this.selectedEngineer.StoreId) {\r\n this.showStoreWarningPopup = true;\r\n }\r\n }\r\n }\r\n\r\n public OnConfirmChangeStore(confirmed: boolean): void {\r\n if (!confirmed) {\r\n this.Visit.StoreId = this.oldStoreId;\r\n }\r\n\r\n this.showStoreWarningPopup = false;\r\n }\r\n\r\n private ChangeEngineer(engineerChanged: EngineerChanged): void {\r\n const oldValue = engineerChanged.PreviousEngineerId;\r\n const newValue = engineerChanged.CurrentEngineerId;\r\n this.selectedEngineer = engineerChanged.SelectedEngineer;\r\n this.Visit.StoreId = this.selectedEngineer.StoreId;\r\n this.setMinimumDate();\r\n\r\n this.needToAsk = oldValue && newValue && oldValue !== newValue;\r\n if (this.Visit.SessionID > 0 && oldValue && newValue) {\r\n this.showEngineerWarningPopup = true;\r\n }\r\n }\r\n\r\n private convertChargesDateTimes(): JobVisitChargeModel[] {\r\n return this.Visit.Charges.map((charge) => {\r\n if (Number(charge.Type) !== LabourTypes.Mileage) {\r\n charge.Units = (new Date(charge.UnitsUI).getUTCHours() + new Date(charge.UnitsUI).getUTCMinutes() / 60);\r\n }\r\n return charge;\r\n });\r\n }\r\n\r\n // Initial Charge Update (onLoad, AddNew)\r\n private initialChargeUpdate(charge: JobVisitChargeModel): void {\r\n charge.description = \"Charge row \";\r\n if (Number(charge.Type) !== LabourTypes.Mileage) {\r\n charge.Units = Date.UTC(2000, 0, 1) + Math.round(charge.Units * 60) * 60 * 1000;\r\n }\r\n charge.UnitsUI = charge.Units;\r\n }\r\n\r\n // Validate Charge Types\r\n private validateChargeTypes(): void {\r\n if (this.Visit.Charges) {\r\n this.Visit.Charges\r\n .filter(ch => !ch.IsDeleted)\r\n .forEach((item: JobVisitChargeModel, i) => {\r\n if (item.Type > 0) {\r\n item.hasDuplicateError = this.chargeTypeExist(item);\r\n this.setValidity(item.description + (i + 1), \"duplicated\", !item.hasDuplicateError);\r\n }\r\n });\r\n }\r\n }\r\n\r\n // Check if Charge Type Exist\r\n private chargeTypeExist(charge: JobVisitChargeModel): boolean {\r\n let exists = false;\r\n if (charge && !charge.IsDeleted) {\r\n this.Visit.Charges.forEach((item) => {\r\n if (item !== charge && !item.IsDeleted && Number(item.Type) === Number(charge.Type) && item.Multiplier === charge.Multiplier) {\r\n exists = true;\r\n }\r\n });\r\n }\r\n return exists;\r\n }\r\n\r\n // Recalculate Total of All\r\n private recalcTotalOfAll(): void {\r\n this.totalCharges = 0;\r\n this.Visit.Charges.forEach((item) => {\r\n if (!item.IsDeleted) {\r\n this.totalCharges += item.Total;\r\n }\r\n });\r\n this.validateChargeTypes();\r\n }\r\n\r\n private commitSave(dataContextAction: (visit: JobVisitModel) => Observable, doNotCloseDialog: boolean): void {\r\n this.isLoading = true;\r\n this.Visit.Charges = this.convertChargesDateTimes();\r\n const bindedDataContextAction = dataContextAction.bind(this.service);\r\n if (doNotCloseDialog) {\r\n this.formMessageService\r\n .RegisterObservable(bindedDataContextAction(this.Visit), this.formName)\r\n .subscribe(() => {\r\n this.isLoading = false;\r\n this.onLoad.bind(this)();\r\n }, () => {\r\n this.showRecalculateCharges = false;\r\n this.isLoading = false;\r\n });\r\n this.reloadVisitsList = true;\r\n } else {\r\n this.formMessageService\r\n .RegisterObservable(bindedDataContextAction(this.Visit), this.formName)\r\n .subscribe(() => this.save.emit(), () => {\r\n this.showRecalculateCharges = false;\r\n this.isLoading = false;\r\n });\r\n }\r\n }\r\n\r\n // Set Form Control errors\r\n private setValidity(fieldName: string, validity: string, isValid: boolean): void {\r\n if (this.form.form.controls[fieldName]) {\r\n const error = { };\r\n error[validity] = true;\r\n if (isValid) {\r\n this.form.form.controls[fieldName].setErrors(null);\r\n } else {\r\n setTimeout(() => {\r\n this.form.form.controls[fieldName].setErrors(error);\r\n this.form.form.markAsDirty();\r\n });\r\n }\r\n }\r\n }\r\n\r\n private setTimeWorked1Validity(isValid: boolean): void {\r\n this.workedTimeError = !isValid;\r\n this.setValidity(\"Hours worked\", \"wrongTimeOnTimeOff\", isValid);\r\n }\r\n\r\n // Load Data\r\n private loadFormData(jobId: number, visitId: number): void {\r\n this.isLoading = true;\r\n this.service.getJobVisit(jobId, visitId).subscribe((resp) => {\r\n this.isLoading = false;\r\n this.Visit = resp;\r\n this.oldMileage = this.Visit.MileageActual;\r\n this.oldStoreId = this.Visit.StoreId;\r\n this.isActive = (this.Visit.Status !== JobVisitStatus.Complete);\r\n this.FieldsDisabled = (this.Visit.Status === JobVisitStatus.Complete);\r\n this.anySelected = false;\r\n this.allSelected = false;\r\n this.Visit.Charges.forEach(this.initialChargeUpdate.bind(this));\r\n this.Visit.RecalculateCharges = false;\r\n this.recalcTotalOfAll();\r\n this.needToAsk = false;\r\n this.isTravelToLoaded = false;\r\n this.isTravelFromLoaded = false;\r\n\r\n if (this.Visit.Status !== JobVisitStatus.Complete &&\r\n this.Visit.FurtherWork && this.Visit.FurtherWork.length > 0) {\r\n this.activeTab = 3;\r\n }\r\n\r\n this.attachWatches();\r\n }, () => this.isLoading = false);\r\n }\r\n\r\n // Update with recalculation question\r\n private updateVisit(dataContextAction: (visit: JobVisitModel) => Observable, doNotCloseDialog: boolean): void {\r\n if (!this.workedTimeError && (this.needToAsk || !this.Visit.SessionID)) {\r\n this.showRecalculateCharges = true;\r\n this.currentDataContextAction = dataContextAction;\r\n } else if (this.workedTimeError) {\r\n this.commitSave(dataContextAction, true);\r\n } else {\r\n this.commitSave(dataContextAction, doNotCloseDialog);\r\n }\r\n }\r\n\r\n private attachWatches(): void {\r\n this.watchValueChange(\"TravelTime1Actual\", () => {\r\n if (this.isTravelToLoaded) {\r\n this.needToAsk = true;\r\n } else {\r\n this.isTravelToLoaded = true;\r\n }\r\n });\r\n this.watchValueChange(\"TravelTime2Actual\", () => {\r\n if (this.isTravelFromLoaded) {\r\n this.needToAsk = true;\r\n } else {\r\n this.isTravelFromLoaded = true;\r\n }\r\n });\r\n }\r\n\r\n private watchValueChange(fieldName: string, action: () => void) {\r\n if (this.form.form.get(fieldName)) {\r\n this.form.form.get(fieldName)\r\n .valueChanges\r\n .pipe(distinctUntilChanged())\r\n .subscribe(action.bind(this));\r\n }\r\n }\r\n\r\n private setMinimumDate(): void {\r\n if (!this.workTimeEditDisabled && !this.overrideTimesheetRestrictions) {\r\n this.minDate = moment(this.selectedEngineer.LastSubmitDate).add(1, \"days\").toDate();\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {{visit.data.WorkReport}}\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
{{visit.data.FurtherWorkDescription}}
\r\n
\r\n
\r\n \r\n
\r\n {{data.value}}\r\n
\r\n \r\n
{{ data.value | durationFromDate }}
\r\n
{{ GetTime(data.value) }}
\r\n
{{data.value}}
\r\n
{{ data.value | currency: baseCurrencySymbol }}
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n

{{ \"job.save-job-first.visit\" | translate }}

\r\n
\r\n
\r\n \r\n
\r\n
\r\n","import { formatCurrency } from \"@angular/common\";\r\nimport {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport moment from \"moment\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport {\r\n FormMesssageService,\r\n InspectionService,\r\n JobStatus,\r\n JobVisitEngineer,\r\n LabourService,\r\n Module,\r\n PermissionsService\r\n} from \"servicesight-shared\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { JobVisitStatus } from \"../../shared/enums/JobVisitStatus\";\r\nimport { JobDetail } from \"../models/job-detail\";\r\nimport { JobVisitListModel } from \"../models/job-visit-list\";\r\nimport { JobVisitDataService } from \"../services/job-visit-data.service\";\r\nimport { JobService } from \"../services/job.service\";\r\n\r\n@Component({\r\n selector: \"app-job-labour\",\r\n templateUrl: \"./job-labour.component.html\",\r\n styleUrls: [\"./job-labour.component.scss\"]\r\n})\r\nexport class JobLabourComponent implements OnInit, OnChanges {\r\n @Input() job: JobDetail;\r\n @Input() jobForm: any;\r\n @Output() load = new EventEmitter();\r\n @Output() recentDeletedIds = new EventEmitter();\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n\r\n public jobCompleted: boolean;\r\n public visits: JobVisitListModel[];\r\n public engineers: JobVisitEngineer[];\r\n public selectedVisitIds: Array = [];\r\n public baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n public isLoading = true;\r\n public showWarningPopup: boolean;\r\n public showDeleteMessage: boolean = false;\r\n public showJobVisitDialogue: boolean = false;\r\n public currentVisitId: number;\r\n private readonly formName: string = \"jobform\";\r\n public proEnabled: boolean = false;\r\n public showWarning: boolean = false;\r\n public overrideTimesheetRestrictions: boolean = false;\r\n\r\n public get AddVisitDisabled(): boolean {\r\n return (!this.job.IsAllowedAddSession && !!this.job.JobID) || this.isLoading || this.job.Status < JobStatus.UNALLOCATED;\r\n }\r\n\r\n constructor(\r\n private inspectionService: InspectionService,\r\n private labourService: LabourService,\r\n private permissionsService: PermissionsService,\r\n private formMessageService: FormMesssageService,\r\n private jobService: JobService,\r\n private jobVisitService: JobVisitDataService,\r\n private licenseService: LicenseService) {\r\n }\r\n\r\n ngOnInit(): void {\r\n this.onLoad();\r\n this.jobVisitService.getAllEngineers().subscribe(x => this.engineers = x);\r\n this.permissionsService.CurrentUserHasPermission(\"TimesheetCannotChangeAfterSubmit\").subscribe(x => this.overrideTimesheetRestrictions = x);\r\n this.licenseService.GetCompanyHasAccessToModule(Module.Pro).subscribe(proEnabled => this.proEnabled = proEnabled);\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.job.currentValue.JobID) {\r\n this.jobCompleted = this.job.Status >= JobStatus.COMPLETED;\r\n this.loadVisits();\r\n }\r\n }\r\n\r\n public DeleteSelectedVisits(): void {\r\n this.isLoading = true;\r\n if (this.jobForm.form.dirty) {\r\n this.showWarningPopup = true;\r\n } else {\r\n this.showDeleteMessage = true;\r\n }\r\n }\r\n\r\n public ConfirmDeleteAction(confirm: boolean): void {\r\n if (confirm) {\r\n this.doDeleteVisits(this.selectedVisitIds);\r\n }\r\n this.showDeleteMessage = false;\r\n this.isLoading = false;\r\n }\r\n\r\n public onConfirmSave(isConfirmed: boolean): void {\r\n const self = this;\r\n if (isConfirmed) {\r\n this.jobService.SaveJob(this.job).subscribe(() => {\r\n self.showWarningPopup = false;\r\n self.jobForm.form.markAsPristine();\r\n this.doDeleteVisits(this.selectedVisitIds);\r\n });\r\n } else {\r\n this.showWarningPopup = false;\r\n }\r\n }\r\n\r\n public OpenNewVisit(): void {\r\n if (!this.job.JobID) {\r\n this.showWarning = true;\r\n } else {\r\n this.currentVisitId = 0;\r\n this.showJobVisitDialogue = true;\r\n document.querySelector(\"body\").classList.add(\"overhidn\");\r\n }\r\n }\r\n\r\n public onCancelJobVisit(): void {\r\n this.showJobVisitDialogue = false;\r\n document.querySelector(\"body\").classList.remove(\"overhidn\");\r\n }\r\n\r\n public onSaveJobVisit(): void {\r\n this.showJobVisitDialogue = false;\r\n document.querySelector(\"body\").classList.remove(\"overhidn\");\r\n this.inspectionService.InspectionChanged();\r\n this.labourService.LabourChanged();\r\n this.load.emit();\r\n }\r\n\r\n public GoToVisit(visit: JobVisitListModel): void {\r\n this.currentVisitId = visit.SessionID;\r\n this.showJobVisitDialogue = true;\r\n document.querySelector(\"body\").classList.add(\"overhidn\");\r\n }\r\n\r\n public OnRowDoubleClick($event: any): void {\r\n this.GoToVisit($event.data);\r\n }\r\n\r\n public OnSelectionChanged(event: any): void {\r\n if (!this.overrideTimesheetRestrictions) {\r\n event.selectedRowsData.forEach((visit: JobVisitListModel) => {\r\n const engineer = this.engineers.find(x => x.Id === visit.EmployeeID);\r\n if (engineer && engineer.LastSubmitDate) {\r\n const lastSubmitDate = moment(engineer.LastSubmitDate);\r\n if (moment(visit.TimeOn).isSameOrBefore(lastSubmitDate, \"day\")) {\r\n event.component.deselectRows([visit.SessionID]);\r\n }\r\n }\r\n });\r\n }\r\n }\r\n\r\n public SetCssClass(info: any): void {\r\n if (info.rowType === \"data\") {\r\n info.rowElement.classList.add(\"labour-row\");\r\n }\r\n }\r\n\r\n public VisitStatusClass(visit: JobVisitListModel): string {\r\n if (visit.Status === JobVisitStatus.Complete) {\r\n return \"clrgreen bold\";\r\n } else if (visit.Status > JobVisitStatus.WaitingAcceptance && visit.Status < JobVisitStatus.Complete) {\r\n return \"clryellow bold\";\r\n } else {\r\n return \"clrred bold\";\r\n }\r\n }\r\n\r\n public TotalText(data: any): string {\r\n return formatCurrency(data.value,\r\n JSON.parse(localStorage.getItem(\"ls.UserBrowserLocale\")),\r\n JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\")));\r\n }\r\n\r\n public EngineerSortValue(data: JobVisitListModel): string {\r\n return data.Employee;\r\n }\r\n\r\n public GetTime(date: string): string {\r\n if (date) {\r\n const hours = new Date(date).getHours().toString();\r\n const minutes = new Date(date).getMinutes().toString();\r\n return hours.padStart(2, \"0\") + \":\" + minutes.padStart(2, \"0\");\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n private doDeleteVisits(visitIds: number[]): void {\r\n if (visitIds && visitIds.length > 0) {\r\n this.formMessageService.RegisterObservable(this.jobService.DeleteJobVisits(this.job.JobID, visitIds), this.formName)\r\n .subscribe(() => {\r\n this.load.emit();\r\n this.recentDeletedIds.emit(visitIds);\r\n this.labourService.LabourChanged();\r\n }, () => this.isLoading = false);\r\n }\r\n }\r\n\r\n private loadVisits(): void {\r\n this.selectedVisitIds = [];\r\n this.isLoading = true;\r\n this.jobService.GetVisits(this.job.JobID).subscribe((res) => {\r\n this.visits = res;\r\n this.dataGrid.instance.expandAll(-1);\r\n this.isLoading = false;\r\n }, () => this.isLoading = false);\r\n }\r\n\r\n private onLoad(): void {\r\n this.isLoading = false;\r\n this.showWarningPopup = false;\r\n }\r\n}\r\n","\r\n {{ 'job.parts-po.min-order' | translate }}\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n
\r\n {{ data.displayValue }}*\r\n
\r\n\r\n
{{ data.displayValue | currency: (data.data.currencySymbol || baseCurrencySymbol) }}
\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
","import { Component, OnInit } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { DocumentTypeEnum, FormMesssageService, SettingData, SettingId, SettingsService } from \"servicesight-shared\";\r\nimport { BulkPurchaseOrderService } from \"src/app/shared/services/bulk-purchase-order/bulk-purchase-order.service\";\r\nimport { SupplierPartPriceService } from \"src/app/shared/services/supplier-part-price/supplier-part-price.service\";\r\nimport { SupplierService } from \"src/app/shared/services/supplier/supplier.service\";\r\nimport { StockState } from \"src/app/stock/models/enums/stock-state.enum\";\r\nimport { StockService } from \"src/app/stock/services/stock.service\";\r\nimport { BulkPartOrderLine } from \"../../models/bulk-part-order-line.model\";\r\nimport { BulkPartOrderListModel } from \"../../models/bulk-part-order-list-model\";\r\nimport { SupplierPartPrice } from \"../../models/supplier-part-price.model\";\r\nimport { SupplierStatus } from \"../../pipes/enums/supplier-status.enum\";\r\n\r\n@Component({\r\n selector: \"app-bulk-part-order-popup\",\r\n templateUrl: \"./bulk-part-order-popup.component.html\",\r\n styleUrls: [\"./bulk-part-order-popup.component.scss\"]\r\n})\r\nexport class BulkPartOrderPopupComponent implements OnInit {\r\n\r\n public readonly formName: string = \"bulkRaisePartsPoForm\";\r\n public warningIsShowing: boolean = false;\r\n public showDialog: boolean = false;\r\n public orderParts: BulkPartOrderLine[];\r\n\r\n public supplierDataStore: ODataStore;\r\n public supplierPartPriceDataSource: DataSource;\r\n public storeDataStore: ODataStore;\r\n public baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n public lookup: any;\r\n public StoresEnabled: boolean = false;\r\n public saveEnabled: boolean = true;\r\n\r\n private linkNumber?: number;\r\n private linkType?: DocumentTypeEnum;\r\n private siteId: number;\r\n\r\n public get disableRaisePurchaseOrders(): boolean {\r\n return (this.orderParts && (this.orderParts.length === 0 || this.orderParts.some(p => !p.SupplierId))) || !this.saveEnabled;\r\n }\r\n\r\n constructor(\r\n private supplierService: SupplierService,\r\n private supplierPartPriceService: SupplierPartPriceService,\r\n private bulkPurchaseOrderService: BulkPurchaseOrderService,\r\n private settingsService: SettingsService,\r\n private stockService: StockService,\r\n private router: Router,\r\n private formMessageService: FormMesssageService\r\n ) {\r\n this.SetSupplier = this.SetSupplier.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.supplierDataStore = this.supplierService.GetSupplierStore();\r\n this.storeDataStore = this.stockService.GetStoresStore();\r\n\r\n this.settingsService.getSetting(SettingId.UseAdditionalStores).subscribe((setting: SettingData) => {\r\n this.StoresEnabled = setting.ValueBool;\r\n });\r\n\r\n this.getActiveSuppliers = this.getActiveSuppliers.bind(this);\r\n }\r\n\r\n public Open(parts: BulkPartOrderListModel[], linkNumber: number, linkType: DocumentTypeEnum, siteId: number) {\r\n this.linkNumber = linkNumber;\r\n this.linkType = linkType;\r\n this.siteId = siteId;\r\n\r\n this.orderParts = parts.map((p, i) => {\r\n return {\r\n id: i,\r\n StockHeaderId: p.StockHeaderId,\r\n Quantity: p.QuantityOutstanding,\r\n LinkItemQuantity: p.QuantityOutstanding,\r\n StockState: StockState.New,\r\n SupplierId: null,\r\n BuyingPrice: null,\r\n EstimatedDate: null,\r\n SubDocId: p.PartId,\r\n partNumber: p.PartNumber,\r\n PartDescription: p.PartDescription,\r\n unitPrice: null,\r\n minOrderQty: null,\r\n currencySymbol: null,\r\n storeId: p.StoreId\r\n };\r\n });\r\n\r\n const array = parts.map(p => p.StockHeaderId);\r\n const chunk = 10;\r\n let loadingCount = 0;\r\n\r\n for (let i = 0; i < array.length; i += chunk) {\r\n const temporary = array.slice(i, i + chunk);\r\n const filter = this.buildFilter(temporary);\r\n\r\n this.supplierPartPriceDataSource = this.supplierPartPriceService.GetDataSource();\r\n this.supplierPartPriceDataSource.filter([[filter], \"and\", [\"Preferred\", \"=\", true]]);\r\n\r\n loadingCount++;\r\n this.supplierPartPriceDataSource.load().then((res: SupplierPartPrice[]) => {\r\n // set preferred suppliers\r\n res.forEach(s => {\r\n this.orderParts.filter(p => p.StockHeaderId === s.StockHeaderId).forEach(part => {\r\n part.SupplierId = s.SupplierId;\r\n part.Quantity = part.LinkItemQuantity > s.MinOrderQty ? part.LinkItemQuantity : s.MinOrderQty;\r\n part.EstimatedDate = s.LeadTime ? this.calcEstimatedDate(s.LeadTime) : null;\r\n part.BuyingPrice = s.UnitPrice;\r\n part.unitPrice = s.UnitPrice;\r\n part.minOrderQty = s.MinOrderQty;\r\n this.supplierService.GetSupplierCurrency(part.SupplierId).subscribe(currency => {\r\n part.currencySymbol = currency.CurrencySymbol;\r\n });\r\n });\r\n });\r\n\r\n if (--loadingCount === 0) {\r\n this.showWarningMessage();\r\n }\r\n });\r\n }\r\n\r\n this.showDialog = true;\r\n }\r\n\r\n public async SetSupplier(newData: BulkPartOrderLine, value: number, currentRowData: BulkPartOrderLine): Promise {\r\n newData.SupplierId = value;\r\n\r\n this.showWarningMessage();\r\n\r\n this.supplierService.GetSupplierCurrency(newData.SupplierId).subscribe(currency => {\r\n newData.currencySymbol = currency.CurrencySymbol;\r\n });\r\n\r\n try {\r\n const supplier = await this.getSupplierPrice(currentRowData.StockHeaderId, value);\r\n\r\n newData.Quantity = currentRowData.Quantity > supplier.MinOrderQty ? currentRowData.Quantity : supplier.MinOrderQty;\r\n newData.EstimatedDate = supplier.LeadTime ? this.calcEstimatedDate(supplier.LeadTime) : null;\r\n newData.BuyingPrice = supplier.UnitPrice;\r\n newData.unitPrice = supplier.UnitPrice;\r\n newData.minOrderQty = supplier.MinOrderQty;\r\n } catch {\r\n // error loading supplier price combination, not really a problem could just be that combination does not exist\r\n newData.EstimatedDate = null;\r\n newData.BuyingPrice = 0;\r\n newData.unitPrice = 0;\r\n newData.minOrderQty = null;\r\n }\r\n }\r\n\r\n public Discard(): void {\r\n this.orderParts.length = 0;\r\n this.supplierPartPriceDataSource = null;\r\n this.linkNumber = null;\r\n this.linkType = null;\r\n this.siteId = null;\r\n this.showDialog = false;\r\n this.warningIsShowing = false;\r\n this.formMessageService.ClearForm(this.formName);\r\n }\r\n\r\n public RaisePO(): void {\r\n if (!this.saveEnabled){\r\n return;\r\n }\r\n this.saveEnabled = false;\r\n this.bulkPurchaseOrderService.RaisePartsPO({\r\n LinkNumber: this.linkNumber,\r\n LinkType: this.linkType,\r\n SiteId: this.siteId,\r\n Parts: this.orderParts\r\n }).subscribe(res => {\r\n this.saveEnabled = true;\r\n this.Discard();\r\n if (res.length === 1) {\r\n this.router.navigate([\"/purchase-orders/detail\", res[0]]);\r\n } else {\r\n //GOTO filtered list view\r\n this.router.navigate([\"/purchase-orders/list\"], { queryParams: { ids: res } });\r\n }\r\n }, () => {\r\n this.saveEnabled = true;\r\n });\r\n }\r\n\r\n public SupplierSortValue(data: any): void {\r\n // this here is the grid component\r\n return this.lookup.calculateCellValue(data.SupplierId);\r\n }\r\n\r\n public showWarningMessage(): void {\r\n const showWarning = this.orderParts.some(p => !p.SupplierId);\r\n if (showWarning && !this.warningIsShowing) {\r\n this.warningIsShowing = true;\r\n this.formMessageService.ShowWarning(\"job.parts-po.missing-suppliers\", this.formName);\r\n } else if (!showWarning && this.warningIsShowing) {\r\n this.warningIsShowing = false;\r\n this.formMessageService.ClearForm(this.formName);\r\n }\r\n }\r\n\r\n public getActiveSuppliers(): any {\r\n return {\r\n store: this.supplierDataStore,\r\n filter: [[\"Status\", \"<>\", SupplierStatus.Closed], \"and\", [\"Status\", \"<>\", SupplierStatus.OnHold]]\r\n };\r\n }\r\n\r\n private getSupplierPrice(stockHeaderId: number, supplierId: number): Promise {\r\n const store = this.supplierPartPriceDataSource.store() as ODataStore;\r\n return store.byKey({ StockHeaderId: stockHeaderId, SupplierId: supplierId });\r\n }\r\n\r\n private buildFilter(ids: number[]): any[] {\r\n const filter = [];\r\n ids.forEach(id => {\r\n filter.push([\"StockHeaderId\", \"=\", id]);\r\n filter.push(\"or\");\r\n });\r\n filter.pop();\r\n return filter;\r\n }\r\n\r\n private calcEstimatedDate(daysToAdd: number): Date {\r\n const date = new Date();\r\n let count = 0;\r\n while (count < daysToAdd) {\r\n date.setDate(date.getDate() + 1);\r\n if (date.getDay() !== 0 && date.getDay() !== 6) {\r\n //Date.getDay() gives weekday starting from 0(Sunday) to 6(Saturday)\r\n count++;\r\n }\r\n }\r\n return date;\r\n }\r\n}\r\n","export class BulkPartOrderListModel {\r\n StockHeaderId: number;\r\n QuantityOutstanding: number;\r\n PartId: number;\r\n PartNumber: string;\r\n PartDescription: string;\r\n StoreId: number;\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { BehaviorSubject } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { StockPermissions } from \"../models/stock-permissions\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class StockPermissionsService {\r\n\r\n public HasAddStockTypePermission: BehaviorSubject = new BehaviorSubject(false);\r\n public HasEditStockTypePermission: BehaviorSubject = new BehaviorSubject(false);\r\n public HasDeleteStockTypePermission: BehaviorSubject = new BehaviorSubject(false);\r\n\r\n public HasAddPriceListPermission: BehaviorSubject = new BehaviorSubject(false);\r\n public HasEditPriceListPermission: BehaviorSubject = new BehaviorSubject(false);\r\n public HasDeletePriceListPermission: BehaviorSubject = new BehaviorSubject(false);\r\n\r\n public HasAddAdjustmentReasonPermission: BehaviorSubject = new BehaviorSubject(false);\r\n public HasEditAdjustmentReasonPermission: BehaviorSubject = new BehaviorSubject(false);\r\n public HasDeleteAdjustmentReasonPermission: BehaviorSubject = new BehaviorSubject(false);\r\n\r\n public HasAddStockRecordPermission: BehaviorSubject = new BehaviorSubject(false);\r\n public HasEditStockRecordPermission: BehaviorSubject = new BehaviorSubject(false);\r\n\r\n public HasAddStockAdjustmentPermission: BehaviorSubject = new BehaviorSubject(false);\r\n public HasEditStockAdjustmentPermission: BehaviorSubject = new BehaviorSubject(false);\r\n public HasProcessStockAdjustmentPermission: BehaviorSubject = new BehaviorSubject(false);\r\n\r\n public HasAlterPartPricesPermission: BehaviorSubject = new BehaviorSubject(false);\r\n\r\n public HasAddManufacturerPermission: BehaviorSubject = new BehaviorSubject(false);\r\n public HasEditManufacturerPermission: BehaviorSubject = new BehaviorSubject(false);\r\n public HasDeleteManufacturerPermission: BehaviorSubject = new BehaviorSubject(false);\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) {\r\n this.Reload();\r\n }\r\n\r\n public Reload() {\r\n this.http.get(this.appConfig.apiLocations.Stock + \"Permission\").subscribe(x => {\r\n this.HasAddStockTypePermission.next(x.AddStockType);\r\n this.HasEditStockTypePermission.next(x.EditStockType);\r\n this.HasDeleteStockTypePermission.next(x.DeleteStockType);\r\n\r\n this.HasAddPriceListPermission.next(x.AddPriceList);\r\n this.HasEditPriceListPermission.next(x.EditPriceList);\r\n this.HasDeletePriceListPermission.next(x.DeletePriceList);\r\n\r\n this.HasAddAdjustmentReasonPermission.next(x.AddAdjustmentReason);\r\n this.HasEditAdjustmentReasonPermission.next(x.EditAdjustmentReason);\r\n this.HasDeleteAdjustmentReasonPermission.next(x.DeleteAdjustmentReason);\r\n\r\n this.HasAddStockRecordPermission.next(x.AddStockRecord);\r\n this.HasEditStockRecordPermission.next(x.EditStockRecord);\r\n\r\n this.HasAddStockAdjustmentPermission.next(x.AddStockAdjustment);\r\n this.HasEditStockAdjustmentPermission.next(x.EditStockAdjustment);\r\n this.HasProcessStockAdjustmentPermission.next(x.ProcessStockAdjustment);\r\n\r\n this.HasAlterPartPricesPermission.next(x.AlterPartsPrices);\r\n\r\n this.HasAddManufacturerPermission.next(x.AddManufacturer);\r\n this.HasEditManufacturerPermission.next(x.EditManufacturer);\r\n this.HasDeleteManufacturerPermission.next(x.DeleteManufacturer);\r\n });\r\n }\r\n\r\n}\r\n","
\r\n
\r\n

{{ 'stock.list.heading' | translate}}

\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n {{ 'stock.list.equivalents' | translate }}: {{selectedPartName}}\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n
\r\n
{{ 'generic.yes' | translate }}
\r\n
{{ 'generic.no' | translate }}
\r\n
\r\n\r\n
\r\n {{ data.value | currency: baseCurrencySymbol }}\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport {\r\n AddPartsBaseComponent,\r\n GridExportService,\r\n GridKind,\r\n GridService,\r\n Module,\r\n ModuleService,\r\n SettingData,\r\n SettingId,\r\n SettingsService,\r\n UICustomisation,\r\n UserReferenceService\r\n} from \"servicesight-shared\";\r\nimport { StockPermissionsService } from \"./../../../stock/services/stock-permissions.service\";\r\nimport { StockManufacturerService } from \"../../../settings/services/stock-manufacturer.service\";\r\nimport { StockTypesService } from \"../../../settings/services/stock-types.service\";\r\nimport { StoreService } from \"../../../settings/services/store.service\";\r\nimport { StockUserRef } from \"../../../stock/models/stock-user-ref.model\";\r\nimport { StockService } from \"../../../stock/services/stock.service\";\r\nimport { StoreTypesEnum } from \"../../enums/store-types.enum\";\r\nimport { SupplierService } from \"../../services/supplier/supplier.service\";\r\n\r\n@Component({\r\n selector: \"app-stock-list\",\r\n templateUrl: \"./stock-list.component.html\",\r\n styleUrls: [\"./stock-list.component.scss\"]\r\n})\r\nexport class StockListComponent extends AddPartsBaseComponent implements OnInit, OnChanges {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n @Input() isAddDialogue: boolean = false;\r\n @Input() isJobPartList: boolean = false;\r\n @Input() isSalesOrderPartList: boolean = false;\r\n @Input() isPurchaseOrderPartList: boolean = false;\r\n @Input() isMakeModelOptionPartList: boolean = false;\r\n @Input() supplierId: number = null;\r\n @Input() externalPartsDataSource = null;\r\n @Input() selected: number[] = [];\r\n @Input() storeId: number = StoreTypesEnum.MainStore;\r\n @Input() showStoreSelector: boolean = true;\r\n @Input() alreadyAddedPartsFilter: any[];\r\n @Input() supersededById: number;\r\n @Output() selectedChange = new EventEmitter();\r\n @Output() popupClose = new EventEmitter();\r\n\r\n public stockPartsDataSource: DataSource;\r\n public SearchText: string = \"\";\r\n public stockTypeOData: any = [];\r\n public UserRef1Stock: Array = [];\r\n public UserRef2Stock: Array = [];\r\n public baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n public stockAdjustmentViewPermission: boolean = false;\r\n public userRefStock1Label: string;\r\n public userRefStock2Label: string;\r\n public userRefStock3Label: string;\r\n public hasAddPermission: boolean;\r\n public StockManfacturers: ODataStore;\r\n public Suppliers: ODataStore;\r\n\r\n public filters: any = { };\r\n public filterSelected: any;\r\n public StoreListDataStore: ODataStore;\r\n public Uploads: { value: string; name: string }[];\r\n public hasProModule: boolean;\r\n public hasPurchaseOrdersModule: boolean;\r\n public isStockEnabled: boolean;\r\n\r\n private useAdditionalStoresSetting: boolean = false;\r\n\r\n public get selectionMode(): string {\r\n return this.isAddDialogue ? \"multiple\" : \"none\";\r\n }\r\n\r\n private gridState: any = { };\r\n\r\n public exportOptions: { id: number; label: string }[] = [\r\n { id: 1, label: \"Export data as xlsx\" },\r\n { id: 2, label: \"Export data as csv\" },\r\n { id: 3, label: \"Export data as pdf\" }\r\n ];\r\n public obsoleteOptions: { id: number; label: string }[];\r\n\r\n public ynDataSource = [\r\n { id: false, name: \"No\" },\r\n { id: true, name: \"Yes\" }\r\n ];\r\n\r\n constructor(\r\n private gridService: GridService,\r\n private stockService: StockService,\r\n private stockTypesService: StockTypesService,\r\n private userRefsService: UserReferenceService,\r\n private permissionService: StockPermissionsService,\r\n private router: Router,\r\n private stockManufacturerService: StockManufacturerService,\r\n private supplierService: SupplierService,\r\n private settingsService: SettingsService,\r\n private storeService: StoreService,\r\n protected translator: TranslateService,\r\n private gridExportService: GridExportService,\r\n private moduleService: ModuleService\r\n ) {\r\n super(translator);\r\n this.OnStockListRowPrepared = this.OnStockListRowPrepared.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.SetStockTypes();\r\n this.SetUserRef1Stock();\r\n this.SetUserRef2Stock();\r\n this.SetManufacturers();\r\n this.SetSuppliers();\r\n this.getUserReferenceLabels();\r\n this.getSettingsData();\r\n this.setObsoleteOptions();\r\n this.permissionService.Reload();\r\n this.permissionService.HasAddStockRecordPermission.subscribe(x => this.hasAddPermission = x);\r\n\r\n this.moduleService.GetEnabledModules().subscribe(x => {\r\n this.hasProModule = x.includes(Module.Pro);\r\n this.hasPurchaseOrdersModule = x.includes(Module.PurchaseOrders);\r\n this.isStockEnabled = x.includes(Module.Stock);\r\n });\r\n\r\n this.stockService.GetViewPermission(\"StockAdjustmentView\").subscribe(isAllowedView => {\r\n this.stockAdjustmentViewPermission = isAllowedView;\r\n });\r\n\r\n this.gridService.GetLayout(GridKind.Stock).subscribe(value => {\r\n if (value) {\r\n this.gridState = value;\r\n this.dataGrid.instance.state(value);\r\n }\r\n this.SetDataSources();\r\n });\r\n\r\n this.StoreListDataStore = this.storeService.GetDataStore();\r\n\r\n this.translator.get(\r\n [\r\n \"stock.StockList.Upload.Records\",\r\n \"stock.StockList.Upload.SupplierPrices\"\r\n ]).subscribe(translations => {\r\n this.Uploads = [\r\n { value: \"records\", name: translations[\"stock.StockList.Upload.Records\"] },\r\n { value: \"supplierPrices\", name: translations[\"stock.StockList.Upload.SupplierPrices\"] }\r\n ];\r\n });\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (this.isAddDialogue) {\r\n if (changes.externalPartsDataSource && !changes.externalPartsDataSource.firstChange) {\r\n this.dataGrid.instance.refresh();\r\n }\r\n\r\n if (changes.supersededById && !changes.supersededById.firstChange) {\r\n this.dataGrid.instance.repaint();\r\n }\r\n }\r\n\r\n const supplierIdChange = changes.supplierId;\r\n if (!supplierIdChange || supplierIdChange.currentValue === supplierIdChange.previousValue) {\r\n return;\r\n }\r\n\r\n if (this.supplierId) {\r\n this.filters[\"preferred-supplier\"] = [\"PreferredSupplierId\", \"=\", this.supplierId];\r\n this.filters[\"listed-suppliers\"] = [`SupplierIds/any(p: p eq ${this.supplierId})`];\r\n this.filterSelected = this.filters[\"preferred-supplier\"];\r\n this.SetFilters();\r\n }\r\n }\r\n\r\n public UploadSelected(value: string): void {\r\n switch (value) {\r\n case \"records\":\r\n this.router.navigate([\"/stock/upload/records\"]);\r\n break;\r\n case \"supplierPrices\":\r\n this.router.navigate([\"/stock/upload/supplierPrices\"]);\r\n break;\r\n default:\r\n throw new Error(\"Unhandled upload type\");\r\n }\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.dataGrid.instance.searchByText(this.SearchText);\r\n }\r\n\r\n public SetFilters(): void {\r\n const filters = [];\r\n const filterStoreId = [\"StoreId\", \"=\", this.storeId];\r\n filters.push(filterStoreId);\r\n\r\n if (this.filterSelected) {\r\n filters.push(\"and\");\r\n filters.push(this.filterSelected);\r\n }\r\n\r\n if (this.isAddDialogue) {\r\n if (this.alreadyAddedPartsFilter && !this.filterEquivalences) {\r\n filters.push(\"and\");\r\n filters.push(this.alreadyAddedPartsFilter);\r\n }\r\n\r\n if (this.obsoleteFilter) {\r\n filters.push(\"and\");\r\n filters.push(this.obsoleteFilter);\r\n }\r\n\r\n if (this.filterEquivalences) {\r\n filters.push(\"and\");\r\n filters.push(this.filterEquivalences);\r\n }\r\n }\r\n\r\n this.dataGrid.instance.filter(filters);\r\n }\r\n\r\n public FilterChanged($event): void {\r\n const filterValue = $event.currentTarget.value;\r\n if (filterValue === \"0\") {\r\n this.filterSelected = null;\r\n } else {\r\n this.filterSelected = [\"StockTypeId\", \"=\", Number(filterValue)];\r\n }\r\n this.SetFilters();\r\n }\r\n\r\n public PurchaseOrdersFilterChanged($event): void {\r\n const filterValue = $event.currentTarget.value;\r\n if (filterValue === \"no-filter\" || this.filters[filterValue] === undefined) {\r\n this.filterSelected = null;\r\n } else {\r\n this.filterSelected = this.filters[filterValue];\r\n }\r\n this.SetFilters();\r\n }\r\n\r\n public SaveLayout(): void {\r\n const state = this.dataGrid.instance.state();\r\n this.gridService.SaveLayout(state, GridKind.Stock);\r\n }\r\n\r\n public ResetLayout(): void {\r\n this.gridService.ResetLayout(GridKind.Stock);\r\n this.dataGrid.instance.state(null);\r\n this.gridState = null;\r\n }\r\n\r\n public openColumnChooser(): void {\r\n this.dataGrid.instance.showColumnChooser();\r\n }\r\n\r\n public onExportItemClick(e: any): void {\r\n const title = this.translator.instant(\"stock.list.heading\");\r\n switch (e.itemData.id) {\r\n case 1:\r\n this.gridExportService.exportGridAsXlsx(this.dataGrid.instance, title);\r\n break;\r\n case 2:\r\n this.gridExportService.exportGridAsCsv(this.dataGrid.instance, title);\r\n break;\r\n case 3:\r\n this.gridExportService.exportGridAsPdf(this.dataGrid.instance, title, { orientation: \"l\" });\r\n break;\r\n default:\r\n throw new Error(\"Unhandled export type: \" + e.itemData.id);\r\n }\r\n }\r\n\r\n public columnVisible(name: string, defaultValue: boolean): boolean {\r\n if (this.gridState && this.gridState.columns) {\r\n const column = this.gridState.columns.find(x => x.name === name);\r\n\r\n if (column) {\r\n return column.visible;\r\n }\r\n }\r\n\r\n return defaultValue;\r\n }\r\n\r\n public OnSelectionChanged(): void {\r\n this.selectedChange.emit(this.selected);\r\n }\r\n\r\n public viewDetails(event) {\r\n this.router.navigate([\"/stock/detail/\", event.data.StockHeaderId]);\r\n }\r\n\r\n public get showUserRef1(): boolean {\r\n return !this.isAddDialogue || this.isJobPartList || this.isSalesOrderPartList || this.isMakeModelOptionPartList;\r\n }\r\n\r\n public get showUserRef2(): boolean {\r\n return !this.isAddDialogue || this.isJobPartList || this.isSalesOrderPartList || this.isMakeModelOptionPartList;\r\n }\r\n\r\n public get UseAdditionalStores(): boolean {\r\n return this.useAdditionalStoresSetting && this.showStoreSelector;\r\n }\r\n\r\n public FilterStoreList($event) {\r\n this.storeId = $event.value;\r\n this.SetFilters();\r\n }\r\n\r\n public OnStockListRowPrepared(e) {\r\n if (this.isAddDialogue) {\r\n if (e.data && e.rowType === \"data\") {\r\n if (e.data.Obsolete) {\r\n e.rowElement.className += \" obsolete-text\";\r\n }\r\n\r\n if (this.supersededById && this.supersededById === e.data.StockHeaderId && !e.data.Obsolete) {\r\n e.rowElement.className += \" superceded-background\";\r\n }\r\n\r\n if (this.filterEquivalences && this.supersededPartsIds.includes(e.data.StockHeaderId)) {\r\n e.rowElement.className += \" superceded-background\";\r\n }\r\n }\r\n }\r\n }\r\n\r\n public ClosePopup(): void {\r\n this.popupClose.emit();\r\n }\r\n\r\n private SetDataSources(): void {\r\n if (this.isAddDialogue) {\r\n this.stockPartsDataSource = this.externalPartsDataSource;\r\n } else {\r\n this.stockPartsDataSource = this.stockService.GetDataSource(true);\r\n }\r\n const filter = [\"StoreId\", \"=\", this.storeId];\r\n this.stockPartsDataSource.filter(filter);\r\n }\r\n\r\n private SetStockTypes(): void {\r\n const tmp = this.stockTypesService.ODataStockTypeServiceLevels();\r\n tmp.load().then(result => {\r\n this.stockTypeOData = result;\r\n });\r\n }\r\n\r\n protected ClearSearchText(): void {\r\n this.SearchText = \"\";\r\n this.SearchTextChanged();\r\n }\r\n\r\n private SetUserRef1Stock(): void {\r\n this.stockService.GetUserRef1Stock().subscribe((response) => this.UserRef1Stock = response);\r\n }\r\n\r\n private SetUserRef2Stock(): void {\r\n this.stockService.GetUserRef2Stock().subscribe((response) => this.UserRef2Stock = response);\r\n }\r\n\r\n private getUserReferenceLabels(): void {\r\n this.userRefStock1Label = this.userRefsService.getLabel(UICustomisation.STOCK_REF1);\r\n this.userRefStock2Label = this.userRefsService.getLabel(UICustomisation.STOCK_REF2);\r\n this.userRefStock3Label = this.userRefsService.getLabel(UICustomisation.STOCK_REF3);\r\n }\r\n\r\n private SetManufacturers(): void {\r\n this.StockManfacturers = this.stockManufacturerService.StockManufacturerStore();\r\n }\r\n\r\n private SetSuppliers(): void {\r\n this.Suppliers = this.supplierService.GetSupplierStore();\r\n }\r\n\r\n private getSettingsData() {\r\n this.settingsService.getSetting(SettingId.UseAdditionalStores).subscribe((settingData: SettingData) => {\r\n this.useAdditionalStoresSetting = settingData.ValueBool;\r\n });\r\n }\r\n}\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { EdmLiteral } from \"devextreme/data/odata/utils\";\r\nimport { SettingData, SettingId, SettingsService } from \"servicesight-shared\";\r\nimport { StoreTypesEnum } from \"../../enums/store-types.enum\";\r\nimport { StockListComponent } from \"../stock-list/stock-list.component\";\r\n\r\n@Component({\r\n selector: \"app-add-part-dialogue\",\r\n templateUrl: \"./add-part-dialogue.component.html\",\r\n styleUrls: [\"./add-part-dialogue.component.scss\"]\r\n})\r\nexport class AddPartDialogueComponent implements OnInit, OnChanges {\r\n @ViewChild(\"stockList\") stockList: StockListComponent;\r\n @Input() partsDataSource: DataSource;\r\n @Input() alreadyAdded: number[];\r\n @Input() isJobPartList: boolean = false;\r\n @Input() isSalesOrderPartList: boolean = false;\r\n @Input() isPurchaseOrderPartList: boolean = false;\r\n @Input() isMakeModelOptionPartList: boolean = false;\r\n @Input() supplierId: number = null;\r\n @Input() showStoreSelector: boolean = true;\r\n @Input() supersededById: number;\r\n @Output() partsAdded = new EventEmitter();\r\n\r\n public storesEnabled: boolean = false;\r\n public storeName: string;\r\n public selected: number[] = [];\r\n public visible: boolean = false;\r\n public popupTitle: string;\r\n public alreadyAddedPartsFilter = null;\r\n\r\n constructor(\r\n private translate: TranslateService,\r\n private settingService: SettingsService) { }\r\n\r\n public ngOnInit(): void {\r\n this.HandlePopupTitle();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.alreadyAdded) {\r\n if (!this.alreadyAdded.length) {\r\n this.alreadyAddedPartsFilter = null;\r\n } else {\r\n const values = this.alreadyAdded.join(\",\");\r\n this.alreadyAddedPartsFilter = [new EdmLiteral(`StockHeaderId in (${values}) eq false`), \"=\", true];\r\n }\r\n }\r\n }\r\n\r\n public Show(storeId: number = StoreTypesEnum.MainStore): void {\r\n this.SetPartsToHighlight();\r\n this.selected = [];\r\n this.settingService.getSetting(SettingId.UseAdditionalStores).subscribe((settingData: SettingData) => {\r\n this.storesEnabled = settingData.ValueBool;\r\n this.HandlePopupTitle();\r\n });\r\n\r\n this.visible = true;\r\n this.stockList.storeId = storeId;\r\n this.stockList.SetFilters();\r\n }\r\n\r\n public SetTitle(storeName: string): void {\r\n this.storeName = storeName;\r\n this.HandlePopupTitle();\r\n }\r\n\r\n public Close(): void {\r\n this.visible = false;\r\n }\r\n\r\n public AddPart(): void {\r\n this.partsAdded.emit(this.selected);\r\n this.Close();\r\n }\r\n\r\n private HandlePopupTitle(): void {\r\n if (this.isSalesOrderPartList && this.storesEnabled && this.storeName) {\r\n this.popupTitle = this.translate.instant(\"add.parts.from\", { name: this.storeName });\r\n } else {\r\n this.popupTitle = this.translate.instant(\"add.parts\");\r\n }\r\n }\r\n\r\n private SetPartsToHighlight(): void {\r\n const ids: number[] = [];\r\n this.partsDataSource.items().forEach(x => {\r\n if (x.SupercededById) {\r\n ids.push(x.SupercededById);\r\n }\r\n });\r\n this.stockList.supersededPartsIds = ids;\r\n }\r\n}\r\n","
\r\n\r\n \r\n
\r\n
\r\n

{{ 'job.parts.serial-number-dialogue.required' | translate }}

\r\n

{{ required }}

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

{{ 'job.parts.serial-number-dialogue.selected' | translate }}

\r\n

\r\n {{ selectedSerialIds.length }}\r\n

\r\n
\r\n
\r\n\r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n
\r\n {{ data.value }}\r\n \r\n {{ data.value }}\r\n \r\n
\r\n\r\n
\r\n {{ (allocatedToAnotherJob(data.data) ? \"job.parts.serial-number-dialogue.allocated\" : \"job.parts.serial-number-dialogue.inStock\") | translate }}\r\n
\r\n\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n
","\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n\r\n","import { Component, EventEmitter, Output, Renderer2, ViewEncapsulation } from \"@angular/core\";\r\nimport { StockSerialNoAdjustment } from \"../../stock/models/stock-serialno-adjustment.model\";\r\nimport { StockSerailItemsService } from \"../../stock/services/stock-serail-items.service\";\r\nimport { JobPartModel } from \"../models/job-part\";\r\n\r\n@Component({\r\n selector: \"app-job-part-serial-number-dialogue\",\r\n templateUrl: \"./job-parts-serial-number-dialogue.component.html\",\r\n styleUrls: [\"./job-parts-serial-number-dialogue.component.scss\"],\r\n encapsulation: ViewEncapsulation.None\r\n})\r\nexport class JobPartSerialNumberDialogueComponent {\r\n @Output()\r\n public OnUpdate: EventEmitter<{ jobId: number; partId: number; serialIds: number[]}> = new EventEmitter();\r\n\r\n public partNumber: string = \"\";\r\n public serialNumbers: StockSerialNoAdjustment[];\r\n public showDialog: boolean = false;\r\n public required: number = 0;\r\n public selectedSerialIds: number[] = [];\r\n\r\n private allocatedSerialNumbers: number[] = [];\r\n private jobPart: JobPartModel;\r\n\r\n public get correctNumberAllocated(): boolean {\r\n return this.selectedSerialIds.length === this.required;\r\n }\r\n\r\n public get allocationChanged(): boolean {\r\n return this.jobPart &&\r\n // true if one of the selected ids is not selected on the part\r\n (this.selectedSerialIds.some(id => this.jobPart.SerialIds.indexOf(id) < 0) ||\r\n // true if one the the ids on the part is not selected\r\n this.jobPart.SerialIds.some(id => this.selectedSerialIds.indexOf(id) < 0));\r\n }\r\n\r\n constructor(\r\n private renderer: Renderer2,\r\n private stockSerialItemService: StockSerailItemsService) { }\r\n\r\n public onSelectionChanged(selection: any): void {\r\n this.selectedSerialIds = selection.selectedRowKeys;\r\n selection.component.deselectRows(this.allocatedSerialNumbers);\r\n }\r\n\r\n public onRowPrepared(row: any): void {\r\n if (this.allocatedToAnotherJob(row.data)) {\r\n this.renderer.addClass(row.rowElement, \"job-parts-serial-number-dialogue-row-disabled\");\r\n }\r\n }\r\n\r\n public onGridContentReady(grid: any): void {\r\n if (this.jobPart) {\r\n grid.component.selectRows(this.jobPart.SerialIds);\r\n }\r\n }\r\n\r\n public show(partNumber: string, part: JobPartModel): void {\r\n this.jobPart = part;\r\n this.partNumber = partNumber;\r\n\r\n // can only allocate serial numbers to parts that haven't been issued\r\n this.required = part.QtyOutStanding;\r\n\r\n this.stockSerialItemService.GetPartSerailItems(part.StockHeaderId, part.StoreId)\r\n .subscribe(serialNumbers => {\r\n this.serialNumbers = serialNumbers;\r\n\r\n this.allocatedSerialNumbers = this.serialNumbers\r\n .filter(serialNumber => this.allocatedToAnotherJob(serialNumber))\r\n .map(serialNumber => serialNumber.SerialId);\r\n\r\n this.showDialog = true;\r\n });\r\n }\r\n\r\n public onSave(): void {\r\n this.OnUpdate.emit({ jobId: this.jobPart.JobId, partId: this.jobPart.PartId, serialIds: this.selectedSerialIds});\r\n this.showDialog = false;\r\n }\r\n\r\n public onCancel(): void {\r\n this.showDialog = false;\r\n }\r\n\r\n public allocatedToAnotherJob(serialNumber: StockSerialNoAdjustment): boolean {\r\n return serialNumber && serialNumber.Allocated && this.jobPart.SerialIds.every(sn => sn !== serialNumber.SerialId);\r\n }\r\n\r\n public linkToStock(): string {\r\n return `#/stock/detail/${this.jobPart.StockHeaderId}/false/serialno`;\r\n }\r\n}\r\n","import { JobPartModel } from \"./job-part\";\r\nimport { JobVisitListModel } from \"./job-visit-list\";\r\n\r\nexport class JobPartListModel {\r\n part: JobPartModel;\r\n visit: JobVisitListModel;\r\n visitId: number;\r\n partId: number;\r\n partNumber: string;\r\n partDescription: string;\r\n stockHeaderId: number;\r\n quantityRequired: number;\r\n quantityOutstanding: number;\r\n quantityOnOrder: number;\r\n price: number;\r\n charge: number;\r\n cost: number;\r\n serialNumbered: boolean;\r\n serialIds: number[];\r\n serialNumberDisabled: boolean;\r\n stockAvailable: number;\r\n storeId: number;\r\n notes: string;\r\n stockAllocated: number;\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { PurchaseOrderJobPart } from \"src/app/purchase-orders/models/purchase-order-job-part.model\";\r\nimport { JobPartOrder } from \"../models/job-part-order.model\";\r\nimport { Inject } from \"@angular/core\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class JobPurchaseOrderService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private config: IAppConfig\r\n ) { }\r\n\r\n public RaisePartsPO(model: JobPartOrder): Observable {\r\n return this.http.post(`${this.config.apiLocations.PurchaseOrders}PartOrder`, model);\r\n }\r\n\r\n public GetPartsByJob(jobId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.PurchaseOrders}JobOrder/${jobId}/parts`);\r\n }\r\n}\r\n","// pipe a visit into this to get the standard layout\r\n// session id. employee on visit data\r\nimport { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { formatDate } from \"@angular/common\";\r\n\r\n@Pipe({\r\n name: \"visitDetails\"\r\n})\r\nexport class VisitDetailsPipe implements PipeTransform {\r\n\r\n transform(visit: any): any {\r\n return visit\r\n ? `${visit.SessionID}. ${visit.Employee ? visit.Employee : \"\"} on ${formatDate(visit.VisitDate, \"shortDate\", navigator.language)}`\r\n : \"\";\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport * as moment from \"moment\";\r\n\r\n@Pipe({\r\n name: \"daysUntilNow\"\r\n})\r\nexport class DaysUntilNowPipe implements PipeTransform {\r\n\r\n public transform(value: string): number {\r\n if (!value) {\r\n return;\r\n }\r\n\r\n if (value.includes(\"T\")) {\r\n value = value.split(\"T\")[0];\r\n }\r\n\r\n const startDay = moment(value, \"YYYY-MM-DD\");\r\n const today = moment();\r\n return today.diff(startDay, \"days\");\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n {{ 'job.detail.show-pos' | translate }}\r\n \r\n
\r\n \r\n
\r\n
\r\n\r\n\r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n
\r\n {{ data.data.visit | visitDetails }}\r\n \r\n {{ data.value }}\r\n \r\n
\r\n
\r\n {{ data | visitDetails }}\r\n {{ data.SessionID }}\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
{{ data.value | currency: baseCurrencySymbol }}
\r\n\r\n \r\n\r\n
\r\n \r\n
\r\n\r\n \r\n
\r\n
\r\n
\r\n {{ part.data.notes }}\r\n
\r\n
\r\n

{{ 'job.parts.list.notes' | translate }}

\r\n \r\n
\r\n
\r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n
\r\n {{ data.value | customDate: 'shortDate' }}\r\n
\r\n\r\n
\r\n {{ data.value | daysUntilNow }}\r\n
\r\n\r\n
\r\n
{{ item.value | purchaseOrderStatus | translate }}
\r\n
\r\n\r\n
\r\n {{ data.value | currency: baseCurrencySymbol }}\r\n
\r\n \r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n

{{ \"job.save-job-first.parts\" | translate }}

\r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import { formatCurrency } from \"@angular/common\";\r\nimport {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild,\r\n ViewEncapsulation\r\n} from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport ArrayStore from \"devextreme/data/array_store\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { zip } from \"rxjs\";\r\nimport { DocumentTypeEnum, FormMesssageService, JobStatus, SettingId, SettingsService } from \"servicesight-shared\";\r\nimport { PurchaseOrderStatus } from \"src/app/purchase-orders/enums/purchase-order-status.enum\";\r\nimport { PurchaseOrderJobPart } from \"src/app/purchase-orders/models/purchase-order-job-part.model\";\r\nimport { BulkPartOrderPopupComponent } from \"src/app/shared/components/bulk-part-order-popup/bulk-part-order-popup.component\";\r\nimport { BulkPartOrderListModel } from \"src/app/shared/models/bulk-part-order-list-model\";\r\nimport { SupplierService } from \"src/app/shared/services/supplier/supplier.service\";\r\nimport { StockState } from \"src/app/stock/models/enums/stock-state.enum\";\r\nimport { StockPermissionsService } from \"./../../stock/services/stock-permissions.service\";\r\nimport { AddPartDialogueComponent } from \"../../shared/components/add-part-dialogue/add-part-dialogue.component\";\r\nimport { LicenseService } from \"../../shared/services/licence/license.service\";\r\nimport { StockService } from \"../../stock/services/stock.service\";\r\nimport { JobPartSerialNumberDialogueComponent } from \"../job-parts-serial-number-dialogue/job-parts-serial-number-dialogue.component\";\r\nimport { AddJobPartModel } from \"../models/add-job-part\";\r\nimport { JobDetail } from \"../models/job-detail\";\r\nimport { JobPartModel } from \"../models/job-part\";\r\nimport { JobPartListModel } from \"../models/job-part-list\";\r\nimport { JobVisitListModel } from \"../models/job-visit-list\";\r\nimport { StoreInGrid } from \"../models/store-in-grid.model\";\r\nimport { JobPartDataService } from \"../services/job-part-data.service\";\r\nimport { JobPurchaseOrderService } from \"../services/job-purchase-order.service\";\r\nimport { JobService } from \"../services/job.service\";\r\n\r\n@Component({\r\n selector: \"app-job-parts\",\r\n templateUrl: \"./job-parts.component.html\",\r\n styleUrls: [\"./job-parts.component.scss\"],\r\n // devexpress doesn't handle encapsulated css\r\n encapsulation: ViewEncapsulation.None\r\n})\r\nexport class JobPartComponent implements OnInit, OnChanges {\r\n @Input() job: JobDetail = null;\r\n @Input() jobForm: any;\r\n\r\n @Output() load: EventEmitter = new EventEmitter();\r\n @Output() openVisit = new EventEmitter();\r\n\r\n @ViewChild(AddPartDialogueComponent, { static: true }) addPartDialog: AddPartDialogueComponent;\r\n @ViewChild(\"PartGrid\", { static: true }) partGrid: DxDataGridComponent;\r\n @ViewChild(\"SerialNoDialog\", { static: true }) serialNumberDialogue: JobPartSerialNumberDialogueComponent;\r\n @ViewChild(\"poPopup\") poPopup: BulkPartOrderPopupComponent;\r\n\r\n public storeDataStore: ODataStore;\r\n public stockDataSource: DataSource;\r\n public supplierDataStore: ODataStore;\r\n public jobParts: JobPartListModel[] = [];\r\n public addedPartIds: number[] = [];\r\n public purchaseOrderStatus = PurchaseOrderStatus;\r\n public showDeleteMessage: boolean = false;\r\n\r\n public jobVisits: JobVisitListModel[] = [];\r\n\r\n public showIssue: boolean = false;\r\n public showRaisePo: boolean = false;\r\n public hasAlterPartsPricesPermission: boolean = true;\r\n public hasViewCostsPermission: boolean = false;\r\n public showWarning: boolean = false;\r\n public purchaseOrdersEnabled: boolean = false;\r\n public storesEnabled: boolean = false;\r\n public stockEnabled: boolean = false;\r\n public showChangingStoreDialog: boolean = false;\r\n public showWarningPopupPickingNote: boolean = false;\r\n\r\n public baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n\r\n public currentEditingPart: JobPartModel = null;\r\n public currrentEditingNoteText: string;\r\n public currrentEditingNoteTextHasChanged: boolean = false;\r\n\r\n private readonly formName: string = \"jobform\";\r\n\r\n private noPartsToIssue: boolean = false;\r\n private noPartsOutstanding: boolean = false;\r\n private partsMissingSerialNumbers: boolean = false;\r\n private storeInGrid: StoreInGrid;\r\n\r\n private visitLookup: { [sessionId: number]: JobVisitListModel } = { };\r\n private purchaseOrderParts: PurchaseOrderJobPart[];\r\n private purchaseOrderPartsDataSourceStorage = [];\r\n\r\n public get RemovePartsDisabled(): boolean {\r\n return this.JobStatusPreventsChanges || this.NoPartsSelected;\r\n }\r\n\r\n public get AddPartsDisabled(): boolean {\r\n return this.JobStatusPreventsChanges;\r\n }\r\n\r\n public get IssuePartsDisabled(): boolean {\r\n return this.JobStatusPreventsChanges || this.noPartsToIssue || this.partsMissingSerialNumbers || this.NoPartsSelected;\r\n }\r\n\r\n public get RaisePoDisabled(): boolean {\r\n return this.JobStatusPreventsChanges || this.noPartsOutstanding || this.NoPartsSelected;\r\n }\r\n\r\n public get CanEditParts(): boolean {\r\n return !this.JobStatusPreventsChanges;\r\n }\r\n\r\n private get NoPartsSelected(): boolean {\r\n const length = this.partGrid?.selectedRowKeys?.length;\r\n return length === null || length === 0;\r\n }\r\n\r\n private get JobStatusPreventsChanges(): boolean {\r\n return this.job.Status >= JobStatus.COMPLETED || this.job.Status === JobStatus.CANCELLED;\r\n }\r\n\r\n constructor(\r\n private jobPartService: JobPartDataService,\r\n private stockService: StockService,\r\n private jobService: JobService,\r\n private formMessageService: FormMesssageService,\r\n private permissionService: StockPermissionsService,\r\n private licenseService: LicenseService,\r\n private jobPurchaseOrderService: JobPurchaseOrderService,\r\n private supplierService: SupplierService,\r\n private settingsService: SettingsService,\r\n private router: Router) { }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.job && changes.job.currentValue && changes.job.currentValue.JobID) {\r\n this.LoadParts();\r\n }\r\n }\r\n\r\n ngOnInit(): void {\r\n this.permissionService.Reload();\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(x => {\r\n this.hasViewCostsPermission = x.ProEnabled;\r\n this.showRaisePo = x.PurchaseOrdersEnabled && x.ProEnabled;\r\n this.purchaseOrdersEnabled = x.PurchaseOrdersEnabled;\r\n this.stockEnabled = x.StockEnabled;\r\n });\r\n\r\n this.permissionService.HasAlterPartPricesPermission.subscribe(x => this.hasAlterPartsPricesPermission = x);\r\n this.stockDataSource = this.stockService.GetStockStorePartsDataSource();\r\n this.supplierDataStore = this.supplierService.GetSupplierStore();\r\n this.storeDataStore = this.stockService.GetStoresStore();\r\n this.settingsService.getSetting(SettingId.UseAdditionalStores).subscribe(x => this.storesEnabled = x.ValueBool);\r\n }\r\n\r\n public OnAddParts(): void {\r\n if (!this.job || !this.job.JobID) {\r\n this.showWarning = true;\r\n } else {\r\n this.addPartDialog.Show();\r\n }\r\n }\r\n\r\n public OnPartsAdded(addPartModels: AddJobPartModel[]): void {\r\n this.formMessageService.RegisterObservable(this.jobPartService.AddJobParts(this.job.JobID, addPartModels), this.formName)\r\n .subscribe(() => this.load.emit(), () => this.load.emit());\r\n }\r\n\r\n public OnRemoveSelectedParts(): void {\r\n this.showDeleteMessage = true;\r\n }\r\n\r\n public ConfirmDeleteAction(confirm: boolean): void {\r\n if (confirm) {\r\n const selectedParts: JobPartListModel[] = this.partGrid.instance.getSelectedRowsData();\r\n\r\n if (selectedParts && selectedParts.length) {\r\n this.formMessageService.RegisterObservable(this.jobPartService.RemoveJobParts(this.job.JobID, selectedParts.map(part => part.partId)), this.formName)\r\n .subscribe(() => this.load.emit(), () => this.load.emit());\r\n }\r\n }\r\n this.showDeleteMessage = false;\r\n }\r\n\r\n public OnPartUpdated(part: JobPartListModel): void {\r\n // create part to save by merging existing part with details from the grid\r\n const partToSave = Object.assign(\r\n { },\r\n part.part,\r\n {\r\n SessionId: part.visitId,\r\n Price: part.price,\r\n Qty: part.quantityRequired,\r\n StoreId: part.storeId,\r\n Notes: this.currrentEditingNoteText\r\n });\r\n\r\n // update the visit in the drop down to avoid confusion while the page is reloading\r\n part.visit = part.visitId == null ? null : this.visitLookup[part.visitId];\r\n\r\n this.formMessageService.RegisterObservable(this.jobPartService.UpdateJobPart(partToSave), this.formName)\r\n .subscribe(() => this.load.emit(), () => this.load.emit());\r\n\r\n this.currrentEditingNoteTextHasChanged = false;\r\n }\r\n\r\n public async OnIssueParts(): Promise {\r\n const partsToAdd = [];\r\n const selectedPartIds: number[] = this.partGrid.selectedRowKeys.map(part => part.partId);\r\n const selectedParts = this.partGrid.selectedRowKeys.map(part => part);\r\n for(const p of selectedParts) {\r\n // qty which we could use for issue is the qty in stock minus the allocated but then\r\n // put back the allocated for this particular part line, because we could use it for this issue\r\n const qtyFreeForIssue = (p.stockAvailable - p.stockAllocated) + p.part.QtyAllocated;\r\n if (qtyFreeForIssue > 0 && p.part.QtyOutStanding > qtyFreeForIssue) {\r\n const oldQty = p.part.Qty;\r\n p.part.Qty = qtyFreeForIssue;\r\n partsToAdd.push({\r\n JobId: this.job.JobID,\r\n StockHeaderId: p.part.StockHeaderId,\r\n StoreId: p.part.StoreId,\r\n StockState: StockState.New,\r\n Qty: oldQty - qtyFreeForIssue,\r\n SerialNumbers: []\r\n });\r\n\r\n // reduce the quantity to match the available in stock\r\n await this.jobPartService.UpdateJobPart(p.part).toPromise();\r\n }\r\n }\r\n\r\n // issue selected parts\r\n if(selectedPartIds.length > 0 && partsToAdd.length > 0) {\r\n await this.jobPartService.IssueJobParts(this.job.JobID, selectedPartIds).toPromise();\r\n } else if(selectedPartIds.length > 0) {\r\n // this is the final request because partsToAdd is empty and we register the obeservable to display the success message\r\n this.formMessageService.RegisterObservable(this.jobPartService.IssueJobParts(this.job.JobID, selectedPartIds), this.formName)\r\n .subscribe(() => this.load.emit());\r\n }\r\n\r\n // add parts with the quantity amount matching the reduced quantity for UpdateJobPart\r\n if(partsToAdd.length > 0) {\r\n // this is the final request when we have partsToAdd and we need form message service to display the success message\r\n this.formMessageService.RegisterObservable(this.jobPartService.AddJobPartsAndIssue(this.job.JobID, partsToAdd), this.formName)\r\n .subscribe(() => this.load.emit());\r\n }\r\n }\r\n\r\n public OnSelectSerialNumbers(event: any): void {\r\n this.serialNumberDialogue.show(event.data.partNumber, event.data.part);\r\n }\r\n\r\n public OnSerialNumberUpdate(value: { jobId: number; partId: number; serialIds: number[]}): void {\r\n this.formMessageService.RegisterObservable(this.jobPartService.UpdateJobPartSerialNos(value.jobId, value.partId, value.serialIds), this.formName)\r\n .subscribe(() => {\r\n this.load.emit();\r\n });\r\n }\r\n\r\n public OnCellPrepared(row: any): void {\r\n // don't allow changes to the serial numbers if ...\r\n // 1) the cell is being edited\r\n // 2) the job does not allow edits\r\n // 3) there are no parts to issue\r\n // once a part has been issued the serial number is removed from stock so we can't alter the serial numbers of issued stock\r\n if (row.data) {\r\n row.data.serialNumberDisabled = row.row.isEditing || this.JobStatusPreventsChanges || row.data.quantityOutstanding === 0;\r\n }\r\n }\r\n\r\n public OnSelectionChanged(row: any): void {\r\n const selectedRows: JobPartListModel[] = row.selectedRowsData;\r\n\r\n // parts cannot be issued if all of the selected parts have insuffieicnet stock stock to issue them\r\n // (part.stockAvailable - part.stockAllocated) + part.part.QtyAllocated - should take into account in stock minus allocated but addd back allocated to this part line\r\n this.noPartsToIssue = selectedRows.every(part => part.quantityOutstanding === 0 || (part.stockAvailable - part.stockAllocated) + part.part.QtyAllocated === 0);\r\n\r\n // cannot issue if there are serial numbered parts without all serial number assigned\r\n this.partsMissingSerialNumbers = selectedRows.some(part => part.serialNumbered && part.quantityOutstanding > part.serialIds.length);\r\n\r\n this.noPartsOutstanding = selectedRows.every(part => part.quantityOutstanding === 0);\r\n }\r\n\r\n public OnRowPrepared(row: any): void {\r\n if (this.purchaseOrderParts && row.rowType === \"data\") {\r\n const foundElement = this.purchaseOrderParts\r\n .find(i => i.StockId === row.data.stockHeaderId && i.Status >= PurchaseOrderStatus.Pending && i.Status <= PurchaseOrderStatus.Complete);\r\n\r\n if (!foundElement) {\r\n const expandItems = row.rowElement.querySelector(\".dx-command-expand\");\r\n if (expandItems) {\r\n expandItems.firstChild.classList.remove(\"dx-datagrid-group-closed\");\r\n expandItems.firstChild.classList.remove(\"dx-datagrid-group-opened\");\r\n expandItems.classList.remove(\"dx-datagrid-expand\");\r\n }\r\n }\r\n }\r\n }\r\n\r\n public OnEditorPreparing(e: any): void {\r\n if (e.parentType === \"dataRow\" && e.dataField === \"storeId\" && this.storesEnabled) {\r\n const data: JobPartListModel = e.row.data;\r\n const disabled = data.part.QtyBookedOut - data.part.QtyReturned !== 0;\r\n e.editorOptions.disabled = disabled;\r\n\r\n const isAllocated = data.serialIds.length > 0;\r\n if (isAllocated) {\r\n e.editorOptions.onValueChanged = (args) => {\r\n this.storeInGrid = {\r\n currentStoreId: args.value,\r\n partId: e.row.data.partId,\r\n previousStoreId: args.previousValue,\r\n rowIndex: e.row.rowIndex\r\n } as StoreInGrid;\r\n this.showChangingStoreDialog = true;\r\n };\r\n }\r\n }\r\n }\r\n\r\n public ConfirmChangingStoreDialog(confirmed: boolean): void {\r\n if (!confirmed) {\r\n this.partGrid.instance.cellValue(this.storeInGrid.rowIndex, \"storeId\", this.storeInGrid.previousStoreId);\r\n } else {\r\n this.partGrid.instance.cellValue(this.storeInGrid.rowIndex, \"storeId\", this.storeInGrid.currentStoreId);\r\n }\r\n\r\n this.showChangingStoreDialog = false;\r\n }\r\n\r\n public TotalText(data: any): string {\r\n return formatCurrency(data.value,\r\n JSON.parse(localStorage.getItem(\"ls.UserBrowserLocale\")),\r\n JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\")));\r\n }\r\n\r\n public ValidateQuantity(data: any): boolean {\r\n const value: number = data.value;\r\n return (value > 0) && (Math.floor(value) === value);\r\n }\r\n\r\n public RaisePo(): void {\r\n const selectedParts: JobPartListModel[] = this.partGrid.instance.getSelectedRowsData();\r\n\r\n const partsToPurchase = selectedParts.map((p) => {\r\n const newPartListModel = new BulkPartOrderListModel();\r\n newPartListModel.StockHeaderId = p.stockHeaderId;\r\n newPartListModel.QuantityOutstanding = p.quantityOutstanding;\r\n newPartListModel.PartId = p.part.PartId;\r\n newPartListModel.PartNumber = p.partNumber;\r\n newPartListModel.PartDescription = p.partDescription;\r\n newPartListModel.StoreId = p.storeId;\r\n return newPartListModel;\r\n });\r\n\r\n this.poPopup.Open(partsToPurchase, this.job.JobID, DocumentTypeEnum.Job, this.job.SiteID);\r\n }\r\n\r\n public GetPurchaseOrderParts(stockHeaderId: number): DataSource {\r\n let item = this.purchaseOrderPartsDataSourceStorage.find((i) => i.key === stockHeaderId);\r\n if (!item) {\r\n item = {\r\n key: stockHeaderId,\r\n dataSourceInstance: new DataSource({\r\n store: new ArrayStore({\r\n data: this.purchaseOrderParts,\r\n key: \"StockId\"\r\n }),\r\n filter: [\"StockId\", \"=\", stockHeaderId]\r\n })\r\n };\r\n this.purchaseOrderPartsDataSourceStorage.push(item);\r\n }\r\n\r\n return item.dataSourceInstance;\r\n }\r\n\r\n public GoToVisit(visitId: number): void {\r\n this.openVisit.emit(visitId);\r\n }\r\n\r\n public ViewPickingNote(): void {\r\n if (!this.job || !this.job.JobID || this.jobForm.form.dirty) {\r\n this.showWarningPopupPickingNote = true;\r\n } else {\r\n this.GoToPrintingNote();\r\n }\r\n }\r\n\r\n public onConfirmSavePrintingNote(isConfirmed: boolean): void {\r\n const self = this;\r\n if (isConfirmed) {\r\n this.jobService.SaveJob(this.job).subscribe(() => {\r\n self.showWarningPopupPickingNote = false;\r\n self.jobForm.form.markAsPristine();\r\n this.GoToPrintingNote();\r\n });\r\n } else {\r\n this.showWarningPopupPickingNote = false;\r\n }\r\n }\r\n\r\n public ExpandAllPurchaseOrders(): void {\r\n this.partGrid.instance.expandAll(-1);\r\n }\r\n\r\n public onEditingStart(e: any) {\r\n this.currentEditingPart = Object.assign({ }, e.data.part);\r\n this.currrentEditingNoteText = e.data.notes;\r\n this.currrentEditingNoteTextHasChanged = false;\r\n }\r\n\r\n public onSaved() {\r\n if (this.currrentEditingNoteTextHasChanged) {\r\n // The notes text has changed but hasn't been saved\r\n // This happens if only the notes field has changed\r\n // Get the part and update it\r\n\r\n const partToSave = Object.assign({ }, this.currentEditingPart, { Notes: this.currrentEditingNoteText });\r\n\r\n this.formMessageService.RegisterObservable(this.jobPartService.UpdateJobPart(partToSave), this.formName)\r\n .subscribe(() => this.load.emit(), () => this.load.emit());\r\n }\r\n\r\n this.currentEditingPart = null;\r\n }\r\n\r\n public onEditCanceled() {\r\n this.currentEditingPart = null;\r\n }\r\n\r\n public onCurrrentEditingNoteTextChanged() {\r\n this.currrentEditingNoteTextHasChanged = true;\r\n }\r\n\r\n private LoadParts(): void {\r\n const jobId = this.job.JobID;\r\n\r\n zip(this.jobPartService.GetJobParts(jobId), this.jobService.GetVisits(jobId), this.jobPurchaseOrderService.GetPartsByJob(jobId))\r\n .subscribe(observed => {\r\n const partsOnJob = observed[0];\r\n const visits = observed[1];\r\n const purchaseOrderParts = observed[2];\r\n\r\n this.jobVisits = visits;\r\n this.purchaseOrderParts = purchaseOrderParts.filter(x => x.Status !== PurchaseOrderStatus.AuthorisationReq && x.Status !== PurchaseOrderStatus.Cancelled);\r\n\r\n this.visitLookup = visits.reduce((dictionary, visit) => {\r\n dictionary[visit.SessionID] = visit;\r\n return dictionary;\r\n }, { });\r\n\r\n // show the issue button if there are parts needing stock\r\n this.showIssue = partsOnJob.some(part => part.QtyOutStanding > 0);\r\n\r\n // set defaults until parts are selected\r\n this.noPartsToIssue = true;\r\n this.partsMissingSerialNumbers = false;\r\n\r\n const lookupData = partsOnJob.map(x => {\r\n return {\r\n StockHeaderId: x.StockHeaderId,\r\n StoreId: x.StoreId\r\n };\r\n });\r\n\r\n this.stockService.GetStockPartsForStore(lookupData).subscribe(stockData => {\r\n this.jobParts = partsOnJob.map(part => {\r\n const partModel = new JobPartListModel();\r\n\r\n partModel.part = part;\r\n\r\n partModel.quantityRequired = part.Qty;\r\n partModel.quantityOutstanding = part.QtyOutStanding;\r\n partModel.price = part.Price;\r\n partModel.cost = part.EstimatedCost;\r\n partModel.charge = part.Qty * part.Price;\r\n partModel.storeId = part.StoreId;\r\n\r\n partModel.serialIds = part.SerialIds;\r\n\r\n const visit = this.visitLookup[part.SessionId];\r\n\r\n partModel.visit = visit;\r\n partModel.visitId = visit ? part.SessionId : null;\r\n\r\n partModel.stockHeaderId = part.StockHeaderId;\r\n partModel.partId = part.PartId;\r\n\r\n const stockPart = stockData.find(x => x.StoreId === part.StoreId && x.StockHeaderId === part.StockHeaderId);\r\n partModel.stockAvailable = stockPart ? stockPart.InStock : 0;\r\n partModel.stockAllocated = stockPart ? stockPart.Demand : 0;\r\n partModel.partNumber = stockPart ? stockPart.PartNo : \"\";\r\n partModel.partDescription = stockPart ? stockPart.Description : \"\";\r\n partModel.serialNumbered = stockPart.SerialNumbered;\r\n partModel.serialNumberDisabled = false;\r\n\r\n partModel.quantityOnOrder = this.purchaseOrderParts\r\n .filter(x => x.StockId === part.StockHeaderId && (x.Status === PurchaseOrderStatus.Placed || x.Status === PurchaseOrderStatus.PartReceived))\r\n .map(x => x.QtyOutstanding)\r\n .reduce((sum, current) => sum + current, 0);\r\n\r\n partModel.notes = part.Notes;\r\n\r\n return partModel;\r\n });\r\n });\r\n });\r\n }\r\n\r\n private GoToPrintingNote(): void {\r\n this.router.navigate([\"/stock\", \"picking-note\", this.job.JobID]);\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ data.value | currency: baseCurrencySymbol }}
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges\r\n} from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { DocumentTypeEnum, FormMesssageService } from \"servicesight-shared\";\r\nimport { MaterialListModel } from \"src/app/jobs/models/material-list.model\";\r\nimport { SupplierStatus } from \"../../pipes/enums/supplier-status.enum\";\r\nimport { BulkPurchaseOrderService } from \"../../services/bulk-purchase-order/bulk-purchase-order.service\";\r\nimport { SupplierService } from \"../../services/supplier/supplier.service\";\r\n\r\n@Component({\r\n selector: \"app-bulk-material-order-popup\",\r\n templateUrl: \"./bulk-material-order-popup.component.html\",\r\n styleUrls: [\"./bulk-material-order-popup.component.scss\"]\r\n})\r\nexport class BulkMaterialOrderPopupComponent implements OnInit, OnChanges {\r\n @Input() materials: MaterialListModel[];\r\n @Input() documentId: number;\r\n @Input() siteId: number;\r\n @Input() documentType: DocumentTypeEnum;\r\n @Output() ordersRaised = new EventEmitter();\r\n\r\n public readonly formName: string = \"jobRaiseMaterialsPoForm\";\r\n public warningIsShowing: boolean = false;\r\n public supplierStore: ODataStore;\r\n public showPopup = false;\r\n public lookup: any;\r\n public baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n\r\n public get missingSuppliers(): boolean {\r\n return this.materials && this.materials.some(p => !p.PreferredSupplierID);\r\n }\r\n\r\n constructor(\r\n private supplierService: SupplierService,\r\n private router: Router,\r\n private formMessageService: FormMesssageService,\r\n private bulkPurchaseOrderService: BulkPurchaseOrderService) { }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.materials && changes.materials.currentValue) {\r\n this.showWarningMessage();\r\n }\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.supplierStore = this.supplierService.GetSupplierStore();\r\n this.getActiveSuppliers = this.getActiveSuppliers.bind(this);\r\n }\r\n\r\n public Show(): void {\r\n this.showPopup = true;\r\n }\r\n\r\n public Cancel(): void {\r\n this.showPopup = false;\r\n this.materials = [];\r\n this.warningIsShowing = false;\r\n this.formMessageService.ClearForm(this.formName);\r\n this.ordersRaised.emit(false);\r\n }\r\n\r\n public RaisePO(): void {\r\n // call the server to raise POs\r\n const order = {\r\n DocumentId: this.documentId,\r\n DocumentType: this.documentType,\r\n SiteId: this.siteId,\r\n Materials: this.materials.map(m => ({\r\n MaterialTypeId: m.MiscTypeID,\r\n SubDocId: m.MiscID,\r\n Description: m.Description,\r\n SupplierId: m.PreferredSupplierID,\r\n BuyingPrice: m.Cost,\r\n Due: new Date()\r\n }))\r\n };\r\n this.bulkPurchaseOrderService.RaiseMaterialPO(order).subscribe(res => {\r\n if (res.length === 1) {\r\n this.router.navigate([\"/purchase-orders/detail\", res[0]]);\r\n } else {\r\n //GOTO filtered list view\r\n this.router.navigate([\"/purchase-orders/list\"], { queryParams: { ids: res }});\r\n }\r\n this.showPopup = false;\r\n this.ordersRaised.emit(true);\r\n });\r\n }\r\n\r\n public MaterialSortValue(data: any): string {\r\n return data.Description;\r\n }\r\n\r\n public SupplierSortValue(data: any): void {\r\n // this here is the grid component\r\n return this.lookup.calculateCellValue(data.PreferredSupplierID);\r\n }\r\n\r\n public showWarningMessage(): void {\r\n const showWarning = this.materials.some(p => !p.PreferredSupplierID);\r\n if (showWarning && !this.warningIsShowing) {\r\n this.warningIsShowing = true;\r\n this.formMessageService.ShowWarning(\"job.parts-po.missing-suppliers\", this.formName);\r\n } else if (!showWarning && this.warningIsShowing) {\r\n this.warningIsShowing = false;\r\n this.formMessageService.ClearForm(this.formName);\r\n }\r\n }\r\n\r\n public getActiveSuppliers(): any {\r\n return {\r\n store: this.supplierStore,\r\n filter: [[\"Status\", \"<>\", SupplierStatus.Closed], \"and\", [\"Status\", \"<>\", SupplierStatus.OnHold]]\r\n };\r\n }\r\n}\r\n","export class MaterialListModel {\r\n MiscID: number;\r\n Description: string;\r\n MiscTypeID: number;\r\n MiscType: string;\r\n Cost: number;\r\n PreferredSupplierID?: number;\r\n}\r\n","import { MaterialListModel } from \"./material-list.model\";\r\n\r\nexport class JobMaterialListModel extends MaterialListModel {\r\n JobID: number;\r\n SessionID: number;\r\n ProductTaxCodeID: number;\r\n Value: number;\r\n Employee: string;\r\n VisitDate: Date;\r\n}\r\n","\r\n
\r\n
\r\n \r\n \r\n
\r\n {{ GetVisitDisplayValue(visit) }}\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
","import { formatDate } from \"@angular/common\";\r\nimport {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { FormMesssageService, IProteanResponse, Module } from \"servicesight-shared\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { JobMaterialListModel } from \"../models/job-material-list\";\r\nimport { JobVisitListModel } from \"../models/job-visit-list\";\r\nimport { JobMaterialDataService } from \"../services/job-material-data.service\";\r\n\r\n@Component({\r\n selector: \"app-job-material-dialogue\",\r\n templateUrl: \"./job-material-dialogue.component.html\",\r\n styleUrls: [\"./job-material-dialogue.component.scss\"]\r\n})\r\nexport class JobMaterialDialogueComponent implements OnChanges, OnInit {\r\n @Input() jobId: number;\r\n @Input() miscId: number;\r\n @Input() title: string;\r\n\r\n @Output() save = new EventEmitter();\r\n @Output() cancel = new EventEmitter();\r\n\r\n @ViewChild(\"jobmaterialform\", { static: true }) form: NgForm;\r\n public readonly formName: string = \"jobmaterialform\";\r\n\r\n public material: JobMaterialListModel;\r\n public isLoading: boolean = true;\r\n public visits: JobVisitListModel[];\r\n public miscTypes: DataSource;\r\n public costingsEnabled: boolean = false;\r\n\r\n private loadedMaterialTypeId: number;\r\n\r\n constructor(\r\n private jobMaterialService: JobMaterialDataService,\r\n private formMessagesService: FormMesssageService,\r\n private licenseService: LicenseService) {\r\n this.material = new JobMaterialListModel();\r\n }\r\n\r\n ngOnInit(): void {\r\n this.licenseService.GetCompanyHasAccessToModule(Module.Pro).subscribe(moduleEnabled => {\r\n this.costingsEnabled = moduleEnabled;\r\n });\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.jobId.currentValue || (changes.jobId.currentValue && changes.miscId)) {\r\n this.onLoad(this.jobId, this.miscId);\r\n }\r\n }\r\n\r\n public OnChangeMaterialType(): void {\r\n if (this.material && this.material.MiscTypeID && this.loadedMaterialTypeId !== this.material.MiscTypeID) {\r\n this.loadedMaterialTypeId = this.material.MiscTypeID;\r\n this.jobMaterialService.GetPrice(this.jobId, this.material.MiscTypeID, this.material.Cost)\r\n .subscribe((price) => this.material.Value = price);\r\n }\r\n }\r\n\r\n public OnChangeCost(): void {\r\n if (this.material && this.material.MiscTypeID) {\r\n this.jobMaterialService.GetPrice(this.jobId, this.material.MiscTypeID, this.material.Cost)\r\n .subscribe((price) => this.material.Value = price);\r\n }\r\n }\r\n\r\n public Save(): void {\r\n this.isLoading = true;\r\n this.formMessagesService.RegisterObservable(this.jobMaterialService.UpdateMaterialItem(this.material), this.formName)\r\n .subscribe(() => {\r\n this.isLoading = false;\r\n this.save.emit();\r\n }, () => this.isLoading = false);\r\n }\r\n\r\n public Dismiss(): void {\r\n this.cancel.emit();\r\n }\r\n\r\n public GetVisitDisplayValue(visit: JobVisitListModel): string {\r\n if (visit) {\r\n return `${visit.SessionID}. ${visit.Employee ? visit.Employee : \"\"}${visit.VisitDate ? \" on \" + formatDate(visit.VisitDate, \"shortDate\", navigator.language) : \"\"}`;\r\n } else {\r\n return \"\";\r\n }\r\n }\r\n\r\n private onLoad(jobId: number, miscItemId: number): void {\r\n this.isLoading = true;\r\n\r\n this.jobMaterialService.GetMaterialMetadata(jobId).subscribe((res) => {\r\n this.visits = res.Visits;\r\n this.miscTypes = new DataSource({\r\n store: {\r\n type: \"array\",\r\n data: res.MiscTypes,\r\n key: \"Id\"\r\n },\r\n sort: [\r\n { selector: \"Name\", desc: false }\r\n ]\r\n });\r\n if (miscItemId) {\r\n this.jobMaterialService.GetMaterialItem(jobId, miscItemId).subscribe((response) => {\r\n this.material = response;\r\n this.material.JobID = jobId;\r\n this.loadedMaterialTypeId = this.material.MiscTypeID;\r\n this.isLoading = false;\r\n }, () => this.isLoading = false);\r\n } else {\r\n this.material = new JobMaterialListModel();\r\n this.material.JobID = this.jobId;\r\n this.isLoading = false;\r\n }\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n \r\n \r\n {{ 'job.parts.raise-po' | translate }}\r\n \r\n \r\n {{ 'job.detail.show-pos' | translate }}\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{ data.value }}. {{ data.data.Employee ? data.data.Employee : '' }} on {{ data.data.VisitDate | customDate }}\r\n
\r\n \r\n
{{ data.value | currency: baseCurrencySymbol }}
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n
\r\n = purchaseOrderStatuses.Placed && data.data.Status < purchaseOrderStatuses.Complete\">\r\n {{data.value | daysUntilNow}}\r\n \r\n
\r\n\r\n
\r\n
= purchaseOrderStatuses.Pending\">{{ item.value | purchaseOrderStatus | translate }}
\r\n
\r\n\r\n
{{ data.value | currency: baseCurrencySymbol }}
\r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n

{{ \"job.save-job-first.materials\" | translate }}

\r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n\r\n","import { formatCurrency } from \"@angular/common\";\r\nimport {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport ArrayStore from \"devextreme/data/array_store\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { JobStatus, DocumentTypeEnum } from \"servicesight-shared\";\r\nimport { BulkMaterialOrderPopupComponent } from \"src/app/shared/components/bulk-material-order-popup/bulk-material-order-popup.component\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { PurchaseOrderStatus } from \"../../purchase-orders/enums/purchase-order-status.enum\";\r\nimport { SupplierService } from \"../../shared/services/supplier/supplier.service\";\r\nimport { JobDetail } from \"../models/job-detail\";\r\nimport { JobMaterialListModel } from \"../models/job-material-list\";\r\nimport { PurchaseOrdersMiscModel } from \"../models/purchase-orders-misc.model\";\r\nimport { JobService } from \"../services/job.service\";\r\n\r\n@Component({\r\n selector: \"app-job-materials\",\r\n templateUrl: \"./job-materials.component.html\",\r\n styleUrls: [\"./job-materials.component.scss\"]\r\n})\r\nexport class JobMaterialsComponent implements OnInit, OnChanges {\r\n @Input() job: JobDetail;\r\n @Input() jobForm: any;\r\n @Output() load = new EventEmitter();\r\n @ViewChild(\"grid\") private dataGrid: DxDataGridComponent;\r\n @ViewChild(\"raisePO\", { static: true }) private raisePO: BulkMaterialOrderPopupComponent;\r\n\r\n public jobCompleted: boolean;\r\n public materials: JobMaterialListModel[];\r\n public selectedMateralIds: Array = [];\r\n public baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n public isLoading = true;\r\n public showWarningPopup: boolean;\r\n public showJobMaterialDialogue: boolean;\r\n public materialDialogueTitle: string;\r\n public confirmAction: (isConfirmed: boolean) => void;\r\n public selectedMaterialId: number;\r\n private selectedMaterial: JobMaterialListModel;\r\n public costingsEnabled: boolean = false;\r\n public purchaseOrdersEnabled: boolean = false;\r\n public stockEnabled: boolean = false;\r\n public showWarning: boolean = false;\r\n public materialsToOrder: JobMaterialListModel[];\r\n public suppliersDataStore: ODataStore;\r\n public purchaseOrderMiscs: PurchaseOrdersMiscModel[];\r\n public purchaseOrderStatuses = PurchaseOrderStatus;\r\n public showDeleteMessage: boolean = false;\r\n public documentType = DocumentTypeEnum.Job;\r\n private purchaseOrderMaterialsDataSourceStorage = [];\r\n\r\n public get AddMaterialDisabled(): boolean {\r\n return (!this.job.IsAllowedAddMiscItem && !!this.job.JobID) || this.jobCompleted || this.isLoading;\r\n }\r\n\r\n constructor(\r\n private jobService: JobService,\r\n private licenseService: LicenseService,\r\n private suppliersService: SupplierService\r\n ) { }\r\n\r\n public ngOnInit(): void {\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(modules => {\r\n this.costingsEnabled = modules.ProEnabled;\r\n this.purchaseOrdersEnabled = modules.PurchaseOrdersEnabled;\r\n this.stockEnabled = modules.StockEnabled;\r\n });\r\n this.onLoad();\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.job.currentValue.JobID) {\r\n this.jobCompleted = this.job.Status >= JobStatus.COMPLETED;\r\n this.loadMaterials();\r\n this.jobService.GetJobMiscPurchaseOrders(this.job.JobID).subscribe(x => this.purchaseOrderMiscs = x);\r\n this.suppliersDataStore = this.suppliersService.GetSupplierStore();\r\n }\r\n }\r\n\r\n public DeleteSelectedMaterials(): void {\r\n if (this.jobForm.form.dirty) {\r\n this.isLoading = true;\r\n this.confirmAction = this.onConfirmSaveAndDelete;\r\n this.showWarningPopup = true;\r\n } else {\r\n this.showDeleteMessage = true;\r\n }\r\n }\r\n\r\n public ConfirmDeleteAction(confirm: boolean): void {\r\n if (confirm) {\r\n this.doDeleteMaterials(this.selectedMateralIds);\r\n }\r\n this.showDeleteMessage = false;\r\n }\r\n\r\n public onConfirmSaveAndDelete(isConfirmed: boolean): void {\r\n const self = this;\r\n if (isConfirmed) {\r\n this.jobService.SaveJob(this.job).subscribe(() => {\r\n self.showWarningPopup = false;\r\n self.jobForm.form.markAsPristine();\r\n this.doDeleteMaterials(this.selectedMateralIds);\r\n });\r\n } else {\r\n this.showWarningPopup = false;\r\n }\r\n }\r\n\r\n public onConfirmSaveAndOpenMaterial(isConfirmed: boolean): void {\r\n const self = this;\r\n if (isConfirmed) {\r\n this.jobService.SaveJob(this.job).subscribe(() => {\r\n self.showWarningPopup = false;\r\n self.jobForm.form.markAsPristine();\r\n this.openMaterialDialogue(self.selectedMaterial);\r\n });\r\n } else {\r\n this.showWarningPopup = false;\r\n }\r\n }\r\n\r\n public UpsertMaterial(material: JobMaterialListModel): void {\r\n if (!this.job || !this.job.JobID) {\r\n this.showWarning = true;\r\n } else if (!this.jobCompleted) {\r\n if (this.jobForm.form.dirty) {\r\n this.confirmAction = this.onConfirmSaveAndOpenMaterial;\r\n this.showWarningPopup = true;\r\n this.selectedMaterial = material;\r\n } else {\r\n this.openMaterialDialogue(material);\r\n }\r\n }\r\n }\r\n\r\n public TotalText(data: any): string {\r\n return formatCurrency(data.value,\r\n JSON.parse(localStorage.getItem(\"ls.UserBrowserLocale\")),\r\n JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\")));\r\n }\r\n\r\n public MaterialSortValue(data: any): string {\r\n return data.Description;\r\n }\r\n\r\n public OnSaveMaterial(): void {\r\n this.load.emit();\r\n this.showJobMaterialDialogue = false;\r\n }\r\n\r\n public OnCancelMaterial(): void {\r\n this.showJobMaterialDialogue = false;\r\n }\r\n\r\n public OnRowDoubleClick($event: any): void {\r\n this.UpsertMaterial($event.data);\r\n }\r\n\r\n public RaisePO(): void {\r\n this.materialsToOrder = this.materials.filter(i => this.selectedMateralIds.some(s => s === i.MiscID));\r\n this.raisePO.Show();\r\n this.raisePO.ordersRaised.asObservable().subscribe(res=>{\r\n if (res === false){\r\n this.dataGrid.instance.refresh();\r\n }\r\n });\r\n }\r\n\r\n public GetPurchaseOrderMisc(miscId: number): DataSource {\r\n let item = this.purchaseOrderMaterialsDataSourceStorage.find(i => i.key === miscId);\r\n if (!item) {\r\n item = {\r\n key: miscId,\r\n dataSourceInstance: new DataSource({\r\n store: new ArrayStore({\r\n data: this.purchaseOrderMiscs,\r\n key: \"JobMiscId\"\r\n }),\r\n filter: [[\"JobMiscId\", \"=\", miscId], \"and\", [\"Status\", \"<>\", PurchaseOrderStatus.AuthorisationReq], \"and\", [\"Status\", \"<>\", PurchaseOrderStatus.Cancelled]]\r\n })\r\n };\r\n this.purchaseOrderMaterialsDataSourceStorage.push(item);\r\n }\r\n return item.dataSourceInstance;\r\n }\r\n\r\n public CheckSalesOrderRaised(miscId: number): boolean {\r\n if (this.purchaseOrderMiscs) {\r\n const searchedPurchaseOrder = this.purchaseOrderMiscs.find(i => i.JobMiscId === miscId);\r\n if (!searchedPurchaseOrder) {\r\n return false;\r\n }\r\n return searchedPurchaseOrder.Status >= PurchaseOrderStatus.Placed && searchedPurchaseOrder.Status <= PurchaseOrderStatus.PartReceived;\r\n }\r\n return false;\r\n }\r\n\r\n public HandleRows($event: any): void {\r\n this.setCssClass($event);\r\n this.handleHidingArrows($event);\r\n }\r\n\r\n public CheckSalesOrderExist(miscId: number): boolean {\r\n return this.purchaseOrderMiscs ? !!this.purchaseOrderMiscs.find(i => i.JobMiscId === miscId) : false;\r\n }\r\n\r\n public ExpandAllPurchaseOrders(): void {\r\n this.dataGrid.instance.expandAll(-1);\r\n }\r\n\r\n private setCssClass(info: any): void {\r\n if (info.rowType === \"data\") {\r\n info.rowElement.classList.add(\"labour-row\");\r\n }\r\n }\r\n\r\n private handleHidingArrows(row: any): void {\r\n if (this.purchaseOrderMiscs && row.rowType === \"data\") {\r\n const foundElement = this.purchaseOrderMiscs\r\n .find(i => i.JobMiscId === row.data.MiscID && i.Status >= PurchaseOrderStatus.Pending && i.Status <= PurchaseOrderStatus.Complete);\r\n\r\n if (!foundElement) {\r\n const expandItems = row.rowElement.querySelector(\".dx-command-expand\");\r\n\r\n if (expandItems) {\r\n expandItems.firstChild.classList.remove(\"dx-datagrid-group-closed\");\r\n expandItems.firstChild.classList.remove(\"dx-datagrid-group-opened\");\r\n expandItems.classList.remove(\"dx-datagrid-expand\");\r\n }\r\n }\r\n }\r\n }\r\n\r\n private openMaterialDialogue(material: JobMaterialListModel): void {\r\n if (material && material.MiscID) {\r\n this.materialDialogueTitle = \"job.materials.material.item\";\r\n this.selectedMaterialId = material.MiscID;\r\n } else {\r\n this.materialDialogueTitle = \"job.materials.add.material.item\";\r\n this.selectedMaterialId = 0;\r\n }\r\n\r\n this.showJobMaterialDialogue = true;\r\n }\r\n\r\n private doDeleteMaterials(materialIds: number[]): void {\r\n if (materialIds && materialIds.length > 0) {\r\n this.jobService.DeleteMaterialItems(this.job.JobID, materialIds).subscribe(() => {\r\n this.load.emit();\r\n });\r\n }\r\n }\r\n\r\n private loadMaterials(): void {\r\n this.selectedMateralIds = [];\r\n this.isLoading = true;\r\n this.jobService.GetMaterials(this.job.JobID).subscribe((res) => {\r\n this.materials = res;\r\n this.isLoading = false;\r\n }, () => this.isLoading = false);\r\n }\r\n\r\n private onLoad(): void {\r\n this.isLoading = false;\r\n this.showWarningPopup = false;\r\n this.showJobMaterialDialogue = false;\r\n }\r\n}\r\n","\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n {{description}}\r\n {{\"job.cancellation-dialogue.no-description\" | translate}}\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { FormMesssageService } from \"servicesight-shared\";\r\nimport { AccordionDataService } from \"src/app/shared/components/accordion/accordion-data.service\";\r\nimport { CancellationReasonModel } from \"../models/cancellation-reason\";\r\nimport { JobDetail } from \"../models/job-detail\";\r\nimport { JobService } from \"../services/job.service\";\r\n\r\n@Component({\r\n selector: \"app-job-cancellation-dialogue\",\r\n templateUrl: \"./job-cancellation-dialogue.component.html\",\r\n styleUrls: [\"./job-cancellation-dialogue.component.scss\"]\r\n})\r\nexport class JobCancellationDialogueComponent implements OnInit, OnChanges {\r\n @Input() job: JobDetail;\r\n @Output() close = new EventEmitter();\r\n\r\n @ViewChild(\"cancelJobForm\", { static: true }) form: NgForm;\r\n public readonly formName: string = \"cancelJobForm\";\r\n\r\n public description: string;\r\n public cancelDate = new Date();\r\n public cancelReasonId: number;\r\n public reasons: CancellationReasonModel[];\r\n public isLoading = true;\r\n\r\n constructor(\r\n private jobService: JobService,\r\n private formMessageService: FormMesssageService,\r\n private accordionService: AccordionDataService) { }\r\n\r\n ngOnInit() {\r\n this.onLoad();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (changes.job.currentValue.JobID) {\r\n this.isLoading = false;\r\n }\r\n }\r\n\r\n public Save(): void {\r\n this.job.CancelDate = this.cancelDate;\r\n this.job.CancelReasonID = this.cancelReasonId;\r\n this.formMessageService.RegisterObservable(this.jobService.CancelJob(this.job), this.formName)\r\n .subscribe(() => {\r\n this.close.emit(true);\r\n this.accordionService.JobCancelledChanged();\r\n });\r\n }\r\n\r\n public Dismiss(): void {\r\n this.close.emit(false);\r\n }\r\n\r\n public OnReasonChanged(item): void {\r\n if (item && item.value) {\r\n this.description = this.reasons.find(x => x.CancelReasonID === item.value).Description;\r\n }\r\n }\r\n\r\n private onLoad(): void {\r\n this.jobService.GetCancelationReasons()\r\n .subscribe((res) => this.reasons = res);\r\n }\r\n}\r\n"," {{ 'job.equip.accordion.no.equipment.added' | translate }}\r\n 0\">\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ 'job.equip.accordion.total.equip' | translate }}\r\n {{ totalEquips }}\r\n
{{ 'job.equip.accordion.os.equip' | translate }}\r\n {{ osEquips }}\r\n
{{ 'job.equip.accordion.done.equip' | translate }}\r\n {{ doneEquips }}\r\n
\r\n","import { Component, Input, OnChanges, OnInit } from \"@angular/core\";\r\nimport { JobEquipmentStatus } from \"servicesight-shared\";\r\nimport { JobEquipmentModel } from \"../models/job-equipment\";\r\nimport { JobService } from \"../services/job.service\";\r\n\r\n@Component({\r\n selector: \"app-job-equipment-accordion\",\r\n templateUrl: \"./job-equipment-accordion.component.html\",\r\n styleUrls: [\"./job-equipment-accordion.component.scss\"]\r\n})\r\nexport class JobEquipmentAccordionComponent implements OnChanges, OnInit {\r\n\r\n @Input() jobId: number;\r\n\r\n public jobEquips: JobEquipmentModel[];\r\n public osEquips: number;\r\n public doneEquips: number;\r\n public totalEquips: number;\r\n\r\n constructor(\r\n private jobService: JobService) { }\r\n\r\n ngOnInit(): void {\r\n this.jobService.jobEquipmentChanged.subscribe(() => {\r\n this.loadData();\r\n });\r\n }\r\n\r\n ngOnChanges(): void {\r\n if (this.jobId) {\r\n this.loadData();\r\n } else {\r\n this.jobEquips = null;\r\n this.totalEquips = 0;\r\n this.osEquips = 0;\r\n this.doneEquips = 0;\r\n }\r\n }\r\n\r\n private loadData(): void {\r\n if (this.jobId) {\r\n this.jobService.GetEquipmentAccordion(this.jobId).subscribe(x => {\r\n this.jobEquips = x;\r\n this.totalEquips = x.length;\r\n this.osEquips = x.filter(i => i.Status === JobEquipmentStatus.Outstanding || i.Status === JobEquipmentStatus.NotDone).length;\r\n this.doneEquips = x.filter(i => i.Status === JobEquipmentStatus.Done).length;\r\n });\r\n }\r\n }\r\n}\r\n","import { EquipItemModel } from \"../../quotes/models/equip-item.model\";\r\nimport { IListItemModel } from \"../../shared/models/ilist-item.model\";\r\n\r\nexport class ServiceContractEquipmentModel {\r\n ContractId?: number;\r\n EquipId: number;\r\n SiteId: number;\r\n SalesQuotationContractId?: number;\r\n SalesQuotationContractEquipId?: number;\r\n StartDate?: Date;\r\n StartDateUI?: Date;\r\n EndDate?: Date;\r\n EndDateUI?: Date;\r\n InvoiceFrom?: Date;\r\n InvoiceFromUI?: Date;\r\n Charge: number;\r\n Site?: IListItemModel;\r\n Equipment?: EquipItemModel;\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{job.MaintContractID}}\r\n {{ contract.ContractType }}\r\n \r\n {{ contractSite.StartDateUI | customDate: 'shortDate' }} - {{ contractSite.EndDateUI | customDate: 'shortDate' }}\r\n
\r\n {{ GetEquipNo(equip.EquipId) }}\r\n \r\n {{ equip.StartDateUI | customDate: 'shortDate' }} - {{ equip.EndDateUI | customDate: 'shortDate' }}\r\n
\r\n","import { Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges } from \"@angular/core\";\r\nimport { Subscription } from \"rxjs\";\r\nimport { DateOnlyService, Equipment, EquipmentDataService, JobDataService } from \"servicesight-shared\";\r\nimport { ServiceContractEquipmentModel } from \"src/app/service-contracts/models/service-contract-equipment.model\";\r\nimport { ServiceContractSite } from \"src/app/service-contracts/models/service-contract-site.model\";\r\nimport { ServiceContractModel } from \"src/app/service-contracts/models/service-contract.model\";\r\nimport { ServiceContractService } from \"src/app/service-contracts/services/service-contract.service\";\r\nimport { JobDetail } from \"../models/job-detail\";\r\n\r\n@Component({\r\n selector: \"app-job-contract-accordion\",\r\n templateUrl: \"./job-contract-accordion.component.html\",\r\n styleUrls: [\"./job-contract-accordion.component.scss\"]\r\n})\r\nexport class JobContractAccordionComponent implements OnChanges, OnInit, OnDestroy {\r\n\r\n @Input() job: JobDetail;\r\n\r\n public contract: ServiceContractModel;\r\n public contractSite: ServiceContractSite;\r\n public contractEquipment: ServiceContractEquipmentModel[];\r\n public jobEquipments: Equipment[];\r\n public equipmentSubscription: Subscription;\r\n\r\n constructor(\r\n private contractService: ServiceContractService,\r\n private dataService: EquipmentDataService,\r\n private dateOnlyService: DateOnlyService,\r\n private jobService: JobDataService) { }\r\n\r\n ngOnInit(): void {\r\n this.equipmentSubscription = this.jobService.jobEquipmentChanged.subscribe(() => {\r\n this.loadJobEquipment();\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {\r\n if (this.equipmentSubscription) {\r\n this.equipmentSubscription.unsubscribe();\r\n }\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (changes.job.currentValue && changes.job.currentValue.MaintContractID) {\r\n this.contractService.Get(this.job.MaintContractID).subscribe((res) => {\r\n this.contract = res;\r\n this.loadJobEquipment();\r\n });\r\n }\r\n }\r\n\r\n public GetEquipNo(equipId: number): string {\r\n const equipment = this.jobEquipments.find(i => i.EquipId === equipId);\r\n if (equipment) {\r\n return equipment.Equip;\r\n }\r\n }\r\n\r\n private loadJobEquipment(): void {\r\n this.dataService.GetJobEquipment(this.job.JobID).subscribe((equips) => {\r\n if (equips.length > 0) {\r\n this.jobEquipments = equips;\r\n this.contractEquipment = this.contract.ContractEquipmentList.filter(e => equips.findIndex(i => i.EquipId === e.EquipId) >= 0);\r\n this.contractEquipment.forEach(i => {\r\n i.StartDateUI = this.dateOnlyService.RecalculateDateOnLoad(i.StartDate);\r\n if (i.EndDate) {\r\n i.EndDateUI = this.dateOnlyService.RecalculateDateOnLoad(i.EndDate);\r\n }\r\n });\r\n } else {\r\n this.contractEquipment = ServiceContractEquipmentModel[0];\r\n this.contractSite = this.contract.Sites.find(s => s.SiteId === this.job.SiteID);\r\n this.contractSite.StartDateUI = this.dateOnlyService.RecalculateDateOnLoad(this.contractSite.StartDate);\r\n if (this.contractSite.EndDate) {\r\n this.contractSite.EndDateUI = this.dateOnlyService.RecalculateDateOnLoad(this.contractSite.EndDate);\r\n }\r\n }\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
{{ 'job.equipment.marketing.job-equipment-tab' | translate }}
\r\n
\r\n \r\n {{ 'equipment.marketing.book-demo' | translate }}\r\n
\r\n
    \r\n
  • {{ 'job.equipment.marketing.feature-1' | translate }}
  • \r\n
  • {{ 'job.equipment.marketing.feature-2' | translate }}
  • \r\n
  • {{ 'job.equipment.marketing.feature-3' | translate }}
  • \r\n
  • {{ 'job.equipment.marketing.feature-4' | translate }}
  • \r\n
\r\n
\r\n \r\n {{ 'equipment.marketing.book-demo' | translate }}\r\n
\r\n
\r\n
\r\n
\r\n","import { Component, OnInit } from \"@angular/core\";\r\nimport { DomSanitizer, SafeResourceUrl } from \"@angular/platform-browser\";\r\nimport { Module, ToasterService, ToastType } from \"servicesight-shared\";\r\nimport { AuthService } from \"../../shared/services/auth/auth.service\";\r\nimport { LicenseService } from \"../../shared/services/licence/license.service\";\r\n\r\nconst USA: number = 224;\r\n\r\n@Component({\r\n selector: \"app-job-equipment-marketing\",\r\n templateUrl: \"./job-equipment-marketing.component.html\",\r\n styleUrls: [\"./job-equipment-marketing.component.scss\"]\r\n})\r\nexport class JobEquipmentMarketingComponent implements OnInit {\r\n\r\n public ready: boolean = false;\r\n public videoUrl: SafeResourceUrl;\r\n\r\n constructor(\r\n private authService: AuthService,\r\n private licenseService: LicenseService,\r\n private toaster: ToasterService,\r\n private sanitizer: DomSanitizer) { }\r\n\r\n ngOnInit(): void {\r\n this.licenseService.GetCompanyCountryId().then(countryId => {\r\n if (countryId === USA) {\r\n this.videoUrl = this.makeSafeUrl(\"qULULq7ZzfY\");\r\n } else {\r\n this.videoUrl = this.makeSafeUrl(\"UKtlmhqlgV8\");\r\n }\r\n\r\n this.ready = true;\r\n });\r\n }\r\n\r\n public contactMe(event: any) {\r\n const companyId = this.authService.AuthorizationData.defaultcompanyid;\r\n const userName = this.authService.Username;\r\n event.preventDefault();\r\n\r\n this.licenseService.RequestContactMe(Module.Equipment, userName, companyId)\r\n .then(() => this.toaster.pop(\"stock.marketing.contact-me-confirm\", ToastType.medium));\r\n }\r\n\r\n private makeSafeUrl(videoId): SafeResourceUrl {\r\n const url = `https://www.youtube.com/embed/${videoId}?autoplay=1&loop=1&mute=1&playlist=${videoId}&controls=1&rel=0`;\r\n return this.sanitizer.bypassSecurityTrustResourceUrl(url);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
{{ 'job.parts.marketing.job-parts-tab' | translate }}
\r\n
\r\n \r\n {{ 'stock.marketing.book-demo' | translate }}\r\n
\r\n
    \r\n
  • {{ 'job.parts.marketing.feature-1' | translate }}
  • \r\n
  • {{ 'job.parts.marketing.feature-2' | translate }}
  • \r\n
  • {{ 'job.parts.marketing.feature-3' | translate }}
  • \r\n
  • {{ 'job.parts.marketing.feature-4' | translate }}
  • \r\n
\r\n
\r\n \r\n {{ 'stock.marketing.book-demo' | translate }}\r\n
\r\n
\r\n
\r\n
\r\n","import { Component, OnInit } from \"@angular/core\";\r\nimport { DomSanitizer, SafeResourceUrl } from \"@angular/platform-browser\";\r\nimport { Module, ToasterService, ToastType } from \"servicesight-shared\";\r\nimport { AuthService } from \"../../shared/services/auth/auth.service\";\r\nimport { LicenseService } from \"../../shared/services/licence/license.service\";\r\n\r\nconst USA: number = 224;\r\n\r\n@Component({\r\n selector: \"app-job-parts-marketing\",\r\n templateUrl: \"./job-parts-marketing.component.html\",\r\n styleUrls: [\"./job-parts-marketing.component.scss\"]\r\n})\r\nexport class JobPartsMarketingComponent implements OnInit {\r\n\r\n public ready: boolean = false;\r\n public videoUrl: SafeResourceUrl;\r\n\r\n constructor(\r\n private authService: AuthService,\r\n private licenseService: LicenseService,\r\n private toaster: ToasterService,\r\n private sanitizer: DomSanitizer) { }\r\n\r\n ngOnInit(): void {\r\n this.licenseService.GetCompanyCountryId().then(countryId => {\r\n if (countryId === USA) {\r\n this.videoUrl = this.makeSafeUrl(\"9enjpzUbBII\");\r\n } else {\r\n this.videoUrl = this.makeSafeUrl(\"17zs_1KOy4g\");\r\n }\r\n\r\n this.ready = true;\r\n });\r\n }\r\n\r\n public contactMe(e) {\r\n const companyId = this.authService.AuthorizationData.defaultcompanyid;\r\n const userName = this.authService.Username;\r\n e.preventDefault();\r\n\r\n this.licenseService.RequestContactMe(Module.Stock, userName, companyId)\r\n .then(() => this.toaster.pop(\"stock.marketing.contact-me-confirm\", ToastType.medium));\r\n }\r\n\r\n private makeSafeUrl(videoId): SafeResourceUrl {\r\n const url = `https://www.youtube.com/embed/${videoId}?autoplay=1&loop=1&mute=1&playlist=${videoId}&controls=1&rel=0`;\r\n return this.sanitizer.bypassSecurityTrustResourceUrl(url);\r\n }\r\n}\r\n","
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{ data.value | refrigerantTransactionType | translate }}\r\n
\r\n
\r\n \r\n {{ data.value }}\r\n \r\n {{ 'job.refrigerant.pending' | translate }}\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
{{ data.value | currency: baseCurrencySymbol }}
\r\n
{{ data.data.LogTypeId === 3 ? '' : data.value | number : '1.5-5' }}
\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n","import { formatCurrency } from \"@angular/common\";\r\nimport {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { zip } from \"rxjs\";\r\nimport { EquipmentDataService, FormMesssageService, JobStatus, SettingData, SettingId, SettingsService } from \"servicesight-shared\";\r\nimport { CylinderService } from \"src/app/f-gas/services/cylinder.service\";\r\nimport { RefrigerantTypeService } from \"src/app/settings/services/refrigerant-type.service\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { StockService } from \"src/app/stock/services/stock.service\";\r\nimport { JobCylinderLogDialogComponent } from \"../../shared/components/job-cylinder-log-dialog/job-cylinder-log-dialog.component\";\r\nimport { JobDetail } from \"../models/job-detail\";\r\nimport { JobRefrigerantModel } from \"../models/job-refrigerant.model\";\r\nimport { JobRefrigerantService } from \"../services/job-refrigerant.service\";\r\nimport { JobService } from \"../services/job.service\";\r\n\r\n@Component({\r\n selector: \"app-job-refrigerant\",\r\n templateUrl: \"./job-refrigerant.component.html\",\r\n styleUrls: [\"./job-refrigerant.component.scss\"]\r\n})\r\nexport class JobRefrigerantComponent implements OnInit, OnChanges {\r\n @Input() job: JobDetail;\r\n @Input() equipmentEnabled: boolean = false;\r\n\r\n @Output() openVisit = new EventEmitter();\r\n @Output() reload: EventEmitter = new EventEmitter();\r\n\r\n @ViewChild(DxDataGridComponent) logEntryGrid: DxDataGridComponent;\r\n @ViewChild(\"LogEntryDialogue\", { static: true }) CylinderLogDialog: JobCylinderLogDialogComponent;\r\n\r\n public jobRefrigerants: JobRefrigerantModel[];\r\n private readonly formName: string = \"jobform\";\r\n\r\n public storeDataStore: ODataStore;\r\n public refrigerantTypeDataSource: ODataStore;\r\n public cylinderDataSource: ODataStore;\r\n public equipmentDataSource: ODataStore;\r\n\r\n public unit: string;\r\n public baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n public storesEnabled = false;\r\n public logEntryEnabled = false;\r\n public isRemoveEnabled = false;\r\n public showDeleteMessage: boolean = false;\r\n\r\n selectAllCheckBox: any;\r\n checkBoxUpdating = false;\r\n\r\n public get jobId(): number {\r\n if(this.job){\r\n return this.job.JobID;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n public get siteId(): number {\r\n if(this.job){\r\n return this.job.SiteID;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n public get jobCompleted(): boolean {\r\n return this.job.Status >= JobStatus.COMPLETED;\r\n }\r\n\r\n public get addLogEntryDisabled(): boolean {\r\n return !this.logEntryEnabled || this.jobCompleted;\r\n }\r\n\r\n constructor(\r\n private jobRefrigerantService: JobRefrigerantService,\r\n private stockService: StockService,\r\n private settingsService: SettingsService,\r\n private refrigerantTypeService: RefrigerantTypeService,\r\n private cylinderTypeService: CylinderService,\r\n private equipmentService: EquipmentDataService,\r\n private formMessageService: FormMesssageService,\r\n private jobService: JobService,\r\n private licenseService: LicenseService) {\r\n this.onEditorPreparing = this.onEditorPreparing.bind(this);\r\n this.onSelectionChanged = this.onSelectionChanged.bind(this);\r\n }\r\n\r\n ngOnInit(): void {\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe((res) => {\r\n if (res.FGasEnabled) {\r\n this.storeDataStore = this.stockService.GetStoresStore();\r\n this.cylinderDataSource = this.cylinderTypeService.GetDataSource().store() as ODataStore;\r\n this.refrigerantTypeDataSource = this.refrigerantTypeService.GetDataSource().store() as ODataStore;\r\n }\r\n\r\n if(res.EquipmentEnabled) {\r\n this.jobService.jobEquipmentChanged.subscribe(() => {\r\n this.LoadLogEntryEnabled();\r\n });\r\n\r\n this.equipmentDataSource = this.equipmentService.GetEquipmentRefrigerantDataSource().store() as ODataStore;\r\n }\r\n });\r\n this.settingsService.getSetting(SettingId.UseAdditionalStores).subscribe(x => this.storesEnabled = x.ValueBool);\r\n this.settingsService.getSetting(SettingId.FGasRefrigerantUnits).subscribe((settingData: SettingData) => {\r\n this.unit = settingData.ValueListSelectedId === 1 ? \"(kg)\" : \"(lb)\";\r\n });\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.job && changes.job.currentValue && changes.job.currentValue.JobID) {\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe((res) => {\r\n if (res.FGasEnabled) {\r\n this.LoadRefrigerants();\r\n }\r\n if(res.EquipmentEnabled) {\r\n this.LoadLogEntryEnabled();\r\n }\r\n });\r\n }\r\n }\r\n\r\n public OpenLogEntryDialog(): void {\r\n this.CylinderLogDialog.Show();\r\n }\r\n\r\n public TotalText(data: any): string {\r\n return formatCurrency(data.value,\r\n JSON.parse(localStorage.getItem(\"ls.UserBrowserLocale\")),\r\n JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\")));\r\n }\r\n\r\n public GoToVisit(visitId: number): void {\r\n this.openVisit.emit(visitId);\r\n }\r\n\r\n public OnRowUpdated(row: JobRefrigerantModel): void {\r\n this.formMessageService.RegisterObservable(this.jobRefrigerantService.UpdatePrice(row), this.formName)\r\n .subscribe(() => this.reload.emit(), () => this.reload.emit());\r\n }\r\n\r\n public LoadRefrigerants(reload: boolean = false): void {\r\n zip(this.jobRefrigerantService.GetJobRefrigerants(this.jobId),\r\n this.jobService.GetVisits(this.jobId),\r\n this.jobRefrigerantService.GetLogEntriesForJob(this.jobId))\r\n .subscribe(([jobRefrigerants, visits, logs])=> {\r\n this.jobRefrigerants = jobRefrigerants.map((r) => {\r\n const model = r as JobRefrigerantModel;\r\n model.StoreId = visits.find(v => v.SessionID === r.SessionId) ? visits.find(v => v.SessionID === r.SessionId).StoreId : null;\r\n model.RefrigerantTypeId = model.RefrigerantTypeId ?? logs.find(l => l.TransactionId === model.FGasLogId).RefrigerantTypeId;\r\n return model;\r\n });\r\n });\r\n\r\n if (reload) {\r\n this.reload.emit();\r\n }\r\n }\r\n\r\n private LoadLogEntryEnabled(): void {\r\n this.equipmentService.GetJobEquipment(this.jobId).subscribe((list) => this.logEntryEnabled = list && list.length > 0);\r\n }\r\n\r\n public onEditorPreparing(e): void {\r\n // Implementation of DevExpress pattern for conditionally disabling selection checkboxes:\r\n // https://supportcenter.devexpress.com/ticket/details/t869704/datagrid-how-to-conditionally-disable-selection-checkboxes#\r\n const dataGrid = e.component;\r\n if (e.command === \"select\") {\r\n if (e.parentType === \"dataRow\" && e.row) {\r\n if (!this.isSelectable(e.row.data)) {\r\n e.editorOptions.disabled = true;\r\n }\r\n } else if (e.parentType === \"headerRow\") {\r\n e.editorOptions.onInitialized = (event) => {\r\n this.selectAllCheckBox = event.component;\r\n };\r\n e.editorOptions.value = this.isSelectAll(dataGrid);\r\n e.editorOptions.onValueChanged = (event) => {\r\n if (!event.event) {\r\n if (event.previousValue && !this.checkBoxUpdating) {\r\n event.component.option(\"value\", event.previousValue);\r\n }\r\n return;\r\n }\r\n\r\n if (this.isSelectAll(dataGrid) === event.value) {\r\n return;\r\n }\r\n\r\n if (event.value) {\r\n dataGrid.selectAll();\r\n } else {\r\n dataGrid.deselectAll();\r\n }\r\n\r\n event.event.preventDefault();\r\n };\r\n }\r\n }\r\n }\r\n\r\n public onSelectionChanged(e): void {\r\n // Implementation of DevExpress pattern for conditionally disabling selection checkboxes:\r\n // https://supportcenter.devexpress.com/ticket/details/t869704/datagrid-how-to-conditionally-disable-selection-checkboxes#\r\n const deselectRowKeys = [];\r\n e.selectedRowsData.forEach((item) => {\r\n if (!this.isSelectable(item)) {\r\n deselectRowKeys.push(e.component.keyOf(item));\r\n }\r\n });\r\n if (deselectRowKeys.length) {\r\n e.component.deselectRows(deselectRowKeys);\r\n }\r\n this.checkBoxUpdating = true;\r\n this.selectAllCheckBox.option(\"value\", this.isSelectAll(e.component));\r\n this.checkBoxUpdating = false;\r\n\r\n this.isRemoveEnabled = e.selectedRowKeys.length > 0;\r\n }\r\n\r\n public RemoveLogEntries() {\r\n this.showDeleteMessage = true;\r\n }\r\n\r\n public ConfirmDeleteAction(confirm: boolean): void {\r\n if (confirm) {\r\n const selectedRows: JobRefrigerantModel[] = this.logEntryGrid.instance.getSelectedRowsData();\r\n\r\n selectedRows.forEach(x => {\r\n this.jobRefrigerantService.DeletePendingJobRefrigerant(x.RefrigerantLineId)\r\n .subscribe((deleted: boolean) => {\r\n if (deleted) {\r\n const arrayIndex: number = this.jobRefrigerants.findIndex(i => i.RefrigerantLineId === x.RefrigerantLineId);\r\n this.jobRefrigerants.splice(arrayIndex, 1);\r\n }\r\n });\r\n });\r\n }\r\n this.showDeleteMessage = false;\r\n }\r\n\r\n private isSelectable(item: JobRefrigerantModel): boolean {\r\n return !item.FGasLogId;\r\n }\r\n\r\n private isSelectAll(dataGrid): boolean {\r\n const items = this.jobRefrigerants ? this.jobRefrigerants : [];\r\n const selectableItems = items.filter(this.isSelectable);\r\n const selectedRowKeys = dataGrid.option(\"selectedRowKeys\");\r\n\r\n if (!selectedRowKeys.length) {\r\n return false;\r\n }\r\n\r\n return selectedRowKeys.length >= (selectableItems.length) ? true : undefined;\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

Job {{job.JobID}}

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

{{ GetStatus(job) | jobStatus | translate}}

\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n {{ content.DisplayText }}\r\n {{ content.DisplayText | translate }}\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import { AfterViewChecked, Component, HostListener, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxTabPanelComponent } from \"devextreme-angular\";\r\nimport { EquipJobListSource } from \"projects/servicesight-shared/src/lib/enums/equip-job-list-source.enum\";\r\nimport { Observable, zip } from \"rxjs\";\r\nimport {\r\n ComponentCanDeactivate,\r\n DocumentTypeEnum,\r\n FormMesssageService,\r\n IProteanResponse,\r\n JobDataService,\r\n JobStatus,\r\n JobTabEnum,\r\n PermissionsService,\r\n SettingId,\r\n SettingsService\r\n} from \"servicesight-shared\";\r\nimport { LayoutType } from \"src/app/settings/enums/layout-type.enum\";\r\nimport { JobTypeTabsModel } from \"src/app/settings/job-settings/models/job-type-tabs.model\";\r\nimport { LayoutTemplateModel } from \"src/app/settings/models/layout-template.model\";\r\nimport { LayoutTemplateService } from \"src/app/settings/services/layout-template.service\";\r\nimport { DiscussionComponent } from \"src/app/shared/components/discussion/discussion.component\";\r\nimport { JobFilesComponent } from \"src/app/shared/components/job-files/job-files.component\";\r\nimport { ContactService } from \"src/app/shared/services/contact/contact.service\";\r\nimport { Ng1ReminderService } from \"src/app/shared/services/ng1-reminder.service\";\r\nimport { WalkthoughService } from \"src/app/shared/services/walkthough/walkthough.service\";\r\nimport { MessageService } from \"../../messages/services/message/message.service\";\r\nimport { MessageDocTypeIds } from \"../../shared/enums/messages/message-doc-type-ids.enum\";\r\nimport { MessageTypes } from \"../../shared/enums/messages/message-types.enum\";\r\nimport { GoToJobEquipService } from \"../../shared/services/go-to-job-equip/go-to-job-equip.service\";\r\nimport { LicenseService } from \"../../shared/services/licence/license.service\";\r\nimport { PreviousRouteService } from \"../../shared/services/previous-route.service\";\r\nimport { JobInvoicingComponent } from \"../job-invoicing/job-invoicing.component\";\r\nimport { JobCreateModel } from \"../models/job-create\";\r\nimport { JobDetail } from \"../models/job-detail\";\r\nimport { JobService } from \"../services/job.service\";\r\n\r\n@Component({\r\n selector: \"app-job\",\r\n templateUrl: \"./job.component.html\",\r\n styleUrls: [\"./job.component.scss\"]\r\n})\r\nexport class JobComponent implements OnInit, AfterViewChecked, ComponentCanDeactivate {\r\n\r\n public job = new JobDetail();\r\n public IsAllowedToAcceptJob: boolean = false;\r\n public parameterId: number;\r\n public parameterTabId: JobTabEnum;\r\n public activeTab = 0;\r\n public recentlyDeletedId: number;\r\n public showCancelDialogue: boolean = false;\r\n public showVisitDialogue: boolean = false;\r\n public showAllowVariation: boolean = false;\r\n public showAllowPendingPo: boolean = false;\r\n public bypassPendingPo: boolean = false;\r\n public showSurveyDialog: boolean = false;\r\n public selectedVisitId: number;\r\n public docType: typeof DocumentTypeEnum = DocumentTypeEnum;\r\n public equipDisplaySource: typeof EquipJobListSource = EquipJobListSource;\r\n\r\n @ViewChild(\"jobform\", { static: true }) form: NgForm;\r\n @ViewChild(\"tabPanel\", { static: true }) tabPanel: DxTabPanelComponent;\r\n @ViewChild(\"files\", { static: true }) filesComponent: JobFilesComponent;\r\n @ViewChild(\"discussion\", { static: true }) discussionComponent: DiscussionComponent;\r\n @ViewChild(\"invoicing\", { static: false }) jobInvoicingComponent: JobInvoicingComponent;\r\n\r\n public readonly formName: string = \"jobform\";\r\n public hasAccessToEquipment: boolean = false;\r\n public hasAccessToServiceContracts: boolean = false;\r\n public hasAccessToStock: boolean = false;\r\n public hasAccessToPro: boolean = false;\r\n public hasAccessToFgas: boolean = false;\r\n public hasAccessToSurvey: boolean = false;\r\n public isRecurringJobsModuleEnabled: boolean = false;\r\n public plannerBoardEnabled: boolean = false;\r\n public CanNavigatePrevious: boolean = false;\r\n public CanNavigateNext: boolean = false;\r\n public IsRecordNavigationEnabled: boolean = false;\r\n public IsWizardSkipped: boolean = false;\r\n public showCreditRaisedEye: boolean = false;\r\n public showWarningNotesEye: boolean = false;\r\n public inspectionViewPermission: boolean = false;\r\n public contactEmail: string = \"\";\r\n public pendingPoMessage: string = \"\";\r\n public saveEnabled: boolean = true;\r\n public layouts: LayoutTemplateModel[] = [];\r\n\r\n private switchToEquipment: boolean = false;\r\n private trackedContactId: number = 0;\r\n\r\n public jobTabType = JobTabEnum;\r\n public showTabsPopup: boolean = false;\r\n public visibleJobTabs: JobTypeTabsModel[] = [];\r\n public hiddenJobTabs: JobTypeTabsModel[] = [];\r\n public allTabs: JobTypeTabsModel[] = [{JobTab: 1, Enabled: true, Order: 1},\r\n {JobTab: 2, Enabled: false, Order: 2},\r\n {JobTab: 3, Enabled: false, Order: 3},\r\n {JobTab: 4, Enabled: false, Order: 4},\r\n {JobTab: 5, Enabled: false, Order: 5},\r\n {JobTab: 6, Enabled: false, Order: 6},\r\n {JobTab: 7, Enabled: false, Order: 7},\r\n {JobTab: 8, Enabled: false, Order: 8},\r\n {JobTab: 9, Enabled: false, Order: 9},\r\n {JobTab: 10, Enabled: false, Order: 10},\r\n {JobTab: 11, Enabled: false, Order: 11},\r\n {JobTab: 12, Enabled: false, Order: 12},\r\n {JobTab: 13, Enabled: false, Order: 13}];\r\n\r\n public makeRight: boolean = false;\r\n public showInformation: boolean = false;\r\n public removeTabInformationText: string;\r\n private tabPanelWidth: number;\r\n private tabsLoaded: boolean = false;\r\n private jobTabsNamesDictionary = {\r\n [JobTabEnum.Detail]: \"job.details.tabs.details\",\r\n [JobTabEnum.Equipment]: \"job.details.tabs.equipment\",\r\n [JobTabEnum.Install]: \"job.details.tabs.install\",\r\n [JobTabEnum.Labour]: \"job.details.tabs.labour\",\r\n [JobTabEnum.Inspections]: \"job.details.tabs.inspections\",\r\n [JobTabEnum.Activities]: \"job.details.tabs.activities\",\r\n [JobTabEnum.Parts]: \"job.details.tabs.parts\",\r\n [JobTabEnum.Materials]: \"job.details.tabs.materials\",\r\n [JobTabEnum.Refrigeration]: \"job.details.tabs.refrigerant\",\r\n [JobTabEnum.Attributes]: \"job.details.tabs.attributes\",\r\n [JobTabEnum.Invoicing]: \"job.details.tabs.invoicing\",\r\n [JobTabEnum.Files]: \"job.details.tabs.files\",\r\n [JobTabEnum.Comments]: \"job.details.tabs.comments\"\r\n };\r\n private templatesDictionary: { [key: number]: string } = {\r\n [JobTabEnum.Detail]: \"detailsTemplate\",\r\n [JobTabEnum.Equipment]: \"equipmentTemplate\",\r\n [JobTabEnum.Install]: \"installTemplate\",\r\n [JobTabEnum.Labour]: \"labourTemplate\",\r\n [JobTabEnum.Inspections]: \"inspectionTemplate\",\r\n [JobTabEnum.Activities]: \"activitiesTemplate\",\r\n [JobTabEnum.Parts]: \"partsTemplate\",\r\n [JobTabEnum.Materials]: \"materialsTemplate\",\r\n [JobTabEnum.Refrigeration]: \"refrigerantTemplate\",\r\n [JobTabEnum.Invoicing]: \"invoicingTemplate\",\r\n [JobTabEnum.Attributes]: \"attributesTemplate\",\r\n [JobTabEnum.Files]: \"filesTemplate\",\r\n [JobTabEnum.Comments]: \"notesTemplate\",\r\n };\r\n private didTabsChanged: boolean = false;\r\n\r\n public get showDiscussion(): boolean {\r\n return (window as any).showDiscussion === true;\r\n }\r\n\r\n public get hasJobLevelActivities(): boolean {\r\n let access = false;\r\n\r\n if (this.job) {\r\n access = !!(this.hasAccessToPro && this.job.HasJobActivityTypes);\r\n }\r\n\r\n return access;\r\n }\r\n\r\n public get isFormDirty(): boolean {\r\n if (this.form) {\r\n return this.form.form.dirty;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n constructor(\r\n private jobService: JobService,\r\n private jobDataService: JobDataService,\r\n private contactService: ContactService,\r\n private walkthoughService: WalkthoughService,\r\n private formMessageService: FormMesssageService,\r\n private licenseService: LicenseService,\r\n private messageService: MessageService,\r\n private permissionsService: PermissionsService,\r\n private ng1reminderService: Ng1ReminderService,\r\n private route: ActivatedRoute,\r\n fromPlanerboardService: GoToJobEquipService,\r\n private router: Router,\r\n private previousRouteService: PreviousRouteService,\r\n private settingService: SettingsService,\r\n private translateService: TranslateService,\r\n private layoutTemplateService: LayoutTemplateService) {\r\n\r\n fromPlanerboardService.caller.subscribe(() => {\r\n this.switchToEquipment = true;\r\n });\r\n\r\n this.onTabDragStart = this.onTabDragStart.bind(this);\r\n this.onTabDrop = this.onTabDrop.bind(this);\r\n this.onContentReady = this.onContentReady.bind(this);\r\n }\r\n\r\n @HostListener(\"window:beforeunload\")\r\n public canDeactivate(): Observable | boolean {\r\n return !this.form.form.dirty;\r\n }\r\n\r\n public NavigateForward(): void {\r\n if (this.CanNavigateNext) {\r\n this.jobDataService.GetNextId().then(nextId => {\r\n this.router.navigate([\"jobs\", \"job\", nextId]);\r\n });\r\n }\r\n }\r\n\r\n public onContentReady(e): void {\r\n this.tabPanelWidth = e.element.clientWidth;\r\n setTimeout(() => {\r\n const tabs = e.element.querySelectorAll(\".dx-tab\") as HTMLElement[];\r\n let sum = 0;\r\n\r\n tabs.forEach(t => {\r\n if (!t.innerHTML.includes(\"add-section-tab\")) {\r\n sum = sum + t.clientWidth;\r\n }\r\n });\r\n\r\n if (sum <= this.tabPanelWidth - 50) {\r\n this.makeRight = true;\r\n } else {\r\n this.makeRight = false;\r\n }\r\n });\r\n\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.InitTabs(this.allTabs);\r\n\r\n this.permissionsService.CurrentUserHasPermission(\"InspectionView\").subscribe(permission => {\r\n this.inspectionViewPermission = permission;\r\n });\r\n\r\n this.permissionsService.CurrentUserHasPermission(\"JobPlannerboard\").subscribe(isAllowedView => {\r\n this.plannerBoardEnabled = isAllowedView;\r\n });\r\n\r\n this.layoutTemplateService.GetLayouts(LayoutType.JobSheet).subscribe(layouts => {\r\n this.layouts = layouts;\r\n });\r\n\r\n this.IsRecordNavigationEnabled = this.previousRouteService.PreviousUrlContains(\"/jobs\") && this.router.url.indexOf(\"create\") === -1;\r\n this.route.params.subscribe(params => {\r\n this.parameterId = params.id;\r\n this.parameterTabId = Number(params.activeTab);\r\n this.IsWizardSkipped = isNaN(params.id);\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe((res) => {\r\n this.hasAccessToFgas = res.FGasEnabled;\r\n this.hasAccessToEquipment = res.EquipmentEnabled;\r\n this.hasAccessToServiceContracts = res.ServiceContractsEnabled;\r\n this.hasAccessToStock = res.StockEnabled;\r\n this.hasAccessToPro = res.ProEnabled;\r\n this.hasAccessToSurvey = res.CustomerFeedbackEnabled;\r\n this.isRecurringJobsModuleEnabled = res.RecurringJobsEnabled;\r\n this.HandleJobTabs();\r\n });\r\n this.onLoad();\r\n\r\n if (this.IsWizardSkipped) {\r\n this.IsRecordNavigationEnabled = false;\r\n this.job.IsEditableToDo = true;\r\n this.job.IsAllowedDue = true;\r\n this.job.IsEditableUserRef2JobID = true;\r\n this.job.IsEditableUserRef1JobID = true;\r\n this.job.IsAllowedChangeCustomer = true;\r\n this.job.IsAllowedChangeJobType = true;\r\n this.job.IsAllowedChangeSite = true;\r\n\r\n this.job.CustomerID = params.invoiceid ? Number(params.invoiceid) : null;\r\n this.job.SiteID = params.siteid ? Number(params.siteid) : null;\r\n this.job.ContactID = params.contactid ? Number(params.contactid) : null;\r\n\r\n this.jobService.GetNewJobMetadata().subscribe(res => {\r\n this.job.JobTypeID = res.DefaultJobTypeID;\r\n this.job.HasJobActivityTypes = res.HasJobActivityTypes;\r\n this.job.Tabs = res.Tabs;\r\n this.loadTabsForJobType(res.DefaultJobTypeID);\r\n });\r\n }\r\n });\r\n }\r\n\r\n public ngAfterViewChecked(): void {\r\n if (this.switchToEquipment) {\r\n this.tabPanel.instance.option(\"selectedIndex\", this.getIndexOfTab(JobTabEnum.Equipment));\r\n this.switchToEquipment = false;\r\n }\r\n }\r\n\r\n public ViewReminder(): void {\r\n this.ng1reminderService.CreateJobReminder(this.job.JobID, this.job.ContactID);\r\n }\r\n\r\n public GoJobSheet(event: any): void {\r\n this.NavigateToJobSheet(event.itemData.TemplateId);\r\n }\r\n\r\n public GoJobSheetWithDefaultLayout(): void {\r\n this.NavigateToJobSheet(0);\r\n }\r\n\r\n private NavigateToJobSheet(templateId: number) {\r\n if (this.form.form.dirty) {\r\n this.Save(() => location.href = `/#/jobs/jobsheet/${this.job.JobID}/${templateId}`);\r\n } else {\r\n location.href = `/#/jobs/jobsheet/${this.job.JobID}/${templateId}`;\r\n }\r\n }\r\n\r\n public CancelJob(): void {\r\n this.showCancelDialogue = true;\r\n }\r\n\r\n public OnCancelJobClosed(isConfirmed: boolean): void {\r\n if (isConfirmed) {\r\n this.onLoad();\r\n }\r\n\r\n this.showCancelDialogue = false;\r\n }\r\n\r\n public CompleteJob(): void {\r\n if(!this.bypassPendingPo) {\r\n this.jobService.CheckPendingMaterials(this.job.JobID).subscribe(po =>{\r\n if (po.length) {\r\n this.pendingPoMessage = this.translateService.instant(\"job.materials.outstanding.purchase.order\", { value: po.join(\", \")});\r\n this.showAllowPendingPo = true;\r\n } else {\r\n this.CheckQuoteFixPrice();\r\n }\r\n });\r\n } else {\r\n this.CheckQuoteFixPrice();\r\n }\r\n }\r\n\r\n public CheckQuoteFixPrice(): void {\r\n if (this.job.FixedPriceQuote !== 0) {\r\n this.SetTabsOrder();\r\n this.formMessageService.RegisterObservable(this.jobService.UpdateJob(this.job), this.formName)\r\n .subscribe((res) => {\r\n this.job.Timestamp = res.ViewModel.Timestamp;\r\n zip(\r\n this.settingService.getSetting(SettingId.AllowQuotedJobPriceVariation),\r\n this.jobService.CheckFixedPrices(this.job.JobID)\r\n ).subscribe(([allowVariation, match]) => {\r\n if (allowVariation.ValueBool && !match) {\r\n this.showAllowVariation = true;\r\n } else {\r\n this.CompleteOnServer();\r\n }\r\n });\r\n });\r\n } else {\r\n this.CompleteOnServer();\r\n }\r\n }\r\n\r\n public ConfirmAllowVariation(confirmed): void {\r\n if (confirmed) {\r\n this.job.SkipCheckFixedPrices = true;\r\n this.CompleteOnServer();\r\n }\r\n\r\n this.showAllowVariation = false;\r\n }\r\n\r\n public ConfirmAllowPendingPo(confirmed): void {\r\n if (confirmed) {\r\n this.bypassPendingPo = true;\r\n this.CompleteJob();\r\n }\r\n\r\n this.showAllowPendingPo = false;\r\n }\r\n\r\n private CompleteOnServer(): void {\r\n this.formMessageService.RegisterObservable(this.jobService.CompleteJob(this.job), this.formName)\r\n .subscribe((res) => {\r\n if (res.IsSuccess) {\r\n this.onLoad();\r\n this.discussionComponent.ReloadDiscussion();\r\n }\r\n }, () => this.onLoad());\r\n }\r\n\r\n public UncompleteJob(): void {\r\n this.formMessageService.RegisterObservable(this.jobService.UncompleteJob(this.job), this.formName)\r\n .subscribe((res) => {\r\n if (res.IsSuccess) {\r\n this.onLoad();\r\n }\r\n }, () => this.onLoad());\r\n }\r\n\r\n public PlaceJob(): void {\r\n this.formMessageService.RegisterObservable(this.jobService.PlaceJob(this.job), this.formName)\r\n .subscribe((res) => {\r\n if (res.IsSuccess) {\r\n this.onLoad();\r\n }\r\n }, () => this.onLoad());\r\n }\r\n\r\n public CreateNewMessage(): void {\r\n this.messageService.SetNewMessageParameters(0, MessageTypes.RefMessage, false, MessageDocTypeIds.Job, this.job.JobID);\r\n this.router.navigate([\"messages/newmessage\"]);\r\n }\r\n\r\n public Save(callback: () => {}): void {\r\n this.saveEnabled = false;\r\n if (this.IsWizardSkipped) {\r\n const jobModel: JobCreateModel = {\r\n CustomerId: this.job.CustomerID,\r\n SiteId: this.job.SiteID,\r\n ContactId: this.job.ContactID,\r\n JobTypeId: this.job.JobTypeID,\r\n Reference: this.job.Reference,\r\n ToDo: this.job.ToDo,\r\n Due: this.job.Due,\r\n UserRef1JobID: this.job.UserRef1JobID,\r\n UserRef2JobID: this.job.UserRef2JobID,\r\n Notes: this.job.Notes,\r\n WhatThreeWords: this.job.WhatThreeWords,\r\n SalesOpportunityID: this.job.SalesOpportunityID\r\n };\r\n this.formMessageService.RegisterObservable(this.jobService.Save(jobModel), this.formName)\r\n .subscribe(response => {\r\n this.saveEnabled = true;\r\n if (response.IsSuccess) {\r\n location.href = `/#/jobs/job/${response.EntityId}`;\r\n }\r\n });\r\n } else {\r\n this.SetTabsOrder();\r\n this.formMessageService.RegisterObservable(this.jobService.UpdateJob(this.job), this.formName)\r\n .subscribe((res) => {\r\n this.saveEnabled = true;\r\n if (res.IsSuccess) {\r\n if (callback) {\r\n callback();\r\n }\r\n this.onLoad();\r\n }\r\n });\r\n }\r\n }\r\n\r\n public Cancel(): void {\r\n if (this.parameterId) {\r\n this.onLoad();\r\n } else {\r\n this.router.navigate([\"/jobs\", \"list\"]);\r\n }\r\n }\r\n\r\n public GetStatus(job: JobDetail): number {\r\n if (!job.IsInvoiceable && job.Status === JobStatus.COMPLETED) {\r\n return JobStatus.COMPLETED_UNCHARGEABLE;\r\n }\r\n return job.Status;\r\n }\r\n\r\n public AcceptJob(): void {\r\n this.formMessageService.RegisterObservable(this.jobService.AcceptJob(this.job), this.formName)\r\n .subscribe((res) => {\r\n if (res.IsSuccess) {\r\n this.IsAllowedToAcceptJob = false;\r\n this.onLoad();\r\n }\r\n }, () => this.onLoad());\r\n }\r\n\r\n // only first deleted job visit is assigned here because we do not use the value just reload the visits list\r\n public OnDeleteJobVisits(visitIds: number[]): void {\r\n if (visitIds && visitIds.length > 0) {\r\n this.recentlyDeletedId = visitIds[0];\r\n }\r\n }\r\n\r\n public onLoad(): void {\r\n if (this.parameterId) {\r\n this.jobService.GetJob(this.parameterId)\r\n .subscribe((response) => {\r\n this.job = response;\r\n this.tabsLoaded = true;\r\n this.InitTabs(response.Tabs);\r\n\r\n if (this.job.Status === JobStatus.REQUESTED) {\r\n this.IsAllowedToAcceptJob = true;\r\n }\r\n\r\n if (!this.job.Attributes) { // prevent before 'Cannot read property 'push' of undefined' error\r\n this.job.Attributes = [];\r\n }\r\n\r\n this.SetCurrentItem();\r\n\r\n //--- Ensure buttons have rendered before trying to call this\r\n this.walkthoughService.NextJobStep(true);\r\n this.jobDataService.SiteId = this.job.SiteID;\r\n if (this.job.Status === JobStatus.FURTHER_WORK_REQUIRED) {\r\n this.activeTab = this.getIndexOfTab(JobTabEnum.Labour);\r\n } else if (this.job.Status === JobStatus.COMPLETED && this.job.IsInvoiceable) {\r\n this.activeTab = this.getIndexOfTab(JobTabEnum.Invoicing);\r\n } else {\r\n this.activeTab = this.GetSelectedTabFromParameter();\r\n }\r\n\r\n this.contactChanged();\r\n });\r\n }\r\n }\r\n\r\n public OpenVisit(visitId: number): void {\r\n this.selectedVisitId = visitId;\r\n this.showVisitDialogue = true;\r\n }\r\n\r\n public OnCancelJobVisit(): void {\r\n this.showVisitDialogue = false;\r\n }\r\n\r\n public OnSaveJobVisit(): void {\r\n this.showVisitDialogue = false;\r\n this.onLoad();\r\n }\r\n\r\n public OpenInspections() {\r\n this.tabPanel.instance.option(\"selectedIndex\", this.getIndexOfTab(JobTabEnum.Inspections));\r\n }\r\n\r\n public JobEquipmentCollectionChange() {\r\n if (this.jobInvoicingComponent) {\r\n this.jobInvoicingComponent.UpdateEquipmentFlatChargeTotal();\r\n }\r\n }\r\n\r\n public OpenFiles(equipmentId: number) {\r\n this.filesComponent.SetEquipmentFilter(equipmentId);\r\n this.tabPanel.instance.option(\"selectedIndex\", this.getIndexOfTab(JobTabEnum.Files));\r\n }\r\n\r\n public OnTitleRendered(event): void {\r\n let testId: string = null;\r\n\r\n switch (event.itemIndex) {\r\n case 0:\r\n testId = \"details\";\r\n break;\r\n case 1:\r\n testId = \"equipment\";\r\n break;\r\n case 2:\r\n testId = \"labour\";\r\n break;\r\n case 3:\r\n testId = \"materials\";\r\n break;\r\n case 4:\r\n testId = \"invoicing\";\r\n break;\r\n case 5:\r\n testId = \"files\";\r\n break;\r\n case 6:\r\n testId = \"inspections\";\r\n break;\r\n default:\r\n testId = \"unknown\";\r\n break;\r\n }\r\n\r\n event.itemElement.setAttribute(\"data-test-id\", testId);\r\n }\r\n\r\n public onExistingRaisedCredits(areItemsExists: boolean): void {\r\n this.showCreditRaisedEye = areItemsExists;\r\n }\r\n\r\n private SetCurrentItem() {\r\n if (this.IsRecordNavigationEnabled) {\r\n this.jobDataService.SetCurrentItem(this.job.JobID).then(() => {\r\n this.CanNavigatePrevious = this.jobDataService.IsPreviousAvailable();\r\n this.CanNavigateNext = this.jobDataService.IsNextAvailable();\r\n });\r\n }\r\n }\r\n\r\n public NavigateNext(): void {\r\n if (this.CanNavigateNext) {\r\n this.jobDataService.GetNextId().then(nextId => {\r\n this.router.navigate([\"jobs\", \"job\", nextId]);\r\n });\r\n }\r\n }\r\n\r\n public NavigatePrevious(): void {\r\n if (this.CanNavigatePrevious) {\r\n this.jobDataService.GetPreviousId().then(previousId => {\r\n this.router.navigate([\"jobs\", \"job\", previousId]);\r\n });\r\n }\r\n }\r\n\r\n public onWarningNotes(show: boolean): void {\r\n this.showWarningNotesEye = show;\r\n }\r\n\r\n public OpenSendSurveyDialog(): void {\r\n this.showSurveyDialog = true;\r\n }\r\n\r\n public contactChanged(): void {\r\n if (this.trackedContactId !== this.job.ContactID && this.job.ContactID) {\r\n this.trackedContactId = this.job.ContactID;\r\n\r\n this.contactService.GetContact(this.trackedContactId).subscribe(contact => {\r\n this.contactEmail = contact.ViewModel.Email;\r\n });\r\n }\r\n }\r\n\r\n public tabsChanged(jobTypeId: number): void {\r\n if (jobTypeId) {\r\n this.jobService.GetJobTypeTabs(jobTypeId).subscribe(tabs => {\r\n this.UpdateTabsOrderAndVisibility(tabs);\r\n this.HandleJobTabs();\r\n });\r\n }\r\n }\r\n\r\n public onTabDragStart(e): void {\r\n e.itemData = e.fromData[e.fromIndex];\r\n }\r\n\r\n public onTabDrop(e): void {\r\n const addSectionIdx = this.visibleJobTabs.findIndex(x => x.JobTab === JobTabEnum.AddSections);\r\n if (addSectionIdx === -1 || e.toIndex < addSectionIdx) {\r\n e.fromData.splice(e.fromIndex, 1);\r\n e.toData.splice(e.toIndex, 0, e.itemData);\r\n this.didTabsChanged = true;\r\n setTimeout(() => {\r\n this.form.form.markAsDirty();\r\n });\r\n }\r\n }\r\n\r\n public ShowRemoveButton(tab: JobTypeTabsModel): boolean {\r\n if (tab.JobTab === JobTabEnum.Detail\r\n || tab.JobTab === JobTabEnum.Labour\r\n || tab.JobTab === JobTabEnum.Invoicing\r\n || tab.JobTab === JobTabEnum.AddSections) {\r\n return false;\r\n }\r\n\r\n const selectedIndex = this.tabPanel.instance.option(\"selectedIndex\");\r\n const currentItemIndex = this.visibleJobTabs.findIndex(x => x.JobTab === tab.JobTab);\r\n\r\n return selectedIndex === currentItemIndex;\r\n }\r\n\r\n public RemoveButtonHandler(removedItem: JobTypeTabsModel) {\r\n this.jobService.CanRemoveTab(this.job.JobID, removedItem.JobTab).subscribe(canRemove => {\r\n if (canRemove) {\r\n const selectedIndex = this.tabPanel.instance.option(\"selectedIndex\");\r\n this.tabPanel.instance.option(\"selectedIndex\", selectedIndex - 1);\r\n\r\n removedItem.Enabled = false;\r\n this.visibleJobTabs = this.visibleJobTabs.filter(x => x.JobTab !== removedItem.JobTab);\r\n if (!this.hiddenJobTabs.includes(removedItem)) {\r\n this.hiddenJobTabs.push(removedItem);\r\n }\r\n\r\n this.ManageAddSectionsTabVisibility();\r\n this.didTabsChanged = true;\r\n this.form.form.markAsDirty();\r\n } else {\r\n const tabName = this.translateService.instant(this.jobTabsNamesDictionary[removedItem.JobTab]);\r\n this.removeTabInformationText = this.translateService.instant(\"job.details.tabs.remove-tab-text\", {\r\n tabName\r\n });\r\n this.showInformation = true;\r\n }\r\n });\r\n }\r\n\r\n public OnTabsAdd(data: JobTypeTabsModel[]): void {\r\n this.showTabsPopup = false;\r\n if (data && data.length) {\r\n data.forEach(e => {\r\n e.Enabled = true;\r\n });\r\n this.visibleJobTabs = this.visibleJobTabs.concat(data);\r\n this.hiddenJobTabs = this.hiddenJobTabs.filter(x => !this.visibleJobTabs.includes(x));\r\n this.didTabsChanged = true;\r\n this.form.form.markAsDirty();\r\n this.ManageAddSectionsTabVisibility();\r\n }\r\n }\r\n\r\n public TitleRendered(e): void {\r\n if (e.itemData.JobTab === JobTabEnum.AddSections) {\r\n e.itemElement.addEventListener(\"click\", this.addSectionClick.bind(this));\r\n e.itemElement.addEventListener(\"mousedown\", this.addSectionMouseDown.bind(this));\r\n }\r\n }\r\n\r\n private addSectionMouseDown(e): void {\r\n e.stopPropagation();\r\n }\r\n\r\n private addSectionClick(e): void {\r\n this.showTabsPopup = true;\r\n e.stopPropagation();\r\n }\r\n\r\n private ManageAddSectionsTabVisibility(): void {\r\n if (!this.tabsLoaded) {\r\n return;\r\n }\r\n this.visibleJobTabs = this.visibleJobTabs.filter(x => x.JobTab !== JobTabEnum.AddSections);\r\n if (this.hiddenJobTabs.length) {\r\n const isAdded = this.visibleJobTabs.find(x => x.JobTab === JobTabEnum.AddSections);\r\n if (!isAdded) {\r\n setTimeout(() => {\r\n this.visibleJobTabs.push({\r\n JobTab: JobTabEnum.AddSections,\r\n Enabled: true,\r\n Order: 99,\r\n DisplayText: \"+\"\r\n });\r\n });\r\n }\r\n }\r\n }\r\n\r\n private InitTabs(tabs: JobTypeTabsModel[]): void {\r\n this.UpdateTabsOrderAndVisibility(tabs);\r\n this.MapTabs();\r\n this.HandleJobTabs();\r\n }\r\n\r\n private HandleJobTabs(): void {\r\n this.CheckTabsAvailability();\r\n this.SetVisibleTabs();\r\n this.SetHiddenTabs();\r\n\r\n this.ManageAddSectionsTabVisibility();\r\n }\r\n\r\n private loadTabsForJobType(jobTypeId: number): void {\r\n this.jobService.GetJobTypeTabs(jobTypeId).subscribe(tabs => {\r\n this.InitTabs(tabs);\r\n });\r\n }\r\n\r\n\r\n private UpdateTabsOrderAndVisibility(tabs: JobTypeTabsModel[]): void {\r\n this.allTabs.forEach(tab => {\r\n const t = tabs.find(x => x.JobTab === tab.JobTab);\r\n tab.Enabled = t.Enabled;\r\n tab.Order = t.Order;\r\n });\r\n }\r\n\r\n private MapTabs(): void {\r\n this.allTabs.forEach(t => {\r\n t.DisplayText = this.jobTabsNamesDictionary[t.JobTab];\r\n t.template = this.templatesDictionary[t.JobTab];\r\n t.Available = true;\r\n });\r\n }\r\n\r\n private SetVisibleTabs(): void {\r\n this.visibleJobTabs = this.allTabs.sort((a, b) => a.Order - b.Order).filter(x => x.Enabled && x.Available);\r\n }\r\n\r\n private SetHiddenTabs(): void {\r\n this.hiddenJobTabs = this.allTabs.filter(x => !x.Enabled && x.Available);\r\n }\r\n\r\n private CheckTabsAvailability(): void {\r\n this.allTabs.forEach(tab => {\r\n let available = true;\r\n if (tab.JobTab === JobTabEnum.Refrigeration) {\r\n available = this.hasAccessToFgas;\r\n }\r\n\r\n if (tab.JobTab === JobTabEnum.Inspections) {\r\n available = this.job.IsAllowedInspection;\r\n }\r\n\r\n if (tab.JobTab === JobTabEnum.Activities) {\r\n available = this.hasJobLevelActivities;\r\n }\r\n\r\n if (tab.JobTab === JobTabEnum.Attributes) {\r\n available = this.hasAccessToPro;\r\n }\r\n\r\n if (tab.JobTab === JobTabEnum.Invoicing) {\r\n available = this.job.IsInvoiceable;\r\n }\r\n\r\n tab.Available = available;\r\n });\r\n }\r\n\r\n private SetTabsOrder() {\r\n if (this.didTabsChanged) {\r\n const tabs = this.visibleJobTabs\r\n .filter(x => x.JobTab !== JobTabEnum.AddSections)\r\n .concat(this.hiddenJobTabs)\r\n .concat(this.allTabs.filter(x => !x.Available));\r\n tabs.forEach((t, idx) => {\r\n t.Order = idx + 1;\r\n });\r\n\r\n this.job.Tabs = tabs;\r\n } else {\r\n this.job.Tabs = null;\r\n }\r\n }\r\n\r\n private GetSelectedTabFromParameter(): number {\r\n switch(this.parameterTabId) {\r\n case JobTabEnum.Parts:\r\n return this.getIndexOfTab(JobTabEnum.Parts);\r\n case JobTabEnum.Equipment:\r\n return this.getIndexOfTab(JobTabEnum.Equipment);\r\n case JobTabEnum.Install:\r\n return this.getIndexOfTab(JobTabEnum.Install);\r\n default:\r\n return this.getIndexOfTab(JobTabEnum.Detail);\r\n }\r\n }\r\n\r\n private getIndexOfTab(tab: JobTabEnum): number {\r\n return this.visibleJobTabs.findIndex(x => x.JobTab === tab);\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'job.sheet' | translate }} {{parameterid}}

\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
{{ successMessage | translate }}
\r\n
{{ errorMessage | translate }}
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n","import { Component, Inject, OnInit } from \"@angular/core\";\r\nimport { ActivatedRoute } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { Email } from \"src/app/shared/models/email.model\";\r\nimport { JobService } from \"../services/job.service\";\r\nimport { IAppConfig, APP_CONFIG, Module, ModuleService } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-jobsheet\",\r\n templateUrl: \"./jobsheet.component.html\",\r\n styleUrls: [\"./jobsheet.component.scss\"]\r\n})\r\nexport class JobSheetComponent implements OnInit {\r\n\r\n constructor(\r\n private jobService: JobService,\r\n private route: ActivatedRoute,\r\n private translate: TranslateService,\r\n private modulesService: ModuleService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig\r\n ) { }\r\n\r\n public showMarkAsPrinted = false;\r\n public showEmailDialogue = false;\r\n public showErrorSendMessage = false;\r\n public showSuccessSendMessage = false;\r\n public parameterid: number;\r\n public jobSheetUrl: string;\r\n public hostUrl: string;\r\n public successMessage: string;\r\n public errorMessage: string;\r\n public emailData: Email;\r\n public printFunc: () => void;\r\n public HasProEnabled: boolean = false;\r\n private templateId: number = 0;\r\n\r\n private sendEmailWithInspections: boolean = false;\r\n\r\n public ngOnInit(): void {\r\n this.hostUrl = this.appConfig.apiLocations.ServiceSightReports;\r\n this.parameterid = parseInt(this.route.snapshot.paramMap.get(\"id\"), 10);\r\n this.templateId = parseInt(this.route.snapshot.paramMap.get(\"templateId\"), 10);\r\n this.jobSheetUrl = `jobsheet/${this.parameterid}/${this.templateId}`;\r\n this.modulesService.GetEnabledModules().subscribe(x => {\r\n this.HasProEnabled = x.includes(Module.Pro);\r\n });\r\n }\r\n\r\n public SetPrintFunc(func: () => void) {\r\n this.printFunc = func;\r\n }\r\n\r\n public OnConfirmMarkPrinted(confirmed: boolean): void {\r\n if (confirmed) {\r\n this.jobService.MarkPrinted(this.parameterid).subscribe((res) => {\r\n if (res.IsSuccess) {\r\n this.successMessage = \"job.sheet.successfully.marked.sent\";\r\n this.showMarkAsPrinted = false;\r\n }\r\n });\r\n } else {\r\n this.showMarkAsPrinted = false;\r\n }\r\n }\r\n\r\n public BackToJob(): void {\r\n window.history.back();\r\n }\r\n\r\n public Email(withInspections: boolean = false): void {\r\n this.sendEmailWithInspections = withInspections;\r\n this.jobService\r\n .GetJobSheetEmailData(this.parameterid, this.templateId, withInspections)\r\n .subscribe(x => {\r\n this.emailData = x;\r\n const translatedJobSheet = this.translate.instant(\"job.sheet\");\r\n if (x.Attachments && x.Attachments.length > 0) {\r\n this.emailData.Attachments.unshift(`${translatedJobSheet} ${this.parameterid}`);\r\n } else {\r\n this.emailData.Attachments = [ `${translatedJobSheet} ${this.parameterid}` ];\r\n }\r\n }, () => { }, () => {\r\n this.showErrorSendMessage = false;\r\n this.showEmailDialogue = true;\r\n });\r\n }\r\n\r\n public Send(emailData: Email): void {\r\n this.jobService.SendJobSheetEmail(emailData, this.sendEmailWithInspections).subscribe(() => {\r\n this.showEmailDialogue = false;\r\n this.successMessage = \"job.sheet.successfully.sent\";\r\n }, () => {\r\n this.showErrorSendMessage = true;\r\n });\r\n }\r\n\r\n public CloseDialog(): void {\r\n this.showEmailDialogue = false;\r\n }\r\n\r\n public Print(): void {\r\n this.printFunc();\r\n this.showMarkAsPrinted = true;\r\n }\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { IJobTypeService } from \"../interfaces/IJobTypeService\";\r\nimport { IServiceSightCollection } from \"../../../quotes/models/IServiceSightCollection\";\r\nimport IJobType from \"../../models/ijob-type\";\r\nimport { ISelectOption } from \"../../models/iselect-option.model\";\r\nimport { IAppConfig, APP_CONFIG, ProteanResponse } from \"servicesight-shared\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class JobTypeService implements IJobTypeService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) { }\r\n\r\n public GetAll(): Observable> {\r\n return this.http.get>(`${this.appConfig.apiLocations.ServiceSight}JobType/GetAllJobTypesAsync`);\r\n }\r\n\r\n public GetServiceJobTypes(): Observable> {\r\n return this.http.get>(`${this.appConfig.apiLocations.ServiceSight}JobType/GetServiceJobTypes`);\r\n }\r\n\r\n public Get(id: number): Observable;\r\n\r\n public Get(ids: number[]): Observable;\r\n\r\n public Get(arg: any): Observable {\r\n if (typeof (arg) === \"number\") {\r\n return this.http.get(`${this.appConfig.apiLocations.ServiceSight}JobType/GetJobTypeAsync?jobtypeid=${arg}`);\r\n } else {\r\n let url = `${this.appConfig.apiLocations.ServiceSight}JobType/GetJobTypesAsync?`;\r\n arg.forEach(id => {\r\n url += `jobtypeids=${id}&`;\r\n });\r\n\r\n url = url.substring(0, url.length - 1);\r\n return this.http.get(url);\r\n }\r\n }\r\n\r\n public GetAllCategories(): Observable {\r\n return this.http.get(`${this.appConfig.apiLocations.ServiceSight}JobType/GetAllJobCategories`);\r\n }\r\n\r\n // todo: typing\r\n public Create(model: IJobType): Observable;\r\n\r\n public Create(models: IJobType[]): Observable;\r\n\r\n public Create(model: any): Observable {\r\n if (Array.isArray(model)) {\r\n return this.http.post(`${this.appConfig.apiLocations.ServiceSight}JobType/UpdateJobTypesAsync`, model);\r\n } else {\r\n return this.http.post(`${this.appConfig.apiLocations.ServiceSight}JobType/UpdateJobTypeAsync`, model);\r\n }\r\n }\r\n\r\n public Delete(id: number): Observable {\r\n return this.http.post(`${this.appConfig.apiLocations.ServiceSight}JobType/DeleteJobTypeAsync?jobtypeid=${id}`, {});\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject } from \"@angular/core\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\nimport { RuleModel } from \"../models/rule.model\";\r\nimport { Injectable } from \"@angular/core\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class RecurringJobService {\r\n\r\n constructor(\r\n @Inject(APP_CONFIG) protected config: IAppConfig,\r\n @Inject(\"ODataService\") private odataService: ODataService,\r\n private http: HttpClient) { }\r\n\r\n public GetDataStore(daysAhead: number, filter: string): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.config.apiLocations.RecurringJobOData}RecurringJobOData`,\r\n key: \"Id\",\r\n queryStringParams: {\r\n daysAhead,\r\n filter\r\n }\r\n });\r\n }\r\n\r\n public SaveRule(ruleModel: RuleModel): Observable {\r\n return this.http.post(`${this.config.apiLocations.RecurringJob}RecurringJob/SaveRule`, ruleModel);\r\n }\r\n\r\n public GetRule(): Observable {\r\n return this.http.get(`${this.config.apiLocations.RecurringJob}RecurringJob/GetRule`);\r\n }\r\n\r\n public Run(ruleModel: RuleModel): Observable {\r\n return this.http.post(`${this.config.apiLocations.RecurringJob}RecurringJob/Run`, ruleModel);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

{{ 'recurring.jobs.title' | translate }}

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n
\r\n {{ 'recurring.jobs.gridvalue.multiple-equipid'|translate}}\r\n {{ data.data.EquipNumber }} \r\n
\r\n\r\n
\r\n
\r\n {{ data.value | currency : baseCurrencySymbol }}\r\n
\r\n
\r\n\r\n
\r\n {{ data.value | customDate: 'shortDate' }}\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n

{{ \"recurring.jobs.confirmation.create-recurring-jobs\" | translate: { val: dataSource.totalCount() } }}

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

{{ \"recurring.jobs.confirmation.recurring-jobs-progress\" | translate }}

\r\n
\r\n
\r\n \r\n
\r\n
\r\n","import { Location } from \"@angular/common\";\r\nimport { Component, OnDestroy, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { EdmLiteral } from \"devextreme/data/odata/utils\";\r\nimport { Subscription } from \"rxjs\";\r\nimport {\r\n CurrencyPipe,\r\n CustomerService,\r\n Module,\r\n ModuleService,\r\n PermissionsService,\r\n UICustomisation,\r\n UserReferenceService,\r\n UserRefType\r\n} from \"servicesight-shared\";\r\nimport { EquipmentService } from \"src/app/equipment/services/equipment.service\";\r\nimport IJobType from \"src/app/shared/models/ijob-type\";\r\nimport { JobTypeService } from \"src/app/shared/services/job-type/job-type.service\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\nimport { RuleModel } from \"../models/rule.model\";\r\nimport { RecurringJobService } from \"../services/recurring-job.service\";\r\nimport { Router } from \"@angular/router\";\r\n\r\n@Component({\r\n selector: \"app-recurring-jobs\",\r\n templateUrl: \"./recurring-jobs.component.html\",\r\n styleUrls: [\"./recurring-jobs.component.scss\"]\r\n})\r\nexport class RecurringJobsComponent implements OnInit, OnDestroy {\r\n @ViewChild(\"recurringJobsForm\", { static: true }) form: NgForm;\r\n @ViewChild(\"grid\") private grid: DxDataGridComponent;\r\n\r\n public DaysAhead: number = 30;\r\n public dataSource: DataSource;\r\n public filter: Array = [];\r\n public fields: Array = [];\r\n public customerDataStore: ODataStore;\r\n public equipmentDataStore: ODataStore;\r\n public baseCurrencyCode: string;\r\n public baseCurrencySymbol: string;\r\n public inspectionsEnabled: boolean = false;\r\n public plannerBoardEnabled: boolean = false;\r\n public isProEnabled: boolean = false;\r\n public isEquipmentEnabled: boolean = false;\r\n public isServiceContractEnabled: boolean = false;\r\n public customerRef1DataStore: ODataStore;\r\n public customerRef2DataStore: ODataStore;\r\n public jobTypes: IJobType[] = [];\r\n public serviceLevelTypes: Array = [];\r\n public showConfirmationMessage: boolean = false;\r\n public showViewProgressConfirmationMessage: boolean = false;\r\n\r\n private customerRef1Label: string;\r\n private customerRef2Label: string;\r\n private rule: RuleModel;\r\n private subscription: Subscription = new Subscription();\r\n\r\n constructor(\r\n private recurringJobService: RecurringJobService,\r\n private customerService: CustomerService,\r\n private translateService: TranslateService,\r\n private currencyPipe: CurrencyPipe,\r\n private permissionsService: PermissionsService,\r\n private moduleService: ModuleService,\r\n private userRefsService: UserReferenceService,\r\n private jobTypeService: JobTypeService,\r\n private equipmentService: EquipmentService,\r\n private location: Location,\r\n private router: Router,\r\n private odataService: ODataService\r\n ) {\r\n this.customizeTotal = this.customizeTotal.bind(this);\r\n this.customizeCount = this.customizeCount.bind(this);\r\n this.baseCurrencyCode = JSON.parse(localStorage.getItem(\"ls.BaseCurrencyCode\"));\r\n this.baseCurrencySymbol = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.SetupDataSource();\r\n\r\n this.permissionsService.CurrentUserHasPermission(\"InspectionView\").subscribe(permission => {\r\n this.inspectionsEnabled = permission;\r\n });\r\n\r\n this.permissionsService.CurrentUserHasPermission(\"JobPlannerboard\").subscribe(isAllowedView => {\r\n this.plannerBoardEnabled = isAllowedView;\r\n });\r\n\r\n this.moduleService.GetEnabledModules().subscribe(enabledModules => {\r\n this.isProEnabled = enabledModules.includes(Module.Pro);\r\n this.isEquipmentEnabled = enabledModules.includes(Module.Equipment);\r\n this.isServiceContractEnabled = enabledModules.includes(Module.ServiceContract);\r\n });\r\n\r\n this.recurringJobService.GetRule().subscribe(ruleModel => {\r\n this.rule = ruleModel;\r\n this.ParseFilter();\r\n this.DaysAhead = this.rule.DaysAhead;\r\n });\r\n\r\n this.customerRef1Label = this.userRefsService.getLabel(UICustomisation.CUSTOMER_REF1);\r\n this.customerRef2Label = this.userRefsService.getLabel(UICustomisation.CUSTOMER_REF2);\r\n this.customerRef1DataStore = this.userRefsService.getListDataStore(UserRefType.CUSTOMER_1);\r\n this.customerRef2DataStore = this.userRefsService.getListDataStore(UserRefType.CUSTOMER_2);\r\n this.jobTypeService.GetServiceJobTypes().subscribe(jobTypes => {\r\n this.jobTypes = jobTypes.ModelCollection;\r\n this.CreateFilterFields(); //recreate fields as arrays dont reload\r\n });\r\n\r\n this.CreateFilterFields();\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.subscription.unsubscribe();\r\n this.grid.instance.dispose();\r\n }\r\n\r\n public hasChanges(): boolean {\r\n return !this.form.pristine || (this.rule && JSON.stringify(this.filter) !== this.rule.RuleData);\r\n }\r\n\r\n public allowRun(): boolean {\r\n return this.form.valid &&\r\n this.dataSource != null &&\r\n this.grid &&\r\n this.grid.instance &&\r\n this.grid.instance.getVisibleRows().length > 0;\r\n }\r\n\r\n public OnDiscard(): void {\r\n //reset the grid\r\n this.grid.instance.state(null);\r\n //reset filter\r\n this.ParseFilter();\r\n this.DaysAhead = this.rule.DaysAhead;\r\n this.form.form.reset();\r\n }\r\n\r\n public customizeTotal(data): string {\r\n return this.translateService.instant(\"recurring.jobs.summary.total\", { val: this.currencyPipe.transform(data.value, this.baseCurrencyCode) });\r\n }\r\n\r\n public customizeCount(data): string {\r\n return this.translateService.instant(\"recurring.jobs.summary.no-of-jobs\", { val: data.value });\r\n }\r\n\r\n public FilterChanged(): void {\r\n if (this.filter == null) {\r\n this.filter = [];\r\n }\r\n\r\n this.SetupDataSource();\r\n this.grid.instance.refresh(true);\r\n }\r\n\r\n public SaveCriteria(): void {\r\n this.rule.RuleData = JSON.stringify(this.filter);\r\n this.rule.DaysAhead = this.DaysAhead;\r\n this.recurringJobService.SaveRule(this.rule).subscribe();\r\n }\r\n\r\n public Confirm(): void {\r\n this.showConfirmationMessage = true;\r\n }\r\n\r\n public ShowViewProgressConfirmationMessage(): void {\r\n this.showConfirmationMessage = false;\r\n this.showViewProgressConfirmationMessage = true;\r\n }\r\n\r\n public Run(): void {\r\n this.showViewProgressConfirmationMessage = false;\r\n const rule = {\r\n RuleId: 0,\r\n RuleName: \"Temporary\",\r\n RuleData: JSON.stringify(this.filter),\r\n DaysAhead: this.DaysAhead\r\n };\r\n this.subscription.add(\r\n this.recurringJobService.Run(rule).subscribe(svcJobRunId => {\r\n this.router.navigate([`/jobs/list/RecurringJobHistory/${svcJobRunId}/progress`]);\r\n })\r\n );\r\n }\r\n\r\n public PlannedJobsReport(): void {\r\n this.location.go(\"/proteansystem/systems/planned-jobs-report\");\r\n }\r\n\r\n public DaysAheadChanged(): void {\r\n this.form.form.markAsDirty();\r\n this.FilterChanged();\r\n }\r\n\r\n private SetupDataSource(): void {\r\n const recurringJobsOdata = this.recurringJobService.GetDataStore(this.DaysAhead, JSON.stringify(this.filter));\r\n this.customerDataStore = this.customerService.GetCustomerDataStore();\r\n this.equipmentDataStore = this.equipmentService.GetEquipmentDataStore();\r\n\r\n this.dataSource = this.odataService.GetDataSourceWithLookups(recurringJobsOdata, \"Id\", [\r\n {\r\n store: this.customerDataStore,\r\n dataKey: \"CustomerId\",\r\n lookupKey: \"CustomerId\",\r\n displayExprs: [\"Customer\"]\r\n },\r\n {\r\n store: this.customerDataStore,\r\n dataKey: \"SiteId\",\r\n lookupKey: \"CustomerId\",\r\n displayExprs: [ { original: \"Customer\", target: \"Site\" } ]\r\n },\r\n {\r\n store: this.equipmentDataStore,\r\n dataKey: \"EquipId\",\r\n lookupKey: \"EquipId\",\r\n displayExprs: [\"EquipNumber\"]\r\n }\r\n ]);\r\n }\r\n\r\n private CreateFilterFields(): void {\r\n this.translateService.get(\"recurring.jobs.gridcolumn.customer\").subscribe((customerValue: string) => {\r\n this.fields = [{\r\n caption: customerValue,\r\n dataField: \"CustomerId\",\r\n dataType: \"number\",\r\n lookup: {\r\n dataSource: {\r\n store: this.customerDataStore,\r\n filter: [\"InvoiceId\", \"=\", new EdmLiteral(\"CustomerId\")]\r\n },\r\n displayExpr: \"Customer\",\r\n valueExpr: \"CustomerId\"\r\n }\r\n }, {\r\n caption: this.translateService.instant(\"recurring.jobs.gridcolumn.site\"),\r\n dataField: \"SiteId\",\r\n dataType: \"number\",\r\n lookup: {\r\n dataSource: {\r\n store: this.customerDataStore,\r\n filter: [\"InvoiceId\", \"<>\", new EdmLiteral(\"CustomerId\")]\r\n },\r\n displayExpr: \"Customer\",\r\n valueExpr: \"CustomerId\"\r\n }\r\n }, {\r\n caption: this.translateService.instant(\"recurring.jobs.gridcolumn.job-type\"),\r\n dataField: \"JobTypeId\",\r\n dataType: \"number\",\r\n lookup: {\r\n dataSource: this.jobTypes,\r\n displayExpr: \"Name\",\r\n valueExpr: \"JobTypeID\"\r\n }\r\n }, {\r\n caption: this.translateService.instant(\"recurring.jobs.gridcolumn.service-due-date\"),\r\n dataField: \"ServiceDueDate\",\r\n dataType: \"date\",\r\n editorOptions: {\r\n dateSerializationFormat: \"yyyy-MM-dd\"\r\n }\r\n }, {\r\n caption: this.customerRef1Label,\r\n dataField: \"CustomerRef1JobId\",\r\n dataType: \"number\",\r\n lookup: {\r\n dataSource: {\r\n store: this.customerRef1DataStore\r\n },\r\n displayExpr: \"UserReferenceListItem\",\r\n valueExpr: \"UserReferenceListItemID\"\r\n }\r\n }, {\r\n caption: this.customerRef2Label,\r\n dataField: \"CustomerRef2JobId\",\r\n dataType: \"number\",\r\n lookup: {\r\n dataSource: {\r\n store: this.customerRef2DataStore\r\n },\r\n displayExpr: \"UserReferenceListItem\",\r\n valueExpr: \"UserReferenceListItemID\"\r\n }\r\n }, {\r\n caption: this.translateService.instant(\"recurring.jobs.gridcolumn.contract-number\"),\r\n dataField: \"ContractNumber\",\r\n dataType: \"number\"\r\n }];\r\n\r\n if (this.isEquipmentEnabled) {\r\n this.fields.splice(2, 0, {\r\n caption: this.translateService.instant(\"recurring.jobs.gridcolumn.equipment\"),\r\n dataField: \"EquipId\",\r\n dataType: \"number\",\r\n lookup: {\r\n dataSource: {\r\n store: this.equipmentService.GetEquipmentDataStore(),\r\n filter: [\"ServiceGroupId\", \"=\", null]\r\n },\r\n displayExpr: \"EquipNumber\",\r\n valueExpr: \"EquipId\"\r\n }\r\n });\r\n }\r\n\r\n this.serviceLevelTypes = [{\r\n Name: this.translateService.instant(\"recurring.jobs.service-level-type.equipment\"),\r\n Value: 0\r\n }, {\r\n Name: this.translateService.instant(\"recurring.jobs.service-level-type.service-group\"),\r\n Value: 3\r\n }, {\r\n Name: this.translateService.instant(\"recurring.jobs.service-level-type.site\"),\r\n Value: 2\r\n }, {\r\n Name: this.translateService.instant(\"recurring.jobs.service-level-type.equipment\"),\r\n Value: 1\r\n }];\r\n });\r\n }\r\n\r\n private ParseFilter(): void {\r\n this.filter = JSON.parse(this.rule.RuleData, (key, value) => {\r\n // Filter builder needs instance of Date to work and it comes as a string so we need to parse it\r\n if (key && Number(key) === 2 && !Array.isArray(value)) {\r\n return isNaN(value) && !isNaN(Date.parse(value)) ? new Date(value) : value;\r\n } else if (Array.isArray(value) && value.length === 2) {\r\n // handle date array for \"between\" filter\r\n const dateArray: Date[] = [];\r\n value.forEach(date => {\r\n if (isNaN(date) && !isNaN(Date.parse(date))) {\r\n dateArray.push(new Date(date));\r\n }\r\n });\r\n return dateArray.length ? dateArray : value;;\r\n }\r\n return value;\r\n });\r\n }\r\n}\r\n","import { NgModule } from \"@angular/core\";\r\nimport { RouterModule, Routes } from \"@angular/router\";\r\nimport { CanDeactivateGuard, JobsListComponent } from \"servicesight-shared\";\r\nimport { JobCreateComponent } from \"./job-create/job-create.component\";\r\nimport { JobComponent } from \"./job/job.component\";\r\nimport { JobSheetComponent } from \"./jobsheet/jobsheet.component\";\r\nimport { RecurringJobsComponent } from \"./recurring-jobs/recurring-jobs.component\";\r\n\r\nconst routes: Routes = [\r\n { path: \"list/:filterName\", component: JobsListComponent },\r\n { path: \"list/RecurringJobHistory/:svcJobRunId\", component: JobsListComponent },\r\n { path: \"list/RecurringJobHistory/:svcJobRunId/progress\", component: JobsListComponent },\r\n { path: \"list\", component: JobsListComponent },\r\n { path: \"job/:id\", component: JobComponent, canDeactivate: [ CanDeactivateGuard ] },\r\n { path: \"job/:id/:activeTab\", component: JobComponent, canDeactivate: [ CanDeactivateGuard ] },\r\n { path: \"create/:customerid/:siteid/:contactid\", component: JobCreateComponent, canDeactivate: [ CanDeactivateGuard ] },\r\n { path: \"create\", component: JobCreateComponent, canDeactivate: [ CanDeactivateGuard ] },\r\n { path: \"add-job\", component: JobComponent, canDeactivate: [ CanDeactivateGuard ] },\r\n { path: \"add-job/:invoiceid/:siteid/:contactid\", component: JobComponent, canDeactivate: [ CanDeactivateGuard ] },\r\n { path: \"jobsheet/:id/:templateId\", component: JobSheetComponent },\r\n { path: \"recurringjobs\", component: RecurringJobsComponent },\r\n { path: \"\", redirectTo: \"list\", pathMatch: \"full\" },\r\n { path: \"**\", redirectTo: \"list\" }\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\n\r\nexport class JobRoutingModule {\r\n public static readonly Routes: Routes = routes;\r\n}\r\n","export enum Messages {\r\n Draft = 100,\r\n Unread = 300,\r\n Sent = 800\r\n}\r\n","
\r\n
\r\n
\r\n

{{ 'messages' | translate }}

\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n
{{ 'message.author.system' | translate }}
\r\n
{{ data.data.Author }}
\r\n
{{data.data.SendTime | date: 'short' }}
\r\n
\r\n\r\n
\r\n
{{data.data.Subject}}
\r\n
{{data.data.Body}}
\r\n
\r\n\r\n
\r\n {{ 'messages.status.' + data.data.Status.toLowerCase() | translate }}\r\n
\r\n\r\n
\r\n 0\"\r\n [ngClass]=\"(data.data.Status === 'Received') ? 'paperclip' : 'paperclipold'\">\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport { HelpItemTagEnum } from \"servicesight-shared\";\r\nimport { MessageTypes } from \"../../../shared/enums/messages/message-types.enum\";\r\nimport { Messages } from \"../../../shared/enums/messages/messages.enum\";\r\nimport { MessageService } from \"../../services/message/message.service\";\r\n\r\n@Component({\r\n selector: \"app-message-list\",\r\n templateUrl: \"./message-list.component.html\",\r\n styleUrls: [\r\n \"./message-list.component.scss\",\r\n \"../../../../../projects/servicesight-shared/src/lib/styles/servicesight-shared.scss\"\r\n ]\r\n})\r\n\r\nexport class MessageListComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n\r\n public helpItemTagEnum = HelpItemTagEnum;\r\n public Messages;\r\n public SearchText: string = \"\";\r\n public SelectedItem: number = 0;\r\n public DeleteMessageBind = this.DeleteMessage.bind(this);\r\n public FilterValue: any;\r\n public filters: any = {\r\n 1: [\"StatusCode\", \"=\", Messages.Draft],\r\n 2: [\"StatusCode\", \"=\", Messages.Unread]\r\n };\r\n // eslint-disable-next-line max-len\r\n public systemLogo = \"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAMAAADDpiTIAAAC/VBMVEUAAAAod7UTcrm41uwSdb0SdLkEarZ7tNwCbLa71+wBYrEAZ7QBaLUAZbIAYbAqhsgAYLAAYbAnhsgBZbIAYLBKm84Jd74AY7EBYrEticisz+c1jcwAYbABZLFho9IAYLAId70BY7EohsdmqdUzi8s0jMsAY7G00+o1jswCZLIBbrcxi8zk7/fW5/Q/k8swjcgCc7sBYrEBY7EBYrESe8EKeb8Hdr0Hb7g0jMsSfMEBYrEBZLLc6vWHut0Gdr0BZbIwisoBYrAtiMrK4PAlgsMCZ7QyisoDdbwBdLszjMsxi8rR5PLB2+2cxuOOvd9ans9LlcscgcMmhMY0jMsBaLQzi8sBa7YzjMwKer8Dc7sigsWjy+UCabUXfsIAcbo0jMs0jcwAbrg0jcwFdb3F3e6Bt9w5isUFd70UfcIhgsX+/v4dgMQyi8ozi8uUwuKZw+GAs9oth8T+/v4Bcrr///8agMMkg8X///99stkFdr0Abrg0jMz+/v4fgcX+/v7////+/v7w9vqXwuEhfr8de70Abbcqhcf+/v7+/v7+/v7+/v7////+/v7+/v4bf8L+/v7+/v7+/v7+/v6exuT///8AYbAkPmkCarUCaLQEZLEDZrMDZbIAcLkBa7YAcroAc7sRfMEOe8ABbbcDYrEBb7gwickJeb8AdLwWfsIyisoGeL41js0Bdr0CZ7QDZ7MdgcQcgMMaf8MqhschgsUohccyicomhMYjg8UfgcU0jcwuh8g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zZvgq57+Xd0WQCYXEhPh+9lRbKQn9O8azAA7DwKVOFZ+jDm/yg5G9Ndo0bSBP8NeTH4rKFXr//RXul3dFkAhFxJLYONnHbXc5XX/vaIoRFuAT8a632qK3/YVRbcF2J0L8Qlw/UvBtZWP6rQAO3IhUN8mXG9SbxU6M+BC3oD6S+eF//TVyAywKxeyExHh+uzi4XE+amsLiAkB3PlsxuM/22/ZkQvJxL349GngejosgqXmQjIREVOfFrdFEF1KLiQW9z6D+DRZO06dBi3MhWQicgAnHup4AqnTfeY20BeRpXV8+NywuecXToJMciG+sCC68d1zyeMtKXV2ElywBfjCoYS0gcMe/zzyuCUxf3QSDf4yfAl+8F2EjwRRcq9z+rtOMA3XpmdrLyD5xYQsCKHQ0ZBQKCQIckL0SwH3xvomxjwAAAAAAAAAAAAAAAAAAAAAAAAAAPjLHhwIAAAAAAD5vzaCqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqrSHhwSAAAAAAj6/9obBgAAAAAAAAAAAAAAAAAAAAAAANgLcyVNZ3a0jhwAAAAASUVORK5CYII=\";\r\n\r\n public newMessage: () => void = () => {\r\n this.ClearDataForm();\r\n this.router.navigate([`messages/newmessage`]);\r\n };\r\n\r\n constructor(\r\n private messageService: MessageService,\r\n private router: Router) { }\r\n\r\n ngOnInit() {\r\n this.getConversationList();\r\n }\r\n\r\n public FilterChanged(event) {\r\n const filterValue = event.currentTarget.value;\r\n this.dataGrid.instance.clearFilter();\r\n if (filterValue !== \"0\") {\r\n this.dataGrid.instance.filter(this.filters[filterValue]);\r\n }\r\n }\r\n\r\n public StartEdit(event) {\r\n this.router.navigate([`messages/message/${event.data.MessageID}`]);\r\n }\r\n\r\n public SearchTextChanged() {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public DeleteMessage(e) {\r\n const message = e.row.data;\r\n if (message.StatusCode === Messages.Draft) {\r\n this.messageService.DeleteMessage(message.MessageID).subscribe(() => {\r\n this.getConversationList();\r\n });\r\n } else {\r\n this.messageService.Archive(message).subscribe(() => {\r\n this.getConversationList();\r\n });\r\n }\r\n }\r\n\r\n public ClearDataForm() {\r\n this.messageService.SetNewMessageParameters(0, MessageTypes.NewMessage, false);\r\n }\r\n\r\n public handleColor(status: string): string {\r\n switch (status) {\r\n case \"Received\":\r\n return \"font-red\";\r\n case \"Read\":\r\n return \"font-green\";\r\n default:\r\n return \"\";\r\n }\r\n }\r\n\r\n private getConversationList() {\r\n this.messageService.GetConversationList().subscribe(x => {\r\n if (x.ModelCollection) {\r\n this.Messages = x.ModelCollection;\r\n }\r\n });\r\n }\r\n}\r\n","export enum MessagesActionType {\r\n SendMail,\r\n SaveDraft\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { BehaviorSubject, Observable, Subject } from \"rxjs\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class WarningModalService {\r\n public ShowWarningModal: BehaviorSubject = new BehaviorSubject(false);\r\n private allowChangingUrl: Subject = new Subject();\r\n\r\n constructor() { }\r\n\r\n public setWarningModalObservable(confirmLeave: boolean): void {\r\n this.allowChangingUrl.next(confirmLeave);\r\n }\r\n\r\n public getWarningModalObservable(): Observable {\r\n return this.allowChangingUrl.asObservable();\r\n }\r\n}\r\n","
\r\n
\r\n \r\n
\r\n
\r\n \r\n {{ 'messages.selectAll' | translate }}\r\n
\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport { RecipientCollectionModel } from \"../../../shared/models/messages/recipient-collection.model\";\r\nimport { MessageService } from \"../../services/message/message.service\";\r\n\r\n@Component({\r\n selector: \"app-recipients-picker\",\r\n templateUrl: \"./recipients-picker.component.html\",\r\n styleUrls: [\"./recipients-picker.component.scss\"]\r\n})\r\nexport class RecipientsPickerComponent implements OnInit, OnChanges {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n @Output() showPopup = new EventEmitter();\r\n @Output() PickedRecipients = new EventEmitter();\r\n @Input() RecipientCollection: Array;\r\n public AllSelected: boolean = false;\r\n public SearchText: string = \"\";\r\n\r\n constructor(\r\n private messageService: MessageService) { }\r\n\r\n ngOnInit() {\r\n this.initRecipientList();\r\n }\r\n\r\n ngOnChanges() {\r\n this.initRecipientList();\r\n }\r\n\r\n public SelectAll() {\r\n if (this.AllSelected) {\r\n this.RecipientCollection.map((item) => {\r\n item.Selected = true;\r\n });\r\n } else {\r\n this.RecipientCollection.map((item) => {\r\n item.Selected = false;\r\n });\r\n }\r\n }\r\n\r\n public Cancel() {\r\n this.showPopup.emit(false);\r\n }\r\n\r\n public SaveRecipients() {\r\n const choosedRecipients = this.RecipientCollection.filter((item) => {\r\n if (item.Selected) {\r\n return item.Name;\r\n }\r\n });\r\n this.PickedRecipients.emit(choosedRecipients);\r\n this.showPopup.emit(false);\r\n }\r\n\r\n public SearchTextChanged() {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n private initRecipientList() {\r\n if (!this.RecipientCollection) {\r\n this.messageService.GetRecipientsCollection().subscribe(x => {\r\n this.RecipientCollection = x;\r\n });\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

{{ 'messages.newMessage' | translate }}

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {{image.Employee}}\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n\r\n \r\n\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {{ GetDocumentLabel() }}\r\n \r\n \r\n
0\">\r\n 1\">\r\n {{Attachments.length + AttachmentsCount}}\r\n \r\n \r\n \r\n {{attachment.DisplayName}}\r\n \r\n \r\n \r\n \r\n {{attachment.name}}\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n \r\n \r\n\r\n\r\n\r\n \r\n \r\n \r\n\r\n\r\n\r\n
{{ 'messages.warningText' | translate }}
\r\n
\r\n \r\n \r\n
\r\n
\r\n","import {\r\n Component,\r\n EventEmitter,\r\n HostListener,\r\n OnDestroy,\r\n OnInit,\r\n Output,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { Observable } from \"rxjs\";\r\nimport { first } from \"rxjs/operators\";\r\nimport { ComponentCanDeactivate, FormMesssageService } from \"servicesight-shared\";\r\nimport { MessageDocTypeIds } from \"../../../shared/enums/messages/message-doc-type-ids.enum\";\r\nimport { MessageTypes } from \"../../../shared/enums/messages/message-types.enum\";\r\nimport { MessagesActionType } from \"../../../shared/enums/messages/messages-action-type.enum\";\r\nimport { MessageDetailsModel } from \"../../../shared/models/messages/message-details.model\";\r\nimport { RecipientsModel } from \"../../../shared/models/messages/recipients.model\";\r\nimport { MessageService } from \"../../services/message/message.service\";\r\nimport { WarningModalService } from \"../../services/warning-modal/warning-modal.service\";\r\n\r\n@Component({\r\n selector: \"app-new-messages\",\r\n templateUrl: \"./new-messages.component.html\",\r\n styleUrls: [\"./new-messages.component.scss\"]\r\n})\r\nexport class NewMessagesComponent implements OnInit, OnDestroy, ComponentCanDeactivate {\r\n @ViewChild(\"newMessageForm\") form: NgForm;\r\n @Output() disableForm = new EventEmitter();\r\n public MessageId: number;\r\n public Message: MessageDetailsModel;\r\n public TempAttachments: Array = [];\r\n public AttachmentsCount: number = 0;\r\n public ShowAttachmentsModal: boolean = false;\r\n public ShowRecipientsModal: boolean = false;\r\n public ShowWarningModal: boolean = false;\r\n public MessageParams = this.messageService.GetNewMessageParameters();\r\n public readonly NewMessageForm: string = \"newMessageForm\";\r\n public RecipientVisible: Array = [];\r\n public MessagesActionType = MessagesActionType;\r\n public SaveEnabled: boolean = true;\r\n private Attachments: Array = [];\r\n\r\n @HostListener(\"window:beforeunload\") canDeactivate(): Observable | boolean {\r\n return !this.form.form.dirty;\r\n }\r\n\r\n constructor(\r\n private messageService: MessageService,\r\n private formMessageService: FormMesssageService,\r\n private router: Router,\r\n private route: ActivatedRoute,\r\n private warningModalService: WarningModalService) { }\r\n\r\n ngOnInit() {\r\n this.MessageId = this.MessageParams.id;\r\n this.LoadMessage();\r\n if (this.route.params) {\r\n this.warningModalService.ShowWarningModal.subscribe(x => this.ShowWarningModal = x);\r\n }\r\n document.getElementById(\"main\").classList.add(\"messages-details\");\r\n }\r\n\r\n ngOnDestroy() {\r\n document.getElementById(\"main\").classList.remove(\"messages-details\");\r\n }\r\n\r\n public canDeactivateCallback() {\r\n this.warningModalService.ShowWarningModal.next(true);\r\n return this.warningModalService.getWarningModalObservable().pipe(first());\r\n }\r\n\r\n public LoadMessage() {\r\n switch (this.MessageParams.type) {\r\n case MessageTypes.RefMessage:\r\n this.messageService.GetRefMessageForTypeAndID(`${this.MessageParams.docTypeId}-${this.MessageParams.docId}`, this.MessageParams.reference)\r\n .subscribe(x => this.Message = x);\r\n break;\r\n case MessageTypes.ReplyAll:\r\n this.messageService.GetReplyAllForMessageId(this.MessageId).subscribe(x => {\r\n this.Message = x;\r\n this.handleRecipients();\r\n });\r\n break;\r\n case MessageTypes.Draft:\r\n this.messageService.GetDraftMessageId(this.MessageId).subscribe(x => {\r\n this.Message = x;\r\n this.handleRecipients();\r\n });\r\n break;\r\n case MessageTypes.Forward:\r\n this.messageService.Forward(this.MessageId).subscribe(x => this.Message = x);\r\n break;\r\n case MessageTypes.Reply:\r\n this.messageService.GetReplyForMessageId(this.MessageId).subscribe(x => {\r\n this.Message = x;\r\n this.handleRecipients();\r\n });\r\n break;\r\n case MessageTypes.ClearForm:\r\n this.Message = null;\r\n break;\r\n default:\r\n this.messageService.NewMessage().subscribe(x => this.Message = x);\r\n }\r\n }\r\n\r\n public OpenPicker() {\r\n this.ShowRecipientsModal = true;\r\n }\r\n\r\n public OpenAttachFileModal() {\r\n this.ShowAttachmentsModal = true;\r\n }\r\n\r\n public DialogClosed() {\r\n this.ShowAttachmentsModal = false;\r\n this.ShowRecipientsModal = false;\r\n this.ShowWarningModal = false;\r\n }\r\n\r\n public SaveAttachments() {\r\n this.Attachments.push(...this.TempAttachments);\r\n this.ShowAttachmentsModal = false;\r\n }\r\n\r\n public HandlePopup(event: boolean) {\r\n this.ShowRecipientsModal = event;\r\n }\r\n\r\n public HandleRecipients(event: any) {\r\n this.Message.RecipientArray = [];\r\n const recipientList = [];\r\n event.map((item) => {\r\n recipientList.push(item.Name);\r\n this.Message.RecipientArray.push({\r\n Employee: item.Name,\r\n Source: item.PhotoFace\r\n });\r\n });\r\n this.Message.RecipientList = recipientList.join(\"; \");\r\n }\r\n\r\n public ChooseAction(actionType: MessagesActionType) {\r\n this.validateRecipients();\r\n if (this.form.form.valid && actionType === MessagesActionType.SaveDraft) {\r\n this.saveDraft();\r\n } else if (this.form.form.valid && actionType === MessagesActionType.SendMail) {\r\n this.sendMail();\r\n }\r\n }\r\n\r\n public ToggleTooltip(index: number) {\r\n this.RecipientVisible[index] = !this.RecipientVisible[index];\r\n }\r\n\r\n public OpenDoc(Message: MessageDetailsModel) {\r\n switch (Message.DocTypeID) {\r\n case MessageDocTypeIds.Job:\r\n this.router.navigate([`/jobs/job/${Message.DocumentID}`]);\r\n break;\r\n case MessageDocTypeIds.Equip:\r\n this.router.navigate([`/equipment/detail/${Message.DocumentID}`]);\r\n break;\r\n case MessageDocTypeIds.Customer:\r\n this.router.navigate([`/customers/customer/${Message.DocumentID}`]);\r\n break;\r\n case MessageDocTypeIds.Contact:\r\n this.router.navigate([`/contacts/contact/${Message.DocumentID}`]);\r\n break;\r\n case MessageDocTypeIds.Reminders:\r\n this.router.navigate([`/tasks/task/${Message.DocumentID}`]);\r\n break;\r\n case MessageDocTypeIds.Quotes:\r\n this.router.navigate([`/quotes/details/${Message.DocumentID}/${Message.SupDocID}`]);\r\n break;\r\n case MessageDocTypeIds.ServiceContract:\r\n this.router.navigate([`/contracts/detail/${Message.DocumentID}`]);\r\n break;\r\n case MessageDocTypeIds.Stock:\r\n this.router.navigate([`/stock/detail/${Message.DocumentID}`]);\r\n break;\r\n case MessageDocTypeIds.PurchaseOrder:\r\n this.router.navigate([`/purchase-orders/detail/${Message.DocumentID}`]);\r\n break;\r\n case MessageDocTypeIds.GoodsReceived:\r\n this.router.navigate([`/goods-received/detail/${Message.DocumentID}`]);\r\n break;\r\n case MessageDocTypeIds.StockAdjustment:\r\n this.router.navigate([`/stock/adjustment/${Message.DocumentID}`]);\r\n break;\r\n case MessageDocTypeIds.Supplier:\r\n this.router.navigate([`/suppliers/detail/${Message.DocumentID}`]);\r\n break;\r\n case MessageDocTypeIds.Credit:\r\n this.router.navigate([`/credit-notes/credit-note/${Message.DocumentID}`]);\r\n break;\r\n case MessageDocTypeIds.SalesOrder:\r\n this.router.navigate([`/sales-orders/detail/${Message.DocumentID}`]);\r\n break;\r\n case MessageDocTypeIds.DespatchNote:\r\n this.router.navigate([`/despatch-notes/detail/${Message.DocumentID}`]);\r\n break;\r\n case MessageDocTypeIds.ReturnsNote:\r\n this.router.navigate([`/returns/detail/${Message.DocumentID}`]);\r\n break;\r\n case MessageDocTypeIds.Batch:\r\n location.href = \"#/invoices/batch-list\";\r\n break;\r\n case MessageDocTypeIds.Cylinder:\r\n this.router.navigate([`/f-gas/cylinders/detail/${Message.DocumentID}`]);\r\n break;\r\n case MessageDocTypeIds.FGasLog:\r\n this.router.navigate([`/f-gas/log/${Message.DocumentID}`]);\r\n break;\r\n case MessageDocTypeIds.PurchaseNote:\r\n this.router.navigate([`/purchase-notes/detail/${Message.DocumentID}`]);\r\n break;\r\n case MessageDocTypeIds.Invoice:\r\n this.router.navigate([`/invoices/invoice/${Message.DocumentID}`]);\r\n break;\r\n }\r\n }\r\n\r\n public RemoveAttachment(attachmentIndex: number, isExisting: boolean) {\r\n if (!isExisting) {\r\n this.Attachments.splice(attachmentIndex, 1);\r\n }\r\n }\r\n\r\n public LeaveSite() {\r\n this.warningModalService.setWarningModalObservable(true);\r\n this.warningModalService.ShowWarningModal.next(false);\r\n }\r\n\r\n public StayOnSite() {\r\n this.warningModalService.setWarningModalObservable(false);\r\n this.warningModalService.ShowWarningModal.next(false);\r\n }\r\n\r\n public Cancel() {\r\n this.router.navigate([\"/messages/list\"]);\r\n }\r\n\r\n public CancelUploading() {\r\n this.Attachments = [];\r\n this.ShowAttachmentsModal = false;\r\n }\r\n\r\n public GetDocumentLabel(): string {\r\n let documentLabel: string;\r\n if (this.Message.DocTypeID === MessageDocTypeIds.PurchaseNote) {\r\n documentLabel = this.Message.Reference;\r\n } else if (this.Message.DocTypeID === MessageDocTypeIds.Invoice) {\r\n documentLabel = this.Message.DocumentType;\r\n } else {\r\n documentLabel = `${this.Message.Document} ${this.Message.DocumentName}`;\r\n }\r\n\r\n return documentLabel;\r\n }\r\n\r\n private validateRecipients() {\r\n const controls = this.form.form.controls;\r\n if (!this.Message.RecipientArray || !this.Message.RecipientArray.length) {\r\n controls.Recipients.setErrors({ recipientsRequired: true });\r\n } else {\r\n controls.Recipients.setErrors(null);\r\n }\r\n }\r\n\r\n private sendMail() {\r\n this.SaveEnabled = false;\r\n this.formMessageService\r\n .RegisterObservable(this.messageService.SendMessage(this.Message, this.Attachments), this.NewMessageForm)\r\n .subscribe(x => this.handleReloading(x.EntityId));\r\n }\r\n\r\n private saveDraft() {\r\n this.SaveEnabled = false;\r\n this.formMessageService\r\n .RegisterObservable(this.messageService.SaveDraft(this.Message, this.Attachments), this.NewMessageForm)\r\n .subscribe(x => this.handleReloading(x.EntityId));\r\n }\r\n\r\n private handleReloading(messageId) {\r\n if (this.router.url === `/messages/message/${messageId}`) {\r\n this.router.navigateByUrl(\"\", { skipLocationChange: true }).then(() => {\r\n this.router.navigate([`messages/message/${messageId}`]);\r\n });\r\n } else {\r\n this.router.navigate([`messages/message/${messageId}`]);\r\n this.disableForm.emit();\r\n }\r\n }\r\n\r\n private handleRecipients() {\r\n if (!this.Message.RecipientArray) {\r\n this.Message.RecipientArray = new Array();\r\n if (this.Message.RecipientList) {\r\n const selectedMultipleRecipients = this.Message.RecipientList.split(\"; \");\r\n if (selectedMultipleRecipients) {\r\n selectedMultipleRecipients.map(recipient => this.saveRecipient(recipient));\r\n } else {\r\n this.saveRecipient(this.Message.RecipientList);\r\n }\r\n }\r\n }\r\n }\r\n\r\n private saveRecipient(recipient) {\r\n this.Message.RecipientCollection.filter(item => {\r\n if (item.Name === recipient) {\r\n item.Selected = true;\r\n this.Message.RecipientArray.push({\r\n Employee: item.Name,\r\n Source: item.PhotoFace\r\n });\r\n }\r\n });\r\n }\r\n}\r\n","export enum MessagesTooltipType {\r\n Author,\r\n Recipients\r\n}\r\n","import { Component, Input, OnInit } from \"@angular/core\";\r\nimport { DomSanitizer, SafeHtml } from \"@angular/platform-browser\";\r\n\r\n@Component({\r\n selector: \"app-html-body\",\r\n templateUrl: \"./html-body.component.html\",\r\n styleUrls: [\"./html-body.component.scss\"]\r\n})\r\nexport class HtmlBodyComponent implements OnInit {\r\n\r\n @Input() html: string;\r\n\r\n public get safeHtml(): SafeHtml {\r\n if (!this.html) {\r\n return null;\r\n }\r\n return this.sanitizer.bypassSecurityTrustHtml(this.html);\r\n }\r\n constructor(private sanitizer: DomSanitizer) { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
{{item.Author ? item.Author : 'message.author.system' | translate }}
\r\n
{{item.MessageDate | date: 'short'}}
\r\n
\r\n {{item.SubjectShortened }}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n","\r\n","import { Component, EventEmitter, OnInit, Output } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { MessageNavigation } from \"../../../shared/models/messages/message-navigation.model\";\r\nimport { MessageService } from \"../../services/message/message.service\";\r\n\r\n@Component({\r\n selector: \"app-messages-navigation\",\r\n templateUrl: \"./messages-navigation.component.html\",\r\n styleUrls: [\"./messages-navigation.component.scss\"]\r\n})\r\nexport class MessagesNavigationComponent implements OnInit {\r\n @Output() showMessage = new EventEmitter();\r\n public Navigation: Array;\r\n public ActiveMessageId: number;\r\n // eslint-disable-next-line max-len\r\n public systemLogo = \"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAMAAADDpiTIAAAC/VBMVEUAAAAod7UTcrm41uwSdb0SdLkEarZ7tNwCbLa71+wBYrEAZ7QBaLUAZbIAYbAqhsgAYLAAYbAnhsgBZbIAYLBKm84Jd74AY7EBYrEticisz+c1jcwAYbABZLFho9IAYLAId70BY7EohsdmqdUzi8s0jMsAY7G00+o1jswCZLIBbrcxi8zk7/fW5/Q/k8swjcgCc7sBYrEBY7EBYrESe8EKeb8Hdr0Hb7g0jMsSfMEBYrEBZLLc6vWHut0Gdr0BZbIwisoBYrAtiMrK4PAlgsMCZ7QyisoDdbwBdLszjMsxi8rR5PLB2+2cxuOOvd9ans9LlcscgcMmhMY0jMsBaLQzi8sBa7YzjMwKer8Dc7sigsWjy+UCabUXfsIAcbo0jMs0jcwAbrg0jcwFdb3F3e6Bt9w5isUFd70UfcIhgsX+/v4dgMQyi8ozi8uUwuKZw+GAs9oth8T+/v4Bcrr///8agMMkg8X///99stkFdr0Abrg0jMz+/v4fgcX+/v7////+/v7w9vqXwuEhfr8de70Abbcqhcf+/v7+/v7+/v7+/v7////+/v7+/v4bf8L+/v7+/v7+/v7+/v6exuT///8AYbAkPmkCarUCaLQEZLEDZrMDZbIAcLkBa7YAcroAc7sRfMEOe8ABbbcDYrEBb7gwickJeb8AdLwWfsIyisoGeL41js0Bdr0CZ7QDZ7MdgcQcgMMaf8MqhschgsUohccy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FxJLYONnHbXc5XX/vaIoRFuAT8a632qK3/YVRbcF2J0L8Qlw/UvBtZWP6rQAO3IhUN8mXG9SbxU6M+BC3oD6S+eF//TVyAywKxeyExHh+uzi4XE+amsLiAkB3PlsxuM/22/ZkQvJxL349GngejosgqXmQjIREVOfFrdFEF1KLiQW9z6D+DRZO06dBi3MhWQicgAnHup4AqnTfeY20BeRpXV8+NywuecXToJMciG+sCC68d1zyeMtKXV2ElywBfjCoYS0gcMe/zzyuCUxf3QSDf4yfAl+8F2EjwRRcq9z+rtOMA3XpmdrLyD5xYQsCKHQ0ZBQKCQIckL0SwH3xvomxjwAAAAAAAAAAAAAAAAAAAAAAAAAAPjLHhwIAAAAAAD5vzaCqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqrSHhwSAAAAAAj6/9obBgAAAAAAAAAAAAAAAAAAAAAAANgLcyVNZ3a0jhwAAAAASUVORK5CYII=\";\r\n\r\n\r\n constructor(\r\n private messageService: MessageService,\r\n private router: Router) { }\r\n\r\n ngOnInit() {\r\n this.messageService.GetMessagesNavigation().subscribe(x => {\r\n if (x.ModelCollection) {\r\n this.Navigation = x.ModelCollection;\r\n }\r\n\r\n this.Navigation.map((item) => {\r\n if (item.Subject && item.Subject.length > 40) {\r\n item.SubjectShortened = item.Subject.substr(0, 40) + \"...\";\r\n } else {\r\n item.SubjectShortened = item.Subject;\r\n }\r\n });\r\n });\r\n }\r\n\r\n public GoMessage(messageId: number) {\r\n this.ActiveMessageId = messageId;\r\n this.router.navigate([`messages/message/${messageId}`]);\r\n this.showMessage.emit(messageId);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

{{ 'message' | translate }} {{MessageSubject}}

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n {{ message.Author }}\r\n \r\n \r\n {{ 'message.author.system' | translate }}\r\n \r\n
\r\n
\r\n {{message.SendTime | date: 'shortDate'}}\r\n {{message.SendTime | date: 'shortTime'}}\r\n
\r\n \r\n \r\n \r\n \r\n {{image.Employee}}\r\n \r\n
\r\n
\r\n
\r\n {{ 'messages.button.replyall' | translate }}\r\n {{ 'messages.button.reply' | translate }}\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n {{message.AttachmentCount}}\r\n \r\n \r\n \r\n {{attachment.DisplayName}}  \r\n \r\n \r\n {{attachment.DisplayName}}  \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n {{ GetDocumentLabel(message) }}\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { Component, OnDestroy, OnInit } from \"@angular/core\";\r\nimport { DomSanitizer } from \"@angular/platform-browser\";\r\nimport { ActivatedRoute } from \"@angular/router\";\r\nimport { BypassSecurityTrustResourceUrlPipe, DocumentTypeEnum } from \"servicesight-shared\";\r\nimport { MessageDocTypeIds } from \"../../../shared/enums/messages/message-doc-type-ids.enum\";\r\nimport { MessageTypes } from \"../../../shared/enums/messages/message-types.enum\";\r\nimport { MessagesTooltipType } from \"../../../shared/enums/messages/messages-tooltip-type.enum\";\r\nimport { MessageDetailsModel } from \"../../../shared/models/messages/message-details.model\";\r\nimport { MessageList } from \"../../../shared/models/messages/message-list.model\";\r\nimport { MessageService } from \"../../services/message/message.service\";\r\n\r\n@Component({\r\n selector: \"app-messages\",\r\n templateUrl: \"./messages.component.html\",\r\n styleUrls: [\"./messages.component.scss\"]\r\n})\r\n\r\nexport class MessagesComponent implements OnInit, OnDestroy {\r\n public MessageTypes = MessageTypes;\r\n public ConversationData: MessageList;\r\n public MessageSubject: string;\r\n public FileFormatsForViewing = [\"png\", \"jpeg\", \"jpg\", \"pdf\", \"gif\", \"bmp\", \"txt\"];\r\n public MessageType: MessageTypes;\r\n public MessageIndex: number;\r\n public AuthorVisible: Array = [];\r\n public RecipientVisible: Array<[boolean]> = [];\r\n public TooltipType = MessagesTooltipType;\r\n public DocumentType = DocumentTypeEnum;\r\n // eslint-disable-next-line max-len\r\n public systemLogo = \"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAMAAADDpiTIAAAC/VBMVEUAAAAod7UTcrm41uwSdb0SdLkEarZ7tNwCbLa71+wBYrEAZ7QBaLUAZbIAYbAqhsgAYLAAYbAnhsgBZbIAYLBKm84Jd74AY7EBYrEticisz+c1jcwAYbABZLFho9IAYLAId70BY7EohsdmqdUzi8s0jMsAY7G00+o1jswCZLIBbrcxi8zk7/fW5/Q/k8swjcgCc7sBYrEBY7EBYrESe8EKeb8Hdr0Hb7g0jMsSfMEBYrEBZLLc6vWHut0Gdr0BZbIwisoBYrAtiMrK4PAlgsMCZ7QyisoDdbwBdLszjMsxi8rR5PLB2+2cxuOOvd9ans9LlcscgcMmhMY0jMsBaLQzi8sBa7YzjMwKer8Dc7sigsWjy+UCabUXfsIAcbo0jMs0jcwAbrg0jcwFdb3F3e6Bt9w5isUFd70UfcIhgsX+/v4dgMQyi8ozi8uUwuKZw+GAs9oth8T+/v4Bcrr///8agMMkg8X///99stkFdr0Abrg0jMz+/v4fgcX+/v7////+/v7w9vqXwuEhfr8de70Abbcqhcf+/v7+/v7+/v7+/v7////+/v7+/v4bf8L+/v7+/v7+/v7+/v6exuT///8AYbAkPmkCarUCaLQEZLEDZrMDZbIAcLkBa7YAcroAc7sRfMEOe8ABbbcDYrEBb7gwickJeb8AdLwWfsIyisoGeL41js0Bdr0CZ7QDZ7MdgcQcgMMaf8MqhschgsUohccyicomhMYjg8UfgcU0jcwuh8gzjMsLer8Ed70TfcEBbLYCbbclhMYBbrgUfsIYf8Msh8gshscyi8swh8g3jcz+/v4vh8j9/f4Mer8khMb5+/01THQnQGstRW/v8/hurNf4+fvp8vmCkKlvf5zz9/vX2+NzsNni5etZo9NSoNE9VHp0hKBGW4DQ1d+kr8GdqLwaeLyIlq1pe5jp6/DEytaXo7d8i6XKz9q4wM4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LiAkB3PlsxuM/22/ZkQvJxL349GngejosgqXmQjIREVOfFrdFEF1KLiQW9z6D+DRZO06dBi3MhWQicgAnHup4AqnTfeY20BeRpXV8+NywuecXToJMciG+sCC68d1zyeMtKXV2ElywBfjCoYS0gcMe/zzyuCUxf3QSDf4yfAl+8F2EjwRRcq9z+rtOMA3XpmdrLyD5xYQsCKHQ0ZBQKCQIckL0SwH3xvomxjwAAAAAAAAAAAAAAAAAAAAAAAAAAPjLHhwIAAAAAAD5vzaCqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqrSHhwSAAAAAAj6/9obBgAAAAAAAAAAAAAAAAAAAAAAANgLcyVNZ3a0jhwAAAAASUVORK5CYII=\";\r\n private messageId: number;\r\n\r\n constructor(\r\n private messageService: MessageService,\r\n private bypassSecurityTrust: BypassSecurityTrustResourceUrlPipe,\r\n private route: ActivatedRoute,\r\n private sanitizer: DomSanitizer) {\r\n }\r\n\r\n ngOnInit() {\r\n this.route.params.subscribe(x => {\r\n this.messageId = x.id;\r\n this.load();\r\n });\r\n document.getElementById(\"main\").classList.add(\"messages-details\");\r\n }\r\n\r\n ngOnDestroy() {\r\n document.getElementById(\"main\").classList.remove(\"messages-details\");\r\n }\r\n\r\n public ToggleTooltip(type: MessagesTooltipType, index: number, index2?: number) {\r\n if (type === MessagesTooltipType.Author) {\r\n this.AuthorVisible[index] = !this.AuthorVisible[index];\r\n } else {\r\n this.RecipientVisible[index2][index] = !this.RecipientVisible[index2][index];\r\n }\r\n }\r\n\r\n public ViewAttachment(e: any, item: any): void {\r\n e.preventDefault();\r\n const mimeType = this.getMimeType(item);\r\n this.messageService.DownloadDocument(item.FileGUID).subscribe((response) => {\r\n const fileURL = URL.createObjectURL(new Blob([response.body], { type: mimeType }));\r\n const newTab = window.open(fileURL, \"_blank\");\r\n newTab.onload = () => newTab.document.title = item.DisplayName;\r\n });\r\n }\r\n\r\n public DownloadAttachment(e: any, item: any): void {\r\n e.preventDefault();\r\n this.messageService.DownloadDocument(item.FileGUID).subscribe((response) => {\r\n const downloadLink = document.createElement(\"a\");\r\n downloadLink.href = URL.createObjectURL(new Blob([response.body], { type: response.type }));\r\n downloadLink.setAttribute(\"download\", item.DisplayName);\r\n document.body.appendChild(downloadLink);\r\n downloadLink.click();\r\n downloadLink.remove();\r\n });\r\n }\r\n\r\n private getMimeType(item: any): string {\r\n const filetype = item.DisplayName.split(\".\").pop();\r\n switch (filetype.toLowerCase()) {\r\n case \"png\":\r\n return \"image/png\";\r\n case \"jpeg\":\r\n return \"image/jpeg\";\r\n case \"jpg\":\r\n return \"image/jpg\";\r\n case \"gif\":\r\n return \"image/gif\";\r\n case \"bmp\":\r\n return \"image/bmp\";\r\n case \"pdf\":\r\n return \"application/pdf\";\r\n case \"txt\":\r\n return \"text/plain\";\r\n }\r\n }\r\n\r\n public ShowNewMessage(index: number, messageId: number, type: MessageTypes, editDraft: boolean) {\r\n this.ConversationData.show = [];\r\n this.ConversationData.show[index] = true;\r\n this.messageService.SetNewMessageParameters(messageId, type, editDraft);\r\n this.MessageType = type;\r\n this.MessageIndex = index;\r\n this.messageId = messageId;\r\n }\r\n\r\n public GetDocumentLink(message: MessageDetailsModel): string {\r\n switch (message.DocTypeID) {\r\n case MessageDocTypeIds.Job:\r\n return `#/jobs/job/${message.DocumentID}`;\r\n case MessageDocTypeIds.Customer:\r\n return `#/customers/customer/${message.DocumentID}`;\r\n case MessageDocTypeIds.Contact:\r\n return `#/contacts/contact/${message.DocumentID}`;\r\n case MessageDocTypeIds.Reminders:\r\n return `#/tasks/task/${message.DocumentID}`;\r\n case MessageDocTypeIds.Quotes:\r\n return `#/quotes/details/${message.DocumentID}/${message.SupDocID}`;\r\n case MessageDocTypeIds.Equip:\r\n return `#/equipment/detail/${message.DocumentID}`;\r\n case MessageDocTypeIds.ServiceContract:\r\n return `#/contracts/detail/${message.DocumentID}`;\r\n case MessageDocTypeIds.Stock:\r\n return `#/stock/detail/${message.DocumentID}`;\r\n case MessageDocTypeIds.PurchaseOrder:\r\n return `#/purchase-orders/detail/${message.DocumentID}`;\r\n case MessageDocTypeIds.GoodsReceived:\r\n return `#/goods-received/detail/${message.DocumentID}`;\r\n case MessageDocTypeIds.StockAdjustment:\r\n return `#/stock/adjustment/${message.DocumentID}`;\r\n case MessageDocTypeIds.Credit:\r\n return `#/credit-notes/credit-note/${message.DocumentID}`;\r\n case MessageDocTypeIds.SalesOrder:\r\n return `#/sales-orders/detail/${message.DocumentID}`;\r\n case MessageDocTypeIds.DespatchNote:\r\n return `#/despatch-notes/detail/${message.DocumentID}`;\r\n case MessageDocTypeIds.SalesOpportunity:\r\n return `#/sales-opportunities/detail/${message.DocumentID}`;\r\n case MessageDocTypeIds.Batch:\r\n return \"#/invoices/batch-list\";\r\n case MessageDocTypeIds.ReturnsNote:\r\n return `#/returns/detail/${message.DocumentID}`;\r\n case MessageDocTypeIds.Cylinder:\r\n return `#/f-gas/cylinders/detail/${message.DocumentID}`;\r\n case MessageDocTypeIds.FGasLog:\r\n return `#/f-gas/log/${message.DocumentID}`;\r\n case MessageDocTypeIds.PurchaseNote:\r\n return `#/purchase-notes/detail/${message.DocumentID}`;\r\n case MessageDocTypeIds.Invoice:\r\n return `#/invoices/invoice/${message.DocumentID}`;\r\n }\r\n }\r\n\r\n public GetDocumentLabel(message: MessageDetailsModel): string {\r\n let documentLabel: string;\r\n if (message.DocTypeID === DocumentTypeEnum.PurchaseNote) {\r\n documentLabel = message.Reference;\r\n } else {\r\n documentLabel = this.getDocumentLabelFromDocumentType(message);\r\n }\r\n\r\n return documentLabel;\r\n }\r\n\r\n public ShowMessage(event: any) {\r\n this.messageId = event;\r\n this.messageService.GetConversationDetail(this.messageId).subscribe(x => {\r\n this.ConversationData = x;\r\n if (this.ConversationData.ModelCollection[0].Subject) {\r\n this.MessageSubject = this.ConversationData.ModelCollection[0].Subject;\r\n }\r\n this.handleAttachements();\r\n this.initRecipientVisible(this.ConversationData.ModelCollection.length);\r\n });\r\n this.messageService.SetNewMessageParameters(null, MessageTypes.ClearForm, false);\r\n this.MessageIndex = null;\r\n }\r\n\r\n public disableForm() {\r\n this.MessageIndex = null;\r\n this.MessageType = null;\r\n }\r\n\r\n private getDocumentLabelFromDocumentType(message: MessageDetailsModel): string {\r\n let documentLabel = message.DocumentType;\r\n\r\n if (message.DocTypeID !== DocumentTypeEnum.SalesInvoice) {\r\n const documentTypesWithHiddenId = [\r\n DocumentTypeEnum.Equipment,\r\n DocumentTypeEnum.Stock,\r\n DocumentTypeEnum.Credit,\r\n DocumentTypeEnum.Batch,\r\n DocumentTypeEnum.Cylinder,\r\n DocumentTypeEnum.FGasLog,\r\n DocumentTypeEnum.PurchaseNote\r\n ];\r\n\r\n if (!documentTypesWithHiddenId.includes(message.DocTypeID)) {\r\n documentLabel += ` ${message.DocumentID}`;\r\n }\r\n\r\n const documentTypesWithVisibleSupId = [DocumentTypeEnum.Quote];\r\n if (documentTypesWithVisibleSupId.includes(message.DocTypeID)) {\r\n documentLabel += `/${message.DocumentID}`;\r\n }\r\n }\r\n\r\n return documentLabel;\r\n }\r\n\r\n private load() {\r\n const messageParameters = this.messageService.GetNewMessageParameters();\r\n this.messageService.GetConversationDetail(this.messageId).subscribe(conversationDetails => {\r\n this.ConversationData = conversationDetails;\r\n this.MessageSubject = this.ConversationData.ModelCollection[0].Subject;\r\n this.handleAttachements();\r\n this.initRecipientVisible(this.ConversationData.ModelCollection.length);\r\n\r\n if (messageParameters.type === MessageTypes.ReplyFromNotification) {\r\n this.MessageType = MessageTypes.Reply;\r\n this.MessageIndex = 0;\r\n this.messageService.SetNewMessageParameters(messageParameters.id, this.MessageType, false);\r\n this.ShowNewMessage(this.MessageIndex, messageParameters.id, this.MessageType, false);\r\n }\r\n });\r\n }\r\n\r\n private handleAttachements() {\r\n this.ConversationData.ModelCollection = this.ConversationData.ModelCollection.map((message) => {\r\n if (message.AttachmentCount > 0) {\r\n message.AttachmentsArray = [];\r\n const splitted = message.Attachments.split(\";\");\r\n for (let i = 0; i < splitted.length; i += 2) {\r\n if (splitted[i]) {\r\n const isViewButtonVisible = (this.FileFormatsForViewing.indexOf(splitted[i].split(\".\")[1].toLowerCase()) >= 0);\r\n message.AttachmentsArray.push({\r\n DisplayName: splitted[i],\r\n FileGUID: splitted[i + 1],\r\n IsViewable: isViewButtonVisible\r\n });\r\n }\r\n }\r\n }\r\n\r\n if (message.Body) {\r\n message.Body = this.sanitizer.bypassSecurityTrustHtml(message.Body);\r\n }\r\n\r\n message.RecepientsArray = [];\r\n if (message.Recepients) {\r\n this.parseRecipients(message.Recepients, message);\r\n } else {\r\n this.messageService.GetRecipientListPhotoFaces(message.MessageID).subscribe(x => this.parseRecipients(x, message));\r\n }\r\n\r\n return message;\r\n });\r\n }\r\n\r\n private parseRecipients(input, message) {\r\n if (input) {\r\n const splitted = input.split(\";\");\r\n for (let i = 0; i < splitted.length; i += 2) {\r\n if (splitted[i] !== \"\") {\r\n message.RecepientsArray.push({\r\n Employee: splitted[i],\r\n Source: this.bypassSecurityTrust.transform(splitted[i + 1])\r\n });\r\n }\r\n }\r\n }\r\n }\r\n\r\n private initRecipientVisible(arrayLength: number) {\r\n for (let i = 0; i < arrayLength; i++) {\r\n this.RecipientVisible[i] = [false];\r\n }\r\n }\r\n}\r\n","import { NgModule } from \"@angular/core\";\r\nimport { Routes, RouterModule } from \"@angular/router\";\r\nimport { MessageListComponent } from \"./components/message-list/message-list.component\";\r\nimport { NewMessagesComponent } from \"./components/new-messages/new-messages.component\";\r\nimport { MessagesComponent } from \"./components/messages/messages.component\";\r\nimport { CanDeactivateGuard } from \"servicesight-shared\";\r\n\r\nconst routes: Routes = [{\r\n path: \"list\",\r\n component: MessageListComponent,\r\n}, {\r\n path: \"newmessage\",\r\n component: NewMessagesComponent,\r\n canDeactivate: [CanDeactivateGuard]\r\n}, {\r\n path: \"message/:id\",\r\n component: MessagesComponent,\r\n runGuardsAndResolvers: \"always\"\r\n}, {\r\n path: \"\",\r\n redirectTo: \"list\",\r\n pathMatch: \"full\"\r\n}];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class MessagesRoutingModule {\r\n public static Routes: Routes = routes;\r\n}\r\n","import { Observable } from \"rxjs\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { APP_CONFIG, ProteanResponse } from \"servicesight-shared\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { ChangePasswordModel } from \"../../models/change-password.model\";\r\nimport { WebAppConfig } from \"../../models/web-app-config.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class AccountService {\r\n\r\n constructor(\r\n @Inject(APP_CONFIG) protected config: WebAppConfig,\r\n private http: HttpClient) { }\r\n\r\n public GetChangePasswordCode(): Observable {\r\n return this.http.get(`${this.config.apiLocations.GateKeeper}Account/ChangePassword`);\r\n }\r\n\r\n public ChangePassword(model: ChangePasswordModel): Observable {\r\n return this.http.post(`${this.config.apiLocations.GateKeeper}Account/ChangePassword`, model);\r\n }\r\n}\r\n","import { Directive, Input } from \"@angular/core\";\r\nimport { NG_VALIDATORS, Validator, ValidationErrors, UntypedFormGroup } from \"@angular/forms\";\r\n\r\n@Directive({\r\n selector: \"[appMatchPassword]\",\r\n providers: [{ provide: NG_VALIDATORS, useExisting: FieldsMatchDirective, multi: true }]\r\n})\r\nexport class FieldsMatchDirective implements Validator{\r\n @Input() appMatchPassword: string[] = [];\r\n\r\n public validate(formGroup: UntypedFormGroup): ValidationErrors {\r\n return this.FieldsMatch(this.appMatchPassword[0], this.appMatchPassword[1])(formGroup);\r\n }\r\n\r\n private FieldsMatch(controlName: string, matchingControlName: string) {\r\n return (formGroup: UntypedFormGroup) => {\r\n const control = formGroup.controls[controlName];\r\n const matchingControl = formGroup.controls[matchingControlName];\r\n\r\n if (!control || !matchingControl) {\r\n return null;\r\n }\r\n\r\n if (matchingControl.errors && !matchingControl.errors.mustMatch) {\r\n return null;\r\n }\r\n\r\n if (control.value !== matchingControl.value) {\r\n matchingControl.setErrors({ notmatch: true });\r\n } else {\r\n matchingControl.setErrors(null);\r\n }\r\n };\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n","import { NgForm } from \"@angular/forms\";\r\nimport { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { AccountService } from \"src/app/shared/services/account/account.service\";\r\nimport { ChangePasswordModel } from \"./../../../shared/models/change-password.model\";\r\nimport { FormMesssageService, ProteanResponse } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-change-password\",\r\n templateUrl: \"./change-password.component.html\",\r\n styleUrls: [\"./change-password.component.scss\"]\r\n})\r\nexport class ChangePasswordComponent implements OnInit {\r\n @ViewChild(\"form\", { static: true }) form: NgForm;\r\n public readonly formName: string = \"form\";\r\n public newPassword: ChangePasswordModel = {\r\n Password: \"\",\r\n ConfirmPassword: \"\",\r\n Code: \"\"\r\n };\r\n\r\n constructor(\r\n private accountService: AccountService,\r\n private formMessageService: FormMesssageService) { }\r\n\r\n public ngOnInit(): void {\r\n this.Load();\r\n }\r\n\r\n public Save(): void {\r\n this.formMessageService.RegisterObservable(this.accountService.ChangePassword(this.newPassword), this.formName)\r\n .subscribe(() => {\r\n this.Load();\r\n });\r\n }\r\n\r\n public Discard(): void {\r\n this.newPassword.Password = \"\";\r\n this.newPassword.ConfirmPassword = \"\";\r\n this.form.form.markAsPristine();\r\n }\r\n\r\n private Load(): void {\r\n this.Discard();\r\n this.accountService.GetChangePasswordCode().subscribe(code => {\r\n this.newPassword.Code = code;\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n

{{ 'my-settings.compact-list-views' | translate }}

\r\n \r\n \r\n
\r\n
\r\n
","import { Component } from \"@angular/core\";\r\n\r\n@Component({\r\n selector: \"app-layout-options\",\r\n templateUrl: \"./layout-options.component.html\",\r\n styleUrls: [\"./layout-options.component.scss\"]\r\n})\r\nexport class LayoutOptionsComponent {\r\n public compactListsEnabled: boolean = localStorage.getItem(\"compact-lists-enabled\") !== null;\r\n\r\n public ToggleCompactLists(): void {\r\n this.compactListsEnabled = !this.compactListsEnabled;\r\n if (this.compactListsEnabled) {\r\n localStorage.setItem(\"compact-lists-enabled\", \"true\");\r\n document.getElementById(\"main\").classList.add(\"compact-lists\");\r\n } else {\r\n localStorage.removeItem(\"compact-lists-enabled\");\r\n document.getElementById(\"main\").classList.remove(\"compact-lists\");\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n \"Office\r\n
\r\n
\r\n
\r\n
\r\n

Linked: {{ IsLinked ? \"Yes\" : \"No\" }}

\r\n

Office account: {{ status.Name }}

\r\n

Office email: {{ status.Email }}

\r\n
\r\n \r\n \r\n
\r\n
\r\n
","import { HttpClient } from \"@angular/common/http\";\r\nimport { Component, Inject, OnInit } from \"@angular/core\";\r\nimport { ActivatedRoute } from \"@angular/router\";\r\nimport { Observable } from \"rxjs\";\r\nimport { map } from \"rxjs/operators\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-outlook-integration\",\r\n templateUrl: \"./outlook-integration.component.html\",\r\n styleUrls: [\"./outlook-integration.component.scss\"]\r\n})\r\nexport class OutlookIntegrationComponent implements OnInit {\r\n\r\n public success: boolean = null;\r\n public status: { Linked: boolean; Name: string; Email: string } = null;\r\n\r\n public get IsLinked(): boolean {\r\n return this.status && this.status.Linked === true;\r\n }\r\n\r\n constructor(\r\n private route: ActivatedRoute,\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) { }\r\n\r\n public ngOnInit(): void {\r\n this.route.queryParams.subscribe((params: any) => {\r\n const code = params.code;\r\n\r\n if (code) {\r\n this.SetupLink(code).subscribe(success => {\r\n if (success) {\r\n this.GetLinkStatus().subscribe(status => {\r\n this.status = status;\r\n });\r\n } else {\r\n // todo - handle error\r\n }\r\n });\r\n } else {\r\n this.GetLinkStatus().subscribe(status => {\r\n this.status = status;\r\n });\r\n }\r\n });\r\n }\r\n\r\n public RemoveLink(): void {\r\n const baseUrl = this.appConfig.apiLocations.ServiceSight;\r\n\r\n this.http.get(`${baseUrl}AccountsLink/Disconnect?appId=outlook`, { observe: \"response\" }).pipe(map(response => {\r\n return response.status === 200;\r\n })).subscribe();\r\n }\r\n\r\n public Link(): void {\r\n const clientId = \"ffce5335-3e04-45e5-bf31-4fdbdd5e4ddc\";\r\n const tenant = \"organizations\";\r\n const redirectUrl = encodeURI(\"https://dev2.servicesight.com/AccountsLink/Outlook\");\r\n const scope = encodeURI(\"https://graph.microsoft.com/Calendars.ReadWrite https://graph.microsoft.com/User.Read openid email profile offline_access\");\r\n\r\n let href = `https://login.microsoftonline.com/${tenant}/oauth2/v2.0/authorize`;\r\n href += `?client_id=${clientId}`;\r\n href += \"&response_type=code\";\r\n href += `&redirect_uri=${redirectUrl}`;\r\n href += \"&response_mode=query\";\r\n href += `&scope=${scope}`;\r\n href += \"&state=12345\";\r\n\r\n window.location.href = href;\r\n }\r\n\r\n /* @todo - this is bad practice, move to service */\r\n private SetupLink(code: string): Observable {\r\n const baseUrl = this.appConfig.apiLocations.ServiceSight;\r\n\r\n return this.http.post(`${baseUrl}AccountsLink/ConsumeAccessToken`, { code, appId: \"outlook\" }, { observe: \"response\" }).pipe(map(response => {\r\n return response.status === 204;\r\n }));\r\n }\r\n\r\n /* @todo - this is bad practice, move to service & don't use any */\r\n private GetLinkStatus(): Observable<{ Linked: boolean; Name: string; Email: string }> {\r\n const baseUrl = this.appConfig.apiLocations.ServiceSight;\r\n\r\n return this.http.get<{ Linked: boolean; Name: string; Email: string }>(`${baseUrl}AccountsLink/GetOfficeLinkStatus`);\r\n }\r\n\r\n}\r\n","\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ item.Title | translate }}
\r\n
\r\n
\r\n
\r\n {{ item.Title | translate }}\r\n
\r\n
\r\n","import { Component, EventEmitter, Input, Output, ViewChild } from \"@angular/core\";\r\nimport { DxAccordionComponent } from \"devextreme-angular\";\r\nimport { SidebarMenuModel } from \"./../../models/sidebar-menu.model\";\r\nimport { SidebarMenuItemModel } from \"../../models/sidebar-menu-item.model\";\r\n\r\n@Component({\r\n selector: \"app-sidebar-menu\",\r\n templateUrl: \"./sidebar-menu.component.html\",\r\n styleUrls: [\"./sidebar-menu.component.scss\"]\r\n})\r\nexport class SidebarMenuComponent {\r\n @Input() menu: SidebarMenuModel[];\r\n @Output() selectedItem: EventEmitter = new EventEmitter();\r\n @ViewChild(\"sidebar\") sidebar: DxAccordionComponent;\r\n\r\n public Select(item: SidebarMenuItemModel): void {\r\n this.selectedItem.emit(item);\r\n }\r\n}\r\n","import { Component } from \"@angular/core\";\r\nimport { SidebarMenuModel } from \"./../shared/models/sidebar-menu.model\";\r\nimport { SidebarMenuItemModel } from \"../shared/models/sidebar-menu-item.model\";\r\n\r\n@Component({\r\n selector: \"app-my-settings\",\r\n templateUrl: \"./my-settings.component.html\",\r\n styleUrls: [\"./my-settings.component.scss\"]\r\n})\r\nexport class MySettingsComponent {\r\n public title: string;\r\n public menu: SidebarMenuModel[] = [\r\n {\r\n Title: \"my-settings.sidebar.user-options\",\r\n Icon: \"general\",\r\n Rows: [\r\n {\r\n Title: \"my-settings.sidebar.layout-options\",\r\n Link: \"layout-options\"\r\n },\r\n {\r\n Title: \"my-settings.sidebar.outlook-integration\",\r\n Link: \"outlook-integration\",\r\n get Enabled() { return (window as any).betaOutlook === true; }\r\n }\r\n ]\r\n },\r\n {\r\n Title: \"my-settings.sidebar.security\",\r\n Icon: \"security\",\r\n Rows: [\r\n {\r\n Title: \"my-settings.sidebar.change-password\",\r\n Link: \"change-password\"\r\n },\r\n {\r\n Title: \"my-settings.sidebar.two-factor-authentication\",\r\n Link: \"two-factor-authentication\"\r\n }\r\n ]\r\n },\r\n {\r\n Title: \"my-settings.sidebar.support\",\r\n Icon: \"user-headset\",\r\n Rows: [\r\n {\r\n Title: \"my-settings.sidebar.support-code\",\r\n Link: \"support-code\"\r\n }\r\n ]\r\n }\r\n ];\r\n\r\n public SetTitle(item: SidebarMenuItemModel): void {\r\n this.title = item.Title;\r\n }\r\n}\r\n","
\r\n
\r\n

{{\"my-settings.header\" | translate }}

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

{{ (title ? title : \"my-settings.select-user-settings\") | translate }}

\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { Observable } from \"rxjs\";\r\nimport { SupportCodeModel } from \"../models/support-code-model\";\r\nimport { APP_CONFIG } from \"servicesight-shared\";\r\nimport { WebAppConfig } from \"src/app/shared/models/web-app-config.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class SupportCodeService {\r\n private readonly baseUrl: string;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) appConfig: WebAppConfig) {\r\n this.baseUrl = appConfig.apiLocations.GateKeeper;\r\n }\r\n\r\n GetSupportCode(): Observable {\r\n return this.http.get(this.baseUrl + \"SupportCode/GetSupportCode\");\r\n }\r\n\r\n GenerateSupportCode(): Observable {\r\n return this.http.post(this.baseUrl + \"SupportCode/GenerateSupportCode\", null);\r\n }\r\n\r\n RevokeSupportAccess(): Observable {\r\n return this.http.delete(this.baseUrl + \"SupportCode/RevokeSupportAccess\");\r\n }\r\n}\r\n","export class SupportCodeModel {\r\n public SupportCode: string;\r\n public ExpiryDate: Date;\r\n}\r\n","
\r\n
\r\n
\r\n

{{ 'label.settings.support-code' | translate }}

\r\n \r\n {{ 'label.settings.support-code.enabled' | translate }} {{supportCodeModel.ExpiryDate | date: 'shortTime'}} - {{supportCodeModel.ExpiryDate | date: 'dd/MM/yyyy'}}\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { SupportCodeService } from \"../services/support-code.service\";\r\nimport { SupportCodeModel } from \"../models/support-code-model\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { FormMesssageService } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-support-code\",\r\n templateUrl: \"./support-code.component.html\",\r\n styleUrls: [\"./support-code.component.scss\"]\r\n})\r\nexport class SupportCodeComponent implements OnInit {\r\n @ViewChild(\"supportCodeform\", { static: true }) form: NgForm;\r\n public readonly formName: string = \"supportCodeform\";\r\n\r\n public supportCodeModel: SupportCodeModel = new SupportCodeModel();\r\n public isLoading = false;\r\n\r\n constructor(\r\n private supportCodeService: SupportCodeService,\r\n private formMessagesService: FormMesssageService) { }\r\n\r\n public ngOnInit(): void {\r\n this.isLoading = true;\r\n this.supportCodeService.GetSupportCode().subscribe(result => {\r\n if (result) {\r\n this.supportCodeModel = result;\r\n }\r\n this.isLoading = false;\r\n }, () => this.isLoading = false);\r\n }\r\n\r\n public GenerateSupportCode(): void {\r\n this.isLoading = true;\r\n this.formMessagesService.RegisterObservable(this.supportCodeService.GenerateSupportCode(), this.formName)\r\n .subscribe((result) => {\r\n if (result) {\r\n this.supportCodeModel = result;\r\n }\r\n this.isLoading = false;\r\n }, () => this.isLoading = false);\r\n }\r\n\r\n public RevokeSupportAccess(): void {\r\n this.isLoading = true;\r\n this.formMessagesService.RegisterObservable(this.supportCodeService.RevokeSupportAccess(), this.formName)\r\n .subscribe(() => {\r\n this.supportCodeModel.SupportCode = null;\r\n this.supportCodeModel.ExpiryDate = null;\r\n this.isLoading = false;\r\n }, () => this.isLoading = false);\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { APP_CONFIG } from \"servicesight-shared\";\r\nimport { GoogleSetupCode } from \"../models/google-setup-code.model\";\r\nimport { WebAppConfig } from \"src/app/shared/models/web-app-config.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class TwoFactorAuthenticationService {\r\n\r\n private readonly baseUrl: string;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) appConfig: WebAppConfig) {\r\n this.baseUrl = appConfig.apiLocations.GateKeeper;\r\n }\r\n\r\n public GoogleAuthenticatorEnabled(): Observable {\r\n return this.http.get(this.baseUrl + \"Account/GoogleAuthenticatorEnabled\");\r\n }\r\n\r\n public GoogleAuthenticatorSetup(): Observable {\r\n return this.http.get(this.baseUrl + \"Account/GoogleAuthenticatorSetup\");\r\n }\r\n\r\n public GoogleAuthenticatorCompleteSetup(twoFactorCode: string): Observable {\r\n return this.http.post(this.baseUrl + \"Account/GoogleAuthenticatorSetup\", {\r\n TwoFactorCode: twoFactorCode\r\n });\r\n }\r\n\r\n public GoogleAuthenticatorDisable(): Observable {\r\n return this.http.get(this.baseUrl + \"Account/GoogleAuthenticatorDisable\");\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n

Two factor authentication is currently enabled

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

Scan the QR code in your app

\r\n \r\n

Manual entry

\r\n

{{ setupCode.ManualEntryKey }}

\r\n
\r\n Auth code\r\n \r\n
\r\n \r\n \r\n
\r\n\r\n","import { Component, OnInit } from \"@angular/core\";\r\nimport { DomSanitizer, SafeUrl } from \"@angular/platform-browser\";\r\nimport { GoogleSetupCode } from \"../models/google-setup-code.model\";\r\nimport { TwoFactorAuthenticationService } from \"../services/two-factor-authentication.service\";\r\n\r\n@Component({\r\n selector: \"app-two-factor-authentication\",\r\n templateUrl: \"./two-factor-authentication.component.html\",\r\n styleUrls: [\"./two-factor-authentication.component.scss\"]\r\n})\r\nexport class TwoFactorAuthenticationComponent implements OnInit {\r\n\r\n public twoFactorEnabled: boolean = false;\r\n public setupVisible: boolean = false;\r\n public setupCode: GoogleSetupCode = null;\r\n public twoFactorCode: string = null;\r\n\r\n public get qrImage(): SafeUrl {\r\n if (this.setupCode == null) {\r\n return null;\r\n }\r\n\r\n return this.sanitizer.bypassSecurityTrustUrl(this.setupCode.QrCodeSetupImageUrl);\r\n }\r\n\r\n constructor(\r\n private twoFactorAuthenticationService: TwoFactorAuthenticationService,\r\n private sanitizer: DomSanitizer\r\n ) { }\r\n\r\n public ngOnInit(): void {\r\n this.twoFactorAuthenticationService.GoogleAuthenticatorEnabled().subscribe(enabled => {\r\n this.twoFactorEnabled = enabled;\r\n });\r\n }\r\n\r\n public Setup(): void {\r\n this.twoFactorAuthenticationService.GoogleAuthenticatorSetup().subscribe(setupCode => {\r\n this.setupCode = setupCode;\r\n this.setupVisible = true;\r\n });\r\n }\r\n\r\n public CompleteSetup(): void {\r\n this.twoFactorAuthenticationService.GoogleAuthenticatorCompleteSetup(this.twoFactorCode).subscribe(enabled => {\r\n this.twoFactorCode = null;\r\n this.setupCode = null;\r\n this.setupVisible = false;\r\n this.twoFactorEnabled = enabled;\r\n });\r\n this.setupVisible = false;\r\n }\r\n\r\n public Remove(): void {\r\n this.twoFactorAuthenticationService.GoogleAuthenticatorDisable().subscribe(disabled => {\r\n this.twoFactorCode = null;\r\n this.setupCode = null;\r\n this.setupVisible = false;\r\n this.twoFactorEnabled = !disabled;\r\n });\r\n }\r\n}\r\n","import { NgModule } from \"@angular/core\";\r\nimport { RouterModule, Routes } from \"@angular/router\";\r\nimport { ChangePasswordComponent } from \"./components/change-password/change-password.component\";\r\nimport { LayoutOptionsComponent } from \"./components/layout-options/layout-options.component\";\r\nimport { OutlookIntegrationComponent } from \"./components/outlook-integration/outlook-integration.component\";\r\nimport { MySettingsComponent } from \"./my-settings.component\";\r\nimport { SupportCodeComponent } from \"../settings/support-code/support-code.component\";\r\nimport { TwoFactorAuthenticationComponent } from \"../settings/two-factor-authentication/two-factor-authentication.component\";\r\n\r\nconst routes: Routes = [\r\n { path: \"\", component: MySettingsComponent,\r\n children: [\r\n { path: \"change-password\", component: ChangePasswordComponent },\r\n { path: \"two-factor-authentication\", component: TwoFactorAuthenticationComponent },\r\n { path: \"layout-options\", component: LayoutOptionsComponent },\r\n { path: \"support-code\", component: SupportCodeComponent },\r\n { path: \"outlook-integration\", component: OutlookIntegrationComponent },\r\n ]\r\n },\r\n { path: \"**\", redirectTo: \"\" }\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\n\r\nexport class MySettingsRoutingModule {\r\n public static readonly Routes: Routes = routes;\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { UrlHandlingStrategy } from \"@angular/router\";\r\n\r\n@Injectable()\r\nexport class Ng1Ng2UrlHandlingStrategy implements UrlHandlingStrategy {\r\n shouldProcessUrl(url) {\r\n const urlString = url.toString();\r\n return urlString.startsWith(\"/inspections\") ||\r\n urlString.startsWith(\"/sign-in\") ||\r\n urlString.startsWith(\"/helpdesk\") ||\r\n urlString.startsWith(\"/surveys\") ||\r\n urlString.startsWith(\"/quotes\") ||\r\n urlString.startsWith(\"/stock\") ||\r\n urlString.startsWith(\"/f-gas\") ||\r\n urlString.startsWith(\"/portal\") ||\r\n urlString.startsWith(\"/equipment\") ||\r\n urlString.startsWith(\"/jobs\") ||\r\n urlString.startsWith(\"/messages\") ||\r\n urlString.startsWith(\"/mysettings\") ||\r\n urlString.startsWith(\"/contracts\") ||\r\n urlString.startsWith(\"/suppliers\") ||\r\n urlString.startsWith(\"/purchase-orders\") ||\r\n urlString.startsWith(\"/goods-received\") ||\r\n urlString.startsWith(\"/planner/\") ||\r\n urlString.startsWith(\"/credit-notes\") ||\r\n urlString.startsWith(\"/invoices\") ||\r\n urlString.startsWith(\"/insights\") ||\r\n urlString.startsWith(\"/sales-orders\") ||\r\n urlString.startsWith(\"/despatch-notes\") ||\r\n urlString.startsWith(\"/sales-opportunities\") ||\r\n urlString.startsWith(\"/sales-campaigns\") ||\r\n urlString.startsWith(\"/returns\") ||\r\n urlString.startsWith(\"/purchase-notes\") ||\r\n urlString.startsWith(\"/customers\") ||\r\n urlString.startsWith(\"/tasks\");\r\n }\r\n extract(url) {\r\n return url;\r\n }\r\n merge(url) {\r\n return url;\r\n }\r\n}\r\n","export class MapPins {\r\n /* eslint-disable max-len */\r\n public static readonly homeMarker: string = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAoCAYAAABTsMJyAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAABUQAAAVEBKaLAYAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAL+SURBVGiB7dlNqFVVFAfw3/Oj99I+/CIVrCAi/MqMcOAgnObICAdFo4JGQY+c2NBhE0nBgQqJCkVBJA5EitQkfdZAKSjCsHqhIujAxFRMfbfBvpv2PZ579vW9e967yvvDnwNnr7X2+nPPWvvjUh+m4T38jGvN57vN91XYhUYJhzG7plwrMQ9H2yR1BHMrfP9s49fAqvpSLsdzOF2RUAO/Y1kb/54R8wr+rkgm5VWsK4nRE2IGcbsikTKOYFMhzoSKeUj7ou2Un+LhiRbzBI5lEj2Hj5rPKrtjzXgTImZFZuIGvsfCpv0CnMjYD+PyeItZiyuZxD7z/6cT0Y/dGb8qdl3MIO5UTBiLum8MMWoXM4C9mcmu4tWC3+sYwhuF9+ua9uMupmpFTwv9pcSnT/iFRhKbrZiS2DwvX3ddFbNCKMyqSYaEAo+YiS/b2B7AY4ntPHw7HmJewz+ZCfYIhR3xFH7M+PyEpxOfThvDO6MR0YeNOiv0FKtxoYOkGriENQX/3C5iBB+qbi4t6Df6Qr/eoZDIm3irEKeT/d3nmJETshA/ZAKdxYuJTyz0exFR5FZMTWIuxx8Zn1N4sp2QF/BX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uop0OUTb6X3A7z5pnIk0/XgOvIznQa9BUqvMBxOmq0m1e95T/Syy0gq+qWnPq8Gk2gM3VY28g1QfV2rLtFXqvSIGrcRnbFOnof8APl8PzTTWQeiTRlDYJ37QisQi9jcDw9kOgMPTzWgboY+jUNpX8u/YWwRM/EZrFoNFoZkebQL6oFUoaXT92AJ0Bjs3A4aj0gQSha5Vc9qikQLgW+2Ckt4mbwLQKcWmlZCOYLUJdBWH2w3NdLkJ+FKnoKTp8eUG0Fdam0YL6SB+1kCXcKDT0EynpJf6rPSnr7D+AqBTa5lmwDTNAAAAAElFTkSuQmCC\";\r\n /* eslint-enable max-len */\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable, of } from \"rxjs\";\r\nimport { switchMap } from \"rxjs/operators\";\r\nimport { ActivityTypeModel, IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\n\r\n\r\ninterface ResponseModel {\r\n ModelCollection: ActivityTypeModel[];\r\n}\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class ActivityTypeService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private config: IAppConfig) { }\r\n\r\n public GetActivityTypes(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}ActivityType/GetAllAsync`)\r\n .pipe(switchMap(d => of(d.ModelCollection)));\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable, of } from \"rxjs\";\r\nimport { switchMap } from \"rxjs/operators\";\r\nimport { Employee, IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { EngineerActivityModel } from \"../../models/engineer-activity.model\";\r\nimport { EngineerJobSessionModel } from \"../../models/engineer-job-session.model\";\r\nimport { EngineerModel } from \"../../models/engineer.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class EngineerService {\r\n\r\n constructor(\r\n @Inject(APP_CONFIG) protected config: IAppConfig,\r\n private httpClient: HttpClient\r\n ) { }\r\n\r\n public GetEngineers(): Observable {\r\n return this.httpClient.get(`${this.config.apiLocations.ServiceSight}Engineer/GetAll`)\r\n .pipe(switchMap(d => of(d.map((e: any): EngineerModel => ({ ...e, id: e.Id})))));\r\n }\r\n\r\n public GetActivities(): Observable {\r\n return this.httpClient.get(`${this.config.apiLocations.ServiceSight}Engineer/GetActivities`);\r\n }\r\n\r\n public GetJobSessions(): Observable {\r\n return this.httpClient.get(`${this.config.apiLocations.ServiceSight}Engineer/GetJobSessions`);\r\n }\r\n\r\n public GetEmployeeIdsHavingEngineerSkillsRequiredForJob(jobId: number): Observable {\r\n const url = `${this.config.apiLocations.ServiceSight}Engineer/GetEngineerIdsHavingSkillsRequiredForJob?jobId=${jobId}`;\r\n return this.httpClient.get(url);\r\n }\r\n}\r\n","export enum AppointmentType {\r\n Job = \"Job\",\r\n Activity = \"Activity\",\r\n NewJob = \"NewJob\"\r\n}\r\n","export enum EngineerCardMode {\r\n Normal = 0,\r\n Collapse = 1,\r\n FullWidth = 3\r\n}\r\n","export enum PlannerView {\r\n PlannerList = 0,\r\n PlannerTopDown = 1,\r\n PlannerMap = 2\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { JobCat } from \"../enums/job-cat.enum\";\r\n\r\n@Pipe({\r\n name: \"jobCategory\"\r\n})\r\nexport class JobCategoryPipe implements PipeTransform {\r\n\r\n transform(value: any): string {\r\n const status = {\r\n [JobCat.Abuse]: \"job.category.abuse\",\r\n [JobCat.Callout]: \"job.category.callout\",\r\n [JobCat.Repair]: \"job.category.repair\",\r\n [JobCat.Service]: \"job.category.service\",\r\n };\r\n return status[value] || \"\";\r\n }\r\n\r\n}\r\n","export enum EmployeeActivityStatus {\r\n InProgress = 300,\r\n Finished = 700\r\n}\r\n","import { EngineerCardMode } from \"../enums/engineer-card-mode.enum\";\r\nimport { PlannerView } from \"../enums/planner-view.enum\";\r\n\r\nexport class PlannerLayout {\r\n public PlannerView: PlannerView;\r\n public SelectedCalendarView: string;\r\n public EngineerCardMode: EngineerCardMode;\r\n public DisplayJobsAsList: boolean;\r\n public SelectedRefreshInterval: string;\r\n public JobsGridLayout: any;\r\n public TopHeight: number;\r\n public BottomHeight: number;\r\n public SelectedEngineers: number[];\r\n public ShowWorkingHoursOnly: boolean;\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { EventEmitter, Inject, Injectable } from \"@angular/core\";\r\nimport CustomStore from \"devextreme/data/custom_store\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { Guid } from \"guid-typescript\";\r\nimport * as moment from \"moment\";\r\nimport { BehaviorSubject, Observable, of } from \"rxjs\";\r\nimport { map, shareReplay, take } from \"rxjs/operators\";\r\nimport {\r\n ActivityTypeModel,\r\n APP_CONFIG,\r\n GridKind,\r\n GridService,\r\n IAppConfig,\r\n IProteanResponse,\r\n SettingId,\r\n SettingsService,\r\n ToasterService,\r\n ToastType\r\n} from \"servicesight-shared\";\r\nimport { IServiceSightCollection } from \"src/app/quotes/models/IServiceSightCollection\";\r\nimport { PlannerJobSession } from \"src/app/shared/models/planner/planner-job-session.model\";\r\nimport { PublicHoliday } from \"src/app/shared/models/public-holiday.model\";\r\nimport { JobCategoryPipe } from \"src/app/shared/pipes/job-category.pipe\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\nimport { EmployeeActivityStatus } from \"../../shared/enums/employee-activity-status.enum\";\r\nimport { JobVisitStatus } from \"../../shared/enums/JobVisitStatus\";\r\nimport { EngineerActivityModel } from \"../../shared/models/engineer-activity.model\";\r\nimport { AppointmentType } from \"../enums/appointment-type.enum\";\r\nimport { EngineerCardMode } from \"../enums/engineer-card-mode.enum\";\r\nimport { PlannerView } from \"../enums/planner-view.enum\";\r\nimport { AppointmentModel } from \"../models/appointment.model\";\r\nimport { EditorActivityModel } from \"../models/editor-activity.model\";\r\nimport { EngineerVisit } from \"../models/engineer-visit.model\";\r\nimport { MapLocationData } from \"../models/map-location-data.model\";\r\nimport { PlannerEventModel } from \"../models/planner-event.model\";\r\nimport { PlannerLayout } from \"../models/planner-layout.model\";\r\nimport { TimeZoneInfo } from \"../models/time-zone-info.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\",\r\n})\r\nexport class PlannerService {\r\n public AssignJobFailed: EventEmitter = new EventEmitter();\r\n public AssignJobStarted: EventEmitter = new EventEmitter();\r\n public AssignJobSucceeded: EventEmitter = new EventEmitter();\r\n public RemoveAssignmentFailed: EventEmitter = new EventEmitter();\r\n public RemoveAssignmentStarted: EventEmitter = new EventEmitter();\r\n public RemoveAssignmentSucceeded: EventEmitter = new EventEmitter();\r\n public SaveActivityStarted: EventEmitter = new EventEmitter();\r\n public SaveActivitySucceeded: EventEmitter = new EventEmitter();\r\n public SaveActivityFailed: EventEmitter = new EventEmitter();\r\n public MapItemSelected: EventEmitter = new EventEmitter();\r\n public MustExitFullscreen: EventEmitter = new EventEmitter();\r\n public MustRepaintCalendar: EventEmitter = new EventEmitter();\r\n public MustReloadUnallocated: EventEmitter = new EventEmitter();\r\n public ViewJobWorkRequired: EventEmitter = new EventEmitter();\r\n public FilterEngineersBySkills: EventEmitter = new EventEmitter();\r\n\r\n public TopDownCalendarMode: BehaviorSubject = new BehaviorSubject(false);\r\n public SelectedEngineers: BehaviorSubject = new BehaviorSubject([]);\r\n\r\n private readonly initialAppointmentDurationHours = 2;\r\n private plannerLayout: PlannerLayout = null;\r\n private dataSource: DataSource;\r\n private currentTrackedData: any[] = [];\r\n private inProgressTransactionCount: number = 0;\r\n private adding: any[] = [];\r\n private updating: any[] = [];\r\n private deleting: any[] = [];\r\n private currentLoading: Promise;\r\n private currentPlannerLoad: Observable;\r\n\r\n constructor(\r\n @Inject(APP_CONFIG) protected config: IAppConfig,\r\n private httpClient: HttpClient,\r\n private toasterService: ToasterService,\r\n private settingsService: SettingsService,\r\n private odataService: ODataService,\r\n private gridService: GridService,\r\n private jobCategoryPipe: JobCategoryPipe\r\n ) { }\r\n\r\n public GetAppointmentsDataSource(): DataSource {\r\n if (!this.dataSource) {\r\n const odataStore = this.odataService.GetStore({\r\n url: this.config.apiLocations.ServiceSightOData + \"AppointmentOD\",\r\n key: [\"Id\", \"Type\", \"SessionId\"],\r\n keyType: {\r\n Id: \"Int32\",\r\n Type: \"String\",\r\n SessionId: \"Int32\"\r\n },\r\n beforeSend: (e) => {\r\n if (e.params.$filter) {\r\n const regex = /(')(\\d{4}-\\d{2}-\\d{2}T+\\d{2}:\\d{2}:\\d{2})(')/gm;\r\n const newParams = e.params.$filter.replace(regex, \"$2Z\");\r\n e.params.$filter = newParams;\r\n }\r\n\r\n if (e.payload) {\r\n e.payload.StartDate += \"Z\";\r\n e.payload.EndDate += \"Z\";\r\n }\r\n }\r\n });\r\n\r\n const store = new CustomStore({\r\n load: (loadOptions) => {\r\n return new Promise((resolve) => {\r\n if (this.currentLoading) {\r\n resolve(this.currentLoading);\r\n } else if (this.inProgressTransactionCount > 0) {\r\n const dataClone = JSON.parse(JSON.stringify(this.currentTrackedData));\r\n resolve(this.processPendingTransaction(dataClone));\r\n } else {\r\n this.currentLoading = odataStore.load(loadOptions).then(data => {\r\n this.currentTrackedData = data;\r\n const dataClone = JSON.parse(JSON.stringify(data));\r\n resolve(this.processPendingTransaction(dataClone));\r\n this.currentLoading = null;\r\n }).catch(() => this.ReloadAppointments());\r\n }\r\n });\r\n },\r\n byKey: (key: any) => odataStore.byKey(key),\r\n update: (key: any, values: any) => {\r\n this.inProgressTransactionCount++;\r\n odataStore.update(key, values)\r\n .then(item => {\r\n this.updating = this.updating.filter(a => !(a.Id === values.Id && a.Type === values.Type && a.SessionId === values.SessionId));\r\n const idx = this.currentTrackedData.findIndex(a => a.Id === values.Id && a.Type === values.Type && a.SessionId === values.SessionId);\r\n this.currentTrackedData[idx] = item;\r\n\r\n if (item.HasMultipleUpdates) {\r\n this.inProgressTransactionCount = 0;\r\n this.ReloadAppointments();\r\n } else {\r\n this.ReloadAppointments().then(() => this.inProgressTransactionCount--);\r\n }\r\n }, () => {\r\n this.inProgressTransactionCount--;\r\n this.toasterService.pop(\"appointment.update.failed\", ToastType.burnt);\r\n this.updating = this.updating.filter(a => !(a.Id === values.Id && a.Type === values.Type && a.SessionId === values.SessionId));\r\n this.ReloadAppointments();\r\n });\r\n values.disabled = true;\r\n\r\n if (values.StartDate.endsWith(\"Z\")) {\r\n values.StartDate = values.StartDate.replace(\"Z\", \"\");\r\n }\r\n values.StartDate = new Date(new Date(values.StartDate).getTime() + (new Date().getTimezoneOffset() * 60000 * -1)).toISOString().replace(\"Z\", \"\");\r\n\r\n if (values.EndDate.endsWith(\"Z\")) {\r\n values.EndDate = values.EndDate.replace(\"Z\", \"\");\r\n }\r\n values.EndDate = new Date(new Date(values.EndDate).getTime() + (new Date().getTimezoneOffset() * 60000 * -1)).toISOString().replace(\"Z\", \"\");\r\n\r\n this.updating.push(values);\r\n return Promise.resolve(values);\r\n },\r\n insert: (values) => {\r\n this.inProgressTransactionCount++;\r\n const clone = Object.assign({}, values);\r\n values.Id = Guid.create();\r\n values.Type = \"Pending\";\r\n values.SessionId = -1;\r\n values.disabled = true;\r\n this.adding.push(values);\r\n odataStore.insert(clone)\r\n .then(item => {\r\n this.adding = this.adding.filter(a => a.Id !== values.Id);\r\n this.currentTrackedData.push(item);\r\n this.ReloadAppointments().then(() => this.inProgressTransactionCount--);\r\n }, () => {\r\n this.inProgressTransactionCount--;\r\n this.toasterService.pop(\"appointment.add.failed\", ToastType.burnt);\r\n this.adding = this.adding.filter(a => a.Id !== values.Id);\r\n });\r\n return Promise.resolve(values);\r\n },\r\n remove: (key) => {\r\n this.inProgressTransactionCount++;\r\n this.deleting.push(key);\r\n odataStore.remove(key).then(() => {\r\n this.deleting = this.deleting.filter(a => a !== key);\r\n this.currentTrackedData = this.currentTrackedData.filter(a => a.Id !== key.Id || a.Type !== key.Type || a.SessionId !== key.SessionId);\r\n this.ReloadAppointments().then(() => this.inProgressTransactionCount--);\r\n }, (err) => {\r\n this.inProgressTransactionCount--;\r\n this.toasterService.pop(err.message, ToastType.burnt);\r\n this.deleting = this.deleting.filter(a => a !== key);\r\n this.ReloadAppointments();\r\n });\r\n return Promise.resolve();\r\n }\r\n });\r\n\r\n this.dataSource = new DataSource({\r\n store,\r\n paginate: false,\r\n });\r\n } else {\r\n this.dataSource.reload();\r\n }\r\n return this.dataSource;\r\n }\r\n\r\n public ReloadAppointments(): Promise {\r\n if (this.dataSource) {\r\n return this.dataSource.reload();\r\n }\r\n\r\n return Promise.resolve();\r\n }\r\n\r\n public GetPublicHolidays(): Observable {\r\n return this.httpClient.get>(`${this.config.apiLocations.ServiceSight}Holidays/GetAllAsync`)\r\n .pipe(map(result => result.ModelCollection.map(x => {\r\n x.HolidayDate = new Date(x.HolidayDate);\r\n return x;\r\n })));\r\n }\r\n\r\n public GetMapLocationData(): Observable {\r\n return this.httpClient.get(`${this.config.apiLocations.ServiceSight}Planner/GetPlannerMapLocations`);\r\n }\r\n\r\n public GetEngineerVisits(): Observable {\r\n const date = new Date().toISOString().substring(0, 10);\r\n return this.httpClient.get(`${this.config.apiLocations.ServiceSight}Planner/GetEngineerVisits?date=${date}`);\r\n }\r\n\r\n public GetTimeZoneInfo(): Observable {\r\n return this.httpClient.get(`${this.config.apiLocations.ServiceSight}Customer/GetCompanyDepoDateInfo`);\r\n }\r\n\r\n public GetCalendarStartTime(): Observable {\r\n return this.GetSettingDateHour(SettingId.WorkingDayStartsAt);\r\n }\r\n\r\n public GetCalendarEndTime(): Observable {\r\n return this.GetSettingDateHour(SettingId.WorkingDayEndsAt);\r\n }\r\n\r\n public SetTopDownCalendarMode(value: boolean): void {\r\n this.TopDownCalendarMode.next(value);\r\n this.SetPlannerLayoutOption({ PlannerView: value ? PlannerView.PlannerTopDown : PlannerView.PlannerList });\r\n\r\n if (value) {\r\n this.SetPlannerLayoutOption({ EngineerCardMode: EngineerCardMode.FullWidth });\r\n } else {\r\n this.SetPlannerLayoutOption({ EngineerCardMode: EngineerCardMode.Normal });\r\n }\r\n }\r\n\r\n public SetSelectedEngineers(engineerIds: number[]): void {\r\n this.SelectedEngineers.next(engineerIds);\r\n this.SetPlannerLayoutOption({ SelectedEngineers: engineerIds });\r\n }\r\n\r\n public SetPlannerRefreshInterval(value: string): void {\r\n this.SetPlannerLayoutOption({ SelectedRefreshInterval: value });\r\n }\r\n\r\n public GetJobsGridLayout(): any {\r\n if (this.plannerLayout === null) {\r\n return null;\r\n }\r\n\r\n return this.plannerLayout.JobsGridLayout;\r\n }\r\n\r\n public GetPlannerLayout(fromLocalStorage: boolean): Observable {\r\n if (this.plannerLayout) {\r\n return of(this.plannerLayout);\r\n }\r\n\r\n if (fromLocalStorage){\r\n const lsLayout = localStorage.getItem(\"ls.plannerlayout\");\r\n if (lsLayout){\r\n this.plannerLayout = JSON.parse(lsLayout);\r\n }\r\n }\r\n\r\n if (this.plannerLayout !== null) {\r\n return of(this.plannerLayout);\r\n }\r\n\r\n if (this.currentPlannerLoad) {\r\n return this.currentPlannerLoad.pipe(shareReplay());\r\n }\r\n\r\n this.currentPlannerLoad = this.gridService.GetLayout(GridKind.Plannerboard).pipe(take(1), map(layout => {\r\n this.plannerLayout = layout as PlannerLayout;\r\n if (this.plannerLayout === null) {\r\n this.plannerLayout = new PlannerLayout();\r\n }\r\n this.currentPlannerLoad = null;\r\n return this.plannerLayout;\r\n }));\r\n\r\n return this.currentPlannerLoad;\r\n }\r\n\r\n public ReloadPlannerLayout(): Observable {\r\n return this.gridService.GetLayout(GridKind.Plannerboard).pipe(take(1), map(layout => {\r\n this.plannerLayout = layout as PlannerLayout;\r\n\r\n if (this.plannerLayout === null) {\r\n this.plannerLayout = new PlannerLayout();\r\n }\r\n\r\n return this.plannerLayout;\r\n }));\r\n }\r\n\r\n public PersistCurrentLayout(): void {\r\n this.gridService.SaveLayout(this.plannerLayout, GridKind.Plannerboard);\r\n }\r\n\r\n public SetPlannerLayoutOption(layout: Partial): void {\r\n if (this.plannerLayout === null) {\r\n this.plannerLayout = new PlannerLayout();\r\n }\r\n\r\n Object.assign(this.plannerLayout, layout);\r\n // Save a duplicate in localstorage so it can be restored from there for browser navigation events.\r\n localStorage.setItem(\"ls.plannerlayout\", JSON.stringify(this.plannerLayout));\r\n }\r\n\r\n public AssignJob(appointment: AppointmentModel): AppointmentModel {\r\n const jobSession = appointment.JobSession;\r\n this.AssignJobStarted.emit(appointment.JobSession);\r\n\r\n this.EnsureValidOrNoEndDate(appointment.JobSession);\r\n appointment.disabled = true;\r\n\r\n const endDate = jobSession.EndDate ? moment(jobSession.EndDate) : moment(appointment.StartDate).add(this.initialAppointmentDurationHours, \"hour\");\r\n jobSession.EndDate = endDate.toDate();\r\n appointment.EndDate = endDate.toDate();\r\n appointment.Type = AppointmentType.Job;\r\n return appointment;\r\n }\r\n\r\n public CreateAppointmentFromActivity(activity: EngineerActivityModel, activityType: ActivityTypeModel): AppointmentModel {\r\n return {\r\n EmployeeId: activity.EmployeeId,\r\n Text: activityType.ActivityName,\r\n StartDate: activity.StartDate,\r\n EndDate: activity.EndDate,\r\n Activity: activity,\r\n ActivityType: activityType\r\n };\r\n }\r\n\r\n public CreateAppointmentFromJobSession(jobSession: PlannerJobSession): AppointmentModel {\r\n const endDate = jobSession.EndDate ? moment(jobSession.EndDate) : moment(jobSession.StartDate).add(this.initialAppointmentDurationHours, \"hour\");\r\n return {\r\n EmployeeId: jobSession.EmployeeId,\r\n Text: jobSession.SiteName,\r\n StartDate: jobSession.StartDate || moment(jobSession.StartDate).toDate(),\r\n EndDate: endDate.toDate(),\r\n JobSession: jobSession,\r\n disabled: JobVisitStatus[jobSession.Status] === JobVisitStatus.Complete || endDate.isBefore(moment.now())\r\n };\r\n }\r\n\r\n public CreatePlannerEventFromEditorActivity(appointment: AppointmentModel): PlannerEventModel {\r\n const activity: EngineerActivityModel = appointment.Activity;\r\n return {\r\n ActivityTypeID: activity.ActivityTypeId,\r\n EmployeeID: appointment.EmployeeId,\r\n OldEmployeeID: activity.EmployeeId,\r\n LineID: activity.LineId || 0,\r\n id: activity.LineId,\r\n description: activity.Notes,\r\n end: appointment.EndDate,\r\n start: appointment.StartDate\r\n };\r\n }\r\n\r\n public CreatePlannerEventFromJobSession(appointment: AppointmentModel): PlannerEventModel {\r\n const jobSession = appointment.JobSession;\r\n return {\r\n ActivityTypeID: 0,\r\n EmployeeID: appointment.EmployeeId,\r\n OldEmployeeID: jobSession.EmployeeId,\r\n JobCatID: jobSession.JobCatId,\r\n JobID: jobSession.JobId,\r\n JobType: jobSession.JobType,\r\n Logged: jobSession.Logged,\r\n SessionID: jobSession.SessionId || 0,\r\n SiteName: jobSession.SiteName,\r\n Status: \"Allocated\",\r\n StatusId: JobVisitStatus[jobSession.Status],\r\n end: appointment.EndDate,\r\n id: jobSession.JobId, // required by existing back end for delete\r\n start: appointment.StartDate\r\n };\r\n }\r\n\r\n public GetUnassignedJobs(): Observable {\r\n return this.httpClient.get(`${this.config.apiLocations.ServiceSightOData}PlannerUnassignedJobOD`)\r\n .pipe(\r\n map(d => d.value.map((j: any): AppointmentModel => ({\r\n JobSession: {\r\n JobId: j.JobId,\r\n Due: j.DueDate,\r\n EquipCount: j.EquipmentCount,\r\n EquipmentOoa: j.EquipmentOoa,\r\n JobCatId: j.JobCatId,\r\n JobType: j.JobType,\r\n Logged: j.LoggedDate,\r\n SiteName: j.SiteName,\r\n SiteAddress: j.SiteAddress,\r\n SitePostCode: j.SitePostCode,\r\n SitePhotoFace: j.SitePhotoFace,\r\n UserRef1Job: j.UserRef1Job,\r\n UserRef2Job: j.UserRef2Job,\r\n Status: JobVisitStatus[JobVisitStatus.Unalloc],\r\n Chargeable: j.Chargeable,\r\n Engineer: j.Engineer,\r\n Phone: j.Phone,\r\n JobStatus: j.Status,\r\n JobCategory: this.jobCategoryPipe.transform(j.JobCatID),\r\n Latitude: j.Latitude,\r\n Longitude: j.Longitude,\r\n JobGroupID: j.JobGroupID,\r\n MakeModels: j.EquipMakeModels,\r\n EquipCategories: j.EquipCategories,\r\n EquipTypes: j.EquipTypes,\r\n PriorityName: j.PriorityName,\r\n PriorityColour: j.PriorityColour,\r\n PriorityIcon: j.PriorityIcon\r\n },\r\n EmployeeId: null,\r\n StartDate: null,\r\n EndDate: null,\r\n Text: null\r\n }))));\r\n }\r\n\r\n public UpdateAppointment(appointment: AppointmentModel): void {\r\n const event = appointment.JobSession ?\r\n this.CreatePlannerEventFromJobSession(appointment) :\r\n this.CreatePlannerEventFromEditorActivity(appointment);\r\n if (event.id || event.LineID) {\r\n this.TryUpdateEvent(event);\r\n } else {\r\n if (appointment.JobSession) {\r\n this.TryAssigningJob(event, appointment);\r\n } else {\r\n this.TrySaveActivity(event, appointment);\r\n }\r\n }\r\n }\r\n\r\n public RemoveAssignment(appointment: AppointmentModel): void {\r\n this.RemoveAssignmentStarted.emit(appointment);\r\n }\r\n\r\n public SaveActivity(activity: EditorActivityModel, activityType: ActivityTypeModel): void {\r\n const engineerActivity = this.CrateEngineerActivityFromEditorActivity(activity);\r\n const appointment = this.CreateAppointmentFromActivity(engineerActivity, activityType);\r\n\r\n this.SaveActivityStarted.emit(appointment);\r\n\r\n const plannerEvent = this.CreatePlannerEventFromEditorActivity(appointment);\r\n this.TrySaveActivity(plannerEvent, appointment);\r\n }\r\n\r\n public CreateActivity(appointment: AppointmentModel): void {\r\n const plannerEvent = this.CreatePlannerEventFromEditorActivity(appointment);\r\n this.TrySaveActivity(plannerEvent, appointment);\r\n }\r\n\r\n public CrateEngineerActivityFromEditorActivity(activity: EditorActivityModel): EngineerActivityModel {\r\n return {\r\n ActivityTypeId: activity.ActivityTypeId,\r\n EmployeeId: activity.EmployeeId,\r\n EndDate: activity.EndDate,\r\n LineId: activity.LineId || 0,\r\n Notes: activity.Notes,\r\n StartDate: activity.StartDate,\r\n Status: EmployeeActivityStatus.InProgress\r\n };\r\n }\r\n\r\n public CreateAppointmentFromEditorActivity(activity: EditorActivityModel): AppointmentModel {\r\n return {\r\n EmployeeId: activity.EmployeeId,\r\n EndDate: activity.EndDate,\r\n StartDate: activity.StartDate,\r\n Text: activity.Notes,\r\n disabled: true\r\n };\r\n }\r\n\r\n public GetSettingDateHour(id: SettingId): Observable {\r\n if (id !== SettingId.WorkingDayEndsAt && id !== SettingId.WorkingDayStartsAt) {\r\n throw new Error(\"Only supports: WorkingDayStartsAt & WorkingDayEndsAt\");\r\n }\r\n\r\n return this.settingsService.getSetting(id).pipe(map(setting => {\r\n return new Date(setting.ValueDate).getUTCHours();\r\n }));\r\n }\r\n\r\n public GetJobVisitDefaultDuration(): Observable {\r\n return this.settingsService.getSetting(SettingId.JobVisitDefaultDuration);\r\n }\r\n\r\n public SetPlannerDate(selectedDate: Date) {\r\n localStorage.setItem(\"ls.plannerselecteddate\", selectedDate.toDateString());\r\n }\r\n\r\n public GetPlannerDate(): Date {\r\n const lsPlannerSelectedDate = localStorage.getItem(\"ls.plannerselecteddate\");\r\n if (lsPlannerSelectedDate){\r\n return new Date(lsPlannerSelectedDate);\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n private processPendingTransaction(data: any[]): any[] {\r\n this.deleting.forEach(d => {\r\n const idx = data.findIndex(a => a.Id === d.Id && a.Type === d.Type && a.SessionId === d.SessionId);\r\n data.splice(idx, 1);\r\n });\r\n\r\n this.updating.forEach(u => {\r\n const idx = data.findIndex(a => a.Id === u.Id && a.Type === u.Type && a.SessionId === u.SessionId);\r\n u.disabled = true;\r\n data[idx] = u;\r\n });\r\n\r\n this.adding.forEach(a => {\r\n a.disabled = true;\r\n });\r\n\r\n data.push(...this.adding);\r\n\r\n return data;\r\n }\r\n\r\n private EnsureValidOrNoEndDate(jobSession: PlannerJobSession): void {\r\n if (!moment.isDate(jobSession.EndDate)) {\r\n jobSession.EndDate = null;\r\n }\r\n }\r\n\r\n private TryAssigningJob(plannerEvent: PlannerEventModel, appointment: AppointmentModel): void {\r\n this.CreateEvent(plannerEvent).subscribe(r => {\r\n if (r.IsSuccess) {\r\n if (r.ViewModel) {\r\n const viewModel = r.ViewModel as PlannerEventModel;\r\n appointment.JobSession.SessionId = viewModel.SessionID;\r\n appointment.JobSession.Status = JobVisitStatus[viewModel.StatusId];\r\n appointment.JobSession.EmployeeId = viewModel.EmployeeID;\r\n appointment.JobSession.SitePostCode = viewModel.PostCode;\r\n appointment.JobSession.EquipCategories = viewModel.EquipCategories;\r\n appointment.JobSession.EquipTypes = viewModel.EquipTypes;\r\n appointment.JobSession.MakeModels = viewModel.MakeModels;\r\n }\r\n this.AssignJobSucceeded.emit(appointment);\r\n } else {\r\n this.toasterService.pop(r.Messages[0].Message, ToastType.burnt);\r\n this.AssignJobFailed.emit(appointment);\r\n }\r\n });\r\n }\r\n\r\n private TrySaveActivity(plannerEvent: PlannerEventModel, appointment: AppointmentModel) {\r\n this.httpClient.post(`${this.config.apiLocations.ServiceSight}planner/create`, plannerEvent).subscribe(r => {\r\n if (r.IsSuccess) {\r\n if (r.ViewModel) {\r\n const viewModel = r.ViewModel as PlannerEventModel;\r\n appointment.Activity.LineId = viewModel.id;\r\n appointment.Activity.EmployeeId = viewModel.EmployeeID;\r\n }\r\n this.SaveActivitySucceeded.emit(appointment);\r\n } else {\r\n this.toasterService.pop(r.Messages[0].Message, ToastType.burnt);\r\n this.SaveActivityFailed.emit(appointment);\r\n }\r\n });\r\n }\r\n\r\n private CreateEvent(plannerEvent: PlannerEventModel): Observable {\r\n return this.httpClient.post(`${this.config.apiLocations.ServiceSight}planner/create`, plannerEvent);\r\n }\r\n\r\n private TryUpdateEvent(plannerEvent: PlannerEventModel): void {\r\n this.httpClient.post(`${this.config.apiLocations.ServiceSight}planner/update`, plannerEvent).subscribe();\r\n }\r\n}\r\n","/* eslint-disable max-len */\r\nexport class DefaultImageDataUrl {\r\n public static Engineer = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQ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dMkf+2xjdWUxDUdwOKywzRNiEPct5aJnxLP82KbDp+joyMIKkPs+1CpVEhNKQiLZVkQcVwH8SUqPpnnEOi6Dv4ehLwXEiHE0HV9cdqbQAPGGJhHfQbL/4z4XoC8UxIhxOBU5mcnLObr/wPla8XkXnjLdwAAAABJRU5ErkJggg==\";\r\n}\r\n\r\n","
\r\n \r\n \r\n {{ engineer.Name }}\r\n
    \r\n
  • \r\n
  • \r\n
\r\n
\r\n","import { Component, EventEmitter, Input, OnChanges, Output } from \"@angular/core\";\r\nimport * as moment from \"moment\";\r\nimport { DefaultImageDataUrl } from \"../../shared/enums/default-image-data-url.enum\";\r\nimport { EngineerModel } from \"../../shared/models/engineer.model\";\r\nimport { EngineerCardMode } from \"../enums/engineer-card-mode.enum\";\r\n\r\n\r\n@Component({\r\n selector: \"app-planner-engineer\",\r\n templateUrl: \"./planner-engineer.component.html\",\r\n styleUrls: [\"./planner-engineer.component.scss\"]\r\n})\r\nexport class PlannerEngineerComponent implements OnChanges {\r\n\r\n @Input() public engineer: EngineerModel;\r\n\r\n @Input() public collapse: EngineerCardMode = EngineerCardMode.Normal;\r\n\r\n @Input() public isActive: boolean = false;\r\n\r\n @Input() public disableCalenderOption: boolean = false;\r\n\r\n @Output() public calendarButtonClicked: EventEmitter = new EventEmitter();\r\n\r\n @Output() public locationButtonClicked: EventEmitter = new EventEmitter();\r\n\r\n public engineerCardMode = EngineerCardMode;\r\n\r\n public iconUrl: string;\r\n\r\n public onlineStatus: string = null;\r\n\r\n public onlineStatusText: string = null;\r\n\r\n constructor() { }\r\n\r\n public ngOnChanges(): void {\r\n if (this.engineer) {\r\n this.iconUrl = this.getIconUrl();\r\n this.onlineStatus = this.getStatus();\r\n this.onlineStatusText = this.getStatusText();\r\n }\r\n }\r\n\r\n public HandleCalendarButtonClicked(): void {\r\n this.calendarButtonClicked.emit(this.engineer);\r\n }\r\n\r\n public HandleLocationButtonClicked(): void {\r\n this.locationButtonClicked.emit(this.engineer);\r\n }\r\n\r\n private getIconUrl(): string {\r\n let result = DefaultImageDataUrl.Engineer;\r\n if (this.engineer.PhotoFace) {\r\n result = `data:image/bmp;charset=utf-8;base64,${this.engineer.PhotoFace}`;\r\n }\r\n\r\n return `url(${result})`;\r\n }\r\n\r\n private getStatus(): string {\r\n if (!this.engineer.PositionTime) {\r\n return \"offline\";\r\n }\r\n\r\n const diff = moment.utc().diff(this.engineer.PositionTime, \"minutes\");\r\n\r\n if (diff < 10) {\r\n return \"online\";\r\n } else if (diff < 60) {\r\n return \"last-hour\";\r\n } else if (diff < 180) {\r\n return \"last-three-hours\";\r\n }\r\n\r\n return \"offline\";\r\n }\r\n\r\n private getStatusText(): string {\r\n if (!this.engineer.PositionTime) {\r\n return \"Offline\";\r\n }\r\n\r\n const diff = moment.utc().diff(this.engineer.PositionTime, \"minutes\");\r\n\r\n if (diff < 10) {\r\n return \"Online\";\r\n } else if (diff < 60) {\r\n return \"Online in the last 60 minutes\";\r\n } else if (diff < 180) {\r\n return \"Online in the last 3 hours\";\r\n }\r\n\r\n return \"offline\";\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable, of } from \"rxjs\";\r\nimport { map, shareReplay } from \"rxjs/operators\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { PlannerCardLayout } from \"../models/planner/planner-card-layout.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class PlannerCardService {\r\n\r\n private layout: PlannerCardLayout;\r\n private get$: Observable;\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) protected config: IAppConfig\r\n ) { }\r\n\r\n public GetLayout(): Observable {\r\n if (this.layout) {\r\n return of(this.layout);\r\n }\r\n if (!this.get$) {\r\n this.get$ = this.http.get(`${this.config.apiLocations.ServiceSight}PlannerCard/Get`).pipe(shareReplay(1));\r\n }\r\n\r\n return this.get$\r\n .pipe(map(l => {\r\n this.layout = l;\r\n this.get$ = null;\r\n return l;\r\n }));\r\n }\r\n\r\n public UpdateLayout(layout: PlannerCardLayout): Observable {\r\n this.layout = layout;\r\n return this.http.post(`${this.config.apiLocations.ServiceSight}PlannerCard/Update`, layout);\r\n }\r\n}\r\n","export enum JobProperties {\r\n JobId = \"JobId\",\r\n PriorityName = \"PriorityName\",\r\n SessionId = \"SessionId\",\r\n JobType = \"JobType\",\r\n JobCatId = \"JobCatId\",\r\n Chargeable = \"Chargeable\",\r\n ToDo = \"ToDo\",\r\n UserRef1Job = \"UserRef1Job\",\r\n UserRef2Job = \"UserRef2Job\",\r\n Logged = \"Logged\",\r\n Due = \"Due\",\r\n Status = \"Status\",\r\n SiteName = \"SiteName\",\r\n SitePostCode = \"SitePostCode\",\r\n EquipCount = \"EquipCount\",\r\n UnassignedSiteJobs = \"UnassignedSiteJobs\",\r\n EquipCategories = \"EquipCategories\",\r\n EquipTypes = \"EquipTypes\",\r\n MakeModels = \"MakeModels\",\r\n}\r\n","import { DatePipe } from \"@angular/common\";\r\nimport { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { JobProperties } from \"src/app/planner/enums/job-properties.enum\";\r\nimport { JobCategoryPipe } from \"./job-category.pipe\";\r\nimport { JobVisitStatusPipe } from \"./job-visit-status.pipe\";\r\n\r\n@Pipe({\r\n name: \"jobProperty\",\r\n})\r\nexport class JobPropertyPipe implements PipeTransform {\r\n\r\n constructor(\r\n private translateService: TranslateService,\r\n private jobVisitStatus: JobVisitStatusPipe,\r\n private datePipe: DatePipe,\r\n private jobCategoryPipe: JobCategoryPipe\r\n ) { }\r\n\r\n transform(value: any, property: JobProperties): any {\r\n let val: string = value;\r\n if (value !== null && value !== undefined) {\r\n switch (property) {\r\n case JobProperties.Due:\r\n val = this.translateService.instant(\"job.card.due\", { val: this.datePipe.transform(value) });\r\n break;\r\n case JobProperties.Logged:\r\n val = this.translateService.instant(\"job.card.logged\", { val: this.datePipe.transform(value) });\r\n break;\r\n case JobProperties.Status:\r\n val = this.translateService.instant(this.jobVisitStatus.transform(value));\r\n break;\r\n case JobProperties.JobCatId:\r\n val = this.translateService.instant(this.jobCategoryPipe.transform(value));\r\n break;\r\n case JobProperties.Chargeable:\r\n val = this.translateService.instant(value ? \"job.card.chargeable\" : \"job.card.non-chargeable\");\r\n break;\r\n case JobProperties.SessionId:\r\n val = this.translateService.instant(\"job.card.visit\", { value });\r\n break;\r\n }\r\n }\r\n return val || \" \";\r\n }\r\n\r\n}\r\n","
\r\n

{{ 'planner.tooltip.title.job-details' | translate }}

\r\n

{{ 'planner.tooltip.title.activity-details' | translate }}

\r\n X\r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n \r\n {{ Appointment.JobSession[layout.Header1] | jobProperty: layout.Header1 }}\r\n \r\n |\r\n \r\n \r\n {{ Appointment.JobSession[layout.Header2] | jobProperty: layout.Header2 }}\r\n \r\n |\r\n \r\n \r\n {{ Appointment.JobSession[layout.Header3] | jobProperty: layout.Header3 }}\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n {{ Appointment.JobSession[layout.Body1] | jobProperty: layout.Body1 }}\r\n \r\n
\r\n
\r\n \r\n \r\n {{ Appointment.JobSession[layout.Body2] | jobProperty: layout.Body2 }}\r\n \r\n
\r\n
\r\n \r\n \r\n {{ Appointment.JobSession[layout.Body3] | jobProperty: layout.Body3 }}\r\n \r\n
\r\n
\r\n \r\n \r\n {{ Appointment.JobSession[layout.Body4] | jobProperty: layout.Body4 }}\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n {{ Appointment.Activity.ActivityType }}\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n {{ Appointment.StartDate | date:'shortTime' }}  \r\n {{ \"label.to.lower\" | translate }}  \r\n {{ Appointment.EndDate | date:'shortTime' }}\r\n
\r\n
\r\n {{ Appointment.Activity.Notes }}\r\n
\r\n
\r\n
\r\n
\r\n","import { DomSanitizer, SafeResourceUrl } from \"@angular/platform-browser\";\r\nimport { JobVisitStatus } from \"src/app/shared/enums/JobVisitStatus\";\r\nimport { PlannerCardLayout } from \"src/app/shared/models/planner/planner-card-layout.model\";\r\nimport { PlannerCardService } from \"src/app/shared/services/planner-card.service\";\r\nimport { JobCat } from \"../../shared/enums/job-cat.enum\";\r\nimport { GoToJobEquipService } from \"../../shared/services/go-to-job-equip/go-to-job-equip.service\";\r\nimport { JobProperties } from \"../enums/job-properties.enum\";\r\nimport { AppointmentModel } from \"../models/appointment.model\";\r\nimport { PlannerService } from \"../services/planner.service\";\r\nimport {\r\n AfterContentInit,\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n} from \"@angular/core\";\r\n\r\n@Component({\r\n selector: \"app-planner-appointment-card\",\r\n templateUrl: \"./planner-appointment-card.component.html\",\r\n styleUrls: [\"./planner-appointment-card.component.scss\"],\r\n})\r\nexport class PlannerAppointmentCardComponent implements OnChanges, OnInit, AfterContentInit {\r\n @Input() public Appointment: AppointmentModel;\r\n @Input() public isUnassignedMode: boolean;\r\n @Input() public hideActionButtons: boolean = false;\r\n @Input() public isTooltip: boolean = false;\r\n\r\n @Output() public DeleteClicked: EventEmitter = new EventEmitter();\r\n @Output() public CloseTooltipClicked: EventEmitter = new EventEmitter();\r\n @Output() public Loaded: EventEmitter = new EventEmitter();\r\n\r\n public layout: PlannerCardLayout = {\r\n Header1: JobProperties.JobId,\r\n Header2: JobProperties.JobType,\r\n Header3: JobProperties.Status,\r\n Body1: JobProperties.SiteName,\r\n Body2: JobProperties.JobCatId,\r\n Body3: JobProperties.Due,\r\n Body4: JobProperties.EquipCount,\r\n LogoEnabled: false\r\n };\r\n\r\n public propertyToIcon: object = {\r\n [JobProperties.EquipCount]: \"equipment-indicator\",\r\n [JobProperties.UnassignedSiteJobs]: \"unassigned-jobs-indicator\"\r\n };\r\n\r\n public JobCategory: string;\r\n public ColourCodingClass: string;\r\n public ColourCodingOverride: string;\r\n public isPastEvent: boolean;\r\n public isJobVisitComplete: boolean;\r\n public isJobVisitStarted: boolean;\r\n public logoUrl: SafeResourceUrl;\r\n\r\n constructor(\r\n private plannerService: PlannerService,\r\n private goToJobEquipService: GoToJobEquipService,\r\n private plannerCardService: PlannerCardService,\r\n private sanatizer: DomSanitizer) { }\r\n\r\n public ngAfterContentInit(): void {\r\n // Tell listeners the component has been rendered\r\n this.Loaded.emit();\r\n }\r\n\r\n public JobPropertyClick(property: JobProperties, evt: Event): void {\r\n evt.preventDefault();\r\n\r\n switch (property) {\r\n case JobProperties.EquipCount:\r\n this.goToJobEquipService.NavigateToJob(this.Appointment.JobSession.JobId);\r\n break;\r\n }\r\n }\r\n\r\n public HandleDeleteClick(evt: Event): void {\r\n evt.preventDefault();\r\n evt.stopPropagation();\r\n this.DeleteClicked.emit(this.Appointment);\r\n }\r\n\r\n public HandleMapClick(evt: Event): void {\r\n evt.preventDefault();\r\n evt.stopPropagation();\r\n this.plannerService.MapItemSelected.emit(this.Appointment);\r\n }\r\n\r\n public HandleCloseClick(evt: Event): void {\r\n evt.preventDefault();\r\n evt.stopPropagation();\r\n this.CloseTooltipClicked.emit();\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.SetupJobCard();\r\n this.plannerCardService.GetLayout().subscribe(l => {\r\n this.layout = l || this.layout;\r\n if (this.layout.LogoEnabled) {\r\n this.logoUrl = this.sanatizer.bypassSecurityTrustResourceUrl(\r\n this.Appointment.JobSession && this.Appointment.JobSession.SitePhotoFace ?\r\n this.Appointment.JobSession.SitePhotoFace : null);\r\n }\r\n });\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.Appointment &&\r\n changes.Appointment.currentValue !== changes.Appointment.previousValue) {\r\n this.SetupJobCard();\r\n }\r\n this.isPastEvent = this.Appointment.EndDate < new Date();\r\n if (this.Appointment.JobSession) {\r\n const visitStatus = JobVisitStatus[this.Appointment.JobSession.Status];\r\n this.isJobVisitComplete = visitStatus === JobVisitStatus.Complete;\r\n this.isJobVisitStarted = visitStatus >= JobVisitStatus.EnRoute && visitStatus < JobVisitStatus.Complete;\r\n\r\n if (this.isJobVisitComplete) {\r\n this.ColourCodingClass += \" job-completed\";\r\n }\r\n }\r\n this.logoUrl = this.sanatizer.bypassSecurityTrustResourceUrl(\r\n this.Appointment.JobSession && this.Appointment.JobSession.SitePhotoFace ?\r\n `data:image/bmp;charset=utf-8;base64,${this.Appointment.JobSession.SitePhotoFace}` : null);\r\n }\r\n\r\n private SetupJobCard(): void {\r\n if (this.Appointment && this.Appointment.JobSession) {\r\n let jobCat = JobCat[this.Appointment.JobSession.JobCatId];\r\n if (!jobCat) {\r\n jobCat = \"unknown\";\r\n }\r\n jobCat = jobCat.toLowerCase();\r\n this.ColourCodingClass = `colour-coding-${jobCat}`;\r\n } else if (this.Appointment && this.Appointment.Activity) {\r\n this.ColourCodingOverride = this.GetRGBFromWin32(this.Appointment.Activity.BackColour);\r\n }\r\n\r\n if (this.isJobVisitComplete) {\r\n this.ColourCodingClass += \" job-completed\";\r\n }\r\n\r\n this.ColourCodingOverride = this.ColourCodingOverride || undefined;\r\n }\r\n\r\n private GetRGBFromWin32(win32Color: number): string {\r\n if (win32Color === null || win32Color === undefined) {\r\n return null;\r\n }\r\n\r\n const Win32RedShift = 0;\r\n const Win32GreenShift = 8;\r\n const Win32BlueShift = 16;\r\n\r\n /* eslint-disable no-bitwise */\r\n const red = (win32Color >> Win32RedShift) & 0xFF;\r\n const green = (win32Color >> Win32GreenShift) & 0xFF;\r\n const blue = (win32Color >> Win32BlueShift) & 0xFF;\r\n /* eslint-enable no-bitwise */\r\n\r\n return `rgb(${red}, ${green}, ${blue})`;\r\n }\r\n}\r\n","
\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n
\r\n {{dateCell.text}}\r\n \r\n
\r\n\r\n
\r\n {{ dataCell.text }}\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n
{{ FormatDayViewDate(data) }}
\r\n
\r\n\r\n
\r\n
{{ FormatWeekViewDate(data) }}
\r\n
\r\n\r\n
\r\n
{{ FormatTopDownWeekViewDate(data) }}
\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n \r\n\r\n
\r\n\r\n\r\n
\r\n \r\n {{ e.text | translate }}\r\n
\r\n\r\n\r\n\r\n
\r\n \r\n \r\n \r\n
\r\n\r\n\r\n\r\n\r\n","import {\r\n Component,\r\n Input,\r\n OnChanges,\r\n OnDestroy,\r\n OnInit,\r\n SimpleChanges,\r\n ViewChild,\r\n ViewEncapsulation\r\n} from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { Event as NavigationEvent } from \"@angular/router\";\r\nimport { filter as rxjsFilter } from \"rxjs/operators\";\r\nimport { NavigationStart } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxSchedulerComponent } from \"devextreme-angular\";\r\nimport ArrayStore from \"devextreme/data/array_store\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ScrollView from \"devextreme/ui/scroll_view\";\r\nimport * as moment from \"moment-timezone\";\r\nimport { Subscription } from \"rxjs\";\r\nimport {\r\n ActivityTypeModel,\r\n ContactModel,\r\n CustomerService,\r\n CustomerStatus,\r\n PermissionsService,\r\n PhraseBookType,\r\n SettingData,\r\n SettingId,\r\n SettingsService,\r\n ToasterService,\r\n ToastType\r\n} from \"servicesight-shared\";\r\nimport { JobService } from \"src/app/jobs/services/job.service\";\r\nimport { EngineerSkillService } from \"src/app/settings/services/engineer-skill.service\";\r\nimport { ConfirmationDialogueComponent } from \"src/app/shared/components/confirmation-dialogue/confirmation-dialogue.component\";\r\nimport { MapPins } from \"src/app/shared/constants/map-pins.constants\";\r\nimport { ContactStatus } from \"src/app/shared/enums/contact-status.eum\";\r\nimport { ISelectOption } from \"src/app/shared/models/iselect-option.model\";\r\nimport { PublicHoliday } from \"src/app/shared/models/public-holiday.model\";\r\nimport { ActivityTypeService } from \"src/app/shared/services/ativity-type/activity-type.service\";\r\nimport { EngineerModel } from \"../../shared/models/engineer.model\";\r\nimport { EngineerService } from \"../../shared/services/engineer/engineer.service\";\r\nimport { AppointmentType } from \"../enums/appointment-type.enum\";\r\nimport { EngineerCardMode } from \"../enums/engineer-card-mode.enum\";\r\nimport { PlannerView } from \"../enums/planner-view.enum\";\r\nimport { AppointmentModel } from \"../models/appointment.model\";\r\nimport { EditorActivityModel } from \"../models/editor-activity.model\";\r\nimport { JobAssignmentFailedEventArgs } from \"../models/job-assignment-failed-event-args\";\r\nimport { PlannerService } from \"../services/planner.service\";\r\n\r\n@Component({\r\n selector: \"app-planner-calendar\",\r\n templateUrl: \"./planner-calendar.component.html\",\r\n styleUrls: [\"./planner-calendar.component.scss\"],\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\nexport class PlannerCalendarComponent implements OnInit, OnChanges, OnDestroy {\r\n @Input() topDownCalendarMode: boolean = false;\r\n @Input() engineer: number = null;\r\n @Input() disableViewSwitching: boolean = false;\r\n\r\n @ViewChild(\"calender\") calender: DxSchedulerComponent;\r\n @ViewChild(\"skillCheckConfirmationDialogue\") skillCheckConfirmationDialogue: ConfirmationDialogueComponent;\r\n\r\n private startDayHour: number = 7;\r\n private endDayHour: number = 19;\r\n private formStartDate: Date = null;\r\n private allEngineers: EngineerModel[] = [];\r\n private currentView: string = null;\r\n private selectedCells: any[] = [];\r\n private repaintSubscription: Subscription;\r\n private mapItemSubscription: Subscription;\r\n private engineerChangeSubscription: Subscription;\r\n private plannerSubscription: Subscription;\r\n private topDownCalendarModeSubscription: Subscription;\r\n\r\n public ActivityPopupTitle: string = \"New Activity\"; //TODO: translation\r\n public ActivityTypes: ActivityTypeModel[];\r\n public AollapseEngineers: boolean = false;\r\n public Appointments: AppointmentModel[] = [];\r\n public AppointmentDataSource: DataSource = new DataSource([]);\r\n public CollapseEngineers: EngineerCardMode = EngineerCardMode.Normal;\r\n public CurrentDate: Date = new Date();\r\n public EditorActivity: EditorActivityModel;\r\n public Engineers: DataSource = new DataSource([]);\r\n public ShowActivityPopup: boolean = false;\r\n public showWorkingHoursOnly: boolean = true;\r\n public overrideTimesheetRestrictions: boolean = false;\r\n\r\n public phraseType = PhraseBookType;\r\n public contacts: ContactModel[];\r\n public jobTypes: ISelectOption[];\r\n public sitesDataSource: DataSource;\r\n public data: any;\r\n public form: any;\r\n private defaultJobVisitDuration: Date;\r\n public showCustomFormFields: boolean = false;\r\n private formDurationTime: Date = null;\r\n private managingAgentsEnabled: boolean = false;\r\n private get customerActiveStatuses(): CustomerStatus[] {\r\n const statuses: CustomerStatus[] = [\r\n CustomerStatus.ACTIVE\r\n ];\r\n if (this.managingAgentsEnabled) {\r\n statuses.push(CustomerStatus.MANAGING_AGENT);\r\n }\r\n return statuses;\r\n }\r\n\r\n // context menu\r\n public contextTarget: string;\r\n public contextDisabled: boolean = true;\r\n public contextDataSource: any[] = [];\r\n public onContextMenuItemClick: any;\r\n private hasCreateJobPermission = false;\r\n\r\n public selectedJobName: string = null;\r\n public selectedJobPopupVisible: boolean = false;\r\n public selectedJobCenter: { lat: number; lng: number } = null;\r\n public selectedJobMarkers: any[] = [];\r\n\r\n public publicHolidays: PublicHoliday[] = [];\r\n\r\n public dataToConfirm: any;\r\n public showSkillCheckWarningMessage: boolean = false;\r\n public skillCheckWarningMessage: string;\r\n public engineerSkillsCallbackFunction: Function;\r\n\r\n public jobContextMenuItems = [\r\n { text: \"planner.menu.view-job\", onItemClick: this.viewJob.bind(this), disabled: false },\r\n { text: \"planner.menu.add-engineer\", beginGroup: true, disabled: true }\r\n ];\r\n\r\n public activityContextMenuItems = [\r\n { text: \"planner.menu.copy-to-engineer\", onItemClick: null, beginGroup: true, disabled: true }\r\n ];\r\n\r\n public engineerContextMenus = [];\r\n\r\n public get StartDayHour(): number {\r\n if (this.showWorkingHoursOnly) {\r\n\r\n if (this.CurrentView === \"timelineDay\") {\r\n return this.startDayHour;\r\n }\r\n\r\n return this.startDayHour;\r\n }\r\n\r\n return 0;\r\n }\r\n\r\n public get EndDayHour(): number {\r\n if (this.showWorkingHoursOnly) {\r\n\r\n if (this.CurrentView === \"timelineDay\") {\r\n return this.endDayHour;\r\n }\r\n\r\n return this.endDayHour;\r\n }\r\n\r\n return 24;\r\n }\r\n\r\n public get getHoursClass(): string {\r\n let schedulerClass = `hours-${this.EndDayHour - this.StartDayHour}`;\r\n\r\n if (this.CollapseEngineers) {\r\n schedulerClass += \" small-engineers\";\r\n }\r\n\r\n if (this.disableViewSwitching) {\r\n schedulerClass += \" disable-view-switching\";\r\n }\r\n\r\n return schedulerClass;\r\n }\r\n\r\n public get engineerToggleIcon(): string {\r\n return this.CollapseEngineers === EngineerCardMode.Collapse ? \"fa fa-expand-alt\" : \"fa fa-compress-alt\";\r\n }\r\n\r\n public get engineerToggleDisabled(): boolean {\r\n return this.CollapseEngineers === EngineerCardMode.FullWidth;\r\n }\r\n\r\n public get CurrentView(): string {\r\n if (this.engineer !== null) {\r\n return \"day\";\r\n }\r\n\r\n if (this.currentView !== null) {\r\n return this.currentView;\r\n }\r\n\r\n if (this.topDownCalendarMode) {\r\n return \"day\";\r\n }\r\n\r\n return \"timelineDay\";\r\n }\r\n\r\n public set CurrentView(value: string) {\r\n this.currentView = value;\r\n }\r\n\r\n public get getHeight(): string | number {\r\n return \"100%\";\r\n }\r\n\r\n constructor(\r\n private toasterService: ToasterService,\r\n private engineerService: EngineerService,\r\n private plannerService: PlannerService,\r\n private activityTypeService: ActivityTypeService,\r\n private permissionsService: PermissionsService,\r\n private router: Router,\r\n private customerService: CustomerService,\r\n private jobService: JobService,\r\n private transalteService: TranslateService,\r\n private settingsService: SettingsService,\r\n private engineerSkillService: EngineerSkillService\r\n ) {\r\n this.HandleJobDropped = this.HandleJobDropped.bind(this);\r\n this.HandleAppointmentRemove = this.HandleAppointmentRemove.bind(this);\r\n this.AddAppointment = this.AddAppointment.bind(this);\r\n this.UpdateFormSite = this.UpdateFormSite.bind(this);\r\n this.AddCalendarAppointment = this.AddCalendarAppointment.bind(this);\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.engineer.currentValue && this.Engineers) {\r\n const engineers = this.allEngineers.filter(x => x.id === changes.engineer.currentValue);\r\n this.SetEngineersDataSource(engineers);\r\n }\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n if (this.repaintSubscription) {\r\n this.repaintSubscription.unsubscribe();\r\n this.repaintSubscription = null;\r\n }\r\n\r\n if (this.mapItemSubscription) {\r\n this.mapItemSubscription.unsubscribe();\r\n this.mapItemSubscription = null;\r\n }\r\n\r\n if (this.engineerChangeSubscription) {\r\n this.engineerChangeSubscription.unsubscribe();\r\n this.engineerChangeSubscription = null;\r\n }\r\n\r\n if (this.plannerSubscription) {\r\n this.plannerSubscription.unsubscribe();\r\n this.plannerSubscription = null;\r\n }\r\n\r\n if (this.topDownCalendarModeSubscription) {\r\n this.topDownCalendarModeSubscription.unsubscribe();\r\n this.topDownCalendarModeSubscription = null;\r\n }\r\n }\r\n\r\n public ngOnInit(): void {\r\n\r\n this.plannerService.GetPublicHolidays().subscribe(data => {\r\n this.publicHolidays = data;\r\n });\r\n\r\n this.plannerSubscription = this.permissionsService.CurrentUserHasPermissions(\"TimesheetCannotChangeAfterSubmit\", \"JobAdd\")\r\n .subscribe(x => {\r\n this.overrideTimesheetRestrictions = x.TimesheetCannotChangeAfterSubmit;\r\n this.hasCreateJobPermission = x.JobAdd;\r\n });\r\n this.plannerSubscription.add(this.plannerService.AssignJobFailed.subscribe(this.HandleJobAssignmentFailed.bind(this)));\r\n this.plannerSubscription.add(this.plannerService.RemoveAssignmentStarted.subscribe(this.HandleRemoveAssignementStarted.bind(this)));\r\n this.plannerSubscription.add(this.plannerService.RemoveAssignmentFailed.subscribe(this.HandleRemoveAssignementFailed.bind(this)));\r\n this.plannerSubscription.add(this.plannerService.SaveActivityStarted.subscribe(this.HandleSaveActivityStarted.bind(this)));\r\n this.plannerSubscription.add(this.plannerService.SaveActivityFailed.subscribe(this.HandleSaveActivityFailed.bind(this)));\r\n this.topDownCalendarModeSubscription = this.plannerService.TopDownCalendarMode.subscribe(this.HandleTopDownCalendarMode.bind(this));\r\n\r\n this.repaintSubscription = this.plannerService.MustRepaintCalendar.subscribe(() => {\r\n if (this.calender && this.calender.instance) {\r\n this.calender.instance.repaint();\r\n }\r\n });\r\n\r\n this.mapItemSubscription = this.plannerService.MapItemSelected.subscribe((appointment: AppointmentModel) => {\r\n this.selectedJobName = appointment.JobSession.SiteName;\r\n if (appointment.JobSession.Latitude) {\r\n this.selectedJobCenter = {\r\n lat: appointment.JobSession.Latitude,\r\n lng: appointment.JobSession.Longitude\r\n };\r\n\r\n this.selectedJobMarkers = [{\r\n iconSrc: MapPins.standardPin,\r\n location: {\r\n lat: appointment.JobSession.Latitude,\r\n lng: appointment.JobSession.Longitude\r\n },\r\n tooltip: {\r\n isShown: false,\r\n text: appointment.JobSession.SiteName\r\n }\r\n }];\r\n\r\n this.selectedJobPopupVisible = true;\r\n } else {\r\n this.toasterService.pop(\"Customer has no location information\", ToastType.dark, 3000);\r\n }\r\n });\r\n\r\n this.router.events.pipe(rxjsFilter(( event: NavigationEvent ) => {\r\n return( event instanceof NavigationStart );\r\n }))\r\n .subscribe(\r\n ( event: NavigationStart ) => {\r\n const useLocalStorage = event.navigationTrigger === \"popstate\";\r\n // If we got here using browser navigation such as back/forward buttons,\r\n // we want to check local storage for a saved layout and restore that over the previously saved layout.\r\n this.plannerService.GetPlannerLayout(useLocalStorage).subscribe(layout => {\r\n this.topDownCalendarMode = layout.PlannerView === PlannerView.PlannerTopDown;\r\n this.CollapseEngineers = this.topDownCalendarMode ? EngineerCardMode.FullWidth : layout.EngineerCardMode;\r\n this.showWorkingHoursOnly = layout.ShowWorkingHoursOnly === null || layout.ShowWorkingHoursOnly === undefined ? true : layout.ShowWorkingHoursOnly;\r\n if (layout.SelectedCalendarView) {\r\n this.currentView = layout.SelectedCalendarView;\r\n }\r\n if (useLocalStorage) {\r\n const plannerDate = this.plannerService.GetPlannerDate();\r\n if (plannerDate) {\r\n this.CurrentDate = plannerDate;\r\n }\r\n }\r\n });\r\n }\r\n );\r\n this.plannerService.GetCalendarStartTime().subscribe(value => {\r\n this.startDayHour = value;\r\n });\r\n\r\n this.plannerService.GetCalendarEndTime().subscribe(value => {\r\n this.endDayHour = value;\r\n });\r\n\r\n this.engineerChangeSubscription = this.plannerService.SelectedEngineers.subscribe(selectedEngineers => {\r\n if (this.Engineers) {\r\n if (this.engineer) {\r\n const engineers = this.allEngineers.filter(x => x.id === this.engineer);\r\n this.SetEngineersDataSource(engineers);\r\n } else if (selectedEngineers && selectedEngineers.length > 0) {\r\n const engineers = [];\r\n selectedEngineers.forEach(enginner => {\r\n const item = this.allEngineers.find(x => x.id === enginner);\r\n if (item) {\r\n engineers.push(item);\r\n }\r\n });\r\n\r\n this.SetEngineersDataSource(engineers);\r\n } else {\r\n this.SetEngineersDataSource(this.allEngineers);\r\n }\r\n }\r\n });\r\n\r\n this.engineerService.GetEngineers().subscribe(d => {\r\n this.allEngineers = d;\r\n\r\n if (this.engineer) {\r\n const engineers = this.allEngineers.filter(x => x.id === this.engineer);\r\n this.SetEngineersDataSource(engineers);\r\n } else if (this.plannerService.SelectedEngineers.value && this.plannerService.SelectedEngineers.value.length > 0) {\r\n const engineers = [];\r\n this.plannerService.SelectedEngineers.value.forEach(enginner => {\r\n const item = this.allEngineers.find(x => x.id === enginner);\r\n if (item) {\r\n engineers.push(item);\r\n }\r\n });\r\n this.SetEngineersDataSource(engineers);\r\n } else {\r\n this.SetEngineersDataSource(this.allEngineers);\r\n }\r\n\r\n this.engineerContextMenus = d.map(e => {\r\n return { text: e.Name, onItemClick: this.addEngineer.bind(this), id: e.id, iconUrl: `url(data:image/bmp;charset=utf-8;base64,${e.PhotoFace})` };\r\n });\r\n this.AppointmentDataSource = this.plannerService.GetAppointmentsDataSource();\r\n });\r\n\r\n this.activityTypeService.GetActivityTypes().subscribe(d => {\r\n this.ActivityTypes = d.filter(a => a.Planner === true);\r\n });\r\n\r\n this.sitesDataSource = this.customerService.GetCustomersDataSource();\r\n this.jobService.GetJobTypes().subscribe((res) => this.jobTypes = res);\r\n\r\n this.plannerService.GetJobVisitDefaultDuration().subscribe(x => {\r\n const hours = new Date(x.ValueDate).getUTCHours();\r\n const minutes = new Date(x.ValueDate).getUTCMinutes();\r\n\r\n const time = hours * 60 * 60 * 1000 + minutes * 60 * 1000;\r\n this.defaultJobVisitDuration = new Date(time);\r\n });\r\n\r\n this.settingsService.getSetting(SettingId.CustomerManagingAgents)\r\n .subscribe((setting: SettingData) => {\r\n this.managingAgentsEnabled = setting.ValueBool;\r\n const filter = [];\r\n this.customerActiveStatuses.forEach((el, index) => {\r\n if (this.customerActiveStatuses.length > 1) {\r\n filter.push([\"Status\", \"=\", el]);\r\n if (index < this.customerActiveStatuses.length - 1) {\r\n filter.push(\"or\");\r\n }\r\n } else {\r\n filter.push(\"Status\", \"=\", el);\r\n }\r\n });\r\n\r\n this.sitesDataSource.filter(filter);\r\n this.sitesDataSource.reload();\r\n });\r\n }\r\n\r\n public HandleTopDownCalendarMode(value: boolean): void {\r\n this.topDownCalendarMode = value;\r\n this.CollapseEngineers = value ? EngineerCardMode.FullWidth : EngineerCardMode.Normal;\r\n this.plannerService.MustRepaintCalendar.emit();\r\n }\r\n\r\n public toggleEngineerCard(): void {\r\n this.CollapseEngineers = this.CollapseEngineers === EngineerCardMode.Collapse ?\r\n EngineerCardMode.Normal :\r\n EngineerCardMode.Collapse;\r\n\r\n this.plannerService.SetPlannerLayoutOption({ EngineerCardMode: this.CollapseEngineers });\r\n setTimeout(() => {\r\n this.calender.instance.repaint();\r\n }, 250);\r\n }\r\n\r\n public viewJob(e: any): void {\r\n const appointment = e.appointmentData as AppointmentModel;\r\n if (appointment.JobSession) {\r\n this.router.navigate([\"jobs/job\", appointment.JobSession.JobId]);\r\n }\r\n }\r\n\r\n public FormatDayViewDate(data: any): string {\r\n if (data.date.getMinutes() === 30) {\r\n return moment(data.date).format(\"h A\");\r\n } else {\r\n return \"\";\r\n }\r\n }\r\n\r\n public FormatWeekViewDate(data: any): string {\r\n const hour = data.date.getHours();\r\n const minutes = data.date.getMinutes();\r\n if (minutes === 0 && (hour === 7 || hour === 12 || hour === 18)) {\r\n let currentDate = data.date;\r\n if (hour === 18) {\r\n currentDate = moment(currentDate).add(1, \"hour\").toDate();\r\n }\r\n return moment(currentDate).format(\"h A\");\r\n } else {\r\n return \"\";\r\n }\r\n }\r\n\r\n public FormatTopDownWeekViewDate(data: any): string {\r\n return moment(data.date).format(\"DD/MM\");\r\n }\r\n\r\n public addEngineer(e: any, clickEvent: any): void {\r\n const data: AppointmentModel = e.appointmentData;\r\n if (data.EmployeeId !== clickEvent.itemData.id) {\r\n const clone = JSON.parse(JSON.stringify(data)) as AppointmentModel;\r\n clone.EmployeeId = clickEvent.itemData.id;\r\n clone.StartDate = new Date(data.StartDate);\r\n clone.EndDate = new Date(data.EndDate);\r\n\r\n if (clone.JobSession) {\r\n this.engineerSkillService.EngineerSkillsCheckForJob(clickEvent.itemData.id, data.JobSession.JobId).subscribe(x => {\r\n clone.JobSession.EmployeeId = clickEvent.itemData.id;\r\n clone.JobSession.SessionId = null;\r\n clone.JobSession.StartDate = new Date(data.StartDate);\r\n clone.JobSession.EndDate = new Date(data.EndDate);\r\n\r\n this.engineerSkillsCallbackFunction = this.AddCalendarAppointment;\r\n this.dataToConfirm = clone;\r\n if (x.IsSuccess) {\r\n this.AddCalendarAppointment(clone);\r\n } else {\r\n this.skillCheckWarningMessage = x.Message;\r\n this.showSkillCheckWarningMessage = true;\r\n }\r\n });\r\n } else {\r\n clone.Activity.LineId = 0;\r\n this.AddCalendarAppointment(clone);\r\n }\r\n }\r\n }\r\n\r\n private AddCalendarAppointment(appointment: AppointmentModel): void {\r\n this.calender.instance.addAppointment(appointment);\r\n }\r\n\r\n public createActivity(e: any, click: any): void {\r\n this.showCustomFormFields = false;\r\n\r\n const { startDate, endDate } = this.getStartEndDates(e);\r\n\r\n e.component.showAppointmentPopup({\r\n Type: AppointmentType.Activity,\r\n StartDate: startDate,\r\n EndDate: endDate,\r\n EmployeeId: e.cellData.groups.EmployeeId,\r\n JobSession: click.itemData.type === \"job\" ? {} : null\r\n }, true);\r\n }\r\n\r\n private createJob(e: any, click: any): void {\r\n this.showCustomFormFields = true;\r\n\r\n const { startDate, endDate } = this.getStartEndDates(e);\r\n\r\n const difference = new Date(endDate).getTime() - new Date(startDate).getTime();\r\n this.formDurationTime = this.selectedCells.length === 1 ? new Date(this.defaultJobVisitDuration) : new Date(difference);\r\n\r\n e.component.showAppointmentPopup({\r\n NewJob: {\r\n Time: this.formDurationTime,\r\n Description: null,\r\n StartDate: startDate,\r\n },\r\n StartDate: startDate,\r\n EndDate: endDate,\r\n Type: AppointmentType.NewJob,\r\n EmployeeId: e.cellData.groups.EmployeeId,\r\n JobSession: click.itemData.type === \"job\" ? {} : null\r\n }, true);\r\n }\r\n\r\n private getStartEndDates(e: any): { startDate: Date; endDate: Date } {\r\n this.plannerService.MustExitFullscreen.emit();\r\n\r\n let selectedInRange = false;\r\n\r\n if (this.selectedCells) {\r\n this.selectedCells.forEach(cell => {\r\n if (cell.startDate === e.cellData.startDate) {\r\n selectedInRange = true;\r\n }\r\n });\r\n }\r\n\r\n let startDate: Date = e.cellData.startDate;\r\n let endDate: Date = e.cellData.endDate;\r\n\r\n if (selectedInRange) {\r\n startDate = this.selectedCells[0].startDate;\r\n endDate = this.selectedCells[this.selectedCells.length - 1].endDate;\r\n }\r\n\r\n startDate = moment(startDate).toDate();\r\n endDate = moment(endDate).toDate();\r\n\r\n return {\r\n startDate,\r\n endDate\r\n };\r\n }\r\n\r\n public showWorkingHoursOnlyChanged() {\r\n this.plannerService.SetPlannerLayoutOption({ ShowWorkingHoursOnly: this.showWorkingHoursOnly });\r\n }\r\n\r\n public onOptionChanged(e: any): void {\r\n if (e.name === \"currentView\") {\r\n this.CurrentView = e.value;\r\n this.plannerService.SetPlannerLayoutOption({ SelectedCalendarView: e.value });\r\n } else if (e.name === \"selectedCellData\") {\r\n this.selectedCells = e.value;\r\n } else if (e.name === \"currentDate\") {\r\n this.plannerService.SetPlannerDate(e.value);\r\n }\r\n }\r\n\r\n public onAppointmentUpdating(e: any): void {\r\n this.engineerSkillsCallbackFunction = null;\r\n // Appointment updating is continued or canceled once the Promise has been resolved (user confirmation).\r\n e.cancel = new Promise((resolve) => {\r\n if (e.newData.EmployeeId !== e.oldData.EmployeeId) {\r\n if (e.newData.Activity) {\r\n // If an activity, we don't want to do any of the skill check code.\r\n if (this.IsAddOrEditDisabled(e.newData.EmployeeId, e.newData.StartDate) || e.oldData.disabled === true) {\r\n resolve(true);\r\n } else {\r\n this.UpdateAppointment(e);\r\n resolve(false);\r\n }\r\n } else {\r\n this.engineerSkillService.EngineerSkillsCheckForJob(e.newData.EmployeeId, e.newData.Id).subscribe(x => {\r\n if (x.IsSuccess) {\r\n resolve(false);\r\n } else {\r\n this.skillCheckWarningMessage = x.Message;\r\n this.showSkillCheckWarningMessage = true;\r\n this.skillCheckConfirmationDialogue.confirmed.subscribe(isConfirmed => {\r\n if (isConfirmed === true) {\r\n if (this.IsAddOrEditDisabled(e.newData.EmployeeId, e.newData.StartDate) || e.oldData.disabled === true) {\r\n resolve(true);\r\n } else {\r\n this.UpdateAppointment(e);\r\n resolve(false);\r\n }\r\n } else {\r\n resolve(true);\r\n }\r\n });\r\n }\r\n });\r\n }\r\n } else {\r\n resolve(false);\r\n }\r\n });\r\n }\r\n\r\n public onAppointmentContextMenu(e: any): void {\r\n this.contextTarget = \".dx-scheduler-appointment\";\r\n this.contextDisabled = false;\r\n if (e.appointmentData && e.appointmentData.Activity) {\r\n this.contextDataSource = this.GetActivityContextMenuItems(e.appointmentData);\r\n } else {\r\n this.contextDataSource = this.GetJobContextMenuItems(e.appointmentData);\r\n }\r\n this.onContextMenuItemClick = this.onItemClick(e);\r\n }\r\n\r\n public onAppointmentFormOpening(e: any): void {\r\n this.form = e.form;\r\n this.data = e.appointmentData;\r\n e.popup.option(\"height\", \"auto\");\r\n this.formStartDate = this.data.StartDate;\r\n\r\n switch (this.data.Type) {\r\n case AppointmentType.Job:\r\n this.prepareJobForm();\r\n break;\r\n case AppointmentType.NewJob:\r\n e.popup.option(\"height\", \"440px\");\r\n this.prepareNewJobForm();\r\n break;\r\n case AppointmentType.Activity:\r\n default:\r\n this.prepareActivityForm();\r\n }\r\n }\r\n\r\n public durationChanged(e): void {\r\n this.formDurationTime = new Date(e);\r\n this.form.updateData(\"NewJob.Time\", this.formDurationTime);\r\n\r\n this.calculateAndSetEndDate();\r\n }\r\n\r\n public formDateTimeDueChanged(e: any): void {\r\n this.formStartDateChanged(e);\r\n this.calculateAndSetEndDate();\r\n }\r\n\r\n public formSiteChanged(e: any): void {\r\n if (e.value) {\r\n this.engineerSkillService.EngineerSkillsCheckForCustomer(this.data.EmployeeId, e.value).subscribe(x => {\r\n this.engineerSkillsCallbackFunction = this.UpdateFormSite;\r\n this.dataToConfirm = e.value;\r\n if (x.IsSuccess) {\r\n this.UpdateFormSite(e.value);\r\n } else {\r\n this.skillCheckWarningMessage = x.Message;\r\n this.showSkillCheckWarningMessage = true;\r\n }\r\n });\r\n }\r\n }\r\n\r\n public UpdateInternalNotes(e): void {\r\n this.data.NewJob.Description = e;\r\n this.form.updateData(\"NewJob.Description\", e);\r\n }\r\n\r\n private checkIsOrderNumberRequired(customerId: number): void {\r\n this.customerService.IsOrderNumberRequired(customerId).subscribe(result => {\r\n this.form.itemOption(\"OrderNo\", \"isRequired\", result);\r\n });\r\n }\r\n\r\n private setCustomerContacts(customerId: number): void {\r\n this.customerService.GetCustomerContactsAsync(customerId).subscribe(contacts => {\r\n this.contacts = contacts.filter(c => c.Status === ContactStatus.ACTIVE);\r\n this.form.getEditor(\"NewJob.ContactId\").option(\"disabled\", false);\r\n this.form.getEditor(\"NewJob.ContactId\").option(\"items\", this.contacts);\r\n });\r\n }\r\n\r\n public onAppointmentDeleting(e: any): void {\r\n if (this.IsAddOrEditDisabled(e.appointmentData.EmployeeId, e.appointmentData.StartDate)) {\r\n e.cancel = true;\r\n }\r\n }\r\n\r\n public formStartDateChanged(e: any): void {\r\n this.formStartDate = e.value;\r\n }\r\n\r\n public validateEndDate(options: any): boolean {\r\n return moment(options.value).toDate() > moment(this.formStartDate).toDate();\r\n }\r\n\r\n public onCellContextMenu(e: any): void {\r\n const menuItems = [\r\n {\r\n text: \"planner.menu.new-activity\",\r\n onItemClick: this.createActivity.bind(this),\r\n type: \"activity\",\r\n disabled: this.IsAddOrEditDisabled(e.cellData.groups.EmployeeId, e.cellData.startDate)\r\n }\r\n ];\r\n\r\n if (this.hasCreateJobPermission) {\r\n menuItems.push(\r\n {\r\n text: \"planner.menu.new-job\",\r\n onItemClick: this.createJob.bind(this),\r\n type: \"newJob\",\r\n disabled: this.IsAddOrEditDisabled(e.cellData.groups.EmployeeId, e.cellData.startDate)\r\n }\r\n );\r\n }\r\n\r\n this.contextTarget = \".dx-scheduler-date-table-cell\";\r\n this.contextDisabled = false;\r\n this.contextDataSource = menuItems;\r\n this.onContextMenuItemClick = this.onItemClick(e);\r\n }\r\n\r\n public onItemClick(contextMenuEvent: any): (e: any) => void {\r\n return (e) => {\r\n e.itemData.onItemClick(contextMenuEvent, e);\r\n };\r\n }\r\n\r\n public showAppointment(e: any): void {\r\n this.showCustomFormFields = false;\r\n this.plannerService.MustExitFullscreen.emit();\r\n e.component.showAppointmentPopup(e.appointmentData);\r\n }\r\n\r\n public deleteAppointment(e: any): void {\r\n e.component.deleteAppointment(e.appointmentData);\r\n }\r\n\r\n public onContextMenuHiding(): void {\r\n this.contextDisabled = true;\r\n this.contextDataSource = [];\r\n }\r\n\r\n public onContextMenuInitalized(e: any): void {\r\n // eslint-disable-next-line no-underscore-dangle\r\n const oldOptions = e.component._getOverlayOptions();\r\n oldOptions.container = document.querySelector(\"#new-planner-container\");\r\n // eslint-disable-next-line no-underscore-dangle\r\n e.component._getOverlayOptions = () => {\r\n return oldOptions;\r\n };\r\n }\r\n\r\n public onContextMenuRendered(e): void {\r\n if (this.contextDataSource.length > 10) {\r\n const element = e.itemElement.closest(\".dx-submenu\");\r\n if (ScrollView.getInstance(element) as ScrollView === undefined) {\r\n element.style.height = \"400px\";\r\n new ScrollView(element, {});\r\n }\r\n }\r\n }\r\n\r\n public HandleCalendarButtonClicked(engineer: EngineerModel): void {\r\n // TODO: Handle button click for now just logging to console with temporary exception to rule\r\n // eslint-disable-next-line no-console\r\n console.log(engineer);\r\n }\r\n\r\n public HandleDateCellClick(evt: any): void {\r\n evt.event.preventDefault();\r\n evt.event.stopPropagation();\r\n this.EditorActivity = {\r\n StartDate: evt.cellData.startDate,\r\n EndDate: evt.cellData.endDate,\r\n EmployeeId: evt.cellData.groups.EmployeeId\r\n };\r\n // eslint-disable-next-line no-console\r\n console.log(evt);\r\n this.ShowActivityPopup = true;\r\n }\r\n\r\n public HandleDeleteAppointmentClicked(appointment: AppointmentModel): void {\r\n this.calender.instance.deleteAppointment(appointment);\r\n }\r\n\r\n public CloseCalendarTooltip(): void {\r\n this.calender.instance.hideAppointmentTooltip();\r\n }\r\n\r\n public HandleEditActivityCancelled(): void {\r\n this.ShowActivityPopup = false;\r\n this.EditorActivity = null;\r\n }\r\n\r\n public HandleJobDropped(evt: any): void {\r\n this.engineerSkillService.EngineerSkillsCheckForJob(evt.itemData.EmployeeId, evt.itemData.JobSession.JobId).subscribe(x => {\r\n this.engineerSkillsCallbackFunction = this.AddAppointment;\r\n this.dataToConfirm = evt.itemData;\r\n if (x.IsSuccess) {\r\n this.AddAppointment(evt.itemData);\r\n } else {\r\n this.skillCheckWarningMessage = x.Message;\r\n this.showSkillCheckWarningMessage = true;\r\n }\r\n });\r\n }\r\n\r\n private AddAppointment(model: AppointmentModel): void {\r\n const addJobDisabled = this.IsAddOrEditDisabled(model.EmployeeId, model.StartDate);\r\n if (model.EmployeeId && !addJobDisabled) {\r\n const appointment = this.plannerService.AssignJob(model);\r\n this.calender.instance.addAppointment(appointment);\r\n }\r\n }\r\n\r\n private UpdateFormSite(customerId: number): void {\r\n this.checkIsOrderNumberRequired(customerId);\r\n this.setCustomerContacts(customerId);\r\n }\r\n\r\n private UpdateAppointment(e: any): void {\r\n if (e.newData.EndDate instanceof Date) {\r\n if (e.newData.EndDate.getMinutes() === 59) {\r\n e.newData.EndDate.setMinutes(0);\r\n e.newData.EndDate.setHours(e.newData.EndDate.getHours() + 1);\r\n } else if (e.newData.EndDate.getMinutes() === 44) {\r\n e.newData.EndDate.setMinutes(45);\r\n } else if (e.newData.EndDate.getMinutes() === 29) {\r\n e.newData.EndDate.setMinutes(30);\r\n } else if (e.newData.EndDate.getMinutes() === 14) {\r\n e.newData.EndDate.setMinutes(15);\r\n }\r\n }\r\n\r\n if (e.newData.StartDate instanceof Date) {\r\n if (e.newData.StartDate.getMinutes() === 59) {\r\n e.newData.StartDate.setMinutes(0);\r\n e.newData.StartDate.setHours(e.newData.StartDate.getHours() + 1);\r\n } else if (e.newData.StartDate.getMinutes() === 44) {\r\n e.newData.StartDate.setMinutes(45);\r\n } else if (e.newData.StartDate.getMinutes() === 29) {\r\n e.newData.StartDate.setMinutes(30);\r\n } else if (e.newData.StartDate.getMinutes() === 14) {\r\n e.newData.StartDate.setMinutes(15);\r\n }\r\n }\r\n }\r\n\r\n public onConfirmEngineerSkills(isConfirmed: any): void {\r\n if (isConfirmed === false && !!this.form) {\r\n this.form.updateData(\"NewJob.SiteId\", null);\r\n }\r\n\r\n this.showSkillCheckWarningMessage = false;\r\n }\r\n\r\n public HandleLocationButtonClicked(engineer: EngineerModel): void {\r\n this.selectedJobName = engineer.Name;\r\n if (engineer.Latitude) {\r\n this.selectedJobCenter = {\r\n lat: engineer.Latitude,\r\n lng: engineer.Longitude\r\n };\r\n\r\n this.selectedJobMarkers = [{\r\n iconSrc: MapPins.standardPin,\r\n location: {\r\n lat: engineer.Latitude,\r\n lng: engineer.Longitude\r\n },\r\n tooltip: {\r\n isShown: false,\r\n text: engineer.Name\r\n }\r\n }];\r\n\r\n this.selectedJobPopupVisible = true;\r\n } else {\r\n this.toasterService.pop(\"Engineer has no location information\", ToastType.dark, 3000);\r\n }\r\n }\r\n\r\n public HandleSaveActivityFailed(appointment: AppointmentModel): void {\r\n this.RemoveAppointment(appointment);\r\n }\r\n\r\n public HandleSaveActivityStarted(appointment: AppointmentModel): void {\r\n this.Appointments.push(appointment);\r\n }\r\n\r\n public HandleAppointmentRemove(evt: any): void {\r\n this.plannerService.RemoveAssignment(evt.itemData);\r\n }\r\n\r\n public isOutOfHours(date: Date): boolean {\r\n const hour = date.getHours();\r\n return hour < this.startDayHour || hour >= this.endDayHour;\r\n }\r\n\r\n public isHoliday(date: Date): boolean {\r\n return this.publicHolidays.findIndex(x =>\r\n x.HolidayDate.getUTCFullYear() === date.getFullYear() &&\r\n x.HolidayDate.getUTCMonth() === date.getMonth() &&\r\n x.HolidayDate.getUTCDate() === date.getDate()) > -1;\r\n }\r\n\r\n public IsAddOrEditDisabled(employeeId: number, date: Date): boolean {\r\n if (employeeId && date && !this.overrideTimesheetRestrictions) {\r\n const employee = this.allEngineers.find(x => x.id === employeeId);\r\n if (employee) {\r\n const startDate = moment(date);\r\n const lastSubmit = moment(employee.LastSubmitDate);\r\n return lastSubmit.isSameOrAfter(startDate, \"day\");\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n private prepareNewJobForm(): void {\r\n this.setFormColCount(5);\r\n this.calculateAndSetEndDate();\r\n this.data.NewJob = this.data.NewJob || {\r\n SiteId: null,\r\n JobTypeId: null,\r\n ContactId: null,\r\n Description: null,\r\n OrderNo: null,\r\n StartDate: null,\r\n Time: null\r\n };\r\n\r\n const items = [{\r\n label: { text: this.transalteService.instant(\"appointment-form.new-job.site\") },\r\n name: \"SiteId\",\r\n editorType: \"dxSelectBox\",\r\n dataField: \"NewJob.SiteId\",\r\n colSpan: 3,\r\n editorOptions: {\r\n searchEnabled: true,\r\n searchExpr: [\"Customer\", \"Alpha\", \"Address1\", \"Address2\", \"Address3\", \"Address4\", \"PostCode\"],\r\n dataSource: this.sitesDataSource,\r\n displayExpr: \"Customer\",\r\n valueExpr: \"CustomerId\",\r\n width: \"100%\",\r\n onValueChanged: this.formSiteChanged.bind(this)\r\n },\r\n validationRules: [{\r\n type: \"required\",\r\n message: this.transalteService.instant(\"appointment-form.new-job.required.site\")\r\n }]\r\n }, {\r\n label: { text: this.transalteService.instant(\"appointment-form.new-job.job-type\") },\r\n name: \"JobType\",\r\n editorType: \"dxSelectBox\",\r\n dataField: \"NewJob.JobTypeId\",\r\n colSpan: 2,\r\n editorOptions: {\r\n items: this.jobTypes,\r\n displayExpr: \"Name\",\r\n valueExpr: \"Id\",\r\n width: \"100%\"\r\n },\r\n validationRules: [{\r\n type: \"required\",\r\n message: this.transalteService.instant(\"appointment-form.new-job.required.job-type\")\r\n }]\r\n }, {\r\n label: { text: this.transalteService.instant(\"appointment-form.new-job.contact\") },\r\n name: \"Contact\",\r\n editorType: \"dxSelectBox\",\r\n dataField: \"NewJob.ContactId\",\r\n colSpan: 3,\r\n editorOptions: {\r\n items: this.contacts,\r\n displayExpr: \"Name\",\r\n valueExpr: \"ContactID\",\r\n width: \"100%\",\r\n disabled: true\r\n }\r\n }, {\r\n label: { text: this.transalteService.instant(\"appointment-form.new-job.order-no\") },\r\n name: \"OrderNo\",\r\n editorType: \"dxTextBox\",\r\n dataField: \"NewJob.OrderNo\",\r\n colSpan: 2,\r\n editorOptions: {\r\n width: \"100%\"\r\n }\r\n }, {\r\n label: { text: this.transalteService.instant(\"appointment-form.new-job.date-time-due\") },\r\n dataField: \"NewJob.StartDate\",\r\n editorType: \"dxDateBox\",\r\n colSpan: 3,\r\n editorOptions: {\r\n type: \"datetime\",\r\n width: \"100%\",\r\n onValueChanged: this.formDateTimeDueChanged.bind(this)\r\n },\r\n validationRules: [{\r\n type: \"required\",\r\n message: this.transalteService.instant(\"appointment-form.new-job.required.start-date\")\r\n }]\r\n }, {\r\n label: { text: this.transalteService.instant(\"appointment-form.new-job.duration\") },\r\n dataField: \"NewJob.Time\",\r\n template: \"durationTemplate\",\r\n colSpan: 2\r\n }, {\r\n label: { text: this.transalteService.instant(\"appointment-form.new-job.work-description\") },\r\n dataField: \"NewJob.Description\",\r\n template: \"notesTemplate\",\r\n colSpan: 5,\r\n }];\r\n this.form.option(\"items\", items);\r\n this.calculateAndSetEndDate();\r\n }\r\n\r\n private prepareActivityForm(): void {\r\n this.setFormColCount();\r\n this.data.Activity = this.data.Activity || {\r\n ActivityType: null,\r\n ActivityTypeId: null,\r\n BackColorWeb: null\r\n };\r\n\r\n const items = [{\r\n label: { text: \"Activity type\" },\r\n name: \"ActivityType\",\r\n editorType: \"dxSelectBox\",\r\n dataField: \"Activity.ActivityTypeId\",\r\n editorOptions: {\r\n items: this.ActivityTypes,\r\n displayExpr: \"ActivityName\",\r\n valueExpr: \"ActivityTypeID\",\r\n width: \"100%\"\r\n },\r\n validationRules: [{\r\n type: \"required\",\r\n message: \"Activity type is required\"\r\n }]\r\n }, {\r\n label: { text: \"Start date\" },\r\n dataField: \"StartDate\",\r\n editorType: \"dxDateBox\",\r\n editorOptions: {\r\n type: \"datetime\",\r\n width: \"100%\",\r\n onValueChanged: this.formStartDateChanged.bind(this)\r\n },\r\n validationRules: [{\r\n type: \"required\",\r\n message: \"Start date is required\"\r\n }]\r\n }, {\r\n label: { text: \"End date\" },\r\n dataField: \"EndDate\",\r\n editorType: \"dxDateBox\",\r\n editorOptions: {\r\n type: \"datetime\",\r\n width: \"100%\"\r\n },\r\n validationRules: [{\r\n type: \"required\",\r\n message: \"End date is required\"\r\n }, {\r\n type: \"custom\",\r\n reevaluate: true,\r\n validationCallback: this.validateEndDate.bind(this),\r\n message: \"End date must be later than the start date\"\r\n }]\r\n }, {\r\n label: { text: \"Notes\" },\r\n dataField: \"Activity.Notes\",\r\n editorType: \"dxTextArea\",\r\n editorOptions: {\r\n width: \"100%\"\r\n }\r\n }];\r\n this.form.option(\"items\", items);\r\n this.data.Type = AppointmentType.Activity;\r\n this.form.updateData(\"Type\", AppointmentType.Activity);\r\n }\r\n\r\n private prepareJobForm(): void {\r\n this.setFormColCount();\r\n const items = [{\r\n label: { text: \"Job no\" },\r\n editorType: \"dxTextBox\",\r\n dataField: \"JobSession.JobId\",\r\n editorOptions: {\r\n width: \"100%\",\r\n readOnly: true\r\n }\r\n }, {\r\n label: { text: \"Start date\" },\r\n dataField: \"StartDate\",\r\n editorType: \"dxDateBox\",\r\n editorOptions: {\r\n type: \"datetime\",\r\n width: \"100%\",\r\n onValueChanged: this.formStartDateChanged.bind(this)\r\n },\r\n validationRules: [{\r\n type: \"required\",\r\n message: \"Start date is required\"\r\n }]\r\n }, {\r\n label: { text: \"End date\" },\r\n dataField: \"EndDate\",\r\n editorType: \"dxDateBox\",\r\n editorOptions: {\r\n type: \"datetime\",\r\n width: \"100%\"\r\n },\r\n validationRules: [{\r\n type: \"required\",\r\n message: \"End date is required\"\r\n }, {\r\n type: \"custom\",\r\n reevaluate: true,\r\n validationCallback: this.validateEndDate.bind(this),\r\n message: \"End date must be later than the start date\"\r\n }]\r\n }];\r\n this.form.option(\"items\", items);\r\n }\r\n\r\n private calculateAndSetEndDate(): void {\r\n const newEndTime = new Date(this.formStartDate).getTime() + this.formDurationTime.getTime();\r\n const newEndDate = new Date(newEndTime);\r\n this.form.updateData(\"NewJob.EndDate\", newEndDate);\r\n }\r\n\r\n private setFormColCount(count: number = 2): void {\r\n const column = this.form.option(\"colCountByScreen\");\r\n column.lg = count;\r\n column.md = count;\r\n column.sm = count;\r\n column.xs = count;\r\n this.form.option(\"colCount\", count);\r\n }\r\n\r\n private SetEngineersDataSource(engineers: EngineerModel[]): void {\r\n if(this.Engineers && JSON.stringify(this.Engineers.items()) === JSON.stringify(engineers)){\r\n return; // engineers list has not changed\r\n }\r\n\r\n\r\n this.Engineers = new DataSource({\r\n store: new ArrayStore({\r\n data: engineers\r\n }),\r\n sort: \"Name\",\r\n paginate: false\r\n });\r\n }\r\n\r\n private HandleJobAssignmentFailed(eventArgs: JobAssignmentFailedEventArgs): void {\r\n this.RemoveAppointment(eventArgs.appointment);\r\n }\r\n\r\n private HandleRemoveAssignementFailed(appointment: AppointmentModel): void {\r\n // Sadly DevExtreme scheduler updates the appointment with ids and dates as it is dragged over other cells\r\n // so can't just add the original appointment back\r\n const appointmentToAdd = this.plannerService.CreateAppointmentFromJobSession(appointment.JobSession);\r\n this.Appointments.push(appointmentToAdd);\r\n }\r\n\r\n private HandleRemoveAssignementStarted(appointment: AppointmentModel): void {\r\n this.calender.instance.deleteAppointment(appointment);\r\n }\r\n\r\n private RemoveAppointment(appointment: AppointmentModel) {\r\n const index = this.Appointments.indexOf(appointment);\r\n if (index !== -1) {\r\n this.Appointments.splice(index, 1);\r\n }\r\n }\r\n\r\n private GetJobContextMenuItems(appointment: any): any[] {\r\n const menuItems = Array.from(this.jobContextMenuItems);\r\n menuItems.unshift(\r\n {\r\n text: \"planner.menu.edit-job\",\r\n onItemClick: this.showAppointment.bind(this),\r\n disabled: this.IsAddOrEditDisabled(appointment.EmployeeId, appointment.StartDate)\r\n });\r\n const engineerList = this.engineerContextMenus.filter(e => e.id !== Number(appointment.EmployeeId) && !this.IsAddOrEditDisabled(e.id, appointment.StartDate));\r\n return menuItems.concat(engineerList);\r\n }\r\n\r\n private GetActivityContextMenuItems(appointment: any): any[] {\r\n const menuItems = Array.from(this.activityContextMenuItems);\r\n menuItems.unshift(\r\n {\r\n text: \"planner.menu.edit-activity\",\r\n beginGroup: false,\r\n onItemClick: this.showAppointment.bind(this),\r\n disabled: this.IsAddOrEditDisabled(appointment.EmployeeId, appointment.StartDate)\r\n });\r\n const engineerList = this.engineerContextMenus.filter(e => e.id !== Number(appointment.EmployeeId) && !this.IsAddOrEditDisabled(e.id, appointment.StartDate));\r\n return menuItems.concat(engineerList);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n","import { Component, ComponentFactoryResolver, Injector, OnInit, ViewChild, ViewContainerRef } from \"@angular/core\";\r\nimport { ToasterService, ToastType } from \"servicesight-shared\";\r\nimport { MapPins } from \"src/app/shared/constants/map-pins.constants\";\r\nimport { EngineerModel } from \"src/app/shared/models/engineer.model\";\r\nimport { EngineerService } from \"src/app/shared/services/engineer/engineer.service\";\r\nimport { EngineerCardMode } from \"../enums/engineer-card-mode.enum\";\r\nimport { AppointmentModel } from \"../models/appointment.model\";\r\nimport { EngineerVisit } from \"../models/engineer-visit.model\";\r\nimport { PlannerAppointmentCardComponent } from \"../planner-appointment-card/planner-appointment-card.component\";\r\nimport { PlannerService } from \"../services/planner.service\";\r\n\r\n@Component({\r\n selector: \"app-planner-map\",\r\n templateUrl: \"./planner-map.component.html\",\r\n styleUrls: [\"./planner-map.component.scss\"]\r\n})\r\nexport class PlannerMapComponent implements OnInit {\r\n\r\n @ViewChild(\"hiddenEl\", { read: ViewContainerRef }) viewContainerRef: ViewContainerRef;\r\n private allEngineers: EngineerModel[] = [];\r\n private selectedEngineers: number[] = [];\r\n private selectedMarkerJobId: number = null;\r\n\r\n public autoAdjust = true;\r\n public enginnerId: number = null;\r\n public showScheduler: boolean = false;\r\n public engineerCardMode: EngineerCardMode = EngineerCardMode.FullWidth;\r\n public mapZoom: number = 8;\r\n public center: { lat: number; lng: number } = null;\r\n public markers = [];\r\n\r\n public get engineers(): EngineerModel[] {\r\n if (!this.selectedEngineers || this.selectedEngineers.length === 0) {\r\n return this.allEngineers;\r\n }\r\n\r\n return this.allEngineers.filter(x => this.selectedEngineers.includes(x.id));\r\n }\r\n\r\n constructor(\r\n private toasterService: ToasterService,\r\n private plannerService: PlannerService,\r\n private engineerService: EngineerService,\r\n private injector: Injector,\r\n private factoryResolver: ComponentFactoryResolver) { }\r\n\r\n public ngOnInit(): void {\r\n this.engineerService.GetEngineers().subscribe(engineers => {\r\n this.allEngineers = engineers;\r\n });\r\n\r\n this.plannerService.SelectedEngineers.subscribe(selectedEngineers => {\r\n this.selectedEngineers = selectedEngineers;\r\n });\r\n\r\n this.plannerService.MapItemSelected.subscribe((appointment: AppointmentModel) => {\r\n if (this.selectedMarkerJobId !== null) {\r\n this.markers.pop();\r\n }\r\n\r\n if (this.selectedMarkerJobId === appointment.JobSession.JobId) {\r\n this.autoAdjust = true;\r\n this.selectedMarkerJobId = null;\r\n } else if (appointment.JobSession.Latitude) {\r\n this.center = {\r\n lat: appointment.JobSession.Latitude,\r\n lng: appointment.JobSession.Longitude\r\n };\r\n\r\n this.selectedMarkerJobId = appointment.JobSession.JobId;\r\n this.autoAdjust = false;\r\n this.mapZoom = 14;\r\n\r\n const lookup = this.markers.find(x =>\r\n x.location.lat === appointment.JobSession.Latitude &&\r\n x.location.lng === appointment.JobSession.Longitude);\r\n\r\n if (!lookup) {\r\n this.markers.push({\r\n iconSrc: MapPins.standardPin,\r\n location: {\r\n lat: appointment.JobSession.Latitude,\r\n lng: appointment.JobSession.Longitude\r\n },\r\n tooltip: {\r\n isShown: false,\r\n text: appointment.JobSession.SiteName\r\n }\r\n });\r\n }\r\n } else {\r\n this.toasterService.pop(\"Customer has no location information\", ToastType.dark, 3000);\r\n }\r\n });\r\n\r\n this.plannerService.GetEngineerVisits().subscribe(visits => {\r\n const factory = this.factoryResolver.resolveComponentFactory(PlannerAppointmentCardComponent);\r\n visits.forEach(visit => {\r\n if (this.isActivity(visit)) {\r\n return;\r\n }\r\n\r\n const component = factory.create(this.injector);\r\n component.instance.Appointment = this.visitToAppointment(visit);\r\n component.instance.hideActionButtons = true;\r\n this.viewContainerRef.insert(component.hostView);\r\n // Wait for loaded event before pushing to list\r\n component.instance.Loaded.subscribe(() => {\r\n this.markers.push({\r\n iconSrc: `data:image/png;base64,${visit.CustomMarker}`,\r\n location: {\r\n lat: visit.Latitude,\r\n lng: visit.Longitude\r\n },\r\n tooltip: {\r\n isShown: false,\r\n text: component.location.nativeElement\r\n }\r\n });\r\n });\r\n });\r\n });\r\n\r\n this.plannerService.GetMapLocationData().subscribe(data => {\r\n if (data.CustomerLocation.Latitude) {\r\n this.center = {\r\n lat: data.CustomerLocation.Latitude,\r\n lng: data.CustomerLocation.Longitude\r\n };\r\n\r\n this.markers.push({\r\n iconSrc: MapPins.homeMarker,\r\n location: {\r\n lat: data.CustomerLocation.Latitude,\r\n lng: data.CustomerLocation.Longitude\r\n },\r\n tooltip: {\r\n isShown: false,\r\n text: \"Home\"\r\n }\r\n });\r\n }\r\n\r\n data.EngineerWithJobs.Engineers.forEach(engineer => {\r\n this.markers.push({\r\n iconSrc: `data:image/png;base64,${engineer.CustomMarker}`,\r\n location: {\r\n lat: engineer.Location[0],\r\n lng: engineer.Location[1]\r\n },\r\n tooltip: {\r\n isShown: false,\r\n text: engineer.Name\r\n }\r\n });\r\n });\r\n\r\n data.EngineerWithJobs.Jobs.forEach(job => {\r\n this.markers.push({\r\n iconSrc: `data:image/png;base64,${job.CustomMarker}`,\r\n location: {\r\n lat: job.Location[0],\r\n lng: job.Location[1]\r\n },\r\n tooltip: {\r\n isShown: false,\r\n text: job.Name\r\n }\r\n });\r\n });\r\n });\r\n }\r\n\r\n public isEngineerActive(engineerId: number) {\r\n return this.showScheduler && this.enginnerId === engineerId;\r\n }\r\n\r\n public calendarButtonClicked(engineer: EngineerModel): void {\r\n if (this.showScheduler && this.enginnerId === engineer.id) {\r\n this.showScheduler = false;\r\n this.enginnerId = null;\r\n } else {\r\n this.showScheduler = true;\r\n this.enginnerId = engineer.id;\r\n }\r\n }\r\n\r\n public locationButtonClicked(engineer: EngineerModel): void {\r\n if (engineer.Latitude) {\r\n this.center = {\r\n lat: engineer.Latitude,\r\n lng: engineer.Longitude\r\n };\r\n\r\n this.autoAdjust = false;\r\n this.mapZoom = 14;\r\n }\r\n }\r\n\r\n private visitToAppointment(visit: EngineerVisit): AppointmentModel {\r\n return {\r\n EmployeeId: visit.EmployeeID,\r\n EndDate: visit.end,\r\n StartDate: visit.start,\r\n Text: visit.SiteName,\r\n JobSession: {\r\n JobId: visit.JobID,\r\n SessionId: visit.SessionID,\r\n JobType: visit.JobType,\r\n JobCatId: visit.JobCatID,\r\n Status: visit.Status,\r\n SiteName: visit.SiteName,\r\n SiteAddress: visit.Address1 + \"|\" + visit.Address3 + \"|\" + visit.Address4,\r\n SitePostCode: visit.PostCode,\r\n SitePhotoFace: visit.CustomerPhotoFace,\r\n UserRef1Job: \"\",\r\n UserRef2Job: \"\",\r\n EquipCount: null,\r\n EquipmentOoa: false,\r\n Latitude: visit.Latitude,\r\n Longitude: visit.Longitude,\r\n PriorityName: \"\"\r\n },\r\n disabled: true\r\n };\r\n }\r\n\r\n private isActivity(visit: EngineerVisit): boolean {\r\n return visit.ActivityTypeID > 0;\r\n }\r\n}\r\n","import { NgModule } from \"@angular/core\";\r\nimport { RouterModule, Routes } from \"@angular/router\";\r\nimport { PlannerCalendarComponent } from \"./planner-calendar/planner-calendar.component\";\r\nimport { PlannerMapComponent } from \"./planner-map/planner-map.component\";\r\n\r\nconst routes: Routes = [\r\n { path: \"calendar\", component: PlannerCalendarComponent },\r\n { path: \"map\", component: PlannerMapComponent },\r\n { path: \"\", redirectTo: \"calendar\", pathMatch: \"full\" },\r\n { path: \"**\", redirectTo: \"calendar\" }\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class PlannerRoutingModule {\r\n public static readonly Routes: Routes = routes;\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { ODataService } from \"../../shared/services/odata/odata.service\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { EngineerType, IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class EngineerTypeService {\r\n private readonly serviceSightODataBaseUrl: string;\r\n private readonly serviceSightBaseUrl: string;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private odataService: ODataService,\r\n @Inject(APP_CONFIG) appConfig: IAppConfig) {\r\n this.serviceSightODataBaseUrl = appConfig.apiLocations.ServiceSightOData;\r\n this.serviceSightBaseUrl = appConfig.apiLocations.ServiceSight;\r\n }\r\n\r\n public GetDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.serviceSightODataBaseUrl}EngineerTypeOD`,\r\n key: \"TypeId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetDataStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.serviceSightODataBaseUrl}EngineerTypeOD`,\r\n key: \"TypeId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public Get(typeId: number): Observable {\r\n return this.http.get(`${this.serviceSightBaseUrl}EngineerType/Get?typeID=${typeId}`);\r\n }\r\n\r\n public Update(engineerType: EngineerType): Observable {\r\n return this.http.put(`${this.serviceSightBaseUrl}EngineerType/Update`, engineerType);\r\n }\r\n\r\n public Create(engineerType: EngineerType): Observable {\r\n return this.http.post(`${this.serviceSightBaseUrl}EngineerType/Create`, engineerType);\r\n }\r\n\r\n public Delete(typeId: number): Observable {\r\n return this.http.delete(`${this.serviceSightBaseUrl}EngineerType/Delete?typeId=${typeId}`);\r\n }\r\n}\r\n","export class ModuleAccessModel {\r\n ConsumerPortalEnabled: boolean;\r\n AccountsLinkEnabled: boolean;\r\n EquipmentEnabled: boolean;\r\n RecurringJobsEnabled: boolean;\r\n ServiceContractsEnabled: boolean;\r\n StockEnabled: boolean;\r\n PurchaseOrdersEnabled: boolean;\r\n ProEnabled: boolean;\r\n SalesOrderEnabled: boolean;\r\n PowerBiEnabled: boolean;\r\n SalesOpportunityEnabled: boolean;\r\n SalesCampaignsEnabled: boolean;\r\n FGasEnabled: boolean;\r\n CustomerFeedbackEnabled: boolean;\r\n GasSafeEnabled: boolean;\r\n AdvancedQuotesEnabled: boolean;\r\n CFTSEnabled: boolean;\r\n Sfg20Enabled: boolean;\r\n ProjectEnabled: boolean;\r\n}\r\n","
\r\n

Planner board

\r\n
\r\n \r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n","import { Component, Input, OnDestroy, OnInit } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport ArrayStore from \"devextreme/data/array_store\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { combineLatest } from \"rxjs\";\r\nimport { ToasterService, ToastType, UICustomisation, UserReferenceService, UserRefType } from \"servicesight-shared\";\r\nimport { EngineerSkillModel } from \"src/app/settings/models/engineer-skill\";\r\nimport { EngineerSkillService } from \"src/app/settings/services/engineer-skill.service\";\r\nimport { EngineerTypeService } from \"src/app/settings/services/engineer-type.service\";\r\nimport { ModuleAccessModel } from \"src/app/shared/models/module-access.model\";\r\nimport { EngineerService } from \"src/app/shared/services/engineer/engineer.service\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { PlannerView } from \"../enums/planner-view.enum\";\r\nimport { PlannerService } from \"../services/planner.service\";\r\n\r\n@Component({\r\n selector: \"app-planner-view-bar\",\r\n templateUrl: \"./planner-view-bar.component.html\",\r\n styleUrls: [\"./planner-view-bar.component.scss\"]\r\n})\r\nexport class PlannerViewBarComponent implements OnInit, OnDestroy {\r\n @Input() fullscreenElement: any;\r\n\r\n public ModulesAccess: ModuleAccessModel = new ModuleAccessModel();\r\n private engineerSkills: EngineerSkillModel[] = [];\r\n public selectedEngineers: number[] = [];\r\n public engineers: DataSource;\r\n public topDownCalendarMode: boolean = false;\r\n public refreshEnabled: boolean = true;\r\n public refreshItems = [\r\n {\r\n id: \"no-refresh\",\r\n name: \"No auto refresh\",\r\n disabled: false\r\n },\r\n {\r\n id: \"1-refresh\",\r\n name: \"1 minute\",\r\n icon: \"fa fa-sync-alt\"\r\n },\r\n {\r\n id: \"5-refresh\",\r\n name: \"5 minute\"\r\n },\r\n {\r\n id: \"10-refresh\",\r\n name: \"10 minute\"\r\n }\r\n ];\r\n\r\n public plannerViews = [\r\n {\r\n view: \"list\",\r\n icon: \"fas fa-list\"\r\n },\r\n {\r\n view: \"calendar\",\r\n icon: \"fas fa-calendar-alt\"\r\n },\r\n {\r\n view: \"map\",\r\n icon: \"fas fa-map-marked-alt\"\r\n }\r\n ];\r\n\r\n public userRef1Label: string = \"\";\r\n public userRef2Label: string = \"\";\r\n public userReferenceDataStore: ODataStore;\r\n public engineerSkillsDataStore: ODataStore;\r\n public engineerTypeDataStore: ODataStore;\r\n\r\n private isFullscreen: boolean = false;\r\n private refresh;\r\n\r\n public get fullscreenIcon(): string {\r\n return this.isFullscreen ? \"fa fa-compress-arrows-alt\" : \"fa fa-expand-arrows-alt\";\r\n }\r\n\r\n constructor(\r\n private engineerSkillService: EngineerSkillService,\r\n private engineerService: EngineerService,\r\n private engineerTypeService: EngineerTypeService,\r\n private plannerService: PlannerService,\r\n private router: Router,\r\n private licenseService: LicenseService,\r\n private userRefsService: UserReferenceService,\r\n private toasterService: ToasterService) {\r\n this.calculateSkillsDisplay = this.calculateSkillsDisplay.bind(this);\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n if (this.refresh) {\r\n clearInterval(this.refresh);\r\n }\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.userRef1Label = this.userRefsService.getLabel(UICustomisation.EMPLOYEE_REF1);\r\n this.userRef2Label = this.userRefsService.getLabel(UICustomisation.EMPLOYEE_REF2);\r\n this.userReferenceDataStore = this.userRefsService.getListDataStore(UserRefType.EMPLOYEE_1);\r\n this.engineerSkillsDataStore = this.engineerSkillService.ODataEngineerSkills();\r\n this.engineerTypeDataStore = this.engineerTypeService.GetDataStore();\r\n\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(x => this.ModulesAccess = x);\r\n\r\n this.SetAutoRefreshTime(1);\r\n\r\n combineLatest([\r\n this.engineerSkillService.GetAll(),\r\n this.engineerService.GetEngineers(),\r\n this.plannerService.GetPlannerLayout(false)\r\n ]).subscribe(([skills, engineers, layout]) => {\r\n this.engineerSkills = skills;\r\n\r\n const store = new ArrayStore({\r\n key: \"Id\",\r\n data: engineers\r\n });\r\n\r\n this.engineers = new DataSource({\r\n store,\r\n paginate: false\r\n });\r\n\r\n this.topDownCalendarModeChanged(layout.PlannerView === PlannerView.PlannerTopDown);\r\n this.selectedEngineers = layout.SelectedEngineers || [];\r\n\r\n if (this.selectedEngineers.length > 0) {\r\n this.plannerService.SelectedEngineers.next(this.selectedEngineers);\r\n } else {\r\n this.plannerService.SelectedEngineers.next([]);\r\n }\r\n\r\n const loadedRefreshTime = layout.SelectedRefreshInterval || \"1-refresh\";\r\n const eventData = {\r\n itemData: {\r\n id: loadedRefreshTime\r\n }\r\n };\r\n\r\n this.RefreshItemClick(eventData);\r\n });\r\n\r\n this.plannerService.MustExitFullscreen.subscribe(() => {\r\n if (this.isFullscreen) {\r\n this.toggleFullscreen();\r\n }\r\n });\r\n\r\n this.plannerService.FilterEngineersBySkills.subscribe((jobId: number) => {\r\n this.engineerService.GetEmployeeIdsHavingEngineerSkillsRequiredForJob(jobId).subscribe((res: number[]) => {\r\n this.selectedEngineers = res;\r\n this.plannerService.SetSelectedEngineers(this.selectedEngineers);\r\n\r\n if (res.length === 0) {\r\n this.toasterService.pop(\"planner.skills-filter.no-results\", ToastType.dark, 10000);\r\n }\r\n });\r\n });\r\n }\r\n\r\n public engineerSelectionChanged(): void {\r\n this.plannerService.SetSelectedEngineers(this.selectedEngineers);\r\n }\r\n\r\n public calculateSkillsDisplay(rowData: any): string {\r\n if (this.engineerSkills) {\r\n return this.engineerSkills.filter(x => rowData.Skills.includes(x.SkillID)).map(x => x.Name).join(\", \");\r\n }\r\n\r\n return null;\r\n }\r\n\r\n public calculateSkillsFilter(filterValue: any): any {\r\n return [\"Skills\", \"contains\", filterValue];\r\n }\r\n\r\n public RefreshClick(): void {\r\n this.plannerService.ReloadAppointments();\r\n this.plannerService.MustReloadUnallocated.emit();\r\n }\r\n\r\n public RefreshItemClick(e: any): void {\r\n this.refreshItems.forEach(x => {\r\n x.icon = null;\r\n });\r\n\r\n switch (e.itemData.id) {\r\n case \"no-refresh\":\r\n this.refreshEnabled = false;\r\n this.refreshItems[0].disabled = true;\r\n break;\r\n case \"1-refresh\":\r\n this.refreshEnabled = true;\r\n this.refreshItems[0].disabled = false;\r\n this.refreshItems[1].icon = \"fa fa-sync-alt\";\r\n this.SetAutoRefreshTime(1);\r\n break;\r\n case \"5-refresh\":\r\n this.refreshEnabled = true;\r\n this.refreshItems[0].disabled = false;\r\n this.refreshItems[2].icon = \"fa fa-sync-alt\";\r\n this.SetAutoRefreshTime(5);\r\n break;\r\n case \"10-refresh\":\r\n this.refreshEnabled = true;\r\n this.refreshItems[0].disabled = false;\r\n this.refreshItems[3].icon = \"fa fa-sync-alt\";\r\n this.SetAutoRefreshTime(10);\r\n break;\r\n }\r\n\r\n this.plannerService.SetPlannerRefreshInterval(e.itemData.id);\r\n }\r\n\r\n public plannerViewsItemClick(e: any): void {\r\n switch (e.itemIndex) {\r\n case 0:\r\n if (!window.location.href.includes(\"calendar\")) {\r\n this.router.navigate([\"planner\", \"calendar\"]);\r\n }\r\n this.topDownCalendarModeChanged(false);\r\n break;\r\n case 1:\r\n if (!window.location.hash.includes(\"calendar\")) {\r\n this.router.navigate([\"planner\", \"calendar\"]);\r\n }\r\n this.topDownCalendarModeChanged(true);\r\n break;\r\n case 2:\r\n if (!window.location.hash.includes(\"map\")) {\r\n this.router.navigate([\"planner\", \"map\"]);\r\n }\r\n this.plannerService.SetPlannerLayoutOption({ PlannerView: PlannerView.PlannerMap });\r\n break;\r\n default:\r\n throw new Error(\"Not implemented index: \" + e.itemIndex);\r\n }\r\n }\r\n\r\n public topDownCalendarModeChanged(value: boolean): void {\r\n this.topDownCalendarMode = value;\r\n this.plannerService.SetTopDownCalendarMode(value);\r\n }\r\n\r\n public toggleFullscreen(): void {\r\n this.isFullscreen = !this.isFullscreen;\r\n\r\n const trueDocument = document as any;\r\n if (trueDocument.fullscreenElement) {\r\n if (trueDocument.exitFullscreen) {\r\n trueDocument.exitFullscreen();\r\n } else if (trueDocument.mozCancelFullScreen) {\r\n trueDocument.mozCancelFullScreen();\r\n } else if (trueDocument.msExitFullscreen) {\r\n trueDocument.msExitFullscreen();\r\n }\r\n } else {\r\n if (this.fullscreenElement.requestFullscreen) {\r\n this.fullscreenElement.requestFullscreen();\r\n } else if (this.fullscreenElement.mozRequestFullScreen) {\r\n this.fullscreenElement.mozRequestFullScreen();\r\n } else if (this.fullscreenElement.msRequestFullscreen) {\r\n this.fullscreenElement.msRequestFullscreen();\r\n }\r\n }\r\n }\r\n\r\n public saveLayout(): void {\r\n this.plannerService.PersistCurrentLayout();\r\n }\r\n\r\n public TypeSortValue(data: any): void {\r\n const column = this as any;\r\n const value = column.calculateCellValue(data);\r\n return column.lookup.calculateCellValue(value);\r\n }\r\n\r\n private SetAutoRefreshTime(minutes: number): void {\r\n if (this.refresh) {\r\n clearInterval(this.refresh);\r\n }\r\n this.refresh = setInterval(() => {\r\n this.plannerService.ReloadAppointments();\r\n this.plannerService.MustReloadUnallocated.emit();\r\n }, 60000 * minutes);\r\n }\r\n\r\n}\r\n","import { EventEmitter } from \"@angular/core\";\r\nimport { PlannerJobSession } from \"src/app/shared/models/planner/planner-job-session.model\";\r\nimport { AppointmentModel } from \"../models/appointment.model\";\r\nimport { PlannerService } from \"../services/planner.service\";\r\n\r\nexport class PlannerJobsBase {\r\n public DataSource: AppointmentModel[];\r\n public FocusedRowId: number = 0;\r\n public DataLoaded: EventEmitter = new EventEmitter();\r\n\r\n constructor(protected plannerService: PlannerService) { }\r\n\r\n protected onInit(): void {\r\n this.plannerService.AssignJobStarted.subscribe(this.HandleJobAssignmentStarted.bind(this));\r\n this.plannerService.AssignJobFailed.subscribe(this.HandleJobAssignmentFailed.bind(this));\r\n this.plannerService.RemoveAssignmentFailed.subscribe(this.HandleRemoveAssignementFailed.bind(this));\r\n\r\n this.LoadData();\r\n }\r\n\r\n protected LoadData(): void {\r\n this.plannerService.GetUnassignedJobs().subscribe(d => {\r\n this.DataSource = d;\r\n this.DataLoaded.emit();\r\n });\r\n }\r\n\r\n private AddUnassignedJob(appointment: AppointmentModel): void {\r\n this.DataSource.push(appointment);\r\n }\r\n\r\n private HandleJobAssignmentFailed(appointment: AppointmentModel): void {\r\n this.AddUnassignedJob(appointment);\r\n }\r\n\r\n private HandleJobAssignmentStarted(jobSession: PlannerJobSession): void {\r\n const index = this.DataSource.findIndex((d) => d.JobSession.JobId === jobSession.JobId);\r\n this.DataSource.splice(index, 1);\r\n this.FocusedRowId = 0;\r\n }\r\n\r\n private HandleRemoveAssignementFailed(appointment: AppointmentModel): void {\r\n this.AddUnassignedJob(appointment);\r\n }\r\n}\r\n","
\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n
\r\n \r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n
\r\n\r\n \r\n\r\n
\r\n {{ data.value | jobStatus | translate }}\r\n
\r\n\r\n
\r\n {{ data.value | jobCategory | translate }}\r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n
\r\n","import { Component, Input, OnDestroy, OnInit, ViewChild } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport ArrayStore from \"devextreme/data/array_store\";\r\nimport { Subscription } from \"rxjs\";\r\nimport { JobDataService, Module, PriorityService, UICustomisation, UserReferenceService } from \"servicesight-shared\";\r\nimport { JobCat } from \"src/app/shared/enums/job-cat.enum\";\r\nimport { JobCategoryPipe } from \"src/app/shared/pipes/job-category.pipe\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { PlannerJobsBase } from \"./planner-jobs.base\";\r\nimport { AppointmentModel } from \"../models/appointment.model\";\r\nimport { PlannerService } from \"../services/planner.service\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\n\r\n@Component({\r\n selector: \"app-planner-job-panel\",\r\n templateUrl: \"./planner-job-panel.component.html\",\r\n styleUrls: [\"./planner-job-panel.component.scss\"],\r\n})\r\nexport class PlannerJobPanelComponent extends PlannerJobsBase implements OnInit, OnDestroy {\r\n private hasLoadedAtleastOnce: boolean = false;\r\n private dataLoadedSubscription: Subscription;\r\n private reloadDataSubscription: Subscription;\r\n private removeAssignSubscription: Subscription;\r\n private prioritiesDataSource: DataSource;\r\n\r\n @ViewChild(\"jobsGrid\") jobsGrid: DxDataGridComponent;\r\n @Input() height: number = 200;\r\n public categoryLookup: ArrayStore;\r\n public equipmentEnabled: boolean = false;\r\n public proEnabled: boolean = false;\r\n\r\n public labelJobRef1: string = \"label.jobs.grid.jobref1\";\r\n public labelJobRef2: string = \"label.jobs.grid.jobref2\";\r\n\r\n public initialLoad: () => {}; //on load set as empty, grid will be initialized during ngOnInit\r\n public gridConfigLoaded: boolean = false;\r\n\r\n public jobGroups: { jobGroupId: number; jobGroup: string }[] = [];\r\n\r\n constructor(\r\n plannerService: PlannerService,\r\n private licenseService: LicenseService,\r\n private jobCatPipe: JobCategoryPipe,\r\n private translate: TranslateService,\r\n private router: Router,\r\n private userReferenceService: UserReferenceService,\r\n private jobsService: JobDataService,\r\n private priorityService: PriorityService) {\r\n super(plannerService);\r\n this.HandleAppointmentDropped = this.HandleAppointmentDropped.bind(this);\r\n this.onEditorPreparing = this.onEditorPreparing.bind(this);\r\n }\r\n\r\n public HandleAppointmentDropped(evt: any): void {\r\n const appointment: AppointmentModel = evt.itemData;\r\n this.handleInboundAppointment(appointment);\r\n }\r\n\r\n public ngOnInit() {\r\n this.dataLoadedSubscription = this.DataLoaded.subscribe(() => {\r\n this.jobsGrid.instance.repaint();\r\n });\r\n\r\n this.prioritiesDataSource = this.priorityService.OrderedPrioritiesDataSource();\r\n this.prioritiesDataSource.load();\r\n\r\n this.reloadDataSubscription = this.plannerService.MustReloadUnallocated.subscribe(() => {\r\n this.LoadData();\r\n });\r\n\r\n this.onInit();\r\n\r\n this.labelJobRef1 = this.userReferenceService.getLabel(UICustomisation.JOB_REF1);\r\n this.labelJobRef2 = this.userReferenceService.getLabel(UICustomisation.JOB_REF2);\r\n\r\n this.translate.get([\r\n this.jobCatPipe.transform(JobCat.Abuse),\r\n this.jobCatPipe.transform(JobCat.Callout),\r\n this.jobCatPipe.transform(JobCat.Repair),\r\n this.jobCatPipe.transform(JobCat.Service)\r\n ]).subscribe(translations => {\r\n this.categoryLookup = new ArrayStore({\r\n key: \"id\",\r\n data: [\r\n { id: JobCat.Abuse, name: translations[this.jobCatPipe.transform(JobCat.Abuse)] },\r\n { id: JobCat.Callout, name: translations[this.jobCatPipe.transform(JobCat.Callout)] },\r\n { id: JobCat.Repair, name: translations[this.jobCatPipe.transform(JobCat.Repair)] },\r\n { id: JobCat.Service, name: translations[this.jobCatPipe.transform(JobCat.Service)] }\r\n ]\r\n });\r\n });\r\n\r\n this.removeAssignSubscription = this.plannerService.RemoveAssignmentStarted.subscribe((app: AppointmentModel) => {\r\n this.handleInboundAppointment(app);\r\n });\r\n\r\n this.SetModulesPermissions();\r\n\r\n this.jobsService.GetAllGroups().subscribe(result => {\r\n this.jobGroups = result.map(group => {\r\n return {\r\n jobGroupId: group.JobGroupID,\r\n jobGroup: group.JobGroup\r\n };\r\n });\r\n });\r\n\r\n this.loadState()\r\n .then(gridLayout => {\r\n this.jobsGrid.instance.state(gridLayout);\r\n if (!this.equipmentEnabled) {\r\n this.jobsGrid.instance.columnOption(\"JobSession.EquipCount\", \"visible\", false);\r\n }\r\n if (!this.equipmentEnabled || !this.proEnabled) {\r\n this.jobsGrid.instance.columnOption(\"JobSession.EquipmentOoa\", \"visible\", false);\r\n }\r\n\r\n if(!this.proEnabled) {\r\n this.jobsGrid.instance.columnOption(\"JobSession.JobGroupID\", \"visible\", false);\r\n this.jobsGrid.instance.columnOption(\"JobSession.PriorityName\", \"visible\", false);\r\n }\r\n this.gridConfigLoaded = true;\r\n });\r\n }\r\n\r\n public onEditorPreparing(e: any): void {\r\n if (e.parentType === \"filterRow\" && e.name === \"JobSession.PriorityName\") {\r\n e.editorName = \"dxSelectBox\";\r\n const prioritiesNames = this.prioritiesDataSource.items().map(x => x.Name);;\r\n e.editorOptions.dataSource = [\"(All)\", ...prioritiesNames];\r\n }\r\n }\r\n\r\n\r\n\r\n public ngOnDestroy(): void {\r\n if (this.dataLoadedSubscription) {\r\n this.dataLoadedSubscription.unsubscribe();\r\n this.dataLoadedSubscription = null;\r\n }\r\n\r\n if (this.reloadDataSubscription) {\r\n this.reloadDataSubscription.unsubscribe();\r\n this.reloadDataSubscription = null;\r\n }\r\n\r\n if (this.removeAssignSubscription) {\r\n this.removeAssignSubscription.unsubscribe();\r\n this.removeAssignSubscription = null;\r\n }\r\n\r\n this.jobsGrid.instance.dispose();\r\n }\r\n\r\n public openMap = (e: any) => {\r\n this.plannerService.MapItemSelected.emit(e.row.data);\r\n };\r\n\r\n public viewWorkRequired = (e: any) => {\r\n this.plannerService.ViewJobWorkRequired.emit(e.row.key);\r\n };\r\n\r\n public filterEngineersBySkills = (e: any) => {\r\n this.plannerService.FilterEngineersBySkills.emit(e.row.key);\r\n };\r\n\r\n public SetModulesPermissions(): void {\r\n this.licenseService.GetCompanyHasAccessToModule(Module.Equipment).subscribe(enabled => {\r\n this.equipmentEnabled = enabled;\r\n });\r\n\r\n this.licenseService.GetCompanyHasAccessToModule(Module.Pro).subscribe(enabled => {\r\n this.proEnabled = enabled;\r\n });\r\n }\r\n\r\n public loadState(): Promise {\r\n return new Promise(resolve => {\r\n const inMemoryLayout = this.plannerService.GetJobsGridLayout();\r\n if (inMemoryLayout !== null) {\r\n resolve(inMemoryLayout);\r\n }\r\n\r\n this.plannerService.GetPlannerLayout(false).subscribe(layout => {\r\n resolve(layout.JobsGridLayout);\r\n });\r\n }).then(layout => {\r\n this.hasLoadedAtleastOnce = true;\r\n return layout;\r\n });\r\n }\r\n\r\n public saveState = (state: any) => {\r\n if (this.hasLoadedAtleastOnce) {\r\n this.plannerService.SetPlannerLayoutOption({ JobsGridLayout: state });\r\n }\r\n };\r\n\r\n public clearFilter(): void {\r\n this.jobsGrid.instance.clearFilter();\r\n }\r\n\r\n public addJob(): void {\r\n this.router.navigate([\"jobs/create\"], { queryParams: { isNewFromPlanner: true } });\r\n }\r\n\r\n public calculatePriorityFilter(filterValue, selectedFilterOperation, filterType) {\r\n filterValue = filterValue.replace(\" \", \"\");\r\n const column = this as any;\r\n\r\n if (filterValue === \"(All)\"){\r\n return null;\r\n }\r\n\r\n return column.defaultCalculateFilterExpression(filterValue, selectedFilterOperation, filterType);\r\n }\r\n\r\n private handleInboundAppointment(app: AppointmentModel): void {\r\n // clone\r\n const localApp: AppointmentModel = JSON.parse(JSON.stringify(app));\r\n\r\n localApp.SessionId = undefined;\r\n if (localApp.JobSession) {\r\n localApp.JobSession.SessionId = undefined;\r\n\r\n if (this.DataSource.findIndex(x => x.JobSession && x.JobSession.JobId === localApp.JobSession.JobId) === -1) {\r\n this.DataSource.push(localApp);\r\n }\r\n }\r\n }\r\n}\r\n","\r\n\r\n \r\n \r\n \r\n \r\n \r\n","import { Component, Input, OnInit } from \"@angular/core\";\r\nimport { AppointmentModel } from \"../models/appointment.model\";\r\nimport { PlannerJobsBase } from \"../planner-job-panel/planner-jobs.base\";\r\nimport { PlannerService } from \"../services/planner.service\";\r\n\r\n@Component({\r\n selector: \"app-planner-job-card-list\",\r\n templateUrl: \"./planner-job-card-list.component.html\",\r\n styleUrls: [\"./planner-job-card-list.component.scss\"]\r\n})\r\nexport class PlannerJobCardListComponent extends PlannerJobsBase implements OnInit {\r\n @Input() height: number = 200;\r\n\r\n public searchText: string = null;\r\n\r\n public get FilteredDataSource(): AppointmentModel[] {\r\n if (this.searchText && this.searchText.length > 0) {\r\n const searchText = this.searchText.toLowerCase();\r\n return this.DataSource.filter(x =>\r\n (x.JobSession.JobId && x.JobSession.JobId.toString().toLowerCase().includes(searchText)) ||\r\n (x.JobSession.SiteName && x.JobSession.SiteName.toLowerCase().includes(searchText)) ||\r\n (x.JobSession.JobCategory && x.JobSession.JobCategory.toLowerCase().includes(searchText)) ||\r\n (x.JobSession.UserRef1Job && x.JobSession.UserRef1Job.toLowerCase().includes(searchText)) ||\r\n (x.JobSession.UserRef2Job && x.JobSession.UserRef2Job.toLowerCase().includes(searchText)) ||\r\n (x.JobSession.SitePostCode && x.JobSession.SitePostCode.toLowerCase().includes(searchText))\r\n );\r\n }\r\n\r\n return this.DataSource;\r\n }\r\n\r\n constructor(plannerService: PlannerService) {\r\n super(plannerService);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.plannerService.MustReloadUnallocated.subscribe(() => {\r\n this.LoadData();\r\n });\r\n\r\n this.onInit();\r\n }\r\n\r\n public onListDragStart(e: any): void {\r\n e.cancel = true;\r\n }\r\n\r\n public onItemDragStart(e: any): void {\r\n e.itemData = e.fromData;\r\n }\r\n\r\n public onItemDragEnd(e: any): void {\r\n if (e.toData) {\r\n e.cancel = true;\r\n }\r\n }\r\n}\r\n","\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n {{ item.data.EquipmentNo }}\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n\r\n\r\n\r\n
\r\n
\r\n {{ tooltipText }}\r\n
\r\n
\r\n
\r\n","import { PlannerService } from \"./../services/planner.service\";\r\nimport { JobWorkRequired } from \"./../models/job-work-required.model\";\r\nimport { JobService } from \"src/app/jobs/services/job.service\";\r\nimport { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { Module, ModuleService } from \"servicesight-shared\";\r\nimport { on } from \"devextreme/events\";\r\nimport { DxTooltipComponent } from \"devextreme-angular\";\r\n\r\n@Component({\r\n selector: \"app-planner-job-work-required\",\r\n templateUrl: \"./planner-job-work-required.component.html\",\r\n styleUrls: [\"./planner-job-work-required.component.scss\"]\r\n})\r\nexport class PlannerJobWorkRequiredComponent implements OnInit {\r\n @ViewChild(DxTooltipComponent) tooltip: DxTooltipComponent;\r\n public workRequired: JobWorkRequired;\r\n public isVisible: boolean = false;\r\n public isProEnabled: boolean = false;\r\n public tooltipText: string;\r\n\r\n public get EquipmentOOAVisible(): boolean {\r\n return this.isProEnabled;\r\n }\r\n\r\n public get Title(): string {\r\n return `${this.workRequired?.JobId} ${this.workRequired?.Customer}`;\r\n }\r\n\r\n constructor(\r\n private jobService: JobService,\r\n private moduleService: ModuleService,\r\n private plannerService: PlannerService) { }\r\n\r\n public ngOnInit(): void {\r\n this.plannerService.ViewJobWorkRequired.subscribe(jobId => {\r\n this.jobService.GetJobWorkRequired(jobId).subscribe(result => {\r\n this.workRequired = result;\r\n this.isVisible = true;\r\n });\r\n });\r\n\r\n this.moduleService.GetEnabledModules().subscribe(enabledModules => {\r\n this.isProEnabled = enabledModules.includes(Module.Pro);\r\n });\r\n }\r\n\r\n public onCellPrepared(e: any): void {\r\n if (e.rowType === \"data\" && e.column.cellTemplate === \"equipmentCellTemplate\" && this.isProEnabled) {\r\n const id = `eq-no-${e.data.EquipItemId}`;\r\n e.cellElement.id = id;\r\n\r\n const element = document.querySelector(`#${id} .condition-colour-bar`);\r\n on(element, \"mouseover\", arg => {\r\n this.tooltipText = e.data.ConditionName;\r\n this.tooltip.instance.show(arg.target);\r\n });\r\n\r\n on(element, \"mouseout\", () => {\r\n this.tooltip.instance.hide();\r\n });\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n","import {\r\n AfterViewInit,\r\n Component,\r\n ElementRef,\r\n NgZone,\r\n OnDestroy,\r\n OnInit,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { SplitComponent } from \"angular-split\";\r\nimport { take } from \"rxjs/operators\";\r\nimport { Module, ModuleService, PermissionsService } from \"servicesight-shared\";\r\nimport { PlannerView } from \"../enums/planner-view.enum\";\r\nimport { PlannerService } from \"../services/planner.service\";\r\n\r\n@Component({\r\n selector: \"app-planner-shell\",\r\n templateUrl: \"./planner-shell.component.html\",\r\n styleUrls: [\"./planner-shell.component.scss\"],\r\n})\r\nexport class PlannerShellComponent implements OnInit, OnDestroy, AfterViewInit {\r\n @ViewChild(\"split\", { static: true }) split: SplitComponent;\r\n @ViewChild(\"jobsSection\") jobsSection: ElementRef;\r\n @ViewChild(\"plannerShell\") plannerShell: ElementRef;\r\n\r\n public displayJobsAsList: boolean = true;\r\n public viewHeight: number = 500;\r\n public jobsPanelHeight: number = 200;\r\n public showViewBar: boolean = true;\r\n\r\n public topHeight: number = 60;\r\n public bottomHeight: number = 40;\r\n public isRecurringJobsModuleEnabled: boolean = false;\r\n public isProEnabled: boolean = false;\r\n public plannerBoardEnabled: boolean = false;\r\n public inspectionViewPermission: boolean = false;\r\n\r\n public jobListView = [\r\n {\r\n view: \"card\",\r\n icon: \"fas fa-th-large\"\r\n },\r\n {\r\n view: \"list\",\r\n icon: \"fas fa-align-justify\"\r\n }\r\n ];\r\n\r\n private resizeTimeout: any = null;\r\n private jobHeightInterval: any = null;\r\n\r\n public get toggleIcon(): string {\r\n return this.showViewBar ? \"fa fa-chevron-up\" : \"fa fa-chevron-down\";\r\n }\r\n\r\n constructor(\r\n private plannerService: PlannerService,\r\n private permissionsService: PermissionsService,\r\n private ngZone: NgZone,\r\n private router: Router,\r\n private moduleService: ModuleService) { }\r\n\r\n public ngOnDestroy(): void {\r\n if (this.jobHeightInterval) {\r\n clearInterval(this.jobHeightInterval);\r\n this.jobHeightInterval = null;\r\n }\r\n\r\n this.plannerService.ReloadPlannerLayout().pipe(take(1)).subscribe();\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n this.calculateViewHeight();\r\n this.tryBindNavResize();\r\n\r\n this.jobHeightInterval = setInterval(() => {\r\n const height = this.jobsSection.nativeElement.offsetHeight - 44;\r\n this.jobsPanelHeight = height;\r\n }, 1000);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.permissionsService.CurrentUserHasPermission(\"JobPlannerboard\").subscribe(isAllowedView => {\r\n this.plannerBoardEnabled = isAllowedView;\r\n });\r\n\r\n this.permissionsService.CurrentUserHasPermission(\"InspectionView\").subscribe(permission => {\r\n this.inspectionViewPermission = permission;\r\n });\r\n\r\n this.moduleService.GetEnabledModules().subscribe(enabledModules => {\r\n this.isProEnabled = enabledModules.includes(Module.Pro);\r\n this.isRecurringJobsModuleEnabled = enabledModules.includes(Module.RecurringJobs);\r\n });\r\n\r\n this.plannerService.GetPlannerLayout(false).subscribe(layout => {\r\n if (layout.hasOwnProperty(\"DisplayJobsAsList\")) {\r\n this.displayJobsAsList = layout.DisplayJobsAsList;\r\n }\r\n this.topHeight = layout.TopHeight || 60;\r\n this.bottomHeight = layout.BottomHeight || 40;\r\n\r\n if (layout.PlannerView === PlannerView.PlannerMap) {\r\n this.router.navigate([\"/planner/map\"]);\r\n }\r\n });\r\n\r\n window.onresize = () => {\r\n setTimeout(() => {\r\n this.calculateViewHeight();\r\n this.plannerService.MustRepaintCalendar.emit();\r\n }, 500);\r\n };\r\n\r\n this.split.dragProgress$.subscribe((values) => {\r\n const height = this.jobsSection.nativeElement.offsetHeight - 44;\r\n this.ngZone.run(() => {\r\n this.jobsPanelHeight = height;\r\n if (this.resizeTimeout != null) {\r\n clearTimeout(this.resizeTimeout);\r\n this.resizeTimeout = null;\r\n }\r\n\r\n this.resizeTimeout = setTimeout(() => {\r\n this.plannerService.MustRepaintCalendar.emit();\r\n this.resizeTimeout = null;\r\n }, 500);\r\n });\r\n this.plannerService.SetPlannerLayoutOption({\r\n TopHeight: Number(values.sizes[0]),\r\n BottomHeight: Number(values.sizes[1])\r\n });\r\n });\r\n }\r\n\r\n public toggleViewBar(): void {\r\n this.showViewBar = !this.showViewBar;\r\n this.calculateViewHeight();\r\n }\r\n\r\n public displayJobsAsListChanged(e: any): void {\r\n switch (e.itemIndex) {\r\n case 0:\r\n this.displayJobsAsList = false;\r\n break;\r\n case 1:\r\n this.displayJobsAsList = true;\r\n break;\r\n default:\r\n throw new Error(\"Not implemented index: \" + e.itemIndex);\r\n }\r\n\r\n this.plannerService.SetPlannerLayoutOption({ DisplayJobsAsList: this.displayJobsAsList });\r\n }\r\n\r\n private tryBindNavResize(): void {\r\n const element = document.getElementById(\"main_nav\");\r\n if (!element) {\r\n setTimeout(() => this.tryBindNavResize(), 500);\r\n } else {\r\n setTimeout(() => {\r\n this.calculateViewHeight();\r\n }, 1500);\r\n\r\n document.getElementById(\"main_nav\").onresize = () => {\r\n this.calculateViewHeight();\r\n };\r\n }\r\n }\r\n\r\n private calculateViewHeight(): void {\r\n const windowHeight = window.innerHeight - 86;\r\n const element = document.getElementById(\"main_nav\");\r\n if (!element) {\r\n setTimeout(() => this.calculateViewHeight(), 500);\r\n } else {\r\n const navHeight = document.getElementById(\"main_nav\").offsetHeight;\r\n this.viewHeight = windowHeight - navHeight;\r\n }\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { ActivityCustomerList } from \"../../shared/models/activity-customer-list.model\";\r\nimport { ActivityStats } from \"../../shared/models/activity-stats.model\";\r\nimport { PortalResponse } from \"../models/portal-response.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class PortalService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) {\r\n }\r\n\r\n public ResetPassword(email: string): Observable {\r\n return this.http.get(`${this.appConfig.apiLocations.ServiceSight}CustomerContact/ConsumerResetPassword?email=${email}`);\r\n }\r\n\r\n public SendInvite(email: string): Observable {\r\n return this.http.get(`${this.appConfig.apiLocations.ServiceSight}CustomerContact/ConsumerSendInvite?email=${email}`);\r\n }\r\n\r\n public GetActivityListFromLastDays(days: number): Observable> {\r\n return this.http.get>(`${this.appConfig.apiLocations.Consumers}Activity/GetConsumersListFromLastDays/${days}`);\r\n }\r\n\r\n public GetActivityStats(): Observable {\r\n return this.http.get(`${this.appConfig.apiLocations.ServiceSight}ConsumerActivity/GetActivityStats`);\r\n }\r\n}\r\n","import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from \"@angular/core\";\r\nimport { ConfirmationMessageComponent } from \"../../shared/components/confirmation-message/confirmation-message.component\";\r\nimport { ConsumerUserRolesModel } from \"../models/consumer-user-roles.model\";\r\nimport { PortalService } from \"../services/portal.service\";\r\n\r\n@Component({\r\n selector: \"app-portal-contacts-tab\",\r\n templateUrl: \"./portal-contacts-tab.component.html\",\r\n styleUrls: [\"./portal-contacts-tab.component.scss\"]\r\n})\r\nexport class PortalContactsTabComponent implements OnInit {\r\n\r\n @Input() email: string;\r\n @Input() allowLogin: boolean;\r\n @Input() defaultEmail: string;\r\n @Input() disableResetButton: boolean;\r\n @Input() startDate: Date;\r\n @Input() consumerUserRolesModel: Array;\r\n @Input() disableReSendButton: boolean;\r\n @Input() roleSelected: string;\r\n @Output() addEmail: EventEmitter = new EventEmitter();\r\n @Output() resetPasswordEvent: EventEmitter = new EventEmitter();\r\n @Output() switchLoginAccess: EventEmitter = new EventEmitter();\r\n @Output() setStartDate: EventEmitter = new EventEmitter();\r\n @Output() setRoleSelected: EventEmitter = new EventEmitter();\r\n\r\n @ViewChild(\"ResetPasswordConfirmationMessage\", { static: true }) resetPasswordConfirmationMessage: ConfirmationMessageComponent;\r\n public readonly maxEmailLength = 255;\r\n public disabled: boolean;\r\n\r\n constructor(private portalService: PortalService) { }\r\n\r\n public ngOnInit(): void {\r\n\r\n if (this.disableResetButton == null) {\r\n this.disableResetButton = true;\r\n }\r\n if (this.disableReSendButton == null) {\r\n this.disableReSendButton = true;\r\n }\r\n if (this.consumerUserRolesModel == null) {\r\n this.consumerUserRolesModel = new Array();\r\n }\r\n }\r\n\r\n public updateEmail(): void {\r\n this.addEmail.emit(this.email);\r\n }\r\n\r\n public updateLoginSwitch(): void {\r\n if (this.allowLogin) {\r\n this.startDate = new Date();\r\n }\r\n this.switchLoginAccess.emit(this.allowLogin);\r\n }\r\n\r\n public setDate(e: any): void {\r\n this.startDate = e.value;\r\n this.setStartDate.emit(this.startDate);\r\n }\r\n\r\n public setSelected(): void {\r\n this.setRoleSelected.emit(this.roleSelected);\r\n }\r\n\r\n public resetPassword(email: string) {\r\n this.portalService.ResetPassword(email).subscribe(x => {\r\n this.resetPasswordEvent.emit(x);\r\n });\r\n }\r\n\r\n public resendInvite(): void {\r\n this.portalService.SendInvite(this.email).subscribe();\r\n }\r\n\r\n public showConfirmationModal(): void {\r\n this.resetPasswordConfirmationMessage.show();\r\n }\r\n\r\n}\r\n","
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n {{ 'portal.ResetPassword'|translate }}\r\n \r\n \r\n {{ 'portal.ResendInvite'|translate }}\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n","import { NgModule } from \"@angular/core\";\r\nimport { RouterModule, Routes } from \"@angular/router\";\r\nimport { PortalContactsTabComponent } from \"./portal-contacts-tab/portal-contacts-tab.component\";\r\n\r\nconst routes: Routes = [\r\n { path: \"portal-contacts\", component: PortalContactsTabComponent},\r\n\r\n { path: \"\", redirectTo: \"portal-contacts\", pathMatch: \"full\"},\r\n { path: \"**\", redirectTo: \"portal-contacts\"}\r\n];\r\n\r\n@NgModule({\r\n imports: [ RouterModule.forChild(routes) ],\r\n exports: [ RouterModule ]\r\n})\r\nexport class PortalRoutingModule {\r\n public static readonly Routes: Routes = routes;\r\n}\r\n","import { IPowerBiReportGroup } from \"./power-bi-report-group\";\r\n\r\nexport const powerBiReportGroups: IPowerBiReportGroup[] = [\r\n {\r\n groupName: \"favourites\",\r\n order: 1,\r\n icon : \"fa fa-star\"\r\n },\r\n {\r\n groupName: \"company\",\r\n order: 2,\r\n icon : \"fa fa-industry\"\r\n },\r\n {\r\n groupName: \"customer\",\r\n order: 3,\r\n icon : \"fa fa-users\"\r\n },\r\n {\r\n groupName: \"jobs\",\r\n order: 4,\r\n icon : \"fa fa-wrench\"\r\n },\r\n {\r\n groupName: \"equipment\",\r\n order: 5,\r\n icon : \"fa fa-cogs\"\r\n },\r\n {\r\n groupName: \"stock\",\r\n order: 6,\r\n icon : \"fa fa-cubes\"\r\n },\r\n {\r\n groupName: \"contracts\",\r\n order: 7,\r\n icon : \"fa fa-gavel\"\r\n },\r\n {\r\n groupName: \"purchasing\",\r\n order: 8,\r\n icon : \"fa fa-shopping-cart\"\r\n },\r\n {\r\n groupName: \"sales\",\r\n order: 9,\r\n icon : \"fa fa-qrcode\"\r\n },\r\n {\r\n groupName: \"miscellaneous\",\r\n order: 10,\r\n icon : \"fa fa-life-ring\"\r\n }\r\n];\r\n","import { Injectable, Inject } from \"@angular/core\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { Observable } from \"rxjs\";\r\nimport { Guid } from \"guid-typescript\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { IPowerBiReportModel } from \"../models/power-bi-report.model\";\r\nimport { IPowerBiReportEmbedInfoModel } from \"../models/power-bi-report-embed-info\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\n\r\nexport class DashboardService {\r\n private readonly controllerName: string = \"powerbi\";\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private config: IAppConfig) { }\r\n\r\n public getReports(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}${this.controllerName}/getPowerBiReports`);\r\n }\r\n\r\n public getDashboards(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}${this.controllerName}/getPowerBiDashboards`);\r\n }\r\n\r\n public getReportsAndDashboards(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}${this.controllerName}/getPowerBiReportsAndDashboards`);\r\n }\r\n\r\n public getReport(reportId: Guid): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}${this.controllerName}/getPowerBiReport?reportId=${reportId}`);\r\n }\r\n\r\n public getDashboard(dashboardId: Guid): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}${this.controllerName}/getPowerBiDashboard?dashboardId=${dashboardId}`);\r\n }\r\n\r\n public ngCurrentUserHasPermission(action: string): Promise {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}powerbi/GetPermissionOnReports?action=${action}`).toPromise();\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n

{{ 'insight.dashboard' | translate }}

\r\n
\r\n
\r\n
{{ 'insight.reports' | translate }}
\r\n
\r\n \r\n \r\n
\r\n
\r\n  \r\n {{ getGroupName(data) }}\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { Component, ElementRef, OnDestroy, OnInit, ViewChild } from \"@angular/core\";\r\nimport ArrayStore from \"devextreme/data/array_store\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { Guid } from \"guid-typescript\";\r\nimport * as pbi from \"powerbi-client\";\r\nimport { Subject } from \"rxjs\";\r\nimport { takeUntil } from \"rxjs/operators\";\r\nimport { ToasterService, ToastType } from \"servicesight-shared\";\r\nimport { IPowerBiReportEmbedInfoModel } from \"../../models/power-bi-report-embed-info\";\r\nimport { IPowerBiReportGroup } from \"../../models/power-bi-report-group\";\r\nimport { powerBiReportGroups } from \"../../models/power-bi-report-groups-data\";\r\nimport { IPowerBiReportModel } from \"../../models/power-bi-report.model\";\r\nimport { DashboardService } from \"../../services/dashboard.service\";\r\n\r\n@Component({\r\n selector: \"app-power-bi-dashboard\",\r\n templateUrl: \"./power-bi-dashboard.component.html\",\r\n styleUrls: [\"./power-bi-dashboard.component.scss\"]\r\n})\r\n\r\nexport class PowerBiDashboardComponent implements OnInit, OnDestroy {\r\n public reports: IPowerBiReportModel[] = [];\r\n public currentReport: IPowerBiReportModel = null;\r\n public selectedReportId: Guid = null;\r\n public reportGroupDataSource: DataSource;\r\n\r\n private unsubscriptions = new Subject();\r\n @ViewChild(\"reportContainer\", { static: true }) private pbiContainerElement: ElementRef;\r\n private reportStorageKey: string = \"favouriteReports\";\r\n private defaultReport: string = \"companysummary\";\r\n private favouritesGroup: string = \"favourites\";\r\n private miscellaneousGroup: string = \"miscellaneous\";\r\n\r\n private powerbi = new pbi.service.Service(\r\n pbi.factories.hpmFactory,\r\n pbi.factories.wpmpFactory,\r\n pbi.factories.routerFactory\r\n );\r\n\r\n constructor(\r\n private readonly dashboardService: DashboardService,\r\n private readonly toastService: ToasterService\r\n ) { }\r\n\r\n public ngOnInit(): void {\r\n // read all the power bi reports & dashboards from the workspace\r\n this.getReportsAndDashboards();\r\n }\r\n\r\n public embedReport(reportId: Guid): void {\r\n const report = this.reports.filter(rpt => rpt.Id === reportId);\r\n if (report.length > 0) {\r\n if (report[0].Type.toLocaleLowerCase() === \"report\") {\r\n this.dashboardService.getReport(reportId)\r\n .pipe(takeUntil(this.unsubscriptions))\r\n .subscribe((reportResponse: IPowerBiReportEmbedInfoModel) => {\r\n this.replaceLoadingLogo(reportResponse);\r\n });\r\n } else {\r\n this.dashboardService.getDashboard(reportId)\r\n .pipe(takeUntil(this.unsubscriptions))\r\n .subscribe((reportResponse: IPowerBiReportEmbedInfoModel) => {\r\n this.replaceLoadingLogo(reportResponse);\r\n });\r\n }\r\n this.currentReport = this.reports.filter(rpt => rpt.Id === reportId)[0];\r\n this.selectedReportId = this.currentReport.Id;\r\n }\r\n }\r\n\r\n public toogleFavorite(): void {\r\n if (this.currentReport.Group.groupName.toLocaleLowerCase() === this.favouritesGroup) {\r\n this.currentReport.Group = this.currentReport.ActualGroup;\r\n } else {\r\n this.currentReport.Group = powerBiReportGroups.filter(grp => grp.groupName.toLocaleLowerCase() === this.favouritesGroup)[0];\r\n }\r\n this.setUserPreference(this.currentReport);\r\n this.currentReport.GroupName = this.capitalize(this.currentReport.Group.groupName);\r\n this.currentReport.order = this.currentReport.Group.order;\r\n this.setupReportDataSource();\r\n }\r\n\r\n public reportFavoriteStatus(): boolean {\r\n if (this.currentReport === null) {\r\n return false;\r\n }\r\n return (this.currentReport.Group.groupName.toLocaleLowerCase() === this.favouritesGroup);\r\n }\r\n\r\n public getGroupIcon(group): string {\r\n let icon: string = \"fa fa-life-ring\"; // default icon\r\n if (group.items.length > 0) {\r\n if (group.items[0].Group !== undefined) {\r\n icon = group.items[0].Group.icon;\r\n }\r\n }\r\n return icon;\r\n }\r\n\r\n public getGroupName(group): string {\r\n let groupName: string = \"\";\r\n if (group.items.length > 0) {\r\n if (group.items[0].Group !== undefined) {\r\n groupName = group.items[0].GroupName;\r\n }\r\n }\r\n return groupName;\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.unsubscriptions.next();\r\n this.unsubscriptions.complete();\r\n }\r\n\r\n private replaceLoadingLogo(reportResponse: IPowerBiReportEmbedInfoModel): void {\r\n const embedConfig = this.buildEmbedConfig(\"report\", reportResponse);\r\n // replace powerbi logo with custom logo\r\n this.powerbi.reset(this.pbiContainerElement.nativeElement);\r\n this.pbiContainerElement.nativeElement.visibility = \"hidden\";\r\n const reportContainerElement = this.powerbi.embed(this.pbiContainerElement.nativeElement, embedConfig);\r\n reportContainerElement.on(\"loaded\", () => {\r\n this.pbiContainerElement.nativeElement.visibility = \"visible\";\r\n reportContainerElement.off(\"loaded\");\r\n });\r\n }\r\n\r\n private setupReportDataSource(): void {\r\n this.reportGroupDataSource = new DataSource({\r\n store: new ArrayStore({\r\n data: this.reports,\r\n key: \"ReportDisplayName\"\r\n }),\r\n group: [{ selector: \"order\", desc: false }]\r\n });\r\n }\r\n\r\n private buildEmbedConfig(ReportType: string, report: IPowerBiReportEmbedInfoModel): pbi.IEmbedConfiguration {\r\n return {\r\n type: ReportType,\r\n tokenType: pbi.models.TokenType.Embed,\r\n accessToken: report.EmbedToken.token,\r\n embedUrl: report.EmbedUrl,\r\n id: report.Id.toString(),\r\n settings: {\r\n filterPaneEnabled: false,\r\n navContentPaneEnabled: false,\r\n }\r\n };\r\n }\r\n\r\n private getReportsAndDashboards(): void {\r\n // read the reports & dashboards from the workspace\r\n this.dashboardService.getReportsAndDashboards()\r\n .pipe(takeUntil(this.unsubscriptions))\r\n .subscribe((reportResponse: IPowerBiReportModel[]) => {\r\n this.reports = reportResponse;\r\n this.reportsWithGroup(this.reports);\r\n this.setupReportDataSource();\r\n // load the first report on page load\r\n if (this.reports.length > 0) {\r\n const summaryReport = this.reports.findIndex(report => report.ReportName.toLocaleLowerCase() === this.defaultReport);\r\n if (summaryReport >= 0) {\r\n this.embedReport(this.reports[summaryReport].Id);\r\n } else {\r\n this.embedReport(this.reports[0].Id);\r\n }\r\n }\r\n });\r\n }\r\n\r\n private reportsWithGroup(reports: IPowerBiReportModel[]): void {\r\n let isGroupExist: boolean = false;\r\n const userPreference = this.getUserPreference();\r\n // loop through all the reports and attach the group.\r\n reports.forEach((report: IPowerBiReportModel) => {\r\n const reportName = report.ReportName.toLocaleLowerCase();\r\n report.ReportDisplayName = reportName;\r\n // loop through all the report groups and map it with report\r\n powerBiReportGroups.forEach((reportGroup: IPowerBiReportGroup) => {\r\n if (reportName.indexOf(reportGroup.groupName) >= 0) {\r\n report.Group = reportGroup;\r\n report.ActualGroup = report.Group;\r\n\r\n if (report.ReportDisplayName.indexOf(reportGroup.groupName) === 0) {\r\n report.ReportDisplayName = report.ReportDisplayName.slice(reportGroup.groupName.length);\r\n }\r\n\r\n isGroupExist = true;\r\n }\r\n });\r\n\r\n // In case report doesn't belong to any available groups then move it to 'miscellaneous' group\r\n if (!isGroupExist) {\r\n report.Group = powerBiReportGroups.filter(grp => grp.groupName === this.miscellaneousGroup)[0];\r\n report.ActualGroup = report.Group;\r\n }\r\n // if there is already user preference values available.\r\n if (userPreference !== null) {\r\n userPreference.forEach((preference: string) => {\r\n // in case, report is favourite then move it to 'favourite' group\r\n if (preference === report.ReportName) {\r\n report.Group = powerBiReportGroups.filter(grp => grp.groupName === this.favouritesGroup)[0];\r\n isGroupExist = true;\r\n }\r\n });\r\n }\r\n // format the group name\r\n report.GroupName = this.capitalize(report.Group.groupName);\r\n // format the display name of current report\r\n report.ReportDisplayName = this.capitalize(report.ReportDisplayName);\r\n report.order = report.Group.order;\r\n // reset the variable to false\r\n isGroupExist = false;\r\n });\r\n }\r\n\r\n private getUserPreference() {\r\n return JSON.parse(localStorage.getItem(this.reportStorageKey));\r\n }\r\n\r\n private setUserPreference(report: IPowerBiReportModel): void {\r\n const popInterval: number = 2000; // Set up the interval as 2 seconds.\r\n const existingFavoriteReports = this.getUserPreference();\r\n const newFavoriteReports = [];\r\n // in case the current report name doesn't exist in storage then push it\r\n if (existingFavoriteReports !== null) {\r\n existingFavoriteReports.forEach((rpt: string) => {\r\n newFavoriteReports.push(rpt);\r\n });\r\n }\r\n const idx = newFavoriteReports.findIndex(r => r === report.ReportName);\r\n if (report.Group.groupName.toLocaleLowerCase() === this.favouritesGroup) {\r\n if (idx === -1) {\r\n newFavoriteReports.push(report.ReportName);\r\n this.toastService.pop(\"insight.add.favourites\", ToastType.medium, popInterval);\r\n }\r\n } else {\r\n // in case, name already exist then remove it from the storage.\r\n newFavoriteReports.splice(idx, 1);\r\n this.toastService.pop(\"insight.remove.favourites\", ToastType.medium, popInterval);\r\n }\r\n // reset the storage with new value.\r\n localStorage.setItem(this.reportStorageKey, JSON.stringify(newFavoriteReports));\r\n }\r\n\r\n private capitalize(str: string): string {\r\n return `${str.charAt(0).toUpperCase()}${str.slice(1)}`;\r\n }\r\n}\r\n","import { NgModule } from \"@angular/core\";\r\nimport { RouterModule, Routes } from \"@angular/router\";\r\nimport { PowerBiDashboardComponent } from \"./components/power-bi-dashboard/power-bi-dashboard.component\";\r\n\r\nconst routes: Routes = [\r\n { path: \"dashboard\", component: PowerBiDashboardComponent},\r\n { path: \"\", redirectTo: \"dashboard\", pathMatch: \"full\"},\r\n { path: \"**\", redirectTo: \"dashboard\"}\r\n];\r\n\r\n@NgModule({\r\n imports: [ RouterModule.forChild(routes) ],\r\n exports: [ RouterModule ]\r\n})\r\n\r\nexport class PowerBiRoutingModule {\r\n public static readonly Routes: Routes = routes;\r\n}\r\n","\r\n
    \r\n
  • {{ 'purchase.marketing.feature-1' | translate }}
  • \r\n
  • {{ 'purchase.marketing.feature-2' | translate }}
  • \r\n
  • {{ 'purchase.marketing.feature-3' | translate }}
  • \r\n
  • {{ 'purchase.marketing.feature-4' | translate }}
  • \r\n
  • {{ 'purchase.marketing.feature-5' | translate }}
  • \r\n
  • {{ 'purchase.marketing.feature-6' | translate }}
  • \r\n
\r\n
\r\n

{{ 'stock.marketing.price-1' | translate: { price1: price1, price2: price2 } }}

\r\n

{{ 'stock.marketing.price-2' | translate: { price2: price2, price3: price3 } }}

\r\n
\r\n\r\n","import { Component, OnInit } from \"@angular/core\";\r\nimport { Module } from \"servicesight-shared\";\r\nimport { LicenseService } from \"../../shared/services/licence/license.service\";\r\n\r\nconst Ireland: number = 100;\r\nconst USA: number = 224;\r\n\r\n@Component({\r\n selector: \"app-purchase-marketing\",\r\n templateUrl: \"./purchase-marketing.component.html\",\r\n styleUrls: [\"../../../assets/css/marketing.component.scss\"]\r\n})\r\nexport class PurchaseMarketingComponent implements OnInit {\r\n\r\n public ready: boolean = false;\r\n public videoId: string;\r\n public price1: string = \"£10\";\r\n public price2: string = \"£15\";\r\n public price3: string = \"£30\";\r\n public type: Module = Module.PurchaseOrders;\r\n\r\n constructor(private licenseService: LicenseService) { }\r\n\r\n public ngOnInit(): void {\r\n this.licenseService.GetCompanyCountryId().then(countryId => {\r\n if (countryId === USA) {\r\n this.videoId = \"jnS9MulHlJM\";\r\n } else if (countryId === Ireland) {\r\n this.videoId = \"7rS_5SyVbPs\";\r\n this.price1 = \"€10\";\r\n this.price2 = \"€15\";\r\n this.price3 = \"€30\";\r\n } else {\r\n this.videoId = \"9Gl_PLr6Plo\";\r\n }\r\n\r\n this.ready = true;\r\n });\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ 'accordion.purchase.order.details.entered' | translate }}{{ orderDetails.Entered | date: \"short\"}}
{{ 'accordion.purchase.order.details.entered-by' | translate }}{{ orderDetails.EnteredBy }}
{{ 'accordion.purchase.order.details.cancelled' | translate }}{{ orderDetails.Cancelled | date: \"shortDate\"}}
{{ 'accordion.purchase.order.details.cancelled-by' | translate }}{{ orderDetails.CancelledBy }}
{{ 'accordion.purchase.order.details.reason' | translate }}{{ orderDetails.Reason }}
\r\n","import { Component, Input, OnChanges } from \"@angular/core\";\r\nimport { AccordionDataService } from \"../accordion-data.service\";\r\nimport { OrderDetailsModel } from \"../models/order-details.model\";\r\n\r\n@Component({\r\n selector: \"app-purchase-order-details-accordion-item\",\r\n templateUrl: \"./purchase-order-details-accordion-item.component.html\",\r\n styleUrls: [\"./purchase-order-details-accordion-item.component.scss\"]\r\n})\r\nexport class PurchaseOrderDetailsAccordionItemComponent implements OnChanges {\r\n @Input() purchaseOrderId: number;\r\n public orderDetails: OrderDetailsModel;\r\n\r\n constructor(\r\n private dataService: AccordionDataService) { }\r\n\r\n public ngOnChanges(): void {\r\n this.Load();\r\n }\r\n\r\n public Load(): void {\r\n if (this.purchaseOrderId) {\r\n this.dataService.GetPurchaseOrderDetails(this.purchaseOrderId).subscribe(result => {\r\n this.orderDetails = result;\r\n });\r\n }\r\n }\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class RefrigerantTypeViewService {\r\n private readonly refrigerantTypeViewOdataBaseUrl: string;\r\n\r\n constructor(\r\n private odataService: ODataService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig\r\n ) {\r\n this.refrigerantTypeViewOdataBaseUrl = this.appConfig.apiLocations.FGasOData + \"RefrigerantTypeViewOData\";\r\n }\r\n\r\n public GetDataStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.refrigerantTypeViewOdataBaseUrl}`,\r\n key: \"RefrigerantTypeId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.refrigerantTypeViewOdataBaseUrl}`,\r\n key: \"RefrigerantTypeId\",\r\n keyType: \"Int32\",\r\n paging: true,\r\n pageSize: 50\r\n });\r\n }\r\n}\r\n","\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n
\r\n {{ data.value.toFixed(5) }} {{ units }}\r\n 0.00000 {{ units }}\r\n
\r\n
\r\n {{ data.value | currency: data.data.UseBaseCurrency ? baseCurrencySymbol : data.data.CurrencySymbol}}\r\n
\r\n
\r\n {{ \"refrigerant.days\" | translate: { value: data.value } }}\r\n
\r\n
\r\n {{ data.value | currency: data.data.UseBaseCurrency ? baseCurrencySymbol : data.data.CurrencySymbol}} \r\n
\r\n
\r\n {{ data.value | currency: data.data.UseBaseCurrency ? baseCurrencySymbol : data.data.CurrencySymbol}} \r\n {{ 0 | currency: baseCurrencySymbol }} \r\n
\r\n
\r\n {{ data.value | currency: baseCurrencySymbol}} \r\n
\r\n\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Orientation } from \"servicesight-components\";\r\nimport { DocumentTypeEnum, Module, SettingData, SettingId, SettingsService } from \"servicesight-shared\";\r\nimport { RefrigerantTypeViewService } from \"src/app/f-gas/services/refrigerant-type-view.service\";\r\nimport { RefrigerantTypeViewItem } from \"./refrigerantTypeViewItem\";\r\nimport { LicenseService } from \"../../services/licence/license.service\";\r\n\r\n@Component({\r\n selector: \"app-add-cylinder-dialog\",\r\n templateUrl: \"./add-cylinder-dialog.component.html\",\r\n styleUrls: [\"./add-cylinder-dialog.component.scss\"]\r\n})\r\nexport class AddCylinderDialogComponent implements OnInit, OnChanges {\r\n\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n\r\n // if useRefrigerantViewItems = true, supplierId, supplierPriceDataSource, refrigerantTypeStore, and alreadyAdded can be omitted\r\n @Input() supplierId: number = null;\r\n @Input() supplierPriceDataSource: DataSource;\r\n @Input() refrigerantTypeStore: ODataStore;\r\n @Input() alreadyAdded: number[];\r\n @Input() useRefrigerantViewItems: boolean = false;\r\n @Input() documentType: DocumentTypeEnum;\r\n\r\n @Output() cylindersAdded = new EventEmitter();\r\n @Output() cylinderObjectsAdded = new EventEmitter();\r\n @Output() noFiltersSelected = new EventEmitter();\r\n\r\n public visible: boolean = false;\r\n public selected: [] = [];\r\n public SearchText: string = \"\";\r\n public filters: any = { };\r\n public units: string = \"kg\";\r\n public baseCurrencySymbol: string = null;\r\n\r\n public RefrigerantViewItemsDataSource: DataSource;\r\n public landscape: Orientation = Orientation.Landscape;\r\n public isProEnabled: boolean = false;\r\n\r\n private selectedFilterValue: string;\r\n private showRefrigerantDetails: boolean = true;\r\n\r\n constructor(\r\n private settingsService: SettingsService,\r\n private refrigerantTypeViewService: RefrigerantTypeViewService,\r\n private licenseService: LicenseService) {\r\n this.baseCurrencySymbol = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n this.CellPrepared = this.CellPrepared.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.settingsService.getSetting(SettingId.FGasRefrigerantUnits).subscribe((settingData: SettingData) => {\r\n this.units = settingData.ValueListSelectedId === 1 ? \"kg\" : \"lb\";\r\n });\r\n\r\n this.licenseService.GetCompanyHasAccessToModule(Module.Pro).subscribe(enabled => {\r\n this.isProEnabled = enabled;\r\n });\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n\r\n const useRefrigerantViewItemsChange = changes.useRefrigerantViewItems;\r\n\r\n if (useRefrigerantViewItemsChange && useRefrigerantViewItemsChange.currentValue !== useRefrigerantViewItemsChange.previousValue) {\r\n if (this.useRefrigerantViewItems) {\r\n this.RefrigerantViewItemsDataSource = this.refrigerantTypeViewService.GetDataSource();\r\n }\r\n }\r\n\r\n const supplierIdChange = changes.supplierId;\r\n if (!supplierIdChange || supplierIdChange.currentValue === supplierIdChange.previousValue) {\r\n return;\r\n }\r\n\r\n if (this.supplierId && !this.useRefrigerantViewItems) {\r\n this.displaySupplierPrices();\r\n this.filters[\"prefered-supplier\"] = [[\"SupplierId\", \"=\", this.supplierId], \"and\", [\"Preferred\", \"=\", true]];\r\n this.filters[\"listed-supplier\"] = [[\"SupplierId\", \"=\", this.supplierId]];\r\n this.dataGrid.instance.filter(this.filters[\"prefered-supplier\"]);\r\n }\r\n }\r\n\r\n public CellPrepared(e): void {\r\n if (this.shouldHideRefrigerantDetails() && e.rowType === \"data\" && e.columnIndex > 1) {\r\n e.cellElement.classList.add(\"hide-details\");\r\n } else {\r\n e.cellElement.className = e.cellElement.className.replace(\"hide-details\", \"\");\r\n }\r\n }\r\n\r\n public Show(): void {\r\n this.selected = [];\r\n const filter = [];\r\n\r\n if (this.alreadyAdded) {\r\n if (this.useRefrigerantViewItems) {\r\n this.alreadyAdded.forEach(a => {\r\n filter.push([\"RefrigerantTypeId\", \"<>\", a]);\r\n filter.push(\"and\");\r\n });\r\n\r\n filter.pop();\r\n\r\n if (filter.length > 0) {\r\n this.dataGrid.instance.filter(filter);\r\n } else {\r\n this.dataGrid.instance.filter(null);\r\n }\r\n } else {\r\n this.alreadyAdded.forEach(a => {\r\n filter.push([\"SupplierPriceId\", \"<>\", a]);\r\n filter.push(\"and\");\r\n });\r\n\r\n filter.pop();\r\n\r\n if (filter.length > 0) {\r\n this.supplierPriceDataSource.filter(filter);\r\n } else {\r\n this.dataGrid.instance.filter(null);\r\n }\r\n }\r\n }\r\n\r\n if (!this.supplierId) {\r\n this.filterByNoFilter();\r\n }\r\n\r\n this.visible = true;\r\n }\r\n\r\n public AddCylinders(): void {\r\n this.visible = false;\r\n this.cylindersAdded.emit(this.selected);\r\n\r\n this.cylinderObjectsAdded.emit(this.dataGrid.instance.getSelectedRowsData());\r\n }\r\n\r\n public Close(): void {\r\n this.visible = false;\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public FilterChanged($event): void {\r\n this.selectedFilterValue = $event.currentTarget.value;\r\n if (this.selectedFilterValue === \"no-filter\" || this.filters[this.selectedFilterValue] === undefined) {\r\n this.dataGrid.instance.clearFilter();\r\n this.displayAllRefrigerantTypesForPurchaseOrder();\r\n } else {\r\n this.displaySupplierPrices();\r\n this.dataGrid.instance.filter(this.filters[this.selectedFilterValue]);\r\n }\r\n }\r\n\r\n private filterByNoFilter(): void {\r\n this.dataGrid.instance.clearFilter();\r\n this.displayAllRefrigerantTypesForPurchaseOrder();\r\n }\r\n\r\n private displayAllRefrigerantTypesForPurchaseOrder(): void {\r\n if (this.documentType === DocumentTypeEnum.PurchaseOrder) {\r\n this.displayAllRefrigerantTypes();\r\n }\r\n }\r\n\r\n private displayAllRefrigerantTypes(): void {\r\n this.RefrigerantViewItemsDataSource = this.refrigerantTypeViewService.GetDataSource();\r\n this.dataGrid.instance.option(\"dataSource\", this.RefrigerantViewItemsDataSource);\r\n this.noFilterSelected(true);\r\n }\r\n\r\n private displaySupplierPrices(): void {\r\n if (this.documentType === DocumentTypeEnum.PurchaseOrder) {\r\n this.RefrigerantViewItemsDataSource = this.refrigerantTypeViewService.GetDataSource();\r\n this.dataGrid.instance.option(\"dataSource\", this.supplierPriceDataSource);\r\n this.noFilterSelected(false);\r\n }\r\n }\r\n\r\n private noFilterSelected(noFilterselected: boolean) {\r\n this.showRefrigerantDetails = !noFilterselected;\r\n this.noFiltersSelected.emit(noFilterselected);\r\n }\r\n\r\n private shouldHideRefrigerantDetails(): boolean {\r\n return !this.showRefrigerantDetails && this.documentType === DocumentTypeEnum.PurchaseOrder;\r\n }\r\n}\r\n","/**\r\n * This is only view component to present only data.\r\n * Whole logic to preparing messages are in add-messages.component.ts file.\r\n * Please read descriom in that file how to use validation messages\r\n *\r\n * @class ErrorMessagesComponent\r\n * @method ShowSuccessMessages(string[])\r\n * @method ShowAlertMessages(string[])\r\n * @method ShowErrorMessages(string[])\r\n */\r\nimport { Component } from \"@angular/core\";\r\nimport { IErrorMessagesModel } from \"./IErrorMessagesModel\";\r\n\r\n@Component({\r\n selector: \"app-error-messages\",\r\n template: `\r\n
\r\n

{{message | translate}}

\r\n
\r\n `,\r\n styleUrls: [\"./error-messages.component.scss\"]\r\n})\r\nexport class ErrorMessagesComponent {\r\n\r\n public messages: IErrorMessagesModel[] = [];\r\n\r\n constructor() {\r\n }\r\n\r\n public ShowSuccessMessages(success: string[]) {\r\n this.messages.push({ cssClass: \"lblsuccess mgbt10px\", messages: success});\r\n }\r\n\r\n public ShowWarningMessages(warnings?: string[]) {\r\n this.messages.push({ cssClass: \"lblalert mgbt10px\", messages: warnings});\r\n }\r\n\r\n public ShowErrorMessages(errors: string[]) {\r\n this.messages.push({ cssClass: \"lblerror mgbt10px\", messages: errors});\r\n }\r\n}\r\n","import { DOCUMENT } from \"@angular/common\";\r\nimport {\r\n Component,\r\n ComponentFactoryResolver,\r\n ComponentRef,\r\n Inject,\r\n Input,\r\n ViewChild,\r\n ViewContainerRef\r\n} from \"@angular/core\";\r\nimport { UntypedFormGroup } from \"@angular/forms\";\r\nimport { ErrorMessagesComponent } from \"./error-messages.component\";\r\nimport { IMessages } from \"./IErrorMessagesModel\";\r\nimport { JstranslateService } from \"../../services/jstranslate/jstranslate.service\";\r\n/**\r\n * This is dynamic component to showing validation messages\r\n * To use that component in component/parent component create component selector in view\r\n * \r\n * Next in *.component.ts create instance:\r\n *\r\n * @ViewChild(AddMessagesComponent, { static: true }) addMessagesComponent: AddMessagesComponent\r\n *\r\n * If you prefer use to methods in view you should execute CheckForm like below:\r\n *\r\n *
\r\n *\r\n * or in save method inside *.component.ts:\r\n *\r\n * public Save() {\r\n * this.addMessagesComponent.CheckForm(this.someDynamicForm);\r\n * if(this.someDynamicForm.valid) {\r\n * this.someService.Save().subscribe(...);\r\n * }\r\n * }\r\n *\r\n * After that form element looks lie that:\r\n *
\r\n * \r\n * \r\n *
\r\n *\r\n * REMEMBER\r\n * (1) Field attributes: id, formControlName, name MUST HAVE THE SAME NAME otherwise validation message will not appear\r\n * (2) For custom validators you must add condition in CheckForm\r\n * For more information about custom validators please visit url below\r\n * https://alligator.io/angular/reactive-forms-custom-validator/\r\n *\r\n * @component AddMessagesComponent\r\n * @method ShowSuccessMessages(string[])\r\n * @method ShowAlertMessages(string[])\r\n * @method ShowErrorMessages(string[])\r\n * @method ShowMessages(string[], string[], string[])\r\n */\r\n\r\n@Component({\r\n selector: \"app-add-messages\",\r\n template: `\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
`\r\n})\r\nexport class AddMessagesComponent {\r\n\r\n @Input() cssBorders = true;\r\n @ViewChild(\"errorMessagesSpace\", { read: ViewContainerRef, static: true }) messagesHost;\r\n\r\n private componentRef: ComponentRef;\r\n\r\n public constructor(\r\n private componentFactoryResolver: ComponentFactoryResolver,\r\n @Inject(DOCUMENT) private document,\r\n private jstranslate: JstranslateService\r\n ) {\r\n }\r\n\r\n /**\r\n * This method preparing validation messages for UI.\r\n * If form fields are not correctly populated then this method will automatically prepare translated message and\r\n * show on UI.\r\n * REMEMBER - HTMLElement on view MUST HAVE data-field-name attribute to prepare message with correct field name\r\n * @param form FormGroup\r\n */\r\n public CheckForm(form: UntypedFormGroup) {\r\n const elements: IMessages = { success: [], alerts: [], errors: [] };\r\n Object.keys(form.controls).forEach(el => {\r\n const elRef = form.get(el);\r\n if (elRef.invalid) { // @TODO dx-tab-panel issue - if user doesn't click all tabs before saving data document not see all elements in body. For more information ask Jerzy\r\n const htmlEl: HTMLElement = this.document.querySelector(`#${el}`);\r\n const elName: string = (htmlEl && htmlEl.dataset && htmlEl.dataset.fieldName) ? htmlEl.dataset.fieldName : null;\r\n if (elRef.errors.required && elName) { // validators condition\r\n elRef.markAsDirty();\r\n this.jstranslate.Translate(\"messages.validators.mandatoryField\", { value: elName }).subscribe(v => {\r\n elements.alerts.push(v);\r\n });\r\n } else if (elRef.errors.invalidEmail && elName) {\r\n this.jstranslate.Translate(\"messages.validators.invalidEmail\", { value: elName }).subscribe(v => {\r\n elements.alerts.push(v);\r\n });\r\n } else { //if validator not set or form element was not found in document\r\n this.jstranslate.Translate(\"messages.validators.checkForm\", { value: elName }).subscribe(v => {\r\n elements.alerts.push(v);\r\n });\r\n }\r\n }\r\n });\r\n this.ShowMessages(elements.success, elements.alerts, elements.errors);\r\n }\r\n\r\n /**\r\n * Wrapper for ShowMessages(string[], string[], string[]) method\r\n * @param success string[]\r\n */\r\n public ShowSuccessMessages(success: string[]) {\r\n this.ShowMessages(success);\r\n }\r\n\r\n /**\r\n * Wrapper for ShowMessages(string[], string[], string[]) method\r\n * @param alerts string[]\r\n */\r\n public ShowAlertMessages(alerts: string[]) {\r\n this.ShowMessages(null, alerts, null);\r\n }\r\n\r\n /**\r\n * Wrapper for ShowMessages(string[], string[], string[]) method\r\n * @param errors string[]\r\n */\r\n public ShowErrorsMessages(errors: string[]) {\r\n this.ShowMessages(null, null, errors);\r\n }\r\n\r\n /**\r\n * Create dynamic component to show validation messages on UI\r\n * @param success string[]\r\n * @param warnings string[]\r\n * @param errors string[]\r\n */\r\n public ShowMessages(success?: string[], warnings?: string[], errors?: string[]) {\r\n // create component factory\r\n const componentFactory = this.componentFactoryResolver.resolveComponentFactory(ErrorMessagesComponent);\r\n // clear content - preventing before duplicated messages on UI\r\n this.messagesHost.clear();\r\n this.componentRef = this.messagesHost.createComponent(componentFactory);\r\n if (success && success.length > 0) {\r\n this.componentRef.instance.ShowSuccessMessages(success);\r\n }\r\n if (warnings && warnings.length > 0) {\r\n this.componentRef.instance.ShowWarningMessages(warnings);\r\n }\r\n if (errors && errors.length > 0) {\r\n this.componentRef.instance.ShowErrorMessages(errors);\r\n }\r\n // show on UI\r\n this.componentRef.changeDetectorRef.detectChanges();\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\n\r\n@Injectable({\r\n providedIn: \"root\",\r\n})\r\nexport class BankersRoundService {\r\n\r\n public bankersRound(val: number, noOfDecimals: number): number {\r\n if (!val || (val.toString().split(\".\")[1] || \"\").length <= noOfDecimals) {\r\n return val;\r\n }\r\n\r\n const sign = val < 0 ? -1 : 1;\r\n\r\n val = Math.abs(val);\r\n\r\n const p: number = Math.pow(10, noOfDecimals);\r\n const numberToRound: number = this.moveDecimalPlace(val, noOfDecimals); //--- Can produce unexpected results when val has more than 10 decimal places\r\n let rounded: number;\r\n const decimal: number = Number(\"0.\" + (numberToRound.toString().split(\".\")[1] || 0));\r\n if (decimal < 0.5) {\r\n rounded = Math.floor(numberToRound);\r\n } else if (decimal > 0.5) {\r\n rounded = Math.ceil(numberToRound);\r\n } else {\r\n rounded = numberToRound + (numberToRound - decimal) % 2;\r\n }\r\n\r\n rounded = rounded * sign;\r\n\r\n return parseInt(rounded.toString(), 10) / p;\r\n }\r\n\r\n //--- Work around for javascript number error e.g. 37.995 * 100 = 3799.499999999995\r\n private moveDecimalPlace(val: number, noOfPlaces: number): number {\r\n const split = val.toString().split(\".\");\r\n split[1] = split[1].slice(0, noOfPlaces) + \".\" + split[1].slice(noOfPlaces);\r\n return Number(split.join(\"\"));\r\n }\r\n}\r\n","import { PurchaseOrderCylinder } from \"./purchase-order-cylinder.model\";\r\nimport { PurchaseOrderEquipment } from \"./purchase-order-equipment.model\";\r\nimport { PurchaseOrderMaterial } from \"./purchase-order-material.model\";\r\nimport { PurchaseOrderPart } from \"./purchase-order-part.model\";\r\nimport { PurchaseOrderStatus } from \"../enums/purchase-order-status.enum\";\r\n\r\nexport class PurchaseOrder {\r\n PurchaseOrderNumber: number;\r\n Status: PurchaseOrderStatus;\r\n SupplierId: number;\r\n DeliverToId: number;\r\n ContactId: number;\r\n OrderDate: Date;\r\n InternalNotes: string;\r\n Instructions: string;\r\n CancelDate?: Date;\r\n CancelReasonId?: number;\r\n CarrierId: number;\r\n CarrierReference: string;\r\n CarrierContactId: number;\r\n Carriage: number;\r\n CarriageFC: number;\r\n ExchangeRate: number;\r\n IsForeignCustomer: boolean;\r\n IncludeParts: boolean;\r\n IncludeEquipment: boolean;\r\n IncludeMaterials: boolean;\r\n IncludeCylinders: boolean;\r\n UserRef1PurchaseId: number;\r\n UserRef2Purchase: string;\r\n HasActiveGoodsReceived: boolean;\r\n HasPendingGoodsReceived: boolean;\r\n ShowVAT: boolean;\r\n Parts: PurchaseOrderPart[];\r\n Equipment: PurchaseOrderEquipment[];\r\n Materials: PurchaseOrderMaterial[];\r\n Cylinders: PurchaseOrderCylinder[];\r\n StoreId: number;\r\n Timestamp?: number;\r\n\r\n constructor() {\r\n this.IncludeEquipment = true;\r\n this.IncludeMaterials = true;\r\n this.IncludeParts = true;\r\n this.IncludeCylinders = true;\r\n this.Parts = [];\r\n this.Equipment = [];\r\n this.Materials = [];\r\n this.Cylinders = [];\r\n this.Status = PurchaseOrderStatus.Pending;\r\n this.DeliverToId = 1; // default to depot on on new PO\r\n this.StoreId = 1; // default to main store on on new PO\r\n }\r\n}\r\n\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { PageableDatastoreService } from \"servicesight-shared\";\r\nimport { QueuedEmailType } from \"src/app/shared/enums/queued-email-type.enum\";\r\nimport { Email } from \"src/app/shared/models/email.model\";\r\nimport { AuthService } from \"src/app/shared/services/auth/auth.service\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\nimport { PurchaseOrder } from \"../models/purchase-order.model\";\r\nimport { UpdateModel } from \"../models/update.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class PurchaseOrderService extends PageableDatastoreService {\r\n private static readonly odataKey: string = \"PurchaseOrderNumber\";\r\n\r\n constructor(\r\n private odataService: ODataService,\r\n @Inject(APP_CONFIG) protected config: IAppConfig,\r\n private httpClient: HttpClient,\r\n private authService: AuthService\r\n ) {\r\n super(PurchaseOrderService.odataKey);\r\n }\r\n\r\n public Get(purchaseOrderId: number): Observable {\r\n return this.httpClient.get(`${this.config.apiLocations.PurchaseOrders}PurchaseOrders/${purchaseOrderId}`);\r\n }\r\n\r\n public Create(purchaseOrder: PurchaseOrder): Observable {\r\n // null temp misc ids before sending to server\r\n purchaseOrder.Materials.forEach(material => {\r\n const id = Number(material.MiscId);\r\n if (isNaN(id)) {\r\n material.MiscId = null;\r\n }\r\n\r\n if (material.LinkNumber) {\r\n material.LinkNumber = Number(material.LinkNumber);\r\n }\r\n });\r\n\r\n purchaseOrder.Parts.forEach(part => {\r\n if (part.LinkNumber) {\r\n part.LinkNumber = Number(part.LinkNumber);\r\n }\r\n });\r\n\r\n return this.httpClient.post(`${this.config.apiLocations.PurchaseOrders}PurchaseOrders`, purchaseOrder);\r\n }\r\n\r\n public Update(purchaseOrder: PurchaseOrder): Observable {\r\n // null temp misc ids before sending to server\r\n purchaseOrder.Materials.forEach(material => {\r\n const id = Number(material.MiscId);\r\n if (isNaN(id)) {\r\n material.MiscId = null;\r\n }\r\n\r\n if (material.LinkNumber) {\r\n material.LinkNumber = Number(material.LinkNumber);\r\n }\r\n });\r\n\r\n purchaseOrder.Parts.forEach(part => {\r\n if (part.LinkNumber) {\r\n part.LinkNumber = Number(part.LinkNumber);\r\n }\r\n });\r\n\r\n return this.httpClient.put(`${this.config.apiLocations.PurchaseOrders}PurchaseOrders`, purchaseOrder);\r\n }\r\n\r\n public CancelOS(purchaseOrderId: number): Observable {\r\n return this.httpClient.put(`${this.config.apiLocations.PurchaseOrders}PurchaseOrders/${purchaseOrderId}/CancelOS`, null);\r\n }\r\n\r\n public Place(purchaseOrderId: number): Observable {\r\n return this.httpClient.put(`${this.config.apiLocations.PurchaseOrders}PurchaseOrders/${purchaseOrderId}/Place`, null);\r\n }\r\n\r\n public Recall(purchaseOrderId: number): Observable {\r\n return this.httpClient.put(`${this.config.apiLocations.PurchaseOrders}PurchaseOrders/${purchaseOrderId}/Recall`, null);\r\n }\r\n\r\n public Copy(purchaseOrderId: number): Observable {\r\n return this.httpClient.post(`${this.config.apiLocations.PurchaseOrders}PurchaseOrders/${purchaseOrderId}/Copy`, null);\r\n }\r\n\r\n public GetQtyPo(partId: number): Observable {\r\n return this.httpClient.get(`${this.config.apiLocations.PurchaseOrders}PurchaseOrders/${partId}/Quantity`);\r\n }\r\n\r\n public Cancel(purchaseOrder: PurchaseOrder): Observable {\r\n return this.httpClient.put(`${this.config.apiLocations.PurchaseOrders}PurchaseOrders/Cancel`, purchaseOrder);\r\n }\r\n\r\n public GetPurchaseOrderEmailData(id: number): Observable {\r\n return this.httpClient.get(`${this.config.apiLocations.PurchaseOrders}PurchaseOrderEmail/${id}`);\r\n }\r\n\r\n public SendPurchaseOrderEmailData(emailData: Email): Observable {\r\n emailData.EmailType = QueuedEmailType.PurchaseOrder;\r\n emailData.SenderEmployeeId = this.authService.EmployeeId;\r\n return this.httpClient.post(`${this.config.apiLocations.ServiceSight}Email/QueueEmail`, emailData);\r\n }\r\n\r\n protected GetDataSourceObject(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.PurchaseOrdersOData}PurchaseOrdersOData`,\r\n key: PurchaseOrderService.odataKey,\r\n keyType: \"String\"\r\n });\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{ \"accordion.receipts.grn-no\" | translate }}\r\n \r\n {{ receipt.AdviceNoteId }}\r\n {{ receipt.ReceiptDate | date: \"shortDate\" }}{{ receipt.Status | goodsReceivedStatus | translate }}
","import { OrderReceiptModel } from \"./../models/order-receipt.model\";\r\nimport { Component, Input, OnChanges } from \"@angular/core\";\r\nimport { AccordionDataService } from \"../accordion-data.service\";\r\n\r\n@Component({\r\n selector: \"app-purchase-order-receipts-accordion-item\",\r\n templateUrl: \"./purchase-order-receipts-accordion-item.component.html\",\r\n styleUrls: [\"./purchase-order-receipts-accordion-item.component.scss\"]\r\n})\r\nexport class PurchaseOrderReceiptsAccordionItemComponent implements OnChanges {\r\n @Input() purchaseOrderId: number;\r\n public orderReceipts: OrderReceiptModel[];\r\n\r\n constructor(\r\n private dataService: AccordionDataService) { }\r\n\r\n public ngOnChanges(): void {\r\n if (this.purchaseOrderId) {\r\n this.dataService.GetPurchaseOrderReceipts(this.purchaseOrderId).subscribe(result => {\r\n this.orderReceipts = result;\r\n });\r\n }\r\n }\r\n}\r\n","{{ 'accordion.supplier-not-selected' | translate }}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{ order.PurchaseId }}\r\n \r\n
\r\n
\r\n
\r\n
{{ order.OrderDate | date: \"shortDate\" }}{{ order.EnteredBy }}
\r\n","import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges } from \"@angular/core\";\r\nimport { AccordionDataService } from \"../accordion-data.service\";\r\nimport { OpenPurchaseOrderModel } from \"../models/open-purchase-order-model\";\r\n\r\n@Component({\r\n selector: \"app-purchase-order-pending-orders-accordion-item\",\r\n templateUrl: \"./purchase-order-pending-orders-accordion-item.component.html\",\r\n styleUrls: [\"./purchase-order-pending-orders-accordion-item.component.scss\"]\r\n})\r\n\r\nexport class PurchaseOrderPendingOrdersAccordionItemComponent implements OnChanges {\r\n @Input() supplierId: number;\r\n @Input() purchaseOrderId: number;\r\n @Output() openOrders: EventEmitter = new EventEmitter();\r\n\r\n public orders: OpenPurchaseOrderModel[] = [];\r\n\r\n constructor(private dataService: AccordionDataService) { }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.supplierId && changes.supplierId.currentValue) {\r\n this.loadData();\r\n }\r\n\r\n if (changes.purchaseOrderId && changes.purchaseOrderId.currentValue && this.supplierId) {\r\n this.loadData();\r\n }\r\n }\r\n\r\n private loadData(): void {\r\n this.dataService.GetOpenPurchaseOrders(this.supplierId, this.purchaseOrderId || 0).subscribe((res) => {\r\n this.orders = res.sort((a, b) => b.PurchaseId - a.PurchaseId);\r\n this.openOrders.emit(res.length > 0);\r\n });\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { PurchaseOrderStatus } from \"../enums/purchase-order-status.enum\";\r\n\r\n@Pipe({\r\n name: \"purchaseOrderStatusBar\"\r\n})\r\nexport class PurchaseOrderStatusBarPipe implements PipeTransform {\r\n\r\n private readonly status = {\r\n [PurchaseOrderStatus.Pending]: \"bgredstatusshort\",\r\n [PurchaseOrderStatus.AuthorisationReq]: \"bgyellowstatusshorter\",\r\n [PurchaseOrderStatus.Placed]: \"bgyellowstatusshort\",\r\n [PurchaseOrderStatus.PartReceived]: \"bgyellowstatuslong\",\r\n [PurchaseOrderStatus.Complete]: \"bggreenstatuslong\",\r\n [PurchaseOrderStatus.Cancelled]: \"bggraystatus\",\r\n };\r\n\r\n private readonly bgcolors = {\r\n [PurchaseOrderStatus.Pending]: \"clrred\",\r\n [PurchaseOrderStatus.AuthorisationReq]: \"clryellow\",\r\n [PurchaseOrderStatus.Placed]: \"clryellow\",\r\n [PurchaseOrderStatus.PartReceived]: \"clryellow\",\r\n [PurchaseOrderStatus.Complete]: \"clrgreen\",\r\n [PurchaseOrderStatus.Cancelled]: \"clrred\"\r\n };\r\n\r\n private readonly stringValueMapping = {\r\n Pending: PurchaseOrderStatus.Pending,\r\n AuthorisationReq: PurchaseOrderStatus.AuthorisationReq,\r\n Placed: PurchaseOrderStatus.Placed,\r\n PartReceived: PurchaseOrderStatus.PartReceived,\r\n Complete: PurchaseOrderStatus.Complete,\r\n Cancelled: PurchaseOrderStatus.Cancelled\r\n };\r\n\r\n transform(value: PurchaseOrderStatus | number | string, args?: any): string {\r\n if (value) {\r\n let safeValue = Number(value);\r\n if (isNaN(safeValue)) {\r\n safeValue = this.stringValueMapping[value];\r\n }\r\n\r\n const colors = {\r\n bg: this.bgcolors[safeValue],\r\n bar: this.status[safeValue]\r\n };\r\n\r\n return colors[args];\r\n }\r\n\r\n return null;\r\n }\r\n\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

{{ 'purchase-orders.detail.title' | translate }} {{ po.PurchaseOrderNumber }}

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

{{ po.Status | purchaseOrderStatus | translate }}

\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n {{ 'purchase-orders.parts.remove-part' | translate }}\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ prepareCurrencyValue(data.value, data.data.UnitCostFC) | currency: currencySymbol }}
\r\n
{{ prepareCurrencyValue(data.value, data.data.TotalCostFC) | currency: currencySymbol }}
\r\n
{{ data.value | documentType | translate }}
\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {{ 'purchase-orders.parts.description' | translate }}\r\n \r\n \r\n \r\n {{ 'purchase-orders.parts.store' | translate }}\r\n \r\n \r\n {{ 'purchase-orders.parts.qty-required' | translate }}\r\n \r\n \r\n {{ 'purchase-orders.parts.due-date' | translate }}\r\n \r\n \r\n \r\n
\r\n {{ currencySymbol }}\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n {{ 'purchase-orders.parts.update-cost' | translate }}\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n {{ 'purchase-orders.equipment.remove-equipment' | translate }}\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ prepareCurrencyValue(data.value, data.data.UnitCostFC) | currency: currencySymbol }}
\r\n
{{ prepareCurrencyValue(data.value, data.data.TotalCostFC) | currency: currencySymbol }}
\r\n
{{ data.value | documentType | translate }}
\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {{ 'purchase-orders.equipment.qty-required' | translate }}\r\n \r\n \r\n {{ 'purchase-orders.fgas.store' | translate }}\r\n \r\n \r\n {{ 'purchase-orders.equipment.due-date' | translate }}\r\n \r\n \r\n \r\n
\r\n {{ currencySymbol }}\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n {{ 'purchase-orders.materials.remove-materials' | translate }}\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ prepareCurrencyValue(data.value, data.data.CostFC) | currency: currencySymbol }}
\r\n
{{ data.value | documentType | translate }}
\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {{ 'purchase-orders.materials.due-date' | translate }}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{ currencySymbol }}\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n {{ 'purchase-orders.fgas.remove-cylinders' | translate }}\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n
\r\n {{ data.value }} {{ units }}\r\n
\r\n
\r\n {{data.value | currency: baseCurrencySymbol }}\r\n
\r\n
{{ prepareCurrencyValue(data.value, data.data.UnitCostFC) | currency: currencySymbol }}
\r\n
{{ prepareCurrencyValue(data.value, data.data.TotalCostFC) | currency: currencySymbol }}
\r\n
{{ prepareCurrencyValue(data.value, data.data.LateFeeFC) | currency: currencySymbol }}
\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\t \r\n \t \t {{ 'purchase-orders.parts.qty-required' | translate }}\r\n \r\n \r\n \r\n \r\n {{ 'purchase-orders.fgas.store' | translate }}\r\n \r\n \r\n {{ 'purchase-orders.fgas.quantity-required' | translate }}\r\n \r\n \r\n \r\n \r\n
\r\n {{ currencySymbol }}\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n {{ 'purchase-orders.fgas.due-date' | translate }}\r\n \r\n \r\n {{ 'purchase-orders.fgas.return-by' | translate }}\r\n \r\n \r\n \r\n
\r\n {{ currencySymbol }}\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ 'purchase-orders.summary.header.order' | translate }}{{ 'purchase-orders.summary.header.items' | translate }}{{ 'purchase-orders.summary.header.qty-required' | translate }}{{ 'purchase-orders.summary.header.cost' | translate }}{{ 'purchase-orders.summary.header.received' | translate }}{{ 'purchase-orders.summary.header.outstanding' | translate }}
\r\n
\r\n
\r\n \r\n
\r\n
{{ 'purchase-orders.tab.parts' | translate }}
\r\n
\r\n
{{ partsCount }}{{ partsQuantity }}{{ currencyFormat(prepareCurrencyValue(partsCost, partsCostFC)) }}{{ partsReceived }}{{ partsOutstanding }}
\r\n
\r\n
\r\n \r\n
\r\n
{{ 'purchase-orders.tab.equipment' | translate }}
\r\n
\r\n
{{ equipmentCount }}{{ equipmentQuantity }}{{ currencyFormat(prepareCurrencyValue(equipmentCost, equipmentCostFC)) }}{{ equipmentReceived }}{{ equipmentOutstanding }}
\r\n
\r\n
\r\n \r\n
\r\n
{{ 'purchase-orders.tab.materials' | translate }}
\r\n
\r\n
{{ materialsCount }}{{ materialsQuantity }}{{ currencyFormat(prepareCurrencyValue(materialsCost, materialsCostFC)) }}{{ materialsReceived }}{{ materialsOutstanding }}
\r\n
\r\n
\r\n \r\n
\r\n
{{ 'purchase-orders.tab.fgas' | translate }}
\r\n
\r\n
{{ cylindersCount }}{{ cylindersQuantity }}{{ currencyFormat(prepareCurrencyValue(cylindersCost, cylindersCostFC)) }}{{ cylindersReceived }}{{ cylindersOutstanding }}
{{ 'purchase-orders.summary.combined-order-total' | translate }}{{ itemCount }}{{ totalQuantity }}{{ currencyFormat(prepareCurrencyValue(totalCost, totalCostFC)) }}{{ totalReceived }}{{ totalOutstanding }}
{{ 'purchase-orders.detail.carriage' | translate }}  {{ currencyFormat(prepareCurrencyValue(po.Carriage, po.CarriageFC)) }}  
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n {{ tooltipText }}\r\n
\r\n
\r\n","import { formatCurrency } from \"@angular/common\";\r\nimport { Component, ElementRef, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent, DxSelectBoxComponent, DxTabPanelComponent, DxTooltipComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { on } from \"devextreme/events\";\r\nimport { Guid } from \"guid-typescript\";\r\nimport * as moment from \"moment\";\r\nimport { Observable } from \"rxjs\";\r\nimport { map } from \"rxjs/operators\";\r\nimport {\r\n AccountingService,\r\n ContactService,\r\n CustomerService,\r\n CustomerStatus,\r\n DocumentTypeEnum,\r\n DocumentTypePipe,\r\n FormMesssageService,\r\n JobDataService,\r\n MakeModelSharedService,\r\n PhraseBookType,\r\n SettingData,\r\n SettingId,\r\n SettingsService,\r\n SupplierPricesModel,\r\n UICustomisation,\r\n UserReferenceService,\r\n UserRefType\r\n} from \"servicesight-shared\";\r\nimport { SupplierPriceService } from \"src/app/f-gas/services/supplier-price.service\";\r\nimport { GoodsReceivedService } from \"src/app/goods-received/services/goods-received.service\";\r\nimport { MessageService } from \"src/app/messages/services/message/message.service\";\r\nimport { CancelData } from \"src/app/quotes/models/CancelData\";\r\nimport { IJobMisc } from \"src/app/quotes/models/IJobMisc\";\r\nimport { RefrigerantTypeService } from \"src/app/settings/services/refrigerant-type.service\";\r\nimport { StoreService } from \"src/app/settings/services/store.service\";\r\nimport { BasePopSopDetailComponent } from \"src/app/shared-pop-sop/components/base-pop-sop-detail/base-pop-sop-detail.component\";\r\nimport {\r\n PurchaseOrderDetailsAccordionItemComponent\r\n} from \"src/app/shared/components/accordion/purchase-order-details-accordion-item/purchase-order-details-accordion-item.component\";\r\nimport { AddCylinderDialogComponent } from \"src/app/shared/components/add-cylinder-dialog/add-cylinder-dialog.component\";\r\nimport { AddMakeModelDialogueComponent } from \"src/app/shared/components/add-make-model-dialogue/add-make-model-dialogue.component\";\r\nimport { AddPartDialogueComponent } from \"src/app/shared/components/add-part-dialogue/add-part-dialogue.component\";\r\nimport { ChildContactType } from \"src/app/shared/components/child-contacts-list/child-contact-type.enum\";\r\nimport { DiscussionComponent } from \"src/app/shared/components/discussion/discussion.component\";\r\nimport { AddMessagesComponent } from \"src/app/shared/components/error-messages/add-messages.component\";\r\nimport { JobMiscDialogComponent } from \"src/app/shared/components/job-misc-dialog/job-misc-dialog.component\";\r\nimport { MessageDocTypeIds } from \"src/app/shared/enums/messages/message-doc-type-ids.enum\";\r\nimport { MessageTypes } from \"src/app/shared/enums/messages/message-types.enum\";\r\nimport { DocumentLinkModel } from \"src/app/shared/models/document-link.model\";\r\nimport { BankersRoundService } from \"src/app/shared/services/bankers-round.service\";\r\nimport { ChildContactsService } from \"src/app/shared/services/child-contacts/child-contracts.service\";\r\nimport { MakeModelService } from \"src/app/shared/services/make-model/make-model.service\";\r\nimport { MaterialTypeService } from \"src/app/shared/services/material-type/material-type.service\";\r\nimport { Ng1ReminderService } from \"src/app/shared/services/ng1-reminder.service\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\nimport { SupplierService } from \"src/app/shared/services/supplier/supplier.service\";\r\nimport { StockState } from \"src/app/stock/models/enums/stock-state.enum\";\r\nimport { StockService } from \"src/app/stock/services/stock.service\";\r\nimport { ConfirmationMessageComponent } from \"../../shared/components/confirmation-message/confirmation-message.component\";\r\nimport { ContactStatus } from \"../../shared/enums/contact-status.eum\";\r\nimport { SupplierStatus } from \"../../shared/pipes/enums/supplier-status.enum\";\r\nimport { LicenseService } from \"../../shared/services/licence/license.service\";\r\nimport { PreviousRouteService } from \"../../shared/services/previous-route.service\";\r\nimport { PurchaseOrderStatus } from \"../enums/purchase-order-status.enum\";\r\nimport { PurchaseOrderCylinder } from \"../models/purchase-order-cylinder.model\";\r\nimport { PurchaseOrderEquipment } from \"../models/purchase-order-equipment.model\";\r\nimport { PurchaseOrderMaterial } from \"../models/purchase-order-material.model\";\r\nimport { PurchaseOrderPart } from \"../models/purchase-order-part.model\";\r\nimport { PurchaseOrder } from \"../models/purchase-order.model\";\r\nimport { UpdateModel } from \"../models/update.model\";\r\nimport { PurchaseOrderService } from \"../services/purchase-order.service\";\r\n// eslint-disable-next-line max-len\r\n\r\n@Component({\r\n selector: \"app-purchase-order-detail\",\r\n templateUrl: \"./purchase-order-detail.component.html\",\r\n styleUrls: [\"./purchase-order-detail.component.scss\"]\r\n})\r\nexport class PurchaseOrderDetailComponent extends BasePopSopDetailComponent implements OnInit {\r\n @ViewChild(\"poform\", { static: true }) form: NgForm;\r\n @ViewChild(JobMiscDialogComponent, { static: true }) AddMaterialDialog: JobMiscDialogComponent;\r\n @ViewChild(AddPartDialogueComponent, { static: true }) AddPartDialog: AddPartDialogueComponent;\r\n @ViewChild(AddMakeModelDialogueComponent, { static: true }) AddMakeModelDialog: AddMakeModelDialogueComponent;\r\n @ViewChild(AddCylinderDialogComponent, { static: true }) AddCylinderDialog: AddCylinderDialogComponent;\r\n @ViewChild(\"MaterialsGrid\", { static: false }) MaterialsGrid: DxDataGridComponent;\r\n @ViewChild(\"PartsGrid\", { static: false }) PartsGrid: DxDataGridComponent;\r\n @ViewChild(\"EquipmentGrid\", { static: false }) EquipmentGrid: DxDataGridComponent;\r\n @ViewChild(\"CylindersGrid\", { static: false }) CylindersGrid: DxDataGridComponent;\r\n @ViewChild(\"contactSelectBox\", { static: false }) contactSelectBoxComponent: DxSelectBoxComponent;\r\n @ViewChild(\"carrierContactSelectBox\", { static: false }) carrierContactSelectBoxComponent: DxSelectBoxComponent;\r\n @ViewChild(\"orderDetailsAccordionItem\", { static: false }) orderDetailsAccordionItem: PurchaseOrderDetailsAccordionItemComponent;\r\n @ViewChild(\"discardChangesMessage\") discardMessage: ConfirmationMessageComponent;\r\n @ViewChild(\"cancelOSMessage\") cancelOSMessage: ConfirmationMessageComponent;\r\n @ViewChild(\"tabPanel\", { static: true }) tabPanel: DxTabPanelComponent;\r\n @ViewChild(\"submitButton\", { static: true }) submitButton: ElementRef;\r\n @ViewChild(\"messageComponent\") addMessagesComponent: AddMessagesComponent;\r\n @ViewChild(\"discussion\") discussionComponent: DiscussionComponent;\r\n @ViewChild(DxTooltipComponent) tooltip: DxTooltipComponent;\r\n\r\n public supplierContacts: ODataStore = null;\r\n public refrigerantTypeStore: ODataStore = null;\r\n public supplierPriceStore: ODataStore = null;\r\n public supplierPriceDataSource: DataSource = null;\r\n\r\n public documentType = DocumentTypeEnum;\r\n public orderStatus = PurchaseOrderStatus;\r\n public phraseType = PhraseBookType;\r\n public baseCurrencySymbol: string = null;\r\n public foreignCurrencySymbol: string = null;\r\n public showInForeignCurrency: boolean = false;\r\n public selectedPartIds: [] = [];\r\n public selectedMakeModelIds: [] = [];\r\n public selectedMaterialIds: [] = [];\r\n public selectedCylinderIds: [] = [];\r\n\r\n public userRef1Label: string = null;\r\n public userRef2Label: string = null;\r\n\r\n public po: PurchaseOrder = new PurchaseOrder();\r\n\r\n public minDateValue: Date = moment().startOf(\"day\").toDate();\r\n\r\n public IsNew: boolean = false;\r\n public HasAccessToPro: boolean = false;\r\n public HasAccessToStock: boolean = false;\r\n public HasAccessToEquipment: boolean = false;\r\n public HasAccessToFGas: boolean = false;\r\n public CanNavigatePrevious: boolean = false;\r\n public CanNavigateNext: boolean = false;\r\n public IsRecordNavigationEnabled: boolean = false;\r\n public showCancelDialog: boolean = false;\r\n public additionalStoresEnabled: boolean = false;\r\n public ShowMissingSupplierDialogue: boolean = false;\r\n public customerDataSource: DataSource;\r\n public supplierDataSource: DataSource;\r\n public supplierContactsDataSource: DataSource;\r\n public stockStoreDataStore: ODataStore;\r\n public docType = DocumentTypeEnum;\r\n public partsListDataSource: DataSource;\r\n public showPendingOrdersEye: boolean = false;\r\n public showWarningNotesEye: boolean = false;\r\n public isUSCompany: boolean = false;\r\n public units: string = \"kg\";\r\n public saveEnabled: boolean = true;\r\n public tooltipText: string;\r\n private noFilterSelected: boolean = false;\r\n\r\n public get carriage(): number {\r\n return this.showInForeignCurrency ? this.po.CarriageFC : this.po.Carriage;\r\n }\r\n\r\n public set carriage(value: number) {\r\n if (this.showInForeignCurrency) {\r\n this.po.Carriage = this.bankersRoundService.bankersRound(value / this.po.ExchangeRate, 2);\r\n this.po.CarriageFC = value;\r\n } else {\r\n this.po.Carriage = value;\r\n this.po.CarriageFC = this.bankersRoundService.bankersRound(value * this.po.ExchangeRate, 2);\r\n }\r\n }\r\n\r\n public get currencySymbol(): string {\r\n return this.showInForeignCurrency ? this.foreignCurrencySymbol : this.baseCurrencySymbol;\r\n }\r\n\r\n public get partsCount(): number {\r\n let itemCount = 0;\r\n\r\n if (this.po.Parts && this.po.IncludeParts) {\r\n itemCount = this.po.Parts.length;\r\n }\r\n\r\n return itemCount;\r\n }\r\n\r\n public get equipmentCount(): number {\r\n let itemCount = 0;\r\n\r\n if (this.po.Equipment && this.po.IncludeEquipment) {\r\n itemCount = this.po.Equipment.length;\r\n }\r\n\r\n return itemCount;\r\n }\r\n\r\n public get materialsCount(): number {\r\n let itemCount = 0;\r\n\r\n if (this.po.Materials && this.po.IncludeMaterials) {\r\n itemCount = this.po.Materials.length;\r\n }\r\n\r\n return itemCount;\r\n }\r\n\r\n public get cylindersCount(): number {\r\n let itemCount = 0;\r\n\r\n if (this.po.Cylinders && this.po.IncludeCylinders) {\r\n itemCount = this.po.Cylinders.length;\r\n }\r\n\r\n return itemCount;\r\n }\r\n\r\n public get itemCount(): number {\r\n return this.partsCount +\r\n this.equipmentCount +\r\n this.materialsCount +\r\n this.cylindersCount;\r\n }\r\n\r\n public get partsQuantity(): number {\r\n let partsQuantity = 0;\r\n\r\n if (this.po.Parts && this.po.IncludeParts) {\r\n partsQuantity = this.po.Parts.map(x => x.QtyRequired).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return partsQuantity;\r\n }\r\n\r\n public get equipmentQuantity(): number {\r\n let equipmentQuantity = 0;\r\n\r\n if (this.po.Equipment && this.po.IncludeEquipment) {\r\n equipmentQuantity = this.po.Equipment.map(x => x.QtyRequired).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return equipmentQuantity;\r\n }\r\n\r\n public get materialsQuantity(): number {\r\n return this.materialsCount;\r\n }\r\n\r\n public get cylindersQuantity(): number {\r\n let cylindersQuantity = 0;\r\n\r\n if (this.po.Cylinders && this.po.IncludeCylinders) {\r\n cylindersQuantity = this.po.Cylinders.map(x => x.QtyRequired).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return cylindersQuantity;\r\n }\r\n\r\n public get totalQuantity(): number {\r\n return this.partsQuantity +\r\n this.equipmentQuantity +\r\n this.materialsQuantity +\r\n this.cylindersQuantity;\r\n }\r\n\r\n public get partsCost(): number {\r\n let partsCost = 0;\r\n\r\n if (this.po.Parts && this.po.IncludeParts) {\r\n partsCost = this.po.Parts.map(x => x.TotalCost).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return partsCost;\r\n }\r\n\r\n public get partsCostFC(): number {\r\n let partsCostFC = 0;\r\n\r\n if (this.po.Parts && this.po.IncludeParts) {\r\n partsCostFC = this.po.Parts.map(x => x.TotalCostFC).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return partsCostFC;\r\n }\r\n\r\n public get equipmentCost(): number {\r\n let equipmentCost = 0;\r\n\r\n if (this.po.Equipment && this.po.IncludeEquipment) {\r\n equipmentCost = this.po.Equipment.map(x => x.TotalCost).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return equipmentCost;\r\n }\r\n\r\n public get equipmentCostFC(): number {\r\n let equipmentCostFC = 0;\r\n\r\n if (this.po.Equipment && this.po.IncludeEquipment) {\r\n equipmentCostFC = this.po.Equipment.map(x => x.TotalCostFC).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return equipmentCostFC;\r\n }\r\n\r\n public get materialsCost(): number {\r\n let materialsCost = 0;\r\n\r\n if (this.po.Materials && this.po.IncludeMaterials) {\r\n materialsCost = this.po.Materials.map(x => Number(x.Cost)).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return materialsCost;\r\n }\r\n\r\n public get materialsCostFC(): number {\r\n let materialsCostFC = 0;\r\n\r\n if (this.po.Materials && this.po.IncludeMaterials) {\r\n materialsCostFC = this.po.Materials.map(x => Number(x.CostFC)).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return materialsCostFC;\r\n }\r\n\r\n public get cylindersCost(): number {\r\n let cylindersCost = 0;\r\n\r\n if (this.po.Cylinders && this.po.IncludeCylinders) {\r\n cylindersCost = this.po.Cylinders.map(x => Number(x.TotalCost)).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return cylindersCost;\r\n }\r\n\r\n public get cylindersCostFC(): number {\r\n let cylindersCostFC = 0;\r\n\r\n if (this.po.Cylinders && this.po.IncludeCylinders) {\r\n cylindersCostFC = this.po.Cylinders.map(x => Number(x.TotalCostFC)).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return cylindersCostFC;\r\n }\r\n\r\n public get totalCost(): number {\r\n return this.partsCost +\r\n this.equipmentCost +\r\n this.materialsCost +\r\n this.cylindersCost;\r\n }\r\n\r\n public get totalCostFC(): number {\r\n return this.partsCostFC +\r\n this.equipmentCostFC +\r\n this.materialsCostFC +\r\n this.cylindersCostFC;\r\n }\r\n\r\n public get partsReceived(): number {\r\n let partsReceived = 0;\r\n\r\n if (this.po.Parts && this.po.IncludeParts) {\r\n partsReceived = this.po.Parts.map(x => x.Received).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return partsReceived;\r\n }\r\n\r\n public get equipmentReceived(): number {\r\n let equipmentReceived = 0;\r\n\r\n if (this.po.Equipment && this.po.IncludeEquipment) {\r\n equipmentReceived = this.po.Equipment.map(x => x.Received).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return equipmentReceived;\r\n }\r\n\r\n public get materialsReceived(): number {\r\n let materialsReceived = 0;\r\n\r\n if (this.po.Materials && this.po.IncludeMaterials) {\r\n materialsReceived = this.po.Materials.filter(x => x.Received).length;\r\n }\r\n\r\n return materialsReceived;\r\n }\r\n\r\n public get cylindersReceived(): number {\r\n let cylindersReceived = 0;\r\n\r\n if (this.po.Cylinders && this.po.IncludeCylinders) {\r\n cylindersReceived = this.po.Cylinders.filter(x => x.Received).length;\r\n }\r\n\r\n return cylindersReceived;\r\n }\r\n\r\n public get totalReceived(): number {\r\n return this.partsReceived +\r\n this.equipmentReceived +\r\n this.materialsReceived +\r\n this.cylindersReceived;\r\n }\r\n\r\n public get partsOutstanding(): number {\r\n let partsOutstanding = 0;\r\n\r\n if (this.po.Parts && this.po.IncludeParts) {\r\n partsOutstanding = this.po.Parts.map(x => x.Outstanding).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return partsOutstanding;\r\n }\r\n\r\n public get equipmentOutstanding(): number {\r\n let equipmentOutstanding = 0;\r\n\r\n if (this.po.Equipment && this.po.IncludeEquipment) {\r\n equipmentOutstanding = this.po.Equipment.map(x => x.Outstanding).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return equipmentOutstanding;\r\n }\r\n\r\n public get cylindersOutstanding(): number {\r\n let cylindersOutstanding = 0;\r\n\r\n if (this.po.Cylinders && this.po.IncludeCylinders) {\r\n cylindersOutstanding = this.po.Cylinders.map(x => x.Outstanding).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return cylindersOutstanding;\r\n }\r\n\r\n public get materialsOutstanding(): number {\r\n let materialOutstanding = 0;\r\n\r\n if (this.po.Materials && this.po.IncludeMaterials) {\r\n materialOutstanding = this.po.Materials.filter(x => !x.Received).length;\r\n }\r\n\r\n return materialOutstanding;\r\n }\r\n\r\n public get totalOutstanding(): number {\r\n return this.partsOutstanding +\r\n this.equipmentOutstanding +\r\n this.materialsOutstanding +\r\n this.cylindersOutstanding;\r\n }\r\n\r\n public get addedPartIds(): number[] {\r\n if (this.po.Parts) {\r\n return this.po.Parts.map(x => x.StockId);\r\n }\r\n\r\n return [];\r\n }\r\n\r\n public get formDisabled(): boolean {\r\n return this.po.Status !== PurchaseOrderStatus.Pending && this.po.Status !== PurchaseOrderStatus.AuthorisationReq;\r\n }\r\n\r\n public get cancelOSButtonEnabled(): boolean {\r\n return this.po.Status === PurchaseOrderStatus.Placed || this.po.Status === PurchaseOrderStatus.PartReceived;\r\n }\r\n\r\n public get orderCompleted(): boolean {\r\n return this.po.Status === PurchaseOrderStatus.Complete;\r\n }\r\n\r\n public get canBeCancelled(): boolean {\r\n return this.po.Status !== PurchaseOrderStatus.Cancelled\r\n && this.po.Status !== PurchaseOrderStatus.Complete\r\n && !this.po.HasActiveGoodsReceived;\r\n }\r\n\r\n constructor(\r\n private ng1reminderService: Ng1ReminderService,\r\n translate: TranslateService,\r\n documentTypePipe: DocumentTypePipe,\r\n materialType: MaterialTypeService,\r\n customerService: CustomerService,\r\n contactService: ContactService,\r\n makeModelSharedService: MakeModelSharedService,\r\n jobDataService: JobDataService,\r\n stockService: StockService,\r\n supplierService: SupplierService,\r\n private makeModelService: MakeModelService,\r\n private formMessageService: FormMesssageService,\r\n private childContactsService: ChildContactsService,\r\n private messageService: MessageService,\r\n private purchaseOrderService: PurchaseOrderService,\r\n private userRefsService: UserReferenceService,\r\n private router: Router,\r\n private route: ActivatedRoute,\r\n private licenseService: LicenseService,\r\n private previousRouteService: PreviousRouteService,\r\n private storeService: StoreService,\r\n private settingsService: SettingsService,\r\n private odataService: ODataService,\r\n private goodsReceivedService: GoodsReceivedService,\r\n private accountingService: AccountingService,\r\n private refrigerantTypeService: RefrigerantTypeService,\r\n private supplierPriceService: SupplierPriceService,\r\n private bankersRoundService: BankersRoundService\r\n ) {\r\n super(\r\n translate,\r\n documentTypePipe,\r\n materialType,\r\n customerService,\r\n contactService,\r\n makeModelSharedService,\r\n jobDataService,\r\n supplierService,\r\n stockService);\r\n\r\n this.onEquipRowUpdating = this.onEquipRowUpdating.bind(this);\r\n this.onPartsRowUpdating = this.onPartsRowUpdating.bind(this);\r\n this.onMaterialRowUpdating = this.onMaterialRowUpdating.bind(this);\r\n this.onCylinderRowUpdating = this.onCylinderRowUpdating.bind(this);\r\n this.onRowEditingStart = this.onRowEditingStart.bind(this);\r\n this.TotalCostFormatter = this.TotalCostFormatter.bind(this);\r\n this.calculateCustomSummary = this.calculateCustomSummary.bind(this);\r\n this.OnEquipDocumentLinkSelected = this.OnEquipDocumentLinkSelected.bind(this);\r\n this.OnMakeModelDocumentLinkSelected = this.OnMakeModelDocumentLinkSelected.bind(this);\r\n this.OnMaterialDocumentLinkSelected = this.OnMaterialDocumentLinkSelected.bind(this);\r\n\r\n this.baseCurrencySymbol = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(x => {\r\n this.HasAccessToPro = x.ProEnabled;\r\n this.HasAccessToStock = x.StockEnabled;\r\n this.HasAccessToEquipment = x.EquipmentEnabled;\r\n this.HasAccessToFGas = x.FGasEnabled;\r\n });\r\n\r\n this.userRef1Label = this.userRefsService.getLabel(UICustomisation.PURCHASE_REF1);\r\n this.userRef2Label = this.userRefsService.getLabel(UICustomisation.PURCHASE_REF2);\r\n\r\n this.userRefStore = this.userRefsService.getListDataStore(UserRefType.PURCHASE_ORDER_1);\r\n this.supplierContacts = this.childContactsService.GetDataStore(ChildContactType.Supplier);\r\n this.stockStoreDataStore = this.storeService.GetDataStore();\r\n this.refrigerantTypeStore = this.refrigerantTypeService.GetDataStore();\r\n this.supplierPriceStore = this.supplierPriceService.GetDataStore();\r\n this.supplierPriceDataSource = this.supplierPriceService.GetDataSource();\r\n super.ngOnInit();\r\n\r\n this.customerDataSource = new DataSource({\r\n store: this.customersStore,\r\n filter: [[\"Status\", \"=\", CustomerStatus.ACTIVE], \"or\", [\"Status\", \"=\", CustomerStatus.MANAGING_AGENT]]\r\n });\r\n\r\n this.supplierDataSource = new DataSource({\r\n store: this.supplierStore,\r\n filter: [\"Status\", \"=\", SupplierStatus.Active]\r\n });\r\n\r\n this.supplierContactsDataSource = new DataSource({\r\n store: this.supplierContacts,\r\n filter: [\"Status\", \"=\", ContactStatus.ACTIVE]\r\n });\r\n\r\n this.route.params.subscribe(params => {\r\n const id = Number(params.id);\r\n\r\n if (!isNaN(id)) {\r\n this.IsNew = false;\r\n this.GetPurchaseOrder(id);\r\n } else {\r\n this.IsNew = true;\r\n this.setDefaultDate();\r\n this.setShowVATOption();\r\n this.setupPartListDataSource();\r\n }\r\n this.IsRecordNavigationEnabled = !this.IsNew && this.previousRouteService.PreviousUrlContains(\"/purchase-orders\");\r\n });\r\n\r\n this.settingsService.getSetting(SettingId.UseAdditionalStores).subscribe(res => {\r\n this.additionalStoresEnabled = res.ValueBool;\r\n });\r\n\r\n this.settingsService.getSetting(SettingId.FGasRefrigerantUnits).subscribe((settingData: SettingData) => {\r\n this.units = settingData.ValueListSelectedId === 1 ? \"kg\" : \"lb\";\r\n });\r\n\r\n this.accountingService.GetAccountsInfo().subscribe(response => {\r\n this.isUSCompany = response.IsUsaTaxSystem;\r\n });\r\n }\r\n\r\n public currencyFormat(value: number): string {\r\n return formatCurrency(value ? value : 0,\r\n JSON.parse(localStorage.getItem(\"ls.UserBrowserLocale\")),\r\n this.currencySymbol);\r\n }\r\n\r\n public prepareCurrencyValue(value: number, valueFC: number): number {\r\n return this.showInForeignCurrency ? valueFC : value;\r\n }\r\n\r\n public Save(): void {\r\n this.saveEnabled = false;\r\n this.InternalSave().subscribe(()=>{\r\n this.saveEnabled = true;\r\n }, () => {\r\n this.saveEnabled = true;\r\n });\r\n }\r\n\r\n public PlaceOrder(): void {\r\n if (this.form.dirty) {\r\n this.formMessageService\r\n .RegisterObservable(this.InternalSave(), \"poform\")\r\n .subscribe(po => {\r\n this.po = po;\r\n this.IsNew = false;\r\n\r\n this.formMessageService\r\n .RegisterObservable(this.purchaseOrderService.Place(po.PurchaseOrderNumber), \"poform\")\r\n .subscribe(x => {\r\n this.po.Timestamp = x.Timestamp;\r\n this.po.Status = PurchaseOrderStatus.Placed;\r\n this.ReloadComments();\r\n }, response => {\r\n if (response.error.Message === \"purchase-orders.errors.value-of-order-is-greater-than-limit\") {\r\n this.GetPurchaseOrder(this.po.PurchaseOrderNumber);\r\n }\r\n });\r\n });\r\n } else {\r\n this.formMessageService\r\n .RegisterObservable(this.purchaseOrderService.Place(this.po.PurchaseOrderNumber), \"poform\")\r\n .subscribe(x => {\r\n this.po.Timestamp = x.Timestamp;\r\n this.po.Status = PurchaseOrderStatus.Placed;\r\n this.ReloadComments();\r\n }, response => {\r\n if (response.error.Message === \"purchase-orders.errors.value-of-order-is-greater-than-limit\") {\r\n this.GetPurchaseOrder(this.po.PurchaseOrderNumber);\r\n }\r\n });\r\n }\r\n }\r\n\r\n public RecallOrder(): void {\r\n this.formMessageService\r\n .RegisterObservable(this.purchaseOrderService.Recall(this.po.PurchaseOrderNumber), \"poform\")\r\n .subscribe(x => {\r\n this.po.Timestamp = x.Timestamp;\r\n this.po.Status = PurchaseOrderStatus.Pending;\r\n this.setupPartListDataSource();\r\n this.ReloadComments();\r\n });\r\n }\r\n\r\n public ViewOrder(): void {\r\n if (!this.form.invalid) { // form.valid is false if any fields are disabled\r\n if (this.form.dirty) {\r\n this.formMessageService\r\n .RegisterObservable(this.purchaseOrderService.Update(this.po), \"poform\")\r\n .subscribe(po => {\r\n this.router.navigate([\"/purchase-orders/detail\", po.PurchaseOrderNumber, \"document\"]);\r\n });\r\n } else {\r\n this.router.navigate([\"/purchase-orders/detail\", this.po.PurchaseOrderNumber, \"document\"]);\r\n }\r\n\r\n } else {\r\n this.submitButton.nativeElement.click();\r\n }\r\n }\r\n\r\n public CancelOrder(): void {\r\n this.showCancelDialog = true;\r\n }\r\n\r\n public OnCancelOS(): void {\r\n this.cancelOSMessage.show();\r\n }\r\n\r\n public CancelOS(): void {\r\n this.purchaseOrderService.CancelOS(this.po.PurchaseOrderNumber).subscribe(() => {\r\n this.GetPurchaseOrder(this.po.PurchaseOrderNumber);\r\n });\r\n }\r\n\r\n public SaveCancelDialog(data: CancelData): void {\r\n this.po.CancelDate = data.CancelDate;\r\n this.po.CancelReasonId = data.CancelReasonID;\r\n this.purchaseOrderService.Cancel(this.po).subscribe(purchaseOrder => {\r\n this.po = purchaseOrder;\r\n this.orderDetailsAccordionItem.Load();\r\n this.ReloadComments();\r\n });\r\n this.showCancelDialog = false;\r\n }\r\n\r\n public CloseCancelDialog(): void {\r\n this.showCancelDialog = false;\r\n }\r\n\r\n public CopyOrder(): void {\r\n this.purchaseOrderService.Copy(this.po.PurchaseOrderNumber).subscribe(x => {\r\n this.po = x;\r\n window.history.pushState(null, `Purchase order ${this.po.PurchaseOrderNumber}`, `/#/purchase-orders/detail/${this.po.PurchaseOrderNumber}`);\r\n });\r\n }\r\n\r\n public BookIn(): void {\r\n this.goodsReceivedService.GetByPurchaseOrder(this.po.PurchaseOrderNumber).subscribe(grn => {\r\n this.ReloadComments();\r\n this.router.navigate([\"/goods-received/detail\", grn.GoodsReceivedNumber]);\r\n });\r\n }\r\n\r\n public CreateReminder(): void {\r\n this.ng1reminderService.CreatePurchaseOrderReminder(this.po.PurchaseOrderNumber, this.po.ContactId);\r\n }\r\n\r\n public CreateMessage(): void {\r\n this.messageService.SetNewMessageParameters(0, MessageTypes.RefMessage, false, MessageDocTypeIds.PurchaseOrder, this.po.PurchaseOrderNumber);\r\n this.router.navigate([\"messages/newmessage\"]);\r\n }\r\n\r\n public GetSupplierDisplayExpr(item): string {\r\n return item ? `${item.Supplier} - ${item.Alpha}` : \"\";\r\n }\r\n\r\n public GetCustomerDisplayExpr(item): string {\r\n if (!item) {\r\n return \"\";\r\n }\r\n\r\n return item.Customer + (item.Address ? `, ${item.Address}` : \"\");\r\n }\r\n\r\n public SetFormDirty(): void {\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public toggleCurrency(): void {\r\n this.showInForeignCurrency = !this.showInForeignCurrency;\r\n this.RefreshAllGrids();\r\n }\r\n\r\n public AddPart(): void {\r\n if (!this.po.SupplierId) {\r\n this.ShowMissingSupplierDialogue = true;\r\n } else {\r\n this.AddPartDialog.Show(this.po.StoreId);\r\n }\r\n }\r\n\r\n public MoveToGeneralTab(): void {\r\n this.tabPanel.instance.option(\"selectedIndex\", 0);\r\n this.ShowMissingSupplierDialogue = false;\r\n }\r\n\r\n public async OnPartIdsAdded(ids: number[]): Promise {\r\n for (const id of ids) {\r\n const partData = await this.stockPartsDataSource.byKey({ StockHeaderId: id, StoreId: this.po.StoreId });\r\n let supplierPrice = await this.stockService.GetSupplierPrice(id, this.po.SupplierId).toPromise();\r\n\r\n if (!partData) {\r\n throw new Error(\"Error loading part data\");\r\n }\r\n\r\n const qtyRequired = this.GetPartSupplierRequiredQuantity(partData);\r\n supplierPrice = supplierPrice || 0;\r\n\r\n const unitPrice = this.po.IsForeignCustomer && supplierPrice > 0 ? (supplierPrice / this.po.ExchangeRate) : supplierPrice;\r\n const unitPriceFC = this.po.IsForeignCustomer && supplierPrice > 0 ? supplierPrice : supplierPrice * this.po.ExchangeRate;\r\n const totalPrice = unitPrice * qtyRequired;\r\n const totalPriceFC = unitPriceFC * qtyRequired;\r\n\r\n this.po.Parts.push({\r\n PurchaseLineId: Guid.create().toString(),\r\n StockId: id,\r\n PartNumber: partData.PartNo,\r\n Description: partData.Description,\r\n QtyRequired: qtyRequired,\r\n UnitCost: unitPrice,\r\n UnitCostFC: unitPriceFC,\r\n TotalCost: totalPrice,\r\n TotalCostFC: totalPriceFC,\r\n DueDate: new Date(),\r\n Received: 0,\r\n Outstanding: qtyRequired,\r\n LinkType: null,\r\n LinkNumber: null,\r\n UpdateCost: false,\r\n StoreId: this.po.StoreId,\r\n StockState: StockState.New //potentially future get StockState from partData\r\n });\r\n\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n this.RefreshParts();\r\n }\r\n\r\n public RefreshParts(): void {\r\n this.partsListDataSource.reload();\r\n if (this.PartsGrid && this.PartsGrid.instance) {\r\n this.PartsGrid.instance.refresh();\r\n }\r\n }\r\n\r\n public RefreshCylinders(): void {\r\n if (this.CylindersGrid && this.CylindersGrid.instance) {\r\n this.CylindersGrid.instance.refresh();\r\n }\r\n }\r\n\r\n public RefreshEquipment(): void {\r\n if (this.EquipmentGrid && this.EquipmentGrid.instance) {\r\n this.EquipmentGrid.instance.refresh();\r\n }\r\n }\r\n\r\n public RefreshMaterials(): void {\r\n if (this.MaterialsGrid && this.MaterialsGrid.instance) {\r\n this.MaterialsGrid.instance.refresh();\r\n }\r\n }\r\n\r\n public RefreshAllGrids(): void {\r\n this.RefreshParts();\r\n this.RefreshEquipment();\r\n this.RefreshMaterials();\r\n this.RefreshCylinders();\r\n }\r\n\r\n public calculateCustomSummary(options): void {\r\n if (options.name === \"CostSummary\") {\r\n if (options.summaryProcess === \"start\") {\r\n options.totalValue = 0;\r\n } else if (options.summaryProcess === \"calculate\") {\r\n options.totalValue += this.prepareCurrencyValue(parseFloat(options.value.Cost), parseFloat(options.value.CostFC));\r\n }\r\n } else if (options.name === \"TotalCostSummary\") {\r\n if (options.summaryProcess === \"start\") {\r\n options.totalValue = 0;\r\n } else if (options.summaryProcess === \"calculate\") {\r\n options.totalValue += this.prepareCurrencyValue(parseFloat(options.value.TotalCost), parseFloat(options.value.TotalCostFC));\r\n }\r\n }\r\n }\r\n\r\n public onPartsRowUpdating(e: any): void {\r\n let unitCostInForeignCurrency = null;\r\n const alertMessages: string[] = [];\r\n\r\n if (e.newData.UnitCost && this.showInForeignCurrency) {\r\n unitCostInForeignCurrency = e.newData.UnitCost;\r\n } else if (e.newData.UnitCost && !this.showInForeignCurrency) {\r\n unitCostInForeignCurrency = e.newData.UnitCost * this.po.ExchangeRate;\r\n }\r\n\r\n if (e.newData.UpdateCost === true) {\r\n const cost = unitCostInForeignCurrency || (this.po.IsForeignCustomer ? e.oldData.UnitCost * this.po.ExchangeRate : e.oldData.UnitCost);\r\n this.stockService.UpdateBuyingPrice(e.oldData.StockId, this.po.SupplierId, cost).toPromise();\r\n }\r\n\r\n this.stockPartsDataSource.byKey({ StockHeaderId: e.oldData.StockId, StoreId: e.oldData.StoreId }).then(partData => {\r\n const qtyRequired = this.GetPartSupplierRequiredQuantity(partData);\r\n\r\n if (qtyRequired > e.newData.QtyRequired) {\r\n alertMessages.push(\"purchase-orders.errors.required-quantity\");\r\n }\r\n\r\n this.addMessagesComponent.ShowAlertMessages(alertMessages);\r\n });\r\n\r\n this.baseRowUpdating(e);\r\n }\r\n\r\n public DeleteSelectedParts(): void {\r\n this.selectedPartIds.forEach(id => {\r\n const index = this.po.Parts.findIndex(x => x.PurchaseLineId === id);\r\n this.po.Parts.splice(index, 1);\r\n });\r\n\r\n this.selectedPartIds = [];\r\n this.partsListDataSource.reload();\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public GetMakeModelDisplayValue(data: any): string {\r\n return `${data.Make} / ${data.Model}`;\r\n }\r\n\r\n public AddEquipment(): void {\r\n this.AddMakeModelDialog.Show();\r\n }\r\n\r\n public DeleteSelectedEquipment(): void {\r\n this.selectedMakeModelIds.forEach(id => {\r\n const index = this.po.Equipment.findIndex(x => x.PurchaseLineId === id);\r\n this.po.Equipment.splice(index, 1);\r\n });\r\n\r\n this.selectedMakeModelIds = [];\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public DeleteSelectedCylinders(): void {\r\n this.selectedCylinderIds.forEach(id => {\r\n const index = this.po.Cylinders.findIndex(x => x.PurchaseLineId === id);\r\n this.po.Cylinders.splice(index, 1);\r\n });\r\n\r\n this.selectedCylinderIds = [];\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public async OnMakeModelIdsAdded(ids: number[]): Promise {\r\n for (const id of ids) {\r\n const makeModel = await this.makeModelService.Get(id).toPromise();\r\n const supplierPrice = makeModel.SupplierPrices.find(s => s.SupplierId === this.po.SupplierId);\r\n const qtyRequired = supplierPrice?.MinOrderQty || 1;\r\n const buyingPrice = supplierPrice?.Price || 0;\r\n\r\n const unitPrice = this.po.IsForeignCustomer && buyingPrice > 0 ? (buyingPrice / this.po.ExchangeRate) : buyingPrice;\r\n const unitPriceFC = this.po.IsForeignCustomer && buyingPrice > 0 ? buyingPrice : buyingPrice * this.po.ExchangeRate;\r\n\r\n this.po.Equipment.push({\r\n PurchaseLineId: Guid.create().toString(),\r\n MakeModelId: id,\r\n QtyRequired: qtyRequired,\r\n WarrantyPeriod: makeModel.SalesWarrantyLength,\r\n UnitCost: unitPrice,\r\n UnitCostFC: unitPriceFC,\r\n TotalCost: unitPrice * qtyRequired,\r\n TotalCostFC: unitPriceFC * qtyRequired,\r\n DueDate: new Date(),\r\n Received: 0,\r\n Outstanding: qtyRequired,\r\n StoreId: this.po.StoreId,\r\n LinkType: null,\r\n LinkNumber: null\r\n });\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n this.RefreshEquipment();\r\n }\r\n\r\n public OnMakeModelDocumentLinkSelected(event: DocumentLinkModel, cellData: any): void {\r\n cellData.setValue(event.LinkType);\r\n this.PartsGrid.instance.cellValue(cellData.rowIndex, \"LinkNumber\", event.LinkNumber);\r\n }\r\n\r\n public onEquipRowUpdating(e: any): void {\r\n this.baseRowUpdating(e);\r\n e.newData.Outstanding = e.newData.QtyRequired;\r\n }\r\n\r\n public OnEquipDocumentLinkSelected(event: DocumentLinkModel, cellData: any): void {\r\n cellData.setValue(event.LinkType);\r\n this.EquipmentGrid.instance.cellValue(cellData.rowIndex, \"LinkNumber\", event.LinkNumber);\r\n }\r\n\r\n public onMaterialRowUpdating(e: any): void {\r\n this.baseRowUpdating(e);\r\n\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public OnMaterialDocumentLinkSelected(event: DocumentLinkModel, cellData: any): void {\r\n cellData.setValue(event.LinkType);\r\n this.MaterialsGrid.instance.cellValue(cellData.rowIndex, \"LinkNumber\", event.LinkNumber);\r\n }\r\n\r\n public onCylinderRowUpdating(e: any): void {\r\n this.baseRowUpdating(e);\r\n\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public AddMaterial(): void {\r\n this.AddMaterialDialog.Show(false);\r\n }\r\n\r\n public AddCylinder(): void {\r\n this.AddCylinderDialog.Show();\r\n }\r\n\r\n public SetCylindersFilter(noFilterSelected: boolean): void {\r\n this.noFilterSelected = noFilterSelected;\r\n }\r\n\r\n public async AddCylinders(ids: number[]): Promise {\r\n for (const id of ids) {\r\n if (this.noFilterSelected) {\r\n this.AddCylinderWithNoSupplierPrice(id);\r\n } else {\r\n const cylinderPrice = await this.supplierPriceStore.byKey(id);\r\n\r\n if (!cylinderPrice) {\r\n throw new Error(\"Error loading cylinder data\");\r\n }\r\n\r\n this.AddCylinderWithSupplierPrice(cylinderPrice);\r\n }\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n this.RefreshCylinders();\r\n }\r\n\r\n private AddCylinderWithNoSupplierPrice(refrigerantTypeId: number): void {\r\n const orderDate = new Date(this.po.OrderDate);\r\n\r\n this.po.Cylinders.push({\r\n PurchaseLineId: Guid.create().toString(),\r\n RefrigerantTypeId: refrigerantTypeId,\r\n Weight: 0,\r\n QtyRequired: 1,\r\n Received: 0,\r\n Outstanding: 0,\r\n QtyReturned: 0,\r\n UnitCost: 0,\r\n UnitCostFC: 0,\r\n TotalCost: 0,\r\n TotalCostFC: 0,\r\n Discount: 0,\r\n DueDate: orderDate,\r\n ReturnBy: orderDate,\r\n StoreId: this.po.StoreId,\r\n SupplierPartNumber: null,\r\n LateFee: null,\r\n LateFeeFC: null\r\n });\r\n }\r\n\r\n private AddCylinderWithSupplierPrice(supplierCylinderPrice: SupplierPricesModel): void {\r\n const dueDate = new Date(this.po.OrderDate);\r\n if (supplierCylinderPrice.LeadTime) {\r\n dueDate.setDate(dueDate.getDate() + supplierCylinderPrice.LeadTime);\r\n }\r\n const returnBy = new Date(this.po.OrderDate);\r\n if (supplierCylinderPrice.ReturnIn) {\r\n returnBy.setDate(dueDate.getDate() + supplierCylinderPrice.ReturnIn);\r\n }\r\n\r\n const unitCost =\r\n this.po.IsForeignCustomer && supplierCylinderPrice.BuyingPrice > 0\r\n ? (supplierCylinderPrice.BuyingPrice / this.po.ExchangeRate)\r\n : supplierCylinderPrice.BuyingPrice;\r\n\r\n const unitCostFC =\r\n this.po.IsForeignCustomer && supplierCylinderPrice.BuyingPrice > 0\r\n ? supplierCylinderPrice.BuyingPrice\r\n : supplierCylinderPrice.BuyingPrice * this.po.ExchangeRate;\r\n this.po.Cylinders.push({\r\n PurchaseLineId: Guid.create().toString(),\r\n RefrigerantTypeId: supplierCylinderPrice.RefrigerantTypeId,\r\n Weight: supplierCylinderPrice.Weight,\r\n QtyRequired: 1,\r\n Received: 0,\r\n Outstanding: 0,\r\n QtyReturned: 0,\r\n UnitCost: unitCost,\r\n UnitCostFC: unitCostFC,\r\n TotalCost: unitCost,\r\n TotalCostFC: unitCostFC,\r\n Discount: 0,\r\n DueDate: dueDate,\r\n ReturnBy: returnBy,\r\n StoreId: this.po.StoreId,\r\n SupplierPartNumber: supplierCylinderPrice.SupplierPartNumber,\r\n LateFee: supplierCylinderPrice.LateFee,\r\n LateFeeFC: supplierCylinderPrice.LateFee * this.po.ExchangeRate\r\n });\r\n }\r\n\r\n public DeleteSelectedMaterials(): void {\r\n this.selectedMaterialIds.forEach(id => {\r\n const index = this.po.Materials.findIndex(x => x.MiscId === id);\r\n this.po.Materials.splice(index, 1);\r\n });\r\n\r\n this.selectedMaterialIds = [];\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public AddMisc(data: IJobMisc): void {\r\n const cost = this.showInForeignCurrency ? data.Cost / this.po.ExchangeRate : data.Cost;\r\n const costFC = this.showInForeignCurrency ? data.Cost : data.Cost * this.po.ExchangeRate;\r\n\r\n this.po.Materials.push({\r\n MiscId: Guid.create().toString(),\r\n MaterialTypeId: data.MiscTypeID,\r\n Description: data.Description,\r\n Cost: cost,\r\n CostFC: costFC,\r\n DueDate: new Date(),\r\n Received: false,\r\n LinkType: null,\r\n LinkNumber: null\r\n });\r\n\r\n this.form.form.markAsDirty();\r\n this.RefreshMaterials();\r\n }\r\n\r\n public onRowEditingStart(e: any): void {\r\n e.data.UpdateCost = false;\r\n }\r\n\r\n public exchangeRateChanged(): void {\r\n this.UpdateFCsOnExchangeRateChange();\r\n }\r\n\r\n public SupplierChanged(e: any): void {\r\n if (e.value) {\r\n if (e.event) {\r\n this.GetCurrencyInformation(e.value, true);\r\n }\r\n const dataSource = this.contactSelectBoxComponent.instance.getDataSource();\r\n const contactFilter = this.GetContactFilter(e.value);\r\n dataSource.filter(contactFilter);\r\n dataSource.load().then(() => {\r\n if (e.event) {\r\n this.supplierStore.byKey(e.value).then(supplier => {\r\n this.po.ContactId = supplier.AccountsContactId;\r\n });\r\n }\r\n });\r\n }\r\n }\r\n\r\n public CarrierChanged(e: any): void {\r\n if (e.value) {\r\n const dataSource = this.carrierContactSelectBoxComponent.instance.getDataSource();\r\n const contactFilter = this.GetContactFilter(e.value);\r\n dataSource.filter(contactFilter);\r\n dataSource.load().then(() => {\r\n if (e.event) {\r\n this.po.CarrierContactId = null;\r\n }\r\n });\r\n }\r\n }\r\n\r\n public StoreChanged(e: any): void {\r\n if (e.value && e.event) { // make sure that this is not initialize change\r\n this.stockStoreDataStore.byKey(e.value).then(store => {\r\n this.po.DeliverToId = store.SiteId;\r\n });\r\n }\r\n }\r\n\r\n public onWarningNotes(show: boolean): void {\r\n this.showWarningNotesEye = show;\r\n }\r\n\r\n private GetPartSupplierRequiredQuantity(partData: any): number {\r\n const partSupplier = partData.Suppliers.find(supplier => supplier.SupplierId === this.po.SupplierId);\r\n return partSupplier && partSupplier.MinOrderQty ? partSupplier.MinOrderQty : 1;\r\n }\r\n\r\n private GetContactFilter(customerId: number): any[] {\r\n const filter = [];\r\n filter.push([\"Status\", \"=\", ContactStatus.ACTIVE]);\r\n if (customerId) {\r\n filter.push(\"and\");\r\n filter.push([\"CustomerId\", \"=\", customerId]);\r\n }\r\n\r\n return filter;\r\n }\r\n\r\n private InternalSave(): Observable {\r\n if (this.po.Equipment) {\r\n this.po.Equipment.forEach(equip => {\r\n if (isNaN(Number(equip.PurchaseLineId))) {\r\n equip.PurchaseLineId = 0;\r\n }\r\n });\r\n }\r\n\r\n this.po.CarriageFC = this.po.CarriageFC || 0;\r\n if (this.po.PurchaseOrderNumber) {\r\n return this.Update();\r\n } else {\r\n return this.Create();\r\n }\r\n }\r\n\r\n private Create(): Observable {\r\n return this.formMessageService\r\n .RegisterObservable(this.purchaseOrderService.Create(this.po), \"poform\")\r\n .pipe(map(po => {\r\n this.po = po;\r\n // Calculate total cost FC\r\n this.po.Parts.forEach(p => p.TotalCostFC = p.UnitCostFC * p.QtyRequired);\r\n this.po.Equipment.forEach(p => p.TotalCostFC = p.UnitCostFC * p.QtyRequired);\r\n this.po.Cylinders.forEach(p => p.TotalCostFC = p.UnitCostFC * p.QtyRequired);\r\n this.IsNew = false;\r\n this.setupPartListDataSource();\r\n this.ReloadComments();\r\n return po;\r\n }));\r\n }\r\n\r\n private ReloadComments(): void {\r\n if (this.discussionComponent) {\r\n this.discussionComponent.ReloadDiscussion();\r\n }\r\n }\r\n\r\n private Update(): Observable {\r\n return this.formMessageService\r\n .RegisterObservable(this.purchaseOrderService.Update(this.po), \"poform\")\r\n .pipe(map(po => {\r\n this.po = po;\r\n this.setupPartListDataSource();\r\n return po;\r\n }));\r\n }\r\n\r\n private GetCurrencyInformation(supplierId: number, suppliedChanged: boolean): void {\r\n this.supplierService.GetSupplierCurrency(supplierId).subscribe(currency => {\r\n this.foreignCurrencySymbol = currency.CurrencySymbol;\r\n this.po.IsForeignCustomer = currency.IsForeignCustomer;\r\n\r\n // only update exchange rate if it is not already set or we are changing the supplier\r\n if (!this.po.ExchangeRate || suppliedChanged) {\r\n this.po.ExchangeRate = currency.ExchangeRateSales;\r\n this.UpdateFCsOnExchangeRateChange();\r\n }\r\n });\r\n }\r\n\r\n private UpdateFCsOnExchangeRateChange() {\r\n this.po.CarriageFC = this.bankersRoundService.bankersRound(this.po.Carriage * this.po.ExchangeRate, 2);\r\n\r\n this.po.Parts.forEach(p => {\r\n p.UnitCostFC = this.bankersRoundService.bankersRound(p.UnitCost * this.po.ExchangeRate, 2);\r\n p.TotalCostFC = p.UnitCostFC * p.QtyRequired;\r\n });\r\n this.po.Equipment.forEach(p => {\r\n p.UnitCostFC = this.bankersRoundService.bankersRound(p.UnitCost * this.po.ExchangeRate, 2);\r\n p.TotalCostFC = p.UnitCostFC * p.QtyRequired;\r\n });\r\n this.po.Materials.forEach(p => {\r\n p.CostFC = this.bankersRoundService.bankersRound(p.Cost * this.po.ExchangeRate, 2);\r\n });\r\n this.po.Cylinders.forEach(p => {\r\n p.UnitCostFC = this.bankersRoundService.bankersRound(p.UnitCost * this.po.ExchangeRate, 2);\r\n p.TotalCostFC = p.UnitCostFC * p.QtyRequired;\r\n p.LateFeeFC = p.LateFee ? this.bankersRoundService.bankersRound(p.LateFee * this.po.ExchangeRate, 2) : null;\r\n });\r\n }\r\n\r\n private baseRowUpdating(e: any): void {\r\n e.newData.Outstanding = (e.newData.QtyRequired || e.oldData.QtyRequired) - e.oldData.Received;\r\n\r\n const rawUnitCost = e.newData.UnitCost || e.oldData.UnitCost;\r\n const isUnitCost = Boolean(rawUnitCost);\r\n const cost = isUnitCost ? (rawUnitCost) : (e.newData.Cost || e.oldData.Cost);\r\n\r\n const rawUnitCostFc = e.newData.UnitCostFC || e.oldData.UnitCostFC;\r\n const isUnitCostFc = Boolean(rawUnitCostFc);\r\n const costFc = isUnitCostFc ? (rawUnitCostFc) : (e.newData.CostFC || e.oldData.CostFC);\r\n\r\n\r\n e.newData.TotalCost = cost * (e.newData.QtyRequired || e.oldData.QtyRequired);\r\n e.newData.TotalCostFC = costFc * (e.newData.QtyRequired || e.oldData.QtyRequired);\r\n\r\n if (!e.newData.TotalCost) {\r\n e.newData.TotalCost = 0;\r\n }\r\n\r\n if (!e.newData.TotalCostFC) {\r\n e.newData.TotalCostFC = 0;\r\n }\r\n\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n private SetCurrentItem(id: number) {\r\n if (this.IsRecordNavigationEnabled) {\r\n this.purchaseOrderService.SetCurrentItem(id).then(() => {\r\n this.CanNavigatePrevious = this.purchaseOrderService.IsPreviousAvailable();\r\n this.CanNavigateNext = this.purchaseOrderService.IsNextAvailable();\r\n });\r\n }\r\n }\r\n\r\n public NavigateNext(): void {\r\n if (this.CanNavigateNext) {\r\n this.purchaseOrderService.GetNextId().then(nextId => {\r\n this.router.navigate([\"purchase-orders\", \"detail\", nextId]);\r\n });\r\n }\r\n }\r\n\r\n public NavigatePrevious(): void {\r\n if (this.CanNavigatePrevious) {\r\n this.purchaseOrderService.GetPreviousId().then(previousId => {\r\n this.router.navigate([\"purchase-orders\", \"detail\", previousId]);\r\n });\r\n }\r\n }\r\n\r\n public DiscardChanges(): void {\r\n if (!this.IsNew) {\r\n this.GetPurchaseOrder(this.po.PurchaseOrderNumber);\r\n } else {\r\n this.router.navigate([\"/purchase-orders\"]);\r\n }\r\n }\r\n\r\n public InternalNotesChanged(internalNotes: string): void {\r\n if (this.po.InternalNotes !== internalNotes) {\r\n this.po.InternalNotes = internalNotes;\r\n this.form.form.markAsDirty();\r\n }\r\n }\r\n\r\n public InstructionsChanged(instructions: string): void {\r\n if (this.po.Instructions !== instructions) {\r\n this.po.Instructions = instructions;\r\n this.form.form.markAsDirty();\r\n }\r\n }\r\n\r\n public OnOpenOrders(show: boolean): void {\r\n this.showPendingOrdersEye = show;\r\n }\r\n\r\n public TotalCostFormatter(data: any): string {\r\n return this.currencyFormat(data.value);\r\n }\r\n\r\n public onEquipmentCellPrepared(e: any): void {\r\n if (e.rowType === \"data\" && e.column.dataField === \"MakeModelId\") {\r\n on(e.cellElement, \"mouseover\", arg => {\r\n this.tooltipText = e.displayValue;\r\n this.tooltip.instance.show(arg.target);\r\n });\r\n\r\n on(e.cellElement, \"mouseout\", () => {\r\n this.tooltip.instance.hide();\r\n });\r\n }\r\n }\r\n\r\n private GetPurchaseOrder(purchaseOrderNumber: number): void {\r\n this.purchaseOrderService.Get(purchaseOrderNumber).subscribe(po => {\r\n this.po = po;\r\n this.GetCurrencyInformation(po.SupplierId, false);\r\n this.SetCurrentItem(purchaseOrderNumber);\r\n this.discardMessage.showPopup = false;\r\n this.setupPartListDataSource();\r\n });\r\n }\r\n\r\n private setDefaultDate(): void {\r\n if (this.po && !this.po.OrderDate) {\r\n this.po.OrderDate = new Date();\r\n }\r\n }\r\n\r\n private setShowVATOption(): void {\r\n this.settingsService.getSetting(SettingId.ShowVATOnPO).subscribe(res => {\r\n this.po.ShowVAT = res.ValueBool;\r\n });\r\n }\r\n\r\n private setupPartListDataSource(): void {\r\n if (this.partsListDataSource != null) {\r\n this.partsListDataSource.dispose();\r\n }\r\n\r\n this.partsListDataSource = this.odataService.GetDataSourceWithLookups(\r\n this.po.Parts,\r\n \"PurchaseLineId\",\r\n [\r\n {\r\n store: this.stockHeaderDataStore,\r\n dataKey: \"StockId\",\r\n lookupKey: \"StockHeaderId\",\r\n displayExprs: [\"PartNo\"]\r\n }\r\n ]);\r\n }\r\n\r\n public CalculateCylinderTotalCost(rowData: Partial): number {\r\n return rowData.UnitCost * rowData.QtyRequired;\r\n }\r\n\r\n public CalculateCylinderOutstanding(rowData: Partial): number {\r\n return rowData.QtyRequired - rowData.Received;\r\n }\r\n\r\n public SetMaterialCost = (newData: Partial, value: number): void => {\r\n if (this.showInForeignCurrency) {\r\n newData.CostFC = value;\r\n newData.Cost = this.bankersRoundService.bankersRound(value / this.po.ExchangeRate, 2);\r\n } else {\r\n newData.Cost = value;\r\n newData.CostFC = this.bankersRoundService.bankersRound(value * this.po.ExchangeRate, 2);\r\n }\r\n };\r\n\r\n public SetPartCost = (newData: Partial, value: number): void => {\r\n if (this.showInForeignCurrency) {\r\n newData.UnitCostFC = value;\r\n newData.UnitCost = this.bankersRoundService.bankersRound(value / this.po.ExchangeRate, 2);\r\n } else {\r\n newData.UnitCost = value;\r\n newData.UnitCostFC = this.bankersRoundService.bankersRound(value * this.po.ExchangeRate, 2);\r\n }\r\n };\r\n\r\n public SetEquipmentCost = (newData: Partial, value: number): void => {\r\n if (this.showInForeignCurrency) {\r\n newData.UnitCostFC = value;\r\n newData.UnitCost = this.bankersRoundService.bankersRound(value / this.po.ExchangeRate, 2);\r\n } else {\r\n newData.UnitCost = value;\r\n newData.UnitCostFC = this.bankersRoundService.bankersRound(value * this.po.ExchangeRate, 2);\r\n }\r\n };\r\n\r\n public SetCylinderCost = (newData: Partial, value: number): void => {\r\n if (this.showInForeignCurrency) {\r\n newData.UnitCostFC = value;\r\n newData.UnitCost = this.bankersRoundService.bankersRound(value / this.po.ExchangeRate, 2);\r\n } else {\r\n newData.UnitCost = value;\r\n newData.UnitCostFC = this.bankersRoundService.bankersRound(value * this.po.ExchangeRate, 2);\r\n }\r\n };\r\n\r\n public SetLateFee = (newData: Partial, value: number): void => {\r\n if (this.showInForeignCurrency) {\r\n newData.LateFeeFC = value;\r\n newData.LateFee = this.bankersRoundService.bankersRound(value / this.po.ExchangeRate, 2);\r\n } else {\r\n newData.LateFee = value;\r\n newData.LateFeeFC = this.bankersRoundService.bankersRound(value * this.po.ExchangeRate, 2);\r\n }\r\n };\r\n}\r\n","
\r\n
\r\n
\r\n

{{ 'purchase-orders.detail.title' | translate }} {{id}}

\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
{{ 'label.email.sendMessage' | translate }}
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { Component, Inject, OnInit, ViewChild } from \"@angular/core\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { IAppConfig, APP_CONFIG, ReportViewerComponent } from \"servicesight-shared\";\r\nimport { Email } from \"../../shared/models/email.model\";\r\nimport { PurchaseOrderService } from \"./../services/purchase-order.service\";\r\n\r\n@Component({\r\n selector: \"app-purchase-order-preview\",\r\n templateUrl: \"./purchase-order-preview.component.html\",\r\n styleUrls: [\"./purchase-order-preview.component.scss\"]\r\n})\r\nexport class PurchaseOrderPreviewComponent implements OnInit {\r\n\r\n @ViewChild(\"report\", { static: true }) report: ReportViewerComponent;\r\n\r\n public url: string;\r\n public hostUrl: string;\r\n public id: number;\r\n // public contractStatus: number;\r\n public isPreviewLoaded: boolean;\r\n public showTemplateDialog: boolean = false;\r\n public emailData: Email = new Email();\r\n public showSuccessSendMessage: boolean = false;\r\n public showErrorSendMessage: boolean = false;\r\n\r\n constructor(\r\n private purchaseOrderService: PurchaseOrderService,\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) {\r\n this.id = Number(this.route.snapshot.paramMap.get(\"id\"));\r\n this.url = `purchase-order/${this.id}`;\r\n }\r\n\r\n ngOnInit() {\r\n // this.service.GetStatus(this.id).subscribe((res) => this.contractStatus = res);\r\n this.hostUrl = this.appConfig.apiLocations.PurchaseOrders.substr(0, this.appConfig.apiLocations.PurchaseOrders.lastIndexOf(\"/api/\") + 1);\r\n }\r\n\r\n public CallPrint() {\r\n this.report.print();\r\n }\r\n\r\n public CallDownload() {\r\n this.report.download();\r\n }\r\n\r\n public GoBack(): void {\r\n this.router.navigate([`/purchase-orders/detail/${this.id}`]);\r\n }\r\n\r\n public OpenEmailDialog(): void {\r\n this.send();\r\n }\r\n\r\n public OpenDialog(): void {\r\n this.purchaseOrderService\r\n .GetPurchaseOrderEmailData(this.id)\r\n .subscribe(x => this.emailData = x, () => { }, () => {\r\n this.showErrorSendMessage = false;\r\n this.showTemplateDialog = true;\r\n });\r\n }\r\n\r\n public send(): void {\r\n this.purchaseOrderService\r\n .SendPurchaseOrderEmailData(this.emailData).subscribe(() => {\r\n this.showTemplateDialog = false;\r\n this.showSuccessSendMessage = true;\r\n }, () => {\r\n this.showErrorSendMessage = true;\r\n });\r\n }\r\n\r\n public CloseDialog(): void {\r\n this.showTemplateDialog = false;\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'purchase-orders.list.title' | translate }}

\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n
\r\n
\r\n
{{ item.value | purchaseOrderStatus | translate }}
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { EdmLiteral } from \"devextreme/data/odata/utils\";\r\nimport { GridKind, GridService, PermissionsService, UICustomisation, UserReferenceService } from \"servicesight-shared\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { PurchaseOrderStatus } from \"../enums/purchase-order-status.enum\";\r\nimport { PurchaseOrderService } from \"../services/purchase-order.service\";\r\n\r\n@Component({\r\n selector: \"app-purchase-orders-list\",\r\n templateUrl: \"./purchase-orders-list.component.html\",\r\n styleUrls: [\r\n \"./purchase-orders-list.component.scss\",\r\n \"../../../../projects/servicesight-shared/src/lib/styles/global.scss\",\r\n \"../../../../projects/servicesight-shared/src/lib/styles/backgrounds.scss\",\r\n \"../../../../projects/servicesight-shared/src/lib/styles/servicesight-shared.scss\"\r\n ]\r\n})\r\nexport class PurchaseOrdersListComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n\r\n public dataSource: DataSource;\r\n\r\n public SearchText: string = \"\";\r\n public isAllowedCreate = false;\r\n public queryFilter: any[];\r\n public isProEnabled: boolean = false;\r\n\r\n public filters: any = {\r\n 1: [\"Status\", \"=\", new EdmLiteral(\"PurchaseOrders.Enums.PurchaseOrderStatus'Pending'\")],\r\n 2: [\"Status\", \"=\", new EdmLiteral(\"PurchaseOrders.Enums.PurchaseOrderStatus'AuthorisationReq'\")],\r\n 3: [\"Status\", \"=\", new EdmLiteral(\"PurchaseOrders.Enums.PurchaseOrderStatus'Placed'\")],\r\n 4: [\"Status\", \"=\", new EdmLiteral(\"PurchaseOrders.Enums.PurchaseOrderStatus'PartReceived'\")],\r\n 5: [\"Status\", \"=\", new EdmLiteral(\"PurchaseOrders.Enums.PurchaseOrderStatus'Complete'\")]\r\n };\r\n\r\n public userRef1Label: string = null;\r\n public userRef2Label: string = null;\r\n\r\n public orderStatus = PurchaseOrderStatus;\r\n\r\n constructor(\r\n private permissionsService: PermissionsService,\r\n private purchaseOrderService: PurchaseOrderService,\r\n private gridService: GridService,\r\n private userRefsService: UserReferenceService,\r\n private licenseService: LicenseService,\r\n private route: ActivatedRoute,\r\n private router: Router\r\n ) { }\r\n\r\n ngOnInit() {\r\n this.userRef1Label = this.userRefsService.getLabel(UICustomisation.PURCHASE_REF1);\r\n this.userRef2Label = this.userRefsService.getLabel(UICustomisation.PURCHASE_REF2);\r\n\r\n this.permissionsService.CurrentUserHasPermission(\"PurchaseOrderAdd\").subscribe(hasPermission => {\r\n this.isAllowedCreate = hasPermission;\r\n });\r\n\r\n this.permissionsService.CurrentUserHasPermission(\"PurchaseOrderView\").subscribe(isAllowedView => {\r\n if (isAllowedView) {\r\n this.gridService.GetLayout(GridKind.PurchaseOrders).subscribe(value => {\r\n if (value) {\r\n this.dataGrid.instance.state(value);\r\n }\r\n this.GetDataSources();\r\n }, () => this.GetDataSources());\r\n }\r\n });\r\n\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(x => {\r\n this.isProEnabled = x.ProEnabled;\r\n });\r\n\r\n this.route.queryParams.subscribe(params => {\r\n this.queryFilter = [];\r\n\r\n if (params.ids) {\r\n params.ids.forEach(id => {\r\n this.queryFilter.push([\"PurchaseOrderNumber\", \"=\", Number(id)]);\r\n this.queryFilter.push(\"or\");\r\n });\r\n }\r\n\r\n if (this.queryFilter.length > 0) {\r\n this.queryFilter.pop();\r\n if (this.dataSource) {\r\n this.dataSource.filter(this.queryFilter);\r\n }\r\n }\r\n });\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public FilterChanged($event): void {\r\n const filterValue = $event.currentTarget.value;\r\n if (filterValue === \"0\") {\r\n this.dataGrid.instance.clearFilter();\r\n } else {\r\n this.dataGrid.instance.filter(this.filters[filterValue]);\r\n }\r\n }\r\n\r\n public SaveLayout(): void {\r\n const state = this.dataGrid.instance.state();\r\n this.gridService.SaveLayout(state, GridKind.PurchaseOrders);\r\n }\r\n\r\n public ResetLayout(): void {\r\n this.gridService.ResetLayout(GridKind.PurchaseOrders);\r\n this.dataGrid.instance.state(null);\r\n }\r\n\r\n public ViewDetails(event: any): void {\r\n this.router.navigate([\"/purchase-orders/detail/\", event.data.PurchaseOrderNumber]);\r\n }\r\n\r\n private GetDataSources(): void {\r\n this.dataSource = this.purchaseOrderService.GetDataSource(true);\r\n if (this.queryFilter.length > 0) {\r\n this.dataSource.filter(this.queryFilter);\r\n }\r\n }\r\n}\r\n","import { NgModule } from \"@angular/core\";\r\nimport { RouterModule, Routes } from \"@angular/router\";\r\nimport { PurchaseMarketingComponent } from \"./purchase-marketing/purchase-marketing.component\";\r\nimport { PurchaseOrderDetailComponent } from \"./purchase-order-detail/purchase-order-detail.component\";\r\nimport { PurchaseOrderPreviewComponent } from \"./purchase-order-preview/purchase-order-preview.component\";\r\nimport { PurchaseOrdersListComponent } from \"./purchase-orders-list/purchase-orders-list.component\";\r\n\r\nconst routes: Routes = [\r\n { path: \"list\", component: PurchaseOrdersListComponent },\r\n { path: \"detail/:id\", component: PurchaseOrderDetailComponent },\r\n { path: \"detail/:id/document\", component: PurchaseOrderPreviewComponent },\r\n { path: \"new\", component: PurchaseOrderDetailComponent },\r\n { path: \"marketing\", component: PurchaseMarketingComponent },\r\n { path: \"\", redirectTo: \"list\", pathMatch: \"full\" },\r\n { path: \"**\", redirectTo: \"list\" }\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\n\r\nexport class PurchaseOrdersRoutingModule {\r\n public static readonly Routes: Routes = routes;\r\n}\r\n","export enum QuoteSummaryType {\r\n Job = 1,\r\n Contract = 2,\r\n SalesOrder = 3\r\n}\r\n","export enum QuoteTab {\r\n Details = 0,\r\n Job = 1,\r\n Summary = 2\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { IServiceSightCollection } from \"../../../quotes/models/IServiceSightCollection\";\r\nimport { Observable } from \"rxjs/internal/Observable\";\r\nimport { JobTypeModel } from \"../models/job-type.model\";\r\nimport { IAppConfig, APP_CONFIG, IProteanResponse } from \"servicesight-shared\";\r\nimport { JobTypeDetailModel } from \"../models/job-type-detail.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class JobTypesService {\r\n private readonly baseUrl = this.appConfig.apiLocations.ServiceSight;\r\n private readonly jobTypesUrl = this.baseUrl + \"JobType/\";\r\n\r\n constructor(private http: HttpClient, @Inject(APP_CONFIG) private appConfig: IAppConfig) { }\r\n\r\n public GetJobTypesList(): Observable> {\r\n return this.http.get>(this.jobTypesUrl + \"GetAllJobTypes\");\r\n }\r\n\r\n public GetJobType(jobTypeId: number = null): Observable {\r\n if (jobTypeId) {\r\n return this.http.get(this.jobTypesUrl + `GetJobTypeAsync?jobtypeid=${jobTypeId}`);\r\n } else {\r\n return this.http.get(this.jobTypesUrl + \"GetJobTypeAsync?jobtypeid=\");\r\n }\r\n }\r\n\r\n public UpdateJobType(jobType: JobTypeDetailModel): Observable {\r\n return this.http.post(`${this.jobTypesUrl}UpdateJobTypeAsync`, jobType);\r\n }\r\n\r\n public DeleteJobType(jobTypeId: number): Observable {\r\n return this.http.post(`${this.jobTypesUrl}DeleteJobTypeAsync?jobTypeId=${jobTypeId}`, jobTypeId);\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\n\r\n@Pipe({\r\n name: \"quotePercent\"\r\n})\r\nexport class QuotePercentPipe implements PipeTransform {\r\n\r\n public transform(total: number, part: number): string {\r\n const result = total ? part / total : (part ? -1 : 0);\r\n return (result * 100).toFixed(2).replace(\".00\", \"\");\r\n }\r\n}\r\n","import { FormMessage, ViewModel } from \"servicesight-shared\";\r\nimport { AdvancedQuotesEquipmentViewModel } from \"./advanced-quotes-equipment.viewmodel\";\r\nimport { QuoteEquipmentOption } from \"../models/quote-equipment-option.model\";\r\n\r\nexport class AdvancedQuotesEquipmentOptionViewModel extends ViewModel {\r\n ModelChanged: () => void;\r\n\r\n constructor(data: QuoteEquipmentOption[], public Parent: AdvancedQuotesEquipmentViewModel = null) {\r\n super(data ?? []);\r\n }\r\n\r\n public get TotalCost(): number {\r\n const options: QuoteEquipmentOption[] = this?.Model ?? [];\r\n const optionsCost = options.reduce((total, option) => total += option.Cost, 0);\r\n\r\n return optionsCost + this.Parent?.PartsTab?.TotalCostOnlyOptionParts + this.Parent?.MaterialsTab?.TotalCostOnlyOptionMaterials;\r\n }\r\n\r\n public get TotalPrice(): number {\r\n const options: QuoteEquipmentOption[] = this?.Model ?? [];\r\n const optionPrice = options.reduce((total, option) => total += option.Price, 0);\r\n\r\n return optionPrice + this.Parent?.PartsTab?.TotalPriceOnlyOptionParts + this.Parent?.MaterialsTab?.TotalChargeOnlyOptionMaterials;\r\n }\r\n\r\n public Validate(): FormMessage[] {\r\n const result: FormMessage[] = [];\r\n\r\n return result;\r\n }\r\n}\r\n","export enum DiscountType {\r\n Value = 1,\r\n Percentage = 2\r\n}\r\n","import { QuoteEquipment } from \"../models/quote-equipment.model\";\r\nimport { MakeModelItem } from \"../../settings/models/makemodel\";\r\nimport { ViewModel, FormMessage } from \"servicesight-shared\";\r\nimport { AdvancedQuotesEquipmentViewModel } from \"./advanced-quotes-equipment.viewmodel\";\r\nimport { DiscountType } from \"../../shared/enums/discount-type.enum\";\r\n\r\nexport class AdvancedQuotesGeneralViewModel extends ViewModel {\r\n constructor(data: QuoteEquipment, public quoteEquipment: AdvancedQuotesEquipmentViewModel) {\r\n super(data);\r\n }\r\n\r\n public UnitPriceOverride: number = null;\r\n\r\n public get SelectedCurrencySymbol(): string {\r\n return this.ShowInCustomerCurrency? this.CustomerCurrencySymbol : this.BaseCurrencySymbol;\r\n }\r\n\r\n public get ShowInCustomerCurrency(): boolean {\r\n return this.quoteEquipment?.Quote?.UseCustomerCurrency ?? false;\r\n }\r\n\r\n public get BaseCurrencySymbol(): string {\r\n return this.quoteEquipment?.Quote?.BaseCurrencySymbol ?? \"\";\r\n }\r\n\r\n public get CustomerCurrencySymbol(): string {\r\n return this.quoteEquipment?.Quote?.CurrencySymbol ?? \"\";\r\n }\r\n\r\n public get CustomerExchangeRate(): number {\r\n return this.quoteEquipment?.Quote?.ExchangeRate ?? 1;\r\n }\r\n\r\n // Take the Cost price from the Make/Model Buying price + the cost value for any options, parts, misc that have been added)\r\n public GetCost(makeModel: MakeModelItem): number {\r\n const preferredSupplier = makeModel?.SupplierPrices.find(s => s.Preferred);\r\n return (preferredSupplier?.Price ?? 0) + (this.quoteEquipment?.TotalCost ?? 0);\r\n }\r\n\r\n // (Make/Model selling price + total charge for any options, parts, misc that have been added)\r\n public GetRecommendedUnitPrice(makeModel: MakeModelItem): number {\r\n // If a price has already been set by the user we don't want to override that with the makeModel selling price.\r\n if (this.UnitPriceOverride) {\r\n return this.UnitPriceOverride + (this.quoteEquipment?.TotalCharge ?? 0);\r\n } else {\r\n return (makeModel?.SellingPrice ?? 0) + (this.quoteEquipment?.TotalCharge ?? 0);\r\n }\r\n }\r\n\r\n public get Charge(): number {\r\n return this.quoteEquipment?.GetCharge() ?? 0;\r\n }\r\n\r\n public SetDefaults(makeModel: MakeModelItem): void {\r\n this.Model.QtyRequired = this.Model.QtyRequired ?? 1;\r\n this.Model.WarrantyLengthMonths = this.Model.WarrantyLengthMonths ?? makeModel.SalesWarrantyLength ?? 0;\r\n this.Model.WarrantyLengthMeters = this.Model.WarrantyLengthMeters ?? makeModel.SalesWarrantyLengthMeterUnits ?? 0;\r\n this.Model.Carriage = this.Model.Carriage || 0;\r\n this.Model.Price = this.Model.Price ?? this.GetRecommendedUnitPrice(makeModel);\r\n\r\n this.Model.DiscountType = this.Model.DiscountType ?? DiscountType.Value;\r\n this.Model.Discount = this.Model.Discount ?? 0;\r\n }\r\n\r\n public get PreparationJobTypeSelected(): boolean {\r\n return this.quoteEquipment?.PreparationJobTypeSelected;\r\n }\r\n\r\n public get InstallationDeliverJobTypeSelected(): boolean {\r\n return this.quoteEquipment?.InstallationDeliverJobTypeSelected;\r\n }\r\n\r\n public UpdatePrice(makeModel: MakeModelItem): void {\r\n this.Model.Price = this.GetRecommendedUnitPrice(makeModel);\r\n }\r\n\r\n public Validate(): FormMessage[] {\r\n const result: FormMessage[] = [];\r\n\r\n if (!this.Model.QtyRequired) {\r\n result.push({control: \"advanced-quote.quantity\", message: \"quotes.message.required\", args: [\"advanced-quote.quantity\"]});\r\n }\r\n\r\n if (this.Model.WarrantyLengthMonths === null) {\r\n result.push({control: \"advanced-quote.warranty-months\", message: \"quotes.message.required3\", args: [\"advanced-quote.warranty-months\"]});\r\n }\r\n\r\n if (this.Model.WarrantyLengthMeters === null) {\r\n result.push({control: \"advanced-quote.warranty-meter\", message: \"quotes.message.required\", args: [\"advanced-quote.warranty-meter\"]});\r\n }\r\n\r\n if (this.Model.Carriage === null) {\r\n result.push({control: \"advanced-quote.carriage\", message: \"quotes.message.required\", args: [\"advanced-quote.carriage\"]});\r\n }\r\n\r\n if (this.Model.Price === null) {\r\n result.push({control: \"advanced-quote.actual-unit-price\", message: \"quotes.message.required\", args: [\"advanced-quote.actual-unit-price\"]});\r\n }\r\n\r\n if (this.Model.Discount === null) {\r\n result.push({control: \"advanced-quote.discount\", message: \"quotes.message.required\", args: [\"advanced-quote.discount\"]});\r\n }\r\n\r\n if (this.isPreparationJobTypeMissing() && this.isInstallationDeliverJobTypeMissing()) {\r\n result.push({control: \"\", message: \"quotes.message.job-types.required\" , args: []});\r\n } else if (this.isPreparationJobTypeMissing()) {\r\n result.push({control: \"advanced-quote.preparation-job-type\", message: \"quotes.message.job-type.required\", args: [\"advanced-quote.preparation-job-type\"]});\r\n } else if (this.isInstallationDeliverJobTypeMissing()) {\r\n result.push({control: \"advanced-quote.delivery-job-type\", message: \"quotes.message.job-type.required\", args: [\"advanced-quote.delivery-job-type\"]});\r\n }\r\n\r\n return result;\r\n }\r\n\r\n private isPreparationJobTypeMissing(): boolean {\r\n return !this.Model.PreparationJobTypeId && this.PreparationJobTypeSelected;\r\n }\r\n\r\n private isInstallationDeliverJobTypeMissing(): boolean {\r\n return !this.Model.InstallationJobTypeId && this.InstallationDeliverJobTypeSelected;\r\n }\r\n}\r\n","import { QuoteEquipment } from \"../models/quote-equipment.model\";\r\nimport { ViewModel, FormMessage } from \"servicesight-shared\";\r\nimport { AdvancedQuotesEquipmentViewModel } from \"./advanced-quotes-equipment.viewmodel\";\r\nimport { QuoteSalesorderEquipMaterial } from \"../models/quote-salesorder-equip-material.model\";\r\nimport { MakeModelOptionAddTo } from \"src/app/settings/equipment-settings/enum/make-model-option-add-to.enum\";\r\n\r\nexport class AdvancedQuotesMaterialViewModel extends ViewModel {\r\n constructor(data: QuoteEquipment, public quoteEquipment: AdvancedQuotesEquipmentViewModel) {\r\n super(data);\r\n }\r\n\r\n public get TotalChargeNoOptionMaterials(): number {\r\n const materials: QuoteSalesorderEquipMaterial[] = this?.Model?.Materials?.filter(m => !m.OptionId) ?? [];\r\n return this.getTotalCharge(materials);\r\n }\r\n\r\n public get TotalChargeOnlyOptionMaterials(): number {\r\n const materials: QuoteSalesorderEquipMaterial[] = this?.Model?.Materials?.filter(m => m.OptionId) ?? [];\r\n return this.getTotalCharge(materials);\r\n }\r\n\r\n public get TotalCostNoOptionMaterials(): number {\r\n const materials: QuoteSalesorderEquipMaterial[] = this?.Model?.Materials?.filter(m => !m.OptionId) ?? [];\r\n return this.getTotalCost(materials);\r\n }\r\n\r\n public get TotalCostOnlyOptionMaterials(): number {\r\n const materials: QuoteSalesorderEquipMaterial[] = this?.Model?.Materials?.filter(m => m.OptionId) ?? [];\r\n return this.getTotalCost(materials);\r\n }\r\n\r\n public get BaseCurrencySymbol(): string {\r\n return this.quoteEquipment?.Quote?.BaseCurrencySymbol ?? \"\";\r\n }\r\n\r\n public get SelectedCurrencySymbol() {\r\n return this.quoteEquipment?.Quote?.SelectedCurrencySymbol ?? this.BaseCurrencySymbol;\r\n }\r\n\r\n public get SelectedExchangeRate(): number {\r\n return this.quoteEquipment?.Quote?.SelectedExchangeRate ?? 1;\r\n }\r\n\r\n public get ProEnabled(): boolean {\r\n return this.quoteEquipment?.Quote?.ProEnabled;\r\n }\r\n\r\n public get CustomerId(): number {\r\n return this.quoteEquipment?.Quote?.CustomerId;\r\n }\r\n\r\n public get PreparationJobTypeSelected(): boolean {\r\n return this.Model?.Materials?.some(e => e.AddTo?.includes(MakeModelOptionAddTo.PreparationJob));\r\n }\r\n\r\n public get InstallationDeliverJobTypeSelected(): boolean {\r\n return this.Model?.Materials?.some(e => e.AddTo?.includes(MakeModelOptionAddTo.InstallationDeliverJob));\r\n }\r\n\r\n public Validate(): FormMessage[] {\r\n return [];\r\n }\r\n\r\n private getTotalCost(materials: QuoteSalesorderEquipMaterial[]): number {\r\n return materials.reduce((total, material) => total += ((material.Cost ?? 0) * this.getMultiplier(material.AddTo)), 0);\r\n }\r\n\r\n private getTotalCharge(materials: QuoteSalesorderEquipMaterial[]): number {\r\n return materials.reduce((total, material) => total += (material.Charge ?? 0) * this.getMultiplier(material.AddTo), 0);\r\n }\r\n\r\n private getMultiplier(addTo: number[]): number {\r\n return addTo.includes(MakeModelOptionAddTo.InstallationDeliverJob)\r\n && addTo.includes(MakeModelOptionAddTo.PreparationJob)\r\n ? 2\r\n : 1;\r\n }\r\n}\r\n","import { ViewModel, FormMessage } from \"servicesight-shared\";\r\nimport { AdvancedQuotesEquipmentViewModel } from \"./advanced-quotes-equipment.viewmodel\";\r\nimport { QuoteSalesOrderEquipPart } from \"../models/quote-salesorder-equip-part.model\";\r\nimport { QuoteViewModel } from \"./quote.viewmodel\";\r\nimport { MakeModelOptionAddTo } from \"src/app/settings/equipment-settings/enum/make-model-option-add-to.enum\";\r\n\r\nexport class AdvancedQuotesPartsViewModel extends ViewModel {\r\n constructor(data: QuoteSalesOrderEquipPart[], public quoteEquipment: AdvancedQuotesEquipmentViewModel) {\r\n super(data);\r\n }\r\n\r\n public get Quote(): QuoteViewModel {\r\n return this.quoteEquipment?.Quote;\r\n }\r\n\r\n public get SelectedExchangeRate(): number {\r\n return this.Quote?.SelectedExchangeRate ?? 1;\r\n }\r\n\r\n public get ProEnabled(): boolean {\r\n return this.Quote?.ModuleAccess?.ProEnabled;\r\n }\r\n\r\n public get SelectedCurrencySymbol() {\r\n return this.Quote?.SelectedCurrencySymbol ?? this.BaseCurrencySymbol;\r\n }\r\n\r\n public get TotalPriceNoOptionParts(): number {\r\n return this.getTotalPrice(this.Model.filter(p => !p.OptionId));\r\n }\r\n\r\n public get TotalPriceOnlyOptionParts(): number {\r\n return this.getTotalPrice(this.Model.filter(p => p.OptionId));\r\n }\r\n\r\n public get TotalCostNoOptionParts(): number {\r\n return this.getTotalCost(this.Model.filter(p => !p.OptionId));\r\n }\r\n\r\n public get TotalCostOnlyOptionParts(): number {\r\n return this.getTotalCost(this.Model.filter(p => p.OptionId));\r\n }\r\n\r\n public get TotalProfit(): number {\r\n return this.TotalPriceNoOptionParts - this.TotalCostNoOptionParts;\r\n }\r\n\r\n public get QuoteHasCustomerId(): boolean {\r\n return this.Quote?.Model?.CustomerId != null;\r\n }\r\n\r\n public get ShowInCustomerCurrency(): boolean {\r\n return this.Quote?.UseCustomerCurrency ?? false;\r\n }\r\n\r\n public get BaseCurrencySymbol(): string {\r\n return this.Quote?.BaseCurrencySymbol ?? \"\";\r\n }\r\n\r\n public get CustomerCurrencySymbol(): string {\r\n return this.Quote?.CurrencySymbol ?? \"\";\r\n }\r\n\r\n public get CustomerExchangeRate(): number {\r\n return this.Quote?.ExchangeRate ?? 1;\r\n }\r\n\r\n public get PreparationJobTypeSelected(): boolean {\r\n return this.Model?.some(e => e.AddTo?.includes(MakeModelOptionAddTo.PreparationJob));\r\n }\r\n\r\n public get InstallationDeliverJobTypeSelected(): boolean {\r\n return this.Model?.some(e => e.AddTo?.includes(MakeModelOptionAddTo.InstallationDeliverJob));\r\n }\r\n\r\n public Validate(): FormMessage[] {\r\n const result: FormMessage[] = [];\r\n\r\n return result;\r\n }\r\n\r\n private getTotalCost(parts: QuoteSalesOrderEquipPart[]): number {\r\n return parts.reduce((total, part) => total += (part.Cost * part.Qty * this.getMultiplier(part.AddTo)), 0);\r\n }\r\n\r\n private getTotalPrice(parts: QuoteSalesOrderEquipPart[]): number {\r\n return parts.reduce((total, part) => total += (part.Price * part.Qty * this.getMultiplier(part.AddTo)), 0);\r\n }\r\n\r\n private getMultiplier(addTo: number[]): number {\r\n return addTo.includes(MakeModelOptionAddTo.InstallationDeliverJob)\r\n && addTo.includes(MakeModelOptionAddTo.PreparationJob)\r\n ? 2\r\n : 1;\r\n }\r\n}\r\n","import { FormMessage, ViewModel } from \"servicesight-shared\";\r\nimport { AdvancedQuotesEquipmentOptionViewModel } from \"./advanced-quotes-equipment-option.viewmodel\";\r\nimport { AdvancedQuotesGeneralViewModel } from \"./advanced-quotes-general.viewmodel\";\r\nimport { AdvancedQuotesMaterialViewModel } from \"./advanced-quotes-materials.viewmodel\";\r\nimport { AdvancedQuotesPartsViewModel } from \"./advanced-quotes-parts.viewmodel\";\r\nimport { QuoteViewModel } from \"./quote.viewmodel\";\r\nimport { QuoteEquipment } from \"../models/quote-equipment.model\";\r\n\r\nexport class AdvancedQuotesEquipmentViewModel extends ViewModel {\r\n ModelChanged: () => void;\r\n\r\n public GeneralTab: AdvancedQuotesGeneralViewModel = new AdvancedQuotesGeneralViewModel({ Attributes: [], Materials: [], Parts: [], IsInstall: false }, null);\r\n public MaterialsTab: AdvancedQuotesMaterialViewModel = new AdvancedQuotesMaterialViewModel({ Attributes: [], Materials: [], Parts: [], IsInstall: false }, null);\r\n public Options: AdvancedQuotesEquipmentOptionViewModel = new AdvancedQuotesEquipmentOptionViewModel([], null);\r\n public PartsTab: AdvancedQuotesPartsViewModel = new AdvancedQuotesPartsViewModel([], null);\r\n\r\n public get StockEnabled(): boolean {\r\n return this.Quote?.ModuleAccess?.StockEnabled;\r\n }\r\n\r\n public get TotalCharge(): number {\r\n return (this?.Options?.TotalPrice ?? 0) + (this?.MaterialsTab?.TotalChargeNoOptionMaterials ?? 0) + (this?.PartsTab?.TotalPriceNoOptionParts ?? 0);\r\n }\r\n\r\n public get TotalCost(): number {\r\n return (this?.Options?.TotalCost ?? 0) + (this?.MaterialsTab?.TotalCostNoOptionMaterials ?? 0) + (this?.PartsTab?.TotalCostNoOptionParts ?? 0);\r\n }\r\n\r\n public get PreparationJobTypeSelected(): boolean {\r\n return this.PartsTab.PreparationJobTypeSelected || this.MaterialsTab.PreparationJobTypeSelected;\r\n }\r\n\r\n public get InstallationDeliverJobTypeSelected(): boolean {\r\n return this.PartsTab.InstallationDeliverJobTypeSelected || this.MaterialsTab.InstallationDeliverJobTypeSelected;\r\n }\r\n\r\n constructor(data: QuoteEquipment = null, public Quote: QuoteViewModel = null) {\r\n super(data);\r\n this.GeneralTab = new AdvancedQuotesGeneralViewModel(data, this);\r\n this.MaterialsTab = new AdvancedQuotesMaterialViewModel(data, this);\r\n this.Options = new AdvancedQuotesEquipmentOptionViewModel(data?.Options ?? [], this);\r\n this.PartsTab = new AdvancedQuotesPartsViewModel(data.Parts, this);\r\n\r\n // This is a mildly gross necessity to get any potential unit price changes entered by the user\r\n // and preserve them for add/remove/total calculations.\r\n // We're running it here because we don't have an underlying field to save in the db, and we might\r\n // be loading a previous quote.\r\n if (this.Model.Price) {\r\n let unitPriceOverride = this.Model.Price - (this.MaterialsTab.TotalChargeNoOptionMaterials)\r\n - (this.Options.TotalPrice)\r\n - (this.PartsTab.TotalPriceNoOptionParts);\r\n if (unitPriceOverride < 0) {\r\n unitPriceOverride = 0;\r\n }\r\n this.GeneralTab.UnitPriceOverride = unitPriceOverride;\r\n }\r\n\r\n }\r\n\r\n public Validate(): FormMessage[] {\r\n const result: FormMessage[] = [];\r\n\r\n result.push(...this.GeneralTab.Validate());\r\n result.push(...this.PartsTab.Validate());\r\n result.push(...this.Options.Validate());\r\n\r\n return result;\r\n }\r\n\r\n public GetCharge(): number {\r\n return this.Quote?.getEquipmentCharge(this.Model) ?? 0;\r\n }\r\n}\r\n","import { EventEmitter, SimpleChanges } from \"@angular/core\";\r\nimport { ViewModelBase } from \"servicesight-shared\";\r\n\r\nexport abstract class ViewModelComponent, T2 extends object> {\r\n public Model: T;\r\n\r\n abstract ModelChanged: EventEmitter;\r\n\r\n public onChanges(changes: SimpleChanges) {\r\n if (changes.Model) {\r\n this.Model.ModelChanged = () => this.ModelChanged.emit(this.Model);\r\n }\r\n };\r\n}\r\n","import { Component, Input, Output, EventEmitter } from \"@angular/core\";\r\nimport { DiscountType } from \"../../enums/discount-type.enum\";\r\n\r\n@Component({\r\n selector: \"app-discount-toggle\",\r\n templateUrl: \"./discount-toggle.component.html\"\r\n})\r\nexport class DiscountToggleComponent {\r\n @Input() SelectedDiscountType: DiscountType = DiscountType.Percentage;\r\n @Output() SelectedDiscountTypeChange: EventEmitter = new EventEmitter();\r\n\r\n @Input() Title: string = \"Toggle Discount Type\";\r\n\r\n @Input() baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n\r\n @Input() foreignCurrencySymbol: string = this.baseCurrencySymbol;\r\n @Input() showInForeignCurrency: boolean = false;\r\n\r\n public get IsPercentageDiscount(): boolean {\r\n return this.SelectedDiscountType === DiscountType.Percentage;\r\n }\r\n\r\n public get CurrencySymbol(): string {\r\n return this.showInForeignCurrency ? this.foreignCurrencySymbol : this.baseCurrencySymbol;\r\n }\r\n\r\n public ToggleDiscountType(): void {\r\n this.SelectedDiscountType = this.SelectedDiscountType === DiscountType.Percentage ? DiscountType.Value : DiscountType.Percentage;\r\n this.SelectedDiscountTypeChange.emit(this.SelectedDiscountType);\r\n }\r\n}\r\n","
\r\n {{CurrencySymbol}}\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
","
\r\n \r\n \r\n
\r\n","import { Component, Input, Output, EventEmitter, ViewEncapsulation } from \"@angular/core\";\r\nimport { BankersRoundService } from \"../../services/bankers-round.service\";\r\n\r\n@Component({\r\n selector: \"app-currency\",\r\n templateUrl: \"./currency.component.html\",\r\n styleUrls: [\"./currency.component.scss\"],\r\n encapsulation: ViewEncapsulation.None\r\n})\r\nexport class CurrencyComponent {\r\n private amountValue: number = 0;\r\n\r\n @Input() set value(amount: number) {\r\n this.amountValue = amount;\r\n this.amountChanged.emit(amount);\r\n }\r\n\r\n public get value(): number {\r\n return this.amountValue;\r\n }\r\n\r\n @Output() valueChange: EventEmitter = new EventEmitter();\r\n\r\n @Input() baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n\r\n @Input() foreignCurrencySymbol: string = this.baseCurrencySymbol;\r\n @Input() showInForeignCurrency: boolean = false;\r\n @Input() exchangeRate: number = 1;\r\n\r\n @Input() disabled: boolean = false;\r\n @Input() readonly: boolean = false;\r\n\r\n @Input() min: number | null = null;\r\n\r\n @Input() inline: boolean | null = false;\r\n\r\n @Output() amountChanged: EventEmitter = new EventEmitter();\r\n @Output() updated: EventEmitter = new EventEmitter();\r\n\r\n constructor(private bankersRoundService: BankersRoundService) { }\r\n\r\n public isVisible = true;\r\n\r\n public get CurrencySymbol(): string {\r\n return this.showInForeignCurrency ? this.foreignCurrencySymbol : this.baseCurrencySymbol;\r\n }\r\n\r\n public get CurrencyAmount(): number {\r\n return this.bankersRoundService.bankersRound(this.amountValue * this.SelectedExchangeRate, 2);\r\n }\r\n\r\n public set CurrencyAmount(amount: number) {\r\n this.value = this.bankersRoundService.bankersRound(amount / this.SelectedExchangeRate, 2);\r\n this.valueChange.emit(this.value);\r\n if (this.SelectedExchangeRate !== 1) {\r\n this.reload();\r\n }\r\n }\r\n\r\n public get CurrencyFormat(): string {\r\n return this.CurrencySymbol + \"#,##0.00\";\r\n }\r\n\r\n public changed(e): void {\r\n this.updated.emit(e);\r\n }\r\n\r\n private get SelectedExchangeRate(): number {\r\n return this.showInForeignCurrency ? this.exchangeRate : 1;\r\n }\r\n\r\n private reload(): void {\r\n setTimeout(() => this.isVisible = false);\r\n setTimeout(() => this.isVisible = true);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n {{ Model.SelectedCurrencySymbol }}\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges\r\n} from \"@angular/core\";\r\nimport { ControlContainer, NgForm } from \"@angular/forms\";\r\nimport ArrayStore from \"devextreme/data/array_store\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { PhraseBookType } from \"servicesight-shared\";\r\nimport { MakeModelItem } from \"../../../settings/models/makemodel\";\r\nimport { JobTypeService } from \"../../../shared/services/job-type/job-type.service\";\r\nimport { MakeModelService } from \"../../../shared/services/make-model/make-model.service\";\r\nimport { QuoteEquipment } from \"../../models/quote-equipment.model\";\r\nimport { ViewModelComponent } from \"../../view-model-component.class\";\r\nimport { AdvancedQuotesGeneralViewModel } from \"../../view-models/advanced-quotes-general.viewmodel\";\r\n\r\n@Component({\r\n selector: \"app-advanced-quotes-general-tab\",\r\n templateUrl: \"advanced-quotes-general-tab.component.html\",\r\n viewProviders: [{ provide: ControlContainer, useExisting: NgForm }]\r\n})\r\nexport class AdvancedQuotesGeneralTabComponent extends ViewModelComponent implements OnInit, OnChanges {\r\n\r\n @Input() public Model: AdvancedQuotesGeneralViewModel = new AdvancedQuotesGeneralViewModel({ Attributes: [], Parts: [], Materials: [], IsInstall: false }, null);\r\n\r\n @Output() public ModelChanged: EventEmitter = new EventEmitter();\r\n\r\n public JobTypeDataSource: DataSource;\r\n\r\n public SalesQuotePhraseType: PhraseBookType = PhraseBookType.SalesQuote;\r\n\r\n private MakeModel: MakeModelItem;\r\n\r\n constructor(\r\n private jobTypeService: JobTypeService,\r\n private makeModelService: MakeModelService) {\r\n super();\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes?.Model?.currentValue) {\r\n if (this.Model?.Model?.MakeModelId) {\r\n this.makeModelService.Get(this.Model.Model.MakeModelId).subscribe(makeModel => {\r\n this.MakeModel = makeModel;\r\n this.Model.SetDefaults(makeModel);\r\n });\r\n } else {\r\n this.MakeModel = null;\r\n }\r\n }\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.jobTypeService.GetAll().subscribe(jobTypes => {\r\n this.JobTypeDataSource = new DataSource({\r\n store: new ArrayStore({\r\n key: \"JobTypeID\",\r\n data: jobTypes.ModelCollection\r\n })\r\n });\r\n });\r\n }\r\n\r\n public UpdateOnChange() {\r\n this.Model.UpdatePrice(this.MakeModel);\r\n }\r\n\r\n public get Cost(): number {\r\n return this.MakeModel ? this.Model.GetCost(this.MakeModel) : 0;\r\n }\r\n\r\n public get RecommendedUnitPrice(): number {\r\n return this.MakeModel ? this.Model.GetRecommendedUnitPrice(this.MakeModel) : 0;\r\n }\r\n\r\n public SetCost(cost: number): void {\r\n if (this.Model?.Model) {\r\n this.Model.Model.Cost = cost;\r\n }\r\n }\r\n\r\n public UpdateWorkRequired(WorkRequired: string): void {\r\n this.Model.Model.WorkRequired = WorkRequired;\r\n }\r\n\r\n public UpdateRecommendedUnitPriceOverride(e: any): void {\r\n if (e.event) {\r\n // Only set this if there's an event (a user changed the value)\r\n this.Model.UnitPriceOverride = e.value;\r\n }\r\n }\r\n}\r\n","import { ActivityModel } from \"servicesight-shared\";\r\n\r\nexport class QuoteJobActivity {\r\n SalesQuotationId?: number;\r\n RevisionId?: number;\r\n QuoteActivityId?: number;\r\n ActivityTypeId: number;\r\n Description: string;\r\n}\r\n\r\n\r\nexport const QuoteJobActivityToActivityModelConverter = (quoteActivity: QuoteJobActivity): ActivityModel => {\r\n return {\r\n ActivityId: quoteActivity.QuoteActivityId,\r\n ActivityType: quoteActivity.ActivityTypeId,\r\n Description: quoteActivity.Description\r\n } as ActivityModel;\r\n};\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { map, Observable, Subject } from \"rxjs\";\r\nimport { ActivityModel, IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\nimport { CancelData } from \"../models/cancel-data.model\";\r\nimport { QuoteJobActivity, QuoteJobActivityToActivityModelConverter } from \"../models/quote-job-activity.model\";\r\nimport { Quote } from \"../models/quote.model\";\r\nimport { Revision } from \"../models/revision.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class QuotesService {\r\n public equipmentOptionsChanged = new Subject();\r\n\r\n constructor(\r\n private odataService: ODataService,\r\n @Inject(APP_CONFIG) protected config: IAppConfig,\r\n private http: HttpClient\r\n ) { }\r\n\r\n public EquipmentOptionsChanged(): void {\r\n this.equipmentOptionsChanged.next(true);\r\n }\r\n\r\n\r\n public GetQuote(quoteId: number, revisionId?: number): Observable {\r\n if(revisionId) {\r\n return this.http.get(`${this.config.apiLocations.Quotes2}Quote/${quoteId}/${revisionId}`);\r\n }\r\n return this.http.get(`${this.config.apiLocations.Quotes2}Quote/${quoteId}`);\r\n }\r\n\r\n public SaveQuote(quote: Quote): Observable {\r\n this.SetInstalls(quote);\r\n this.SetIds(quote);\r\n return quote.SalesQuotationId ?\r\n this.http.put(`${this.config.apiLocations.Quotes2}Quote`, quote) :\r\n this.http.post(`${this.config.apiLocations.Quotes2}Quote`, quote);\r\n }\r\n\r\n public GetRevisionsList(quoteId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.Quotes2}Quotes/${quoteId}/revisionsList`);\r\n }\r\n\r\n public GetQuoteJobActivities(quoteId: number, revisionId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.Quotes2}Quotes/GetQuoteJobActivities/${quoteId}/${revisionId}`)\r\n .pipe(\r\n map(activities => {\r\n return activities.map(QuoteJobActivityToActivityModelConverter);\r\n })\r\n );\r\n }\r\n\r\n public CancelQuote(data: CancelData): Observable {\r\n return this.http.put(`${this.config.apiLocations.Quotes2}Quotes/${data.SalesQuotationId}/Cancel`, data);\r\n }\r\n\r\n public CreateRevision(revsionInfo: Revision): Observable {\r\n return this.http.post(this.config.apiLocations.Quotes2 + `Quotes/CreateRevision`, revsionInfo);\r\n }\r\n\r\n public AcceptAndCreateContract(quoteId: number, revisionId: number): Observable {\r\n return this.http.post(`${this.config.apiLocations.Quotes2}Quotes/AcceptQuoteAndCreateContract/${quoteId}/${revisionId}`, null);\r\n }\r\n\r\n public AcceptQuoteAndCreateJob(quotationId: number, revisionId: number): Observable {\r\n return this.http.post(`${this.config.apiLocations.Quotes2}Quotes/AcceptQuoteAndCreateJob/${quotationId}/${revisionId}`, null);\r\n }\r\n\r\n public AcceptAndCreateSalesOrder(quoteId: number, revisionId: number): Observable {\r\n return this.http.post(`${this.config.apiLocations.Quotes2}Quotes/AcceptQuoteAndCreateSalesOrder/${quoteId}/${revisionId}`, null);\r\n }\r\n\r\n public AcceptQuote(quoteId: number, revisionId: number): Observable {\r\n return this.http.post(`${this.config.apiLocations.Quotes2}Quotes/AcceptQuote/${quoteId}/${revisionId}`, null);\r\n }\r\n\r\n public SetQuoteStatusToQuoted(quoteId: number, revisionId: number): Observable {\r\n return this.http.put(`${this.config.apiLocations.Quotes2}Quotes/${quoteId}/${revisionId}/Quoted`, null);\r\n }\r\n\r\n public CloneQuote(model: { QuoteId; RevisionId }): Observable<{ QuoteId; RevisionId }> {\r\n return this.http.post<{ QuoteId; RevisionId }>(`${this.config.apiLocations.Quotes2}Quotes/CopyQuote`, model);\r\n }\r\n\r\n public GetMakeModelPrice(customerId: number, makeModelId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Customer/GetMakeModelPrice?id=${customerId}&makeModelId=${makeModelId}`)\r\n .pipe(map((res: any) => res.price));\r\n }\r\n\r\n private SetIds(quote: Quote) {\r\n this.SetMiscIds(quote);\r\n this.SetEquipIds(quote);\r\n this.SetLabourIds(quote);\r\n this.SetRefrigerantIds(quote);\r\n this.SetMakeModelInstallIds(quote);\r\n }\r\n\r\n private SetMiscIds(model: Quote): void {\r\n if(model?.Job?.Materials && model?.Job?.Materials.length > 0) {\r\n model.Job.Materials.forEach(c => {\r\n c.MiscID = c.MiscID < 0 ? 0 : c.MiscID;\r\n c.SalesQuotationID = model.SalesQuotationId;\r\n c.RevisionID = model.RevisionId;\r\n });\r\n }\r\n }\r\n\r\n private SetLabourIds(model: Quote): void {\r\n if(model?.Job?.LabourCosts && model?.Job?.LabourCosts.length > 0) {\r\n model.Job.LabourCosts.forEach(c => {\r\n c.QuoteLabourId = c.QuoteLabourId < 0 ? 0 : c.QuoteLabourId;\r\n c.SalesQuotationId = model.SalesQuotationId;\r\n c.RevisionId = model.RevisionId;\r\n });\r\n }\r\n if(model?.Job?.LabourCharges && model?.Job?.LabourCharges.length > 0) {\r\n model.Job.LabourCharges.forEach(c => {\r\n c.QuoteLabourId = c.QuoteLabourId < 0 ? 0 : c.QuoteLabourId;\r\n c.SalesQuotationId = model.SalesQuotationId;\r\n c.RevisionId = model.RevisionId;\r\n });\r\n }\r\n }\r\n\r\n private SetEquipIds(model: Quote): void {\r\n if(model?.Job?.Equipment && model?.Job?.Equipment.length > 0) {\r\n model.Job.Equipment.forEach(c => {\r\n c.ItemId = c.ItemId < 0 ? 0 : c.ItemId;\r\n c.SalesQuotationID = model.SalesQuotationId;\r\n c.RevisionID = model.RevisionId;\r\n });\r\n }\r\n }\r\n\r\n private SetRefrigerantIds(model: Quote): void {\r\n if(model?.Job?.Refrigerants && model?.Job?.Refrigerants.length > 0) {\r\n model.Job.Refrigerants.forEach(c => {\r\n c.QuoteRefrigerantId = c.QuoteRefrigerantId < 0 ? 0 : c.QuoteRefrigerantId;\r\n c.SalesQuotationId = model.SalesQuotationId;\r\n c.RevisionId = model.RevisionId;\r\n });\r\n }\r\n }\r\n\r\n private SetMakeModelInstallIds(model: Quote): void {\r\n if (model?.Job?.MakeModelInstalls && model?.Job?.MakeModelInstalls.length > 0) {\r\n model.Job.MakeModelInstalls.forEach(c => {\r\n c.SalesQuotationJobMakeModelInstallId = c.SalesQuotationJobMakeModelInstallId < 0 ? 0 : c.SalesQuotationJobMakeModelInstallId;\r\n c.SalesQuotationId = model.SalesQuotationId;\r\n c.RevisionId = model.RevisionId;\r\n });\r\n }\r\n }\r\n\r\n private SetInstalls(model: Quote): void {\r\n // Split our quote job installs out into quote job equip & makemodel installs\r\n if (model?.Job?.JobInstalls && model?.Job?.JobInstalls.length > 0) {\r\n if (!model.Job.Equipment) {\r\n model.Job.Equipment = [];\r\n }\r\n if (!model.Job.MakeModelInstalls) {\r\n model.Job.MakeModelInstalls = [];\r\n }\r\n model.Job.JobInstalls.forEach(inst => {\r\n if (inst.EquipmentId) {\r\n model.Job.Equipment.push({\r\n EquipItemId: inst.EquipmentId,\r\n ItemId: inst.ItemId,\r\n IsInstall: true,\r\n Attributes: [],\r\n Parts: [],\r\n Materials: [],\r\n Cost: inst.UnitCost,\r\n Price: inst.UnitPrice,\r\n Charge: inst.Charge,\r\n ActivityId: inst.ActivityId,\r\n WorkRequired: inst.WorkRequired\r\n });\r\n } else {\r\n model.Job.MakeModelInstalls.push({\r\n SalesQuotationJobMakeModelInstallId: inst.MakeModelInstallId,\r\n SalesQuotationId: 0,\r\n RevisionId: 0,\r\n MakeModelId: inst.MakeModelId,\r\n UnitCost: inst.UnitCost,\r\n UnitPrice: inst.UnitPrice,\r\n Charge: inst.Charge,\r\n QtyToInstall: inst.QtyToInstall,\r\n ActivityId: inst.ActivityId\r\n });\r\n }\r\n });\r\n }\r\n }\r\n\r\n public RejectQuote(quoteId: number): Observable {\r\n return this.http.put(`${this.config.apiLocations.Quotes2}Quotes/${quoteId}/Reject`, quoteId);\r\n }\r\n\r\n public GetLabourStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.config.apiLocations.ServiceSightOData}LabourOD`,\r\n key: \"LabourId\",\r\n keyType: \"Int32\",\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n
\r\n {{data.data.Name}}\r\n {{data.data.Name}}\r\n
\r\n
{{ data.value | currency: Model.BaseCurrencySymbol }}
\r\n
{{ Model.quoteEquipment.Quote.convertAndRound(data.value) | currency: Model.SelectedCurrencySymbol }}
\r\n\r\n
{{ GetTotalCost(data.data) | currency: Model.BaseCurrencySymbol }}
\r\n
{{ Model.quoteEquipment.Quote.convertAndRound(GetTotalPrice(data.data)) | currency: Model.SelectedCurrencySymbol }}
\r\n\r\n\r\n\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnDestroy,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { ControlContainer, NgForm } from \"@angular/forms\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Subscription } from \"rxjs\";\r\nimport { IJobMisc } from \"src/app/quotes/models/IJobMisc\";\r\nimport { MakeModelOptionAddTo } from \"src/app/settings/equipment-settings/enum/make-model-option-add-to.enum\";\r\nimport { JobMiscDialogComponent } from \"src/app/shared/components/job-misc-dialog/job-misc-dialog.component\";\r\nimport { MaterialTypeService } from \"src/app/shared/services/material-type/material-type.service\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\nimport { QuoteEquipment } from \"../../models/quote-equipment.model\";\r\nimport { QuoteSalesorderEquipMaterial } from \"../../models/quote-salesorder-equip-material.model\";\r\nimport { QuotesService } from \"../../services/quotes.service\";\r\nimport { ViewModelComponent } from \"../../view-model-component.class\";\r\nimport { AdvancedQuotesMaterialViewModel } from \"../../view-models/advanced-quotes-materials.viewmodel\";\r\n\r\n@Component({\r\n selector: \"app-advanced-quotes-material-tab\",\r\n templateUrl: \"advanced-quotes-material-tab.component.html\",\r\n viewProviders: [{ provide: ControlContainer, useExisting: NgForm }]\r\n})\r\nexport class AdvancedQuotesMaterialTabComponent extends ViewModelComponent implements OnInit, OnChanges, OnDestroy {\r\n @ViewChild(JobMiscDialogComponent, { static: true }) AddMaterialDialog: JobMiscDialogComponent;\r\n\r\n @Input() public Model: AdvancedQuotesMaterialViewModel = new AdvancedQuotesMaterialViewModel({ Attributes: [], Materials: [], Parts: [], IsInstall: false }, null);\r\n @Output() public ModelChanged: EventEmitter = new EventEmitter();\r\n @Output() public Changed: EventEmitter = new EventEmitter();\r\n\r\n public materials: any[] = [];\r\n public selectedMaterialIds: number[] = [];\r\n public materialTypeStore: ODataStore;\r\n public baseCurrencySymbol: string = null;\r\n public materialsDataSource: DataSource;\r\n public optionChangeSubscription: Subscription;\r\n\r\n private newMaterialId: number = -1;\r\n\r\n public AddToOptions = [\r\n {\r\n Id: MakeModelOptionAddTo.PurchaseOrder,\r\n Name: \"Purchase order\"\r\n }, {\r\n Id: MakeModelOptionAddTo.InstallationDeliverJob,\r\n Name: \"Installation / Delivery job\"\r\n }, {\r\n Id: MakeModelOptionAddTo.PreparationJob,\r\n Name: \"Preparation job\"\r\n }\r\n ];\r\n\r\n public get RemovingDisabled(): boolean {\r\n return !(this.selectedMaterialIds.length > 0);\r\n }\r\n\r\n constructor(\r\n private materialTypeService: MaterialTypeService,\r\n private odataService: ODataService,\r\n private quotesService: QuotesService\r\n ) {\r\n super();\r\n this.baseCurrencySymbol = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n this.sortByAddTo = this.sortByAddTo.bind(this);\r\n this.EditableRow = this.EditableRow.bind(this);\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n this.setupListDataSource();\r\n this.onChanges(changes);\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.optionChangeSubscription.unsubscribe();\r\n }\r\n\r\n public sortByAddTo(rowData): string {\r\n return rowData.AddTo.map((e) => (this.AddToOptions || []).find(o => Number(o.Id) === Number(e))?.Name).join(\", \");\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.materialTypeStore = this.materialTypeService.GetMaterialTypeStore();\r\n this.optionChangeSubscription = this.quotesService.equipmentOptionsChanged.subscribe(() => {\r\n this.setupListDataSource();\r\n });\r\n }\r\n\r\n public ShowAddMaterialsDialogue(): void {\r\n this.AddMaterialDialog.Show(false);\r\n }\r\n\r\n public cellTemplate(container, options) {\r\n const noBreakSpace = \"\\u00A0\";\r\n const text = (options.value || []).map((element) => options.column.lookup.calculateCellValue(element)).join(\", \");\r\n container.textContent = text || noBreakSpace;\r\n container.title = text;\r\n }\r\n\r\n public AddMisc(data: IJobMisc): void {\r\n if (data.MiscID) {\r\n const misc = this.Model.Model.Materials.find(m => m.ItemId === data.MiscID);\r\n misc.Description = data.Description;\r\n misc.Cost = data.Cost / this.Model.SelectedExchangeRate;\r\n misc.Charge = data.Charge / this.Model.SelectedExchangeRate;\r\n misc.MaterialTypeId = data.MiscTypeID;\r\n misc.ItemId = data.MiscID;\r\n misc.AddTo = data.AddTo;\r\n } else {\r\n const misc: QuoteSalesorderEquipMaterial = {\r\n ItemId: this.newMaterialId--,\r\n Cost: data.Cost / this.Model.SelectedExchangeRate,\r\n Charge: data.Charge / this.Model.SelectedExchangeRate,\r\n Description: data.Description,\r\n MaterialTypeId: data.MiscTypeID,\r\n AddTo: data.AddTo,\r\n };\r\n\r\n this.Model.Model.Materials.push(misc);\r\n }\r\n\r\n this.Changed.emit();\r\n this.setupListDataSource();\r\n }\r\n\r\n public OpenMaterialDialogue(e, t): void {\r\n e.preventDefault();\r\n const misc: IJobMisc = {\r\n Charge: t.data.Charge * this.Model.SelectedExchangeRate,\r\n Cost: t.data.Cost * this.Model.SelectedExchangeRate,\r\n Description: t.data.Description,\r\n MiscID: t.data.ItemId,\r\n MiscTypeID: t.data.MaterialTypeId,\r\n AddTo: t.data.AddTo\r\n };\r\n\r\n this.AddMaterialDialog.ShowEdit(misc, false);\r\n }\r\n\r\n public DeleteSelectedMaterials(): void {\r\n this.selectedMaterialIds.forEach(id => {\r\n const idx = this.Model.Model.Materials.map(o => o.ItemId).indexOf(id);\r\n this.Model.Model.Materials.splice(idx, 1);\r\n });\r\n\r\n this.Changed.emit();\r\n this.setupListDataSource();\r\n }\r\n\r\n private setupListDataSource(): void {\r\n this.materialsDataSource = this.odataService.GetDataSourceWithLookups(\r\n this.Model.Model.Materials.map(item => item),\r\n \"ItemId\",\r\n [\r\n {\r\n store: this.materialTypeService.GetMaterialTypeStore(),\r\n dataKey: \"MaterialTypeId\",\r\n lookupKey: \"MiscTypeId\",\r\n displayExprs: [\"Name\"]\r\n }\r\n ]);\r\n }\r\n\r\n public RefreshMaterials(): void {\r\n }\r\n\r\n public EditableRow(e): boolean {\r\n return !e.row.data.OptionId && !this.Model.quoteEquipment?.Quote?.IsQuoteLostOrWon && !this.Model.quoteEquipment?.Quote?.IsQuoteQuoted;\r\n }\r\n\r\n public GetTotalCost(data): number {\r\n const multiplier = this.getMultiplier(data.AddTo);\r\n\r\n return data.Cost * multiplier;\r\n }\r\n\r\n public GetTotalPrice(data): number {\r\n const multiplier = this.getMultiplier(data.AddTo);\r\n\r\n return data.Charge * multiplier;\r\n }\r\n\r\n private getMultiplier(addTo: number[]): number {\r\n return addTo.includes(MakeModelOptionAddTo.InstallationDeliverJob)\r\n && addTo.includes(MakeModelOptionAddTo.PreparationJob)\r\n ? 2\r\n : 1;\r\n }\r\n\r\n public OnSelectionChanged(e: any): void {\r\n const deselectedRowKeys: number[] = [];\r\n e.selectedRowsData.forEach(row => {\r\n if (row.OptionId) {\r\n deselectedRowKeys.push(row.ItemId);\r\n }\r\n });\r\n if (deselectedRowKeys.length) {\r\n e.component.deselectRows(deselectedRowKeys);\r\n }\r\n }\r\n}\r\n","\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n
{{ data.displayValue | currency: CurrencySymbol }}
\r\n\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { MakeModelService } from \"src/app/shared/services/make-model/make-model.service\";\r\n\r\n@Component({\r\n selector: \"app-advanced-quotes-options-dialog\",\r\n templateUrl: \"./advanced-quotes-options-dialog.component.html\",\r\n styleUrls: [\"./advanced-quotes-options-dialog.component.scss\"]\r\n})\r\n\r\nexport class AdvancedQuotesOptionsDialogComponent implements OnChanges {\r\n @Input() MakeModelId: number;\r\n @Input() AlreadyAdded: number[];\r\n\r\n @Output() OptionsAdded = new EventEmitter();\r\n\r\n public available: DataSource;\r\n public OptionTypes: { id: number; name: string}[] = [\r\n { id: 1, name: \"make-model.option-type.manufacturer\"},\r\n { id: 2, name: \"make-model.option-type.dealer\"}\r\n ];\r\n public CurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n public SearchText: string = \"\";\r\n public visible: boolean = false;\r\n public filterSelected: any;\r\n public alreadyAddedFilter: any;\r\n public selected: number[] = [];\r\n\r\n @ViewChild(\"OptionsGrid\", { static: false }) OptionsGrid: DxDataGridComponent;\r\n\r\n constructor(\r\n private makeModelService: MakeModelService,\r\n private translate: TranslateService) {\r\n this.Translate = this.Translate.bind(this);\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.MakeModelId?.currentValue) {\r\n this.available = this.makeModelService.GetMakeModelOptionDataSource(this.MakeModelId);\r\n }\r\n\r\n if (changes.AlreadyAdded?.currentValue) {\r\n if (this.AlreadyAdded.length === 0) {\r\n this.alreadyAddedFilter = null;\r\n } else {\r\n this.alreadyAddedFilter = [];\r\n this.AlreadyAdded.forEach(a => {\r\n this.alreadyAddedFilter.push([\"OptionId\", \"<>\", a]);\r\n this.alreadyAddedFilter.push(\"and\");\r\n });\r\n this.alreadyAddedFilter.pop();\r\n }\r\n\r\n if(this.available) {\r\n this.available.filter(this.alreadyAddedFilter);\r\n if(this.OptionsGrid) {\r\n this.OptionsGrid.instance.refresh();\r\n }\r\n }\r\n }\r\n }\r\n\r\n public Show(): void {\r\n this.selected = [];\r\n this.filterSelected = null;\r\n this.visible = true;\r\n }\r\n\r\n public Close(): void {\r\n this.visible = false;\r\n }\r\n\r\n public AddOption(): void {\r\n this.OptionsAdded.emit(this.selected);\r\n this.Close();\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.OptionsGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public Translate(optionType: {id: number; name: string}): string {\r\n return this.translate.instant(optionType.name);\r\n }\r\n\r\n public OptionFilterChanged($event): void {\r\n const filterValue = $event.currentTarget.value;\r\n if (filterValue === \"0\") {\r\n this.filterSelected = null;\r\n } else {\r\n this.filterSelected = [\"OptionType\", \"=\", Number(filterValue)];\r\n }\r\n\r\n this.SetFilters();\r\n this.OptionsGrid.instance.refresh();\r\n }\r\n\r\n private SetFilters(): void {\r\n if(this.filterSelected && this.alreadyAddedFilter) {\r\n this.available.filter([this.filterSelected, \"and\", this.alreadyAddedFilter]);\r\n } else if(this.filterSelected) {\r\n this.available.filter(this.filterSelected);\r\n } else if(this.alreadyAddedFilter) {\r\n this.available.filter(this.alreadyAddedFilter);\r\n } else {\r\n this.available.filter(null);\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n \r\n\r\n \r\n
\r\n
\r\n\r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
{{ data.displayValue | currency: Model.Parent.Quote.BaseCurrencySymbol }}
\r\n
{{ Model.Parent.Quote.convertAndRound(data.displayValue) | currency: Model.Parent.Quote.SelectedCurrencySymbol }}
\r\n\r\n
\r\n\r\n\r\n\r\n\r\n\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport ArrayStore from \"devextreme/data/array_store\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { forkJoin, map, Observable } from \"rxjs\";\r\nimport { GenericAttribute, ViewModelComponent } from \"servicesight-shared\";\r\nimport { QuotesService } from \"src/app/quotes2/services/quotes.service\";\r\nimport { MakeModelService } from \"src/app/shared/services/make-model/make-model.service\";\r\nimport { StockState } from \"src/app/stock/models/enums/stock-state.enum\";\r\nimport { QuoteEquipmentOption } from \"../../models/quote-equipment-option.model\";\r\nimport { QuoteSalesorderEquipMaterial } from \"../../models/quote-salesorder-equip-material.model\";\r\nimport { QuoteSalesOrderEquipPart } from \"../../models/quote-salesorder-equip-part.model\";\r\nimport { AdvancedQuotesEquipmentOptionViewModel } from \"../../view-models/advanced-quotes-equipment-option.viewmodel\";\r\nimport { AdvancedQuotesOptionsDialogComponent } from \"../advanced-quotes-options-dialog/advanced-quotes-options-dialog.component\";\r\n\r\n@Component({\r\n selector: \"app-advanced-quotes-options-tab\",\r\n templateUrl: \"./advanced-quotes-options-tab.component.html\",\r\n styleUrls: [\"./advanced-quotes-options-tab.component.scss\"]\r\n})\r\nexport class AdvancedQuotesOptionsTabComponent extends ViewModelComponent implements OnChanges {\r\n @Input() public Model: AdvancedQuotesEquipmentOptionViewModel;\r\n @Output() public ModelChanged = new EventEmitter();\r\n @Output() public Changed = new EventEmitter();\r\n\r\n @ViewChild(\"dialog\", { static: false }) dialog: AdvancedQuotesOptionsDialogComponent;\r\n\r\n public selected = [];\r\n public newOptionId = -1;\r\n public makeModelOptionDataSource: DataSource;\r\n public selectedOptionIds: number[] = [];\r\n public addedOptionIds: number[] = [];\r\n public dataSource: DataSource;\r\n public itemId: number = -1;\r\n public showAttributeWarning: boolean = false;\r\n public overrideAttributes: boolean = false;\r\n public currencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n public get currencyFormat(): string {\r\n return this.currencySymbol + \"#,##0.00\";\r\n }\r\n\r\n constructor(\r\n private makeModelService: MakeModelService,\r\n private quoteService: QuotesService) {\r\n super();\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.Model.currentValue) {\r\n this.SetDataSource();\r\n }\r\n this.onChanges(changes);\r\n }\r\n\r\n public ShowAddOption(): void {\r\n this.makeModelOptionDataSource = this.makeModelService.GetMakeModelOptionDataSource(this.Model.Parent.Model.MakeModelId);\r\n this.selected = this.Model.Model.map(i => i.OptionId);\r\n this.dialog.Show();\r\n }\r\n\r\n public RemoveOption(): void {\r\n this.selectedOptionIds.forEach(id => {\r\n const idx = this.Model.Model.map(o => o.OptionId).indexOf(id);\r\n this.Model.Model.splice(idx, 1);\r\n this.Model.Parent.PartsTab.Model.map(i => { return { OptionId: i.OptionId, QuotePartId: i.QuotePartId }; }).forEach((o) => {\r\n if (o.OptionId === id) {\r\n const index = this.Model.Parent.PartsTab.Model.map(p => p.QuotePartId).indexOf(o.QuotePartId);\r\n this.Model.Parent.PartsTab.Model.splice(index, 1);\r\n }\r\n });\r\n this.Model.Parent.Model.Materials.map(i => { return { OptionId: i.OptionId, ItemId: i.ItemId }; }).forEach((o) => {\r\n if (o.OptionId === id) {\r\n const index = this.Model.Parent.Model.Materials.map(p => p.ItemId).indexOf(o.ItemId);\r\n this.Model.Parent.Model.Materials.splice(index, 1);\r\n }\r\n });\r\n this.Model.Parent.Model.Attributes.map(i => { return { OptionId: i.OptionId, ItemId: i.AttributeId }; }).forEach((o) => {\r\n if (o.OptionId === id) {\r\n const index = this.Model.Parent.Model.Attributes.map(p => p.AttributeId).indexOf(o.ItemId);\r\n this.Model.Parent.Model.Attributes.splice(index, 1);\r\n }\r\n });\r\n });\r\n this.SetDataSource();\r\n this.Changed.emit();\r\n this.quoteService.EquipmentOptionsChanged();\r\n }\r\n\r\n public OnOptionUpdated(): void {\r\n this.Changed.emit();\r\n }\r\n\r\n public CheckAttributesCollision(ids: number[]): void {\r\n this.addedOptionIds = ids;\r\n this.makeModelService.OptionAttributesOverlap(ids, this.Model.Parent.Model.Attributes.map(a => a.AttributeId)).subscribe(collide => {\r\n if (collide) {\r\n this.showAttributeWarning = true;\r\n } else {\r\n this.OptionsAdded(ids);\r\n }\r\n });\r\n }\r\n\r\n public ConfirmAttributesOverride(confirm: boolean) {\r\n if (confirm) {\r\n this.overrideAttributes = true;\r\n } else {\r\n this.overrideAttributes = false;\r\n }\r\n this.OptionsAdded(this.addedOptionIds);\r\n this.addedOptionIds = [];\r\n this.showAttributeWarning = false;\r\n }\r\n\r\n private SetDataSource(): void {\r\n this.dataSource = new DataSource({\r\n store: new ArrayStore({\r\n key: \"OptionId\",\r\n data: this.Model?.Model.map(item => item) ?? []\r\n })\r\n });\r\n }\r\n\r\n private OptionsAdded(ids: number[]): void {\r\n const getOptionsObservables: Observable[] =\r\n ids.map(optionId => this.makeModelService.GetOption(optionId).pipe(map((item) => {\r\n const option: QuoteEquipmentOption = {\r\n ItemId: this.itemId--,\r\n OptionId: item.OptionId,\r\n MakeModelId: item.MakeModelId,\r\n OptionType: item.OptionType,\r\n Name: item.Name,\r\n Cost: item.BuyingPrice,\r\n Price: item.SellingPrice\r\n };\r\n\r\n const parts: QuoteSalesOrderEquipPart[] = item.Parts.map(p => {\r\n const part = {\r\n QuoteSalesOrderEquipId: this.Model.Parent.Model.ItemId,\r\n QuotePartId: this.itemId--,\r\n StockHeaderId: p.StockHeaderId,\r\n StockState: StockState.New,\r\n Qty: p.Qty,\r\n Price: 0,\r\n Cost: p.Cost,\r\n SalesQuotationId: this.Model.Parent.Quote.Model.SalesQuotationId,\r\n RevisionId: this.Model.Parent.Quote.Model.RevisionId,\r\n OptionId: item.OptionId,\r\n AddTo: p.AddTo\r\n };\r\n return part;\r\n });\r\n\r\n const materials: QuoteSalesorderEquipMaterial[] = item.Materials.map(m => {\r\n const material = {\r\n ItemId: this.itemId--,\r\n MaterialTypeId: m.MiscTypeId,\r\n Description: m.Description,\r\n Charge: 0,\r\n Cost: m.Cost,\r\n SalesQuotationId: this.Model.Parent.Quote.Model.SalesQuotationId,\r\n RevisionId: this.Model.Parent.Quote.Model.RevisionId,\r\n AddTo: m.AddTo,\r\n OptionId: item.OptionId\r\n };\r\n return material;\r\n });\r\n\r\n const attributes: GenericAttribute[] = item.Attributes.map(a => {\r\n const attribute = {\r\n Id: this.itemId--,\r\n AttributeId: a.AttributeId,\r\n Value: a.Value,\r\n Text: a.Text,\r\n Memo: a.Memo,\r\n OptionId: item.OptionId\r\n };\r\n return attribute;\r\n });\r\n\r\n option.Parts = parts;\r\n option.Materials = materials;\r\n option.Attributes = attributes;\r\n\r\n return option;\r\n })\r\n ));\r\n\r\n forkJoin(getOptionsObservables).subscribe(options => {\r\n this.Model.Model.push(...options);\r\n this.Model.Parent.PartsTab.Model.push(...options.map(i => i.Parts).reduce((p1, p2) => p1.concat(p2)));\r\n this.Model.Parent.Model.Materials.push(...options.map(i => i.Materials).reduce((m1, m2) => m1.concat(m2)));\r\n const optionAttributes = options.map(i => i.Attributes).reduce((a1, a2) => a1.concat(a2));\r\n optionAttributes.forEach(a => {\r\n const existing = this.Model.Parent.Model.Attributes.find(x => x.AttributeId === a.AttributeId);\r\n if (existing && this.overrideAttributes) {\r\n existing.Text = a.Text;\r\n existing.Value = a.Value;\r\n existing.Memo = a.Memo;\r\n existing.OptionId = a.OptionId;\r\n } else if (!existing) {\r\n this.Model.Parent.Model.Attributes = [...this.Model.Parent.Model.Attributes, a];\r\n }\r\n });\r\n this.SetDataSource();\r\n this.Changed.emit();\r\n this.quoteService.EquipmentOptionsChanged();\r\n });\r\n }\r\n}\r\n","import { HttpClient, HttpHeaders } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { CostAndPrice } from \"../models/cost-price.model\";\r\nimport { QuoteJobPartModel } from \"../models/quote-job-part\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class QuoteJobPartsService {\r\n\r\n private quoteJobPartBaseUrl: string = this.config.apiLocations.Quotes.substr(0, this.config.apiLocations.Quotes.lastIndexOf(\"/api/\") + 5) + \"QuoteJobPart/\";\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private config: IAppConfig) { }\r\n\r\n public GetQuoteJobParts(quoteId: number, revisionId: number): Observable {\r\n return this.http.get(`${this.quoteJobPartBaseUrl}${quoteId}/${revisionId}`);\r\n }\r\n\r\n public UpdateQuoteJobPart(part: QuoteJobPartModel): Observable {\r\n return this.http.put(`${this.quoteJobPartBaseUrl}`, part);\r\n }\r\n\r\n public AddQuoteJobParts(quoteId: number, revisionId: number, customerId: number, stockHeaderIds: number[]): Observable {\r\n return this.http.post(`${this.quoteJobPartBaseUrl}${quoteId}/${revisionId}/${customerId}`, stockHeaderIds);\r\n }\r\n\r\n public RemoveQuoteJobParts(quoteId: number, revisionId: number, partIds: number[]): Observable {\r\n const options = {\r\n headers: new HttpHeaders({ \"Content-Type\": \"application/json\" }),\r\n body: partIds\r\n };\r\n return this.http.delete(`${this.quoteJobPartBaseUrl}${quoteId}/${revisionId}`, options);\r\n }\r\n\r\n public GetPrice(stockHeaderId: number, customerId?: number): Observable {\r\n customerId = customerId ? customerId : 0;\r\n const url = `${this.config.apiLocations.ServiceSight}Customer/GetPrice?id=${customerId}&stockHeaderId=${stockHeaderId}`;\r\n return this.http.get(url);\r\n }\r\n}\r\n","
\r\n
\r\n \r\n \r\n
\r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
{{ data.displayValue | currency: Model.SelectedCurrencySymbol }}
\r\n\r\n
{{ data.displayValue * data.data.Qty | currency: Model.BaseCurrencySymbol }}
\r\n\r\n
{{ GetTotalCost(data.data) | currency: Model.BaseCurrencySymbol }}
\r\n\r\n
{{ GetTotalPrice(data.data) * Model.SelectedExchangeRate | currency: Model.SelectedCurrencySymbol }}
\r\n\r\n \r\n\r\n
\r\n \r\n \r\n
\r\n\r\n \r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n \r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnDestroy,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { forkJoin, Observable, Subscription } from \"rxjs\";\r\nimport { switchMap } from \"rxjs/operators\";\r\nimport { ViewModelComponent } from \"servicesight-shared\";\r\nimport { MakeModelOptionAddTo } from \"src/app/settings/equipment-settings/enum/make-model-option-add-to.enum\";\r\nimport { AddPartDialogueComponent } from \"src/app/shared/components/add-part-dialogue/add-part-dialogue.component\";\r\nimport { StockState } from \"src/app/stock/models/enums/stock-state.enum\";\r\nimport { StockPart } from \"src/app/stock/models/stock-part.model\";\r\nimport { StockSupplierModel } from \"src/app/stock/models/stock-supplier.model\";\r\nimport { QuoteJobPartsService } from \"../../../quotes/services/quote-job-parts-service.service\";\r\nimport { ODataService } from \"../../../shared/services/odata/odata.service\";\r\nimport { StockService } from \"../../../stock/services/stock.service\";\r\nimport { QuoteSalesOrderEquipPart } from \"../../models/quote-salesorder-equip-part.model\";\r\nimport { QuotesService } from \"../../services/quotes.service\";\r\nimport { AdvancedQuotesPartsViewModel } from \"../../view-models/advanced-quotes-parts.viewmodel\";\r\n\r\n@Component({\r\n selector: \"app-advanced-quotes-parts-tab\",\r\n templateUrl: \"./advanced-quotes-parts-tab.component.html\",\r\n styleUrls: [\"./advanced-quotes-parts-tab.component.scss\"]\r\n})\r\nexport class AdvancedQuotesPartsTabComponent extends ViewModelComponent implements OnInit, OnChanges, OnDestroy {\r\n\r\n @Input() public Model: AdvancedQuotesPartsViewModel = new AdvancedQuotesPartsViewModel([], null);\r\n\r\n @Output() public ModelChanged: EventEmitter = new EventEmitter();\r\n\r\n @Output() public Changed: EventEmitter = new EventEmitter();\r\n\r\n @ViewChild(AddPartDialogueComponent, { static: true }) AddPartDialog: AddPartDialogueComponent;\r\n\r\n private newQuotePartId: number = -1;\r\n\r\n public SelectedParts: number[] = [];\r\n\r\n public AddedPartIds: number[] = [];\r\n\r\n public ShowCustomerRequiredMessage: boolean = false;\r\n\r\n public PartsDataSource: DataSource;\r\n public PartsDataStore: ODataStore;\r\n public PartsListDataSource: DataSource;\r\n public currentAddTo: number[];\r\n public editRowKey: number;\r\n public optionChangeSubscription: Subscription;\r\n\r\n public AddToOptions = [{\r\n Id: MakeModelOptionAddTo.PurchaseOrder,\r\n Name: \"Purchase order\"\r\n }, {\r\n Id: MakeModelOptionAddTo.InstallationDeliverJob,\r\n Name: \"Installation / Delivery job\"\r\n }, {\r\n Id: MakeModelOptionAddTo.PreparationJob,\r\n Name: \"Preparation job\"\r\n }];\r\n\r\n public get AddingDisabled(): boolean {\r\n return false;\r\n }\r\n\r\n public get RemovingDisabled(): boolean {\r\n return !(this.SelectedParts.length > 0);\r\n }\r\n\r\n public get EditingEnabled(): boolean {\r\n return true;\r\n }\r\n\r\n public get IsPriceEditable(): boolean {\r\n return this.Model.BaseCurrencySymbol === this.Model.SelectedCurrencySymbol;\r\n }\r\n\r\n constructor(\r\n private stockService: StockService,\r\n private odataService: ODataService,\r\n private quotePartService: QuoteJobPartsService,\r\n private quotesService: QuotesService) {\r\n super();\r\n this.EditableRow = this.EditableRow.bind(this);\r\n this.OnPartEditing = this.OnPartEditing.bind(this);\r\n this.CalculatePrice = this.CalculatePrice.bind(this);\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n if(this.optionChangeSubscription) {\r\n this.optionChangeSubscription.unsubscribe();\r\n }\r\n }\r\n\r\n public sortByAddTo(rowData: any): void {\r\n return rowData.AddTo.map((e) => (this.AddToOptions || []).find(o => Number(o.Id) === Number(e))?.Name).join(\", \");\r\n }\r\n\r\n public cellTemplate(container: any, options: any): void {\r\n const noBreakSpace = \"\\u00A0\";\r\n const text = (options.value || []).map((element) => options.column.lookup.calculateCellValue(element)).join(\", \");\r\n container.textContent = text || noBreakSpace;\r\n container.title = text;\r\n }\r\n\r\n public get CurrencyFormat(): string {\r\n return this.Model.SelectedCurrencySymbol + \"#,##0.00\";\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.Model.currentValue) {\r\n this.SetupListDataSource();\r\n }\r\n this.onChanges(changes);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.PartsDataStore = this.stockService.GetStockHeaders();\r\n this.PartsDataSource = this.stockService.GetStockStorePartsDataSource();\r\n this.quotesService.equipmentOptionsChanged.subscribe(() => {\r\n this.SetupListDataSource();\r\n });\r\n\r\n this.SetupListDataSource();\r\n }\r\n\r\n public OnRemoveSelectedParts(): void {\r\n this.SelectedParts.forEach(p => {\r\n const idx = this.Model.Model.findIndex(i => i.QuotePartId === p);\r\n this.Model.Model.splice(idx, 1);\r\n });\r\n\r\n this.SelectedParts = [];\r\n this.SetupListDataSource();\r\n this.Changed.emit();\r\n }\r\n\r\n public OnAddParts(): void {\r\n if (this.Model.QuoteHasCustomerId) {\r\n this.AddPartDialog.Show();\r\n } else {\r\n this.ShowCustomerRequiredMessage = true;\r\n }\r\n }\r\n\r\n public OnPartsAdded(stockIds: { StockHeaderId: number; StoreId: number }[]): void {\r\n const getPartObservables: Observable[] = stockIds\r\n .map(stockId => this.quotePartService.GetPrice(stockId.StockHeaderId, this.Model.quoteEquipment.Quote.CustomerId)\r\n .pipe(switchMap(async (price) => {\r\n const partData = await this.PartsDataStore.byKey(stockId.StockHeaderId);\r\n let stockPart: StockPart;\r\n let preferredSupplier: StockSupplierModel;\r\n if (partData.PreferredSupplierId) {\r\n stockPart = await this.stockService.GetStockPart(stockId.StockHeaderId).toPromise();\r\n preferredSupplier = stockPart.Suppliers.find(s => s.Preferred);\r\n }\r\n // create an object to write back\r\n const part: QuoteSalesOrderEquipPart = {\r\n SalesQuotationId: 0,\r\n RevisionId: 0,\r\n // generate unique but negative quote part id - negative means it is a new part\r\n QuotePartId: this.newQuotePartId--,\r\n StockHeaderId: stockId.StockHeaderId,\r\n StockState: StockState.New,\r\n Qty: 1,\r\n Cost: preferredSupplier ? preferredSupplier.BuyingPrice : 0,\r\n Price: price.Price,\r\n QuoteSalesOrderEquipId: this.Model.quoteEquipment.Model.ItemId,\r\n AddTo: []\r\n };\r\n\r\n return part;\r\n })\r\n ));\r\n\r\n forkJoin(getPartObservables).subscribe(parts => {\r\n this.Model.Model.push(...parts);\r\n this.SetupListDataSource();\r\n this.Changed.emit();\r\n });\r\n }\r\n\r\n public SetUpValue($event: number[]): void {\r\n this.currentAddTo = $event;\r\n }\r\n\r\n public OnPartEditing(e) {\r\n this.currentAddTo = e.AddTo;\r\n }\r\n\r\n public OnSaving(): void {\r\n const row = this.PartsListDataSource.items().filter(i => i.QuotePartId === this.editRowKey);\r\n if(this.currentAddTo) {\r\n row[0].AddTo = this.currentAddTo.slice();\r\n }\r\n this.Changed.emit();\r\n }\r\n\r\n public OnPartUpdated(partData: QuoteSalesOrderEquipPart): void {\r\n const partToUpdate: any = this.Model.Model.find(part => part.QuotePartId === partData.QuotePartId);\r\n if (partToUpdate) {\r\n // update quantity, price and AddTo\r\n partToUpdate.Qty = partData.Qty;\r\n partToUpdate.Price = partData.Price;\r\n partToUpdate.AddTo = this.currentAddTo;\r\n this.currentAddTo = null;\r\n this.Changed.emit();\r\n }\r\n }\r\n\r\n public CalculateCharge(rowData: QuoteSalesOrderEquipPart): number {\r\n return rowData.Qty * rowData.Price;\r\n }\r\n\r\n public CalculatePrice(rowData: any): number {\r\n return rowData.Price * this.Model.SelectedExchangeRate;\r\n }\r\n\r\n public EditableRow(e): boolean {\r\n return !e.row.data.OptionId && !this.Model.quoteEquipment?.Quote?.IsQuoteLostOrWon && !this.Model.quoteEquipment?.Quote?.IsQuoteQuoted && !e.row.isEditing;\r\n }\r\n\r\n public OnSelectionChanged(e: any): void {\r\n const deselectedRowKeys: number[] = [];\r\n e.selectedRowsData.forEach(row => {\r\n if (row.OptionId) {\r\n deselectedRowKeys.push(row.QuotePartId);\r\n }\r\n });\r\n if (deselectedRowKeys.length) {\r\n e.component.deselectRows(deselectedRowKeys);\r\n }\r\n }\r\n\r\n public GetTotalCost(data): number {\r\n const multiplier = this.getMultiplier(data.AddTo);\r\n\r\n return data.Cost * data.Qty * multiplier;\r\n }\r\n\r\n public GetTotalPrice(data): number {\r\n const multiplier = this.getMultiplier(data.AddTo);\r\n\r\n return data.Price * data.Qty * multiplier;\r\n }\r\n\r\n private getMultiplier(addTo: number[]): number {\r\n return addTo.includes(MakeModelOptionAddTo.InstallationDeliverJob)\r\n && addTo.includes(MakeModelOptionAddTo.PreparationJob)\r\n ? 2\r\n : 1;\r\n }\r\n\r\n private SetupListDataSource(): void {\r\n this.PartsListDataSource = this.odataService.GetDataSourceWithLookups(\r\n this.Model.Model.map(item => item),\r\n \"QuotePartId\",\r\n [\r\n {\r\n store: this.PartsDataStore,\r\n dataKey: \"StockHeaderId\",\r\n lookupKey: \"StockHeaderId\",\r\n displayExprs: [\"PartNo\", \"Description\"]\r\n }\r\n ]);\r\n }\r\n}\r\n","\r\n\r\n
\r\n
\r\n
\r\n
\r\n

{{ makeModeTitle }}

\r\n
\r\n
\r\n
\r\n {{ TotalCharge | currency: ViewModel.Quote?.SelectedCurrencyCode }}\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \"\"\r\n

\r\n {{ 'messages.accordion.no-image' | translate }}\r\n

\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n\r\n","import { Component, EventEmitter, OnInit, Output, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { DomSanitizer, SafeUrl } from \"@angular/platform-browser\";\r\nimport { positionConfig } from \"devextreme/animation/position\";\r\nimport { DocumentTypeEnum, FormMesssageService, GenericFormMessagesComponent } from \"servicesight-shared\";\r\nimport { PrimaryImageService } from \"src/app/stock/services/primary-image.service\";\r\nimport { QuoteEquipment } from \"../../models/quote-equipment.model\";\r\nimport { AdvancedQuotesEquipmentViewModel } from \"../../view-models/advanced-quotes-equipment.viewmodel\";\r\nimport { QuoteViewModel } from \"../../view-models/quote.viewmodel\";\r\nimport { AdvancedQuotesGeneralTabComponent } from \"../advanced-quotes-general-tab/advanced-quotes-general-tab.component\";\r\n\r\n@Component({\r\n selector: \"app-advanced-quotes-drawer\",\r\n templateUrl: \"./advanced-quotes-drawer.component.html\",\r\n styleUrls: [\"./advanced-quotes-drawer.component.scss\"]\r\n})\r\nexport class AdvancedQuotesDrawerComponent implements OnInit {\r\n @Output() public Save: EventEmitter = new EventEmitter();\r\n @Output() public Close: EventEmitter = new EventEmitter();\r\n\r\n @ViewChild(GenericFormMessagesComponent) FormMessageComponent: GenericFormMessagesComponent;\r\n @ViewChild(\"advancedquotesdrawerform\", { static: true }) form: NgForm;\r\n @ViewChild(AdvancedQuotesGeneralTabComponent) generalTab: AdvancedQuotesGeneralTabComponent;\r\n\r\n public isDrawerOpen: boolean = false;\r\n public ViewModel: AdvancedQuotesEquipmentViewModel = new AdvancedQuotesEquipmentViewModel({ Attributes: [], Parts: [], Materials: [], IsInstall: false});\r\n public primaryImage: SafeUrl;\r\n public makeModeTitle: string;\r\n public docType = DocumentTypeEnum;\r\n public formName: string = \"advancedquotesdrawerform\";\r\n\r\n private animationType: string = \"slide\";\r\n private animationDuration: number = 400;\r\n private startPosition: any = {\r\n position: {\r\n my: {\r\n x: \"left\",\r\n y: \"center\"\r\n },\r\n at: {\r\n x: \"right\",\r\n y: \"center\"\r\n }\r\n }\r\n };\r\n\r\n public targetPosition: positionConfig = {\r\n my: {\r\n x: \"right\",\r\n y: \"center\"\r\n },\r\n at: {\r\n x: \"right\",\r\n y: \"center\"\r\n }\r\n };\r\n\r\n public animation: any = {\r\n show: {\r\n type: this.animationType,\r\n duration: this.animationDuration,\r\n from: this.startPosition,\r\n to: this.targetPosition\r\n },\r\n hide: {\r\n type: this.animationType,\r\n duration: this.animationDuration,\r\n from: this.targetPosition,\r\n to: this.startPosition\r\n }\r\n };\r\n\r\n public get TotalCharge() {\r\n return this.ViewModel.GeneralTab.Charge || 0;\r\n }\r\n\r\n constructor(\r\n private primaryImageService: PrimaryImageService,\r\n private sanitizer: DomSanitizer,\r\n private formMessageService: FormMesssageService) { }\r\n\r\n public ngOnInit(): void {\r\n }\r\n\r\n public Show(model: QuoteEquipment, quote: QuoteViewModel): void {\r\n this.ClearFormErrors();\r\n this.ViewModel = new AdvancedQuotesEquipmentViewModel(model, quote);\r\n this.LoadPrimaryImage();\r\n this.isDrawerOpen = true;\r\n }\r\n\r\n public OnClose(): void {\r\n this.primaryImage = null;\r\n this.Close.emit();\r\n this.isDrawerOpen = false;\r\n }\r\n\r\n public OnSave(): void {\r\n this.Save.emit(this.ViewModel);\r\n this.primaryImage = null;\r\n this.isDrawerOpen = false;\r\n }\r\n\r\n public HandleChanged(): void {\r\n this.generalTab.UpdateOnChange();\r\n }\r\n\r\n public LoadPrimaryImage(): void {\r\n this.primaryImageService.primaryImage.subscribe(image => {\r\n if (image) {\r\n const trustedImage = this.sanitizer.bypassSecurityTrustUrl(image.toString());\r\n this.primaryImage = trustedImage;\r\n } else {\r\n this.primaryImage = null;\r\n }\r\n });\r\n\r\n if (this.ViewModel.Model.MakeModelId) {\r\n this.primaryImageService.GetPrimaryImage(this.ViewModel.Model.MakeModelId, DocumentTypeEnum.MakeModel);\r\n }\r\n }\r\n\r\n public SwitchCurrency(): void {\r\n this.ViewModel.Quote.UseCustomerCurrency = !this.ViewModel.Quote.UseCustomerCurrency;\r\n }\r\n\r\n private ClearFormErrors(): void {\r\n this.formMessageService.ClearForm(this.formName);\r\n this.FormMessageComponent.ClearFormErrors();\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { ContractInvoiceCycleEnum } from \"../../shared/enums/contract-invoice-cycle.enum\";\r\n\r\n@Pipe({\r\n name: \"quoteInvoiceCycle\"\r\n})\r\nexport class QuoteInvoiceCyclePipe implements PipeTransform {\r\n\r\n private readonly invoiceCycle = {\r\n [ContractInvoiceCycleEnum.Daily]: \"label.contract.invoiceCycle.daily\",\r\n [ContractInvoiceCycleEnum.Weekly]: \"label.contract.invoiceCycle.weekly\",\r\n [ContractInvoiceCycleEnum.Monthly]: \"label.contract.invoiceCycle.monthly\",\r\n [ContractInvoiceCycleEnum.Quarterly]: \"label.contract.invoiceCycle.quarterly\",\r\n [ContractInvoiceCycleEnum.Annually]: \"label.contract.invoiceCycle.annually\"\r\n };\r\n\r\n public transform(value: number | ContractInvoiceCycleEnum): string {\r\n return value ? this.invoiceCycle[value] ?? \"\" : \"\";\r\n }\r\n}\r\n","
\r\n
\r\n

\r\n {{ 'label.equipment' | translate }}\r\n {{ 'quote.equipment.total' | translate: { value: (Model.DisplayTotal | currency: Model.Quote.SelectedCurrencySymbol) } }}\r\n \r\n {{ 'quotes.profit' | translate: { value: ( Model.Profit | currency: Model.Quote.BaseCurrencySymbol), percent: ( Model.Total | quotePercent: Model.Profit) } }}\r\n \r\n

\r\n
\r\n
\r\n \r\n {{ 'quotes.equipment.remove' | translate }}\r\n \r\n {{ 'quotes.list.add' | translate }}\r\n \r\n
\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n
\r\n {{ item.data.Location }}\r\n
\r\n\r\n
\r\n {{ item.data.SerialNo }}\r\n
\r\n\r\n
\r\n {{item.value}}\r\n
\r\n\r\n
\r\n
{{data.data.WorkRequired}}
\r\n
\r\n {{ data.data.WarningNotes }}\r\n
\r\n
\r\n\r\n
{{ data.data.Cost | currency: Model.BaseCurrencySymbol }}
\r\n\r\n
{{ Model.Quote.convertAndRound(data.displayValue) | currency: Model.Quote.SelectedCurrencySymbol }}
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
{{ data.displayValue | currency: Model.Quote.SelectedCurrencySymbol }}
\r\n\r\n
{{ EquipSitesDataSource(data.data.EquipItemId) }}
\r\n\r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Inject,\r\n Input,\r\n OnChanges,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport moment from \"moment\";\r\nimport {\r\n AddEquipmentComponent,\r\n CustomerService,\r\n DateOnlyService,\r\n EquipmentDataService,\r\n IAuthService,\r\n MakeModelSharedService,\r\n PhraseBookType,\r\n WorkRequiredComponent,\r\n WorkRequiredDialogueModel\r\n} from \"servicesight-shared\";\r\nimport { AddMakeModelDialogueComponent } from \"src/app/shared/components/add-make-model-dialogue/add-make-model-dialogue.component\";\r\nimport { AdvancedQuotesDrawerComponent } from \"../advanced-quotes/advanced-quotes-drawer/advanced-quotes-drawer.component\";\r\nimport { QuoteSummaryType } from \"../enums/quote-summary-type.enum\";\r\nimport { QuoteEquipmentUI } from \"../models/quote-equipment-ui.model\";\r\nimport { QuoteEquipment } from \"../models/quote-equipment.model\";\r\nimport { QuotesService } from \"../services/quotes.service\";\r\nimport { ViewModelComponent } from \"../view-model-component.class\";\r\nimport { AdvancedQuotesEquipmentViewModel } from \"../view-models/advanced-quotes-equipment.viewmodel\";\r\nimport { QuoteEquipmentViewModel } from \"../view-models/equipment/quote-equipment.viewmodel\";\r\n\r\n@Component({\r\n selector: \"app-quote-equipment\",\r\n templateUrl: \"./quote-equipment.component.html\",\r\n styleUrls: [\"./quote-equipment.component.scss\"]\r\n})\r\nexport class QuoteEquipmentComponent extends ViewModelComponent implements OnChanges {\r\n\r\n @Input() public Model: QuoteEquipmentViewModel;\r\n @Input() public Situation: QuoteSummaryType = QuoteSummaryType.Job;\r\n @Output() public ModelChanged = new EventEmitter();\r\n @Output() public Changed = new EventEmitter();\r\n\r\n @ViewChild(\"addEquipmentComponent\", { static: false }) addEquipmentComponent: AddEquipmentComponent;\r\n @ViewChild(\"workRequiredComponent\", { static: false }) workRequiredComponent: WorkRequiredComponent;\r\n @ViewChild(\"addMakeModelDialog\", { static: false }) AddMakeModelDialog: AddMakeModelDialogueComponent;\r\n @ViewChild(\"drawer\", { static: false }) drawer: AdvancedQuotesDrawerComponent;\r\n @ViewChild(\"quoteEquipmentGrid\", { static: false }) quoteEquipmentGrid: DxDataGridComponent;\r\n\r\n public locationStore: ODataStore;\r\n public locationDataSource: ODataStore;\r\n public makeModelStore: ODataStore;\r\n public equipmentStore: ODataStore;\r\n public sitesDataStore: ODataStore;\r\n public dataSource: QuoteEquipment[];\r\n public usedEquipment: number[] = [];\r\n\r\n private equipSiteLookup: string[] = [];\r\n private makeModelLookup: string[] = [];\r\n private editedItemId: number = 0;\r\n\r\n public selectedEquipmentItemIds: number[] = [];\r\n public isPortal: boolean;\r\n public showMessage = false;\r\n public minDateValue: Date = moment().startOf(\"day\").toDate();\r\n public minEndDateValue: Date = moment().add(1, \"day\").startOf(\"day\").toDate();\r\n private newEquipmentId: number = -1;\r\n public formName = \"quoteform\";\r\n\r\n public selectedActivityId: number;\r\n\r\n public phraseType = PhraseBookType;\r\n public parentType = QuoteSummaryType;\r\n\r\n public get IsSelectedEquipment(): boolean {\r\n return this.selectedEquipmentItemIds.length > 0;\r\n }\r\n\r\n public get CurrencyFormat(): string {\r\n return this.Model.Quote.SelectedCurrencySymbol + \"#,##0.00\";\r\n }\r\n\r\n public get QuoteEditButtonVisible(): boolean {\r\n if(this.Model.AdvancedQuotesEnabled) {\r\n return true;\r\n }\r\n return !this.Model.Quote.UseCustomerCurrency && !this.Model.Quote.IsQuoteLostOrWon && !this.Model.Quote.IsQuoteQuoted;\r\n }\r\n\r\n constructor(\r\n @Inject(\"AuthService\") authService: IAuthService,\r\n private dataService: EquipmentDataService,\r\n private makeModelService: MakeModelSharedService,\r\n private equipmentService: EquipmentDataService,\r\n private customerService: CustomerService,\r\n private dateOnlyService: DateOnlyService,\r\n private quoteService: QuotesService) {\r\n super();\r\n this.isPortal = authService.isPortalUser;\r\n this.makeModelStore = this.makeModelService.GetMakeModelsDataStore();\r\n this.equipmentStore = this.equipmentService.GetEquipmentDataStore();\r\n this.sitesDataStore = this.customerService.GetCustomerDataStore();\r\n\r\n this.CalculateCharge = this.CalculateCharge.bind(this);\r\n this.ShowEditWorkRequiredDialog = this.ShowEditWorkRequiredDialog.bind(this);\r\n this.ActivityCustomizedText = this.ActivityCustomizedText.bind(this);\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if(changes.Model.currentValue) {\r\n this.SetDataSource();\r\n this.GetLocationData(this.Model.Quote.Model.SiteId);\r\n }\r\n this.onChanges(changes);\r\n }\r\n\r\n public EquipSitesDataSource(equipId: number): string {\r\n if (!this.equipSiteLookup[equipId]) {\r\n this.equipSiteLookup[equipId] = \"loading\";\r\n this.equipmentStore.byKey(equipId).then(equipment => {\r\n this.sitesDataStore.byKey(equipment.SiteId).then(site => {\r\n this.equipSiteLookup[equipId] = site.Customer;\r\n });\r\n });\r\n }\r\n\r\n return this.equipSiteLookup[equipId];\r\n }\r\n\r\n public MakeModelDataSource(makeModelId: number): string {\r\n if (!this.makeModelLookup[makeModelId]) {\r\n this.makeModelLookup[makeModelId] = \"loading\";\r\n this.makeModelStore.byKey(makeModelId).then(makeModel => {\r\n this.makeModelLookup[makeModelId] = `${makeModel.Make} / ${makeModel.Model}`;\r\n });\r\n }\r\n\r\n return this.makeModelLookup[makeModelId];\r\n }\r\n\r\n public RemoveEquipment(): void {\r\n this.Model.Model.remove(o => this.selectedEquipmentItemIds.includes(o.ItemId));\r\n this.Changed.emit();\r\n this.SetDataSource();\r\n }\r\n\r\n public OpenNewEquipmentDialog(): void {\r\n if (!this.Model.Quote.Model.CustomerId) {\r\n this.showMessage = true;\r\n } else if (this.Model.Type === QuoteSummaryType.SalesOrder) {\r\n this.AddMakeModelDialog.Show();\r\n } else if (this.Model.Type === QuoteSummaryType.Job || this.Model.Type === QuoteSummaryType.Contract) {\r\n this.addEquipmentComponent.Show();\r\n }\r\n }\r\n\r\n public OnEquipmentUpdated(): void {\r\n this.Model.Model.forEach(m => {\r\n m.StartDate = this.dateOnlyService.RecalculateDateOnSave((m as QuoteEquipmentUI).UiStartDate);\r\n m.EndDate = this.dateOnlyService.RecalculateDateOnSave((m as QuoteEquipmentUI).UiEndDate);\r\n });\r\n\r\n this.Changed.emit();\r\n }\r\n\r\n public async OnMakeModelIdsAdded(ids: number[]): Promise {\r\n Promise.all(ids.map(i => this.makeModelStore.byKey(i))).then(values => {\r\n let processed = 0;\r\n values.forEach(makeModel => {\r\n this.quoteService.GetMakeModelPrice(this.Model.Quote.CustomerId, makeModel.MakeModelId)\r\n .subscribe((price: number) =>{\r\n this.Model.Model.push({\r\n ItemId: this.newEquipmentId--,\r\n MakeModelId: makeModel.MakeModelId,\r\n QtyRequired: 1,\r\n WarrantyLengthMonths: makeModel.WarrantyMonth,\r\n WarrantyLengthMeters: makeModel.WarrantyMeter,\r\n Cost: makeModel.Cost,\r\n Price: price,\r\n Charge: price,\r\n Carriage: makeModel.Carriage,\r\n Attributes: makeModel.Attributes || [],\r\n Materials: [],\r\n Parts: [],\r\n Options: [],\r\n IsInstall: false\r\n });\r\n processed++;\r\n if(processed === ids.length) {\r\n this.SetDataSource();\r\n this.Changed.emit();\r\n }\r\n });\r\n });\r\n });\r\n }\r\n\r\n public AddEquipment(shouldAdd: boolean = false): void {\r\n if (shouldAdd) {\r\n const selectedEquipment = this.addEquipmentComponent.newEquipmentGrid.instance.getSelectedRowsData();\r\n selectedEquipment.forEach((value: any) => {\r\n value.ItemId = this.newEquipmentId--;\r\n value.EquipItemId = value.EquipId;\r\n value.Equip = value.EquipNumber;\r\n value.LocationId = value.LocationId;\r\n value.MakeModelId = value.MakeModelId;\r\n if(this.Model.Type === QuoteSummaryType.Job || this.Model.Type === QuoteSummaryType.SalesOrder) {\r\n value.WorkRequired = value.Notes;\r\n } else if(this.Model.Type === QuoteSummaryType.Contract) {\r\n value.SiteId = value.SiteId;\r\n value.StartDate = this.dateOnlyService.RecalculateDateOnSave(this.minDateValue);\r\n value.Charge = 0;\r\n }\r\n this.Model.Model.push(value);\r\n });\r\n\r\n this.Changed.emit();\r\n this.SetDataSource();\r\n }\r\n this.GetLocationData(this.Model.Quote.Model.SiteId);\r\n }\r\n\r\n public ShowEditWorkRequiredDialog(e) {\r\n this.editedItemId = e.row.key;\r\n const item: WorkRequiredDialogueModel = {\r\n ActivityId: e.row.data.ActivityId ?? 0,\r\n WorkRequired: e.row.data.WorkRequired\r\n };\r\n this.workRequiredComponent.Show(item);\r\n }\r\n\r\n public OnActivitySelectedEvent(activitySelected: number): void {\r\n this.Model.Model.find(o => o.ItemId === this.editedItemId).ActivityId = activitySelected;\r\n\r\n this.Changed.emit();\r\n }\r\n\r\n public OnEditWorkRequired(workRequired: string): void {\r\n this.Model.Model.find(o => o.ItemId === this.editedItemId).WorkRequired = workRequired;\r\n\r\n this.Changed.emit();\r\n }\r\n\r\n public ActivityCustomizedText(cell): string {\r\n if (cell.value && this.Model.Activities) {\r\n const activity = this.Model.Activities.find(x => x.ActivityId === cell.value);\r\n\r\n return `${activity.ActivityId} - ${activity.Description}`;\r\n }\r\n return \"\";\r\n }\r\n\r\n public CalculateCharge(rowData: QuoteEquipment): number {\r\n return this.Model?.GetEquipmentCharge(rowData) ?? 0;\r\n }\r\n\r\n public getMinEndDate(ev: any): boolean {\r\n this.minEndDateValue = new Date((new Date(ev.value)).getTime() + 1000 * 60 * 60 * 24);\r\n return true;\r\n }\r\n\r\n public OnEditingStart(event): void {\r\n if(this.Model.AdvancedQuotesEnabled && this.Model.Type === QuoteSummaryType.SalesOrder) {\r\n event.cancel = true;\r\n const dataCopy = this.DeepCopy(event.data);\r\n this.drawer.makeModeTitle = this.MakeModelDataSource(dataCopy.MakeModelId);\r\n this.drawer.Show(dataCopy, this.Model.Quote);\r\n }\r\n }\r\n\r\n public OnSave(data: AdvancedQuotesEquipmentViewModel): void {\r\n const dataModel: QuoteEquipment = data?.Model;\r\n if (dataModel) {\r\n const dataIndex = this.Model.Model.findIndex(m => m.ItemId === dataModel.ItemId);\r\n\r\n if (dataIndex >= 0) {\r\n this.Model.Model[dataIndex] = dataModel;\r\n } else {\r\n this.Model.Model.push(dataModel);\r\n }\r\n\r\n this.SetDataSource();\r\n this.Changed.emit();\r\n }\r\n }\r\n\r\n public ActivitiesUpdated() {\r\n this.SetActivities();\r\n this.SetDataSource();\r\n this.quoteEquipmentGrid.instance.refresh();\r\n }\r\n\r\n public get EditingEnabled(): boolean {\r\n return this.Model?.EditingEnabled(this.Situation) ?? false;\r\n }\r\n\r\n private SetActivities(): void {\r\n this.DeleteLinkedEquipment();\r\n this.ModelChanged.emit();\r\n }\r\n\r\n private DeleteLinkedEquipment(): void {\r\n //Delete any equipment where linked activity no longer exists\r\n const equipmentToDelete = [];\r\n this.Model.Model.forEach(e => {\r\n if (e.ActivityId && e.ItemId !== null && !this.Model.Activities.find(a=>a.ActivityId === e.ActivityId)){\r\n equipmentToDelete.push(e.ItemId);\r\n }\r\n });\r\n equipmentToDelete.forEach(ed => this.Model.Model.remove(e=>e.ItemId === ed));\r\n }\r\n\r\n private GetLocationData(siteId: number): void {\r\n if (siteId) {\r\n this.locationDataSource = this.dataService.GetLocationsDataStore(siteId);\r\n this.Model.Model.forEach((v) => {\r\n if(v.LocationId){\r\n this.locationDataSource.byKey(v.LocationId).then((l) => {\r\n v.Location = l.Location;\r\n });\r\n }\r\n });\r\n }\r\n }\r\n\r\n private SetDataSource() {\r\n this.dataSource = this.Model.Model.map(item => {\r\n const uiItem: QuoteEquipmentUI = item;\r\n uiItem.UiStartDate = this.dateOnlyService.RecalculateDateOnLoad(item.StartDate);\r\n uiItem.UiEndDate = this.dateOnlyService.RecalculateDateOnLoad(item.EndDate);\r\n return uiItem;\r\n });\r\n if(this.Model.Type === QuoteSummaryType.Contract) {\r\n this.usedEquipment = this.Model.Model.map(i => i.EquipItemId);\r\n }\r\n }\r\n\r\n private DeepCopy(source: T): T {\r\n const sourceJson: string = JSON.stringify(source);\r\n return JSON.parse(sourceJson);\r\n }\r\n}\r\n","
\r\n
\r\n

\r\n {{ 'label.install' | translate }}\r\n {{ 'quote.install.total' | translate: { value: (Model.DisplayTotal | currency: Model.Quote.SelectedCurrencySymbol) } }}\r\n \r\n {{ 'quotes.profit' | translate: { value: ( Model.Profit | currency: Model.Quote.BaseCurrencySymbol), percent: ( Model.Total | quotePercent: Model.Profit) } }}\r\n \r\n

\r\n
\r\n {{ 'buttons.remove' | translate }}\r\n \r\n \r\n {{ 'equipment.joblist.add' | translate }}\r\n \r\n\r\n \r\n {{ 'equipment.joblist.add-make-model' | translate }}\r\n \r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n
\r\n {{item.value}}\r\n {{item.value}}\r\n
\r\n\r\n \r\n\r\n
{{ data.data.Cost | currency: Model.BaseCurrencySymbol }}
\r\n
{{ data.data.Price | currency: Model.BaseCurrencySymbol }}
\r\n\r\n
{{ Model.Quote.convertAndRound(data.displayValue) | currency: Model.Quote.SelectedCurrencySymbol }}
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
{{ data.displayValue | currency: Model.Quote.SelectedCurrencySymbol }}
\r\n\r\n
\r\n {{ data.value + \" - \" + data.displayValue }}\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n \r\n
\r\n
\r\n\r\n\r\n\r\n\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
","import {\r\n Component,\r\n EventEmitter,\r\n Inject,\r\n Input,\r\n OnInit,\r\n Output,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport {\r\n ActivityModel,\r\n AddEquipmentComponent,\r\n EquipJobListSource,\r\n IAuthService,\r\n MakeModelSharedService,\r\n Module,\r\n ModuleService\r\n} from \"servicesight-shared\";\r\nimport { QuoteJobInstall } from \"../models/quote-job-install.model\";\r\nimport { QuotesService } from \"../services/quotes.service\";\r\nimport { ViewModelComponent } from \"../view-model-component.class\";\r\nimport { QuoteJobInstallViewModel } from \"../view-models/quote-job-install.viewmodel\";\r\n\r\n@Component({\r\n selector: \"app-quote-job-install\",\r\n templateUrl: \"./quote-job-install.component.html\",\r\n styleUrls: [\"./quote-job-install.component.scss\"]\r\n})\r\nexport class QuoteJobInstallComponent extends ViewModelComponent implements OnInit {\r\n @Input() public Model: QuoteJobInstallViewModel;\r\n @Output() public ModelChanged = new EventEmitter();\r\n @Output() public Changed: EventEmitter = new EventEmitter();\r\n\r\n\r\n public dataSource: QuoteJobInstall[];\r\n public activities: ActivityModel[];\r\n public makeModelDialogVisible: boolean = false;\r\n public displaySource: EquipJobListSource = EquipJobListSource.InstallTab;\r\n public selectedMakeModelIds: number[] = [];\r\n public makeModelStore: ODataStore;\r\n public selectedInstallIds: any[] = [];\r\n\r\n public isProEnabled: boolean;\r\n public isPortal: boolean;\r\n\r\n @ViewChild(\"InstallGrid\", { static: false }) installGrid: DxDataGridComponent;\r\n @ViewChild(\"addEquipmentComponent\", { static: true }) addEquipmentComponent: AddEquipmentComponent;\r\n\r\n private newInstallId: number = -1;\r\n private makeModelLookup: string[] = [];\r\n\r\n constructor(\r\n @Inject(\"AuthService\") authService: IAuthService,\r\n private moduleService: ModuleService,\r\n private quoteService: QuotesService,\r\n private makeModelService: MakeModelSharedService) {\r\n\r\n super();\r\n\r\n this.isPortal = authService.isPortalUser;\r\n\r\n this.moduleService.GetEnabledModules().subscribe(x => {\r\n this.isProEnabled = x.includes(Module.Pro);\r\n });\r\n\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.SetActivities();\r\n this.makeModelStore = this.makeModelService.GetMakeModelsDataStore();\r\n this.SetDataSource();\r\n }\r\n\r\n public OnEditorPreparing(e: any): void {\r\n if (e.name === \"qtyToInstall\" && e.row.data.EquipmentId) {\r\n e.editorOptions.disabled = true;\r\n }\r\n }\r\n\r\n public OnUpdateInstall(jobInstall: QuoteJobInstall): void {\r\n jobInstall.Charge = jobInstall.UnitPrice * jobInstall.QtyToInstall;\r\n this.Changed.emit();\r\n }\r\n\r\n public ActivitiesUpdated() {\r\n this.SetActivities();\r\n this.installGrid.instance.refresh();\r\n this.Changed.emit();\r\n }\r\n\r\n public SelectActivity(event: any, cellData: any): void {\r\n cellData.setValue(event);\r\n }\r\n\r\n public OpenNewEquipmentDialog() {\r\n this.addEquipmentComponent.Show();\r\n }\r\n\r\n public OpenNewMakeModelDialog() {\r\n this.makeModelDialogVisible = true;\r\n }\r\n\r\n public AddEquipments(shouldAdd: boolean) {\r\n if (shouldAdd) {\r\n const selectedEquipment = this.addEquipmentComponent.newEquipmentGrid.instance.getSelectedRowsData();\r\n selectedEquipment.forEach((value: any) => {\r\n this.Model.Model.push({\r\n EquipmentId: value.EquipId,\r\n EquipmentNumber: value.EquipNumber,\r\n MakeModelId: value.MakeModelId,\r\n UnitCost: value.Cost ?? 0,\r\n UnitPrice: value.Price ?? 0,\r\n QtyToInstall: 1,\r\n QuoteInstallId: this.newInstallId++,\r\n SalesQuotationId: 0,\r\n RevisionId: 0,\r\n Charge: value.price,\r\n WorkRequired: value.Notes\r\n });\r\n this.SetDataSource();\r\n this.Changed.emit();\r\n });\r\n }\r\n }\r\n\r\n public AddMakeModels(): void {\r\n // MakeModel modal only gives us Ids, so we need to pull each makemodel out of the store\r\n // And add it into our QuoteJobInstalls\r\n if (!this.selectedMakeModelIds.length){\r\n return;\r\n }\r\n\r\n Promise.all(this.selectedMakeModelIds.map(i => this.makeModelStore.byKey(i)))\r\n .then(makeModels => {\r\n let processed = 0;\r\n makeModels.forEach(makeModel => {\r\n this.quoteService.GetMakeModelPrice(this.Model.Quote.CustomerId, makeModel.MakeModelId)\r\n .subscribe((price: number) => {\r\n this.Model.Model.push({\r\n MakeModelId: makeModel.MakeModelId,\r\n EquipmentNumber: \"TBC\",\r\n SerialNo: \"TBC\",\r\n UnitCost: makeModel.Cost ?? 0,\r\n UnitPrice: price,\r\n QtyToInstall: 1,\r\n QuoteInstallId: this.newInstallId++,\r\n SalesQuotationId: 0,\r\n RevisionId: 0,\r\n Charge: price,\r\n WorkRequired: null\r\n });\r\n\r\n processed++;\r\n if (processed === this.selectedMakeModelIds.length) {\r\n this.SetDataSource();\r\n this.CloseMakeModelDialog();\r\n this.Changed.emit();\r\n }\r\n });\r\n });\r\n });\r\n }\r\n\r\n public CloseMakeModelDialog(): void {\r\n this.makeModelDialogVisible = false;\r\n this.selectedMakeModelIds = [];\r\n }\r\n\r\n public makeModelDisplayExpr(item): string {\r\n return item && item.Make + \" / \" + item.Model;\r\n }\r\n\r\n public OnDeleteInstalls(): void {\r\n this.Model.Model.remove(o => this.selectedInstallIds.includes(o.QuoteInstallId));\r\n this.SetDataSource();\r\n this.Changed.emit();\r\n }\r\n\r\n public MakeModelDataSource(makeModelId: number): string {\r\n if (!this.makeModelLookup[makeModelId]) {\r\n this.makeModelLookup[makeModelId] = \"loading\";\r\n this.makeModelStore.byKey(makeModelId).then(makeModel => {\r\n this.makeModelLookup[makeModelId] = `${makeModel.Make} / ${makeModel.Model}`;\r\n });\r\n }\r\n\r\n return this.makeModelLookup[makeModelId];\r\n }\r\n\r\n private SetDataSource(): void {\r\n this.dataSource = this.Model.Model.map(item => item);\r\n this.newInstallId = 1;\r\n const ids: Array = [];\r\n for (const item of this.Model.Model) {\r\n ids.push(item.QuoteInstallId);\r\n }\r\n if (ids.length > 0) {\r\n this.newInstallId = Math.max(...ids) + 1;\r\n }\r\n }\r\n\r\n private SetActivities(): void {\r\n this.activities = this.Model.Activities;\r\n this.DeleteLinkedInstalls();\r\n }\r\n\r\n private DeleteLinkedInstalls(): void {\r\n //Delete any install where linked activity no longer exists\r\n const installToDelete = [];\r\n this.Model.Model.forEach(l => {\r\n if (l.ActivityId !== null && !this.activities.find(a=>a.ActivityId === l.ActivityId)){\r\n installToDelete.push(l.QuoteInstallId);\r\n }\r\n });\r\n installToDelete.forEach(ld => this.Model.Model.remove(l=>l.QuoteInstallId === ld));\r\n }\r\n\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { IServiceSightCollection } from \"../../../quotes/models/IServiceSightCollection\";\r\nimport { IFullLabourRateModel } from \"../../models/ifull-labour-rate-model\";\r\nimport { ILabourProfile } from \"../../models/ilabour-profile.model\";\r\nimport { ILabourRate } from \"../../models/ilabour-rate.model\";\r\nimport { ILabourRateService } from \"../interfaces/ILabourRateService\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class LabourRateService implements ILabourRateService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) { }\r\n\r\n GetLabourRate(customerId: number): Observable {\r\n return this.http.get(`${this.appConfig.apiLocations.ServiceSight}LabourProfile/GetLabourRateFromCustomer?customerId=${customerId}`);\r\n }\r\n\r\n /**\r\n * Returns all labour rates for this user\r\n * /api/LabourRates/GetAllAsync\r\n */\r\n GetAllLabourRates(cost: boolean = false): Observable> {\r\n return this.http.get>(`${this.appConfig.apiLocations.ServiceSight}/LabourRate/GetAllAsync?cost=${cost}`);\r\n }\r\n\r\n GetCompleteLabourRates(cost?: boolean): Observable {\r\n return cost == null\r\n ? this.http.get(`${this.appConfig.apiLocations.ServiceSight}/LabourRate/GetComplete`)\r\n : this.http.get(`${this.appConfig.apiLocations.ServiceSight}/LabourRate/GetComplete?cost=${cost}`);\r\n }\r\n\r\n GetAllLabourProfiles(): Observable> {\r\n return this.http.get>(`${this.appConfig.apiLocations.ServiceSight}/LabourProfile/GetAllAsync?istimestamped=false`);\r\n }\r\n\r\n GetDefaultCostLabourRate(): Observable {\r\n return this.http.get(`${this.appConfig.apiLocations.ServiceSight}LabourRate/GetDefaultCostRate`);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n
{{ data.displayValue | currency: CurrencySymbol }}
\r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n","import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular/ui/data-grid\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ArrayStore from \"devextreme/data/array_store\";\r\nimport { IFullLabourRateModel } from \"../../models/ifull-labour-rate-model\";\r\nimport { LabourRateService } from \"../../services/labour-rate/labour-rate.service\";\r\n\r\n@Component({\r\n selector: \"app-labour-rate\",\r\n templateUrl: \"./labour-rate.component.html\",\r\n styleUrls: [\"./labour-rate.component.scss\"]\r\n})\r\nexport class LabourRateComponent implements OnInit {\r\n\r\n @Input() public ShowCosts: boolean = false;\r\n\r\n @Input() public ShowCharges: boolean = false;\r\n\r\n private customerId: number = null;\r\n\r\n @Input() public set CustomerId(value: number) {\r\n const valueChanged: boolean = value && value !== this.customerId;\r\n this.customerId = value;\r\n\r\n if (valueChanged && this.ShowAssignedRate) {\r\n this.labourRateService.GetLabourRate(value).subscribe(rate => this.assignedLabourRateId = rate.LabourRateId);\r\n }\r\n }\r\n\r\n public get CustomerId(): number {\r\n return this.customerId;\r\n }\r\n\r\n @Input() public CurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n\r\n public SelectedIds: number[] = [];\r\n\r\n @Input() set SelectedRates(value: number[]) {\r\n this.SelectedIds = value;\r\n }\r\n\r\n @Output() SelectedRatesChange: EventEmitter = new EventEmitter();\r\n\r\n @ViewChild(\"LabourRateGrid\", { static: false }) LabourRateGrid: DxDataGridComponent;\r\n\r\n public AvailableRates: DataSource;\r\n\r\n public SearchText: string = \"\";\r\n\r\n private assignedLabourRateId: number = null;\r\n\r\n public constructor(private labourRateService: LabourRateService) {\r\n }\r\n\r\n public ngOnInit(): void {\r\n // show both costs and charges if both flags are true or both flags are false (i.e. no attribute selected)\r\n const searchOption: boolean = (this.ShowCosts && this.ShowCharges) || (!this.ShowCosts && !this.ShowCharges)\r\n ? null\r\n : this.ShowCosts;\r\n this.labourRateService.GetCompleteLabourRates(searchOption).subscribe(rates => {\r\n this.AvailableRates = new DataSource({\r\n store: new ArrayStore({\r\n key: \"LabourID\",\r\n data: rates\r\n })\r\n });\r\n });\r\n }\r\n\r\n public get ShowAssignedRate(): boolean {\r\n return (!this.ShowCosts && !this.ShowCharges) || this.ShowCharges;\r\n }\r\n\r\n public OnSelectionChanged(data: any): void {\r\n this.SelectedRatesChange.emit(data.selectedRowKeys);\r\n }\r\n\r\n public IsAssignedRate(labourRate: IFullLabourRateModel): boolean {\r\n return !labourRate.Cost && labourRate.LabourID === this.assignedLabourRateId;\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.LabourRateGrid.instance.searchByText(this.SearchText);\r\n }\r\n}\r\n","import { Component, EventEmitter, Input, Output, ViewChild } from \"@angular/core\";\r\nimport { LabourRateComponent } from \"../labour-rate/labour-rate.component\";\r\n\r\n@Component({\r\n selector: \"app-labour-rate-dialog\",\r\n templateUrl: \"./labour-rate-dialog.component.html\"\r\n})\r\nexport class LabourRateDialogComponent {\r\n\r\n @Input() public ShowCosts: boolean = false;\r\n\r\n @Input() public ShowCharges: boolean = false;\r\n\r\n @Input() public CustomerId: number = null;\r\n\r\n @Input() public CurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n\r\n @Output() public OnSaveSelection: EventEmitter = new EventEmitter();\r\n\r\n @Output() public OnDismiss: EventEmitter = new EventEmitter();\r\n\r\n @ViewChild(\"labourComponent\", { static: false }) labourComponent: LabourRateComponent;\r\n\r\n public SelectedRates: number[] = [];\r\n\r\n private showDialog: boolean = false;\r\n\r\n public get DialogOpen(): boolean {\r\n return this.showDialog;\r\n }\r\n\r\n public get SelectButtonDisabled(): boolean {\r\n return !(this.SelectedRates && this.SelectedRates.length);\r\n }\r\n\r\n public SaveSelection(): void {\r\n this.showDialog = false;\r\n this.OnSaveSelection.emit(this.SelectedRates);\r\n }\r\n\r\n public Dismiss(): void {\r\n this.showDialog = false;\r\n this.OnDismiss.emit();\r\n }\r\n\r\n public Show(clear: boolean = true): void {\r\n if (clear) {\r\n this.SelectedRates = [];\r\n }\r\n\r\n this.showDialog = true;\r\n }\r\n\r\n public Hide(): void {\r\n this.showDialog = false;\r\n }\r\n}\r\n","\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n","import { EventEmitter, SimpleChanges } from \"@angular/core\";\r\nimport { CollectionViewModel } from \"servicesight-shared\";\r\n\r\nexport abstract class ViewModelComponent,T2> {\r\n abstract Model: T;\r\n\r\n abstract ModelChanged: EventEmitter;\r\n\r\n public onChanges(changes: SimpleChanges) {\r\n if (changes.Model) {\r\n this.Model.ModelChanged = () => this.ModelChanged.emit(this.Model);\r\n }\r\n };\r\n}\r\n","import { CollectionViewModel, FormMessage, ActivityModel } from \"servicesight-shared\";\r\nimport { QuoteViewModel } from \"./quote.viewmodel\";\r\nimport { QuoteJobLabour } from \"../models/quote-job-labour.model\";\r\nimport { QuoteJobActivityToActivityModelConverter } from \"../models/quote-job-activity.model\";\r\n\r\nexport class QuoteJobLabourViewModel extends CollectionViewModel {\r\n ModelChanged: () => void;\r\n\r\n\r\n constructor(data: QuoteJobLabour[] = null, public Quote: QuoteViewModel = null) {\r\n super(data ?? []);\r\n }\r\n\r\n public Validate(): FormMessage[] {\r\n return [];\r\n }\r\n\r\n public get Total(): number {\r\n return this.Model\r\n .reduce((total, current) => total + (Number(current.Rate) * Number(current.Units) * Number(current.Multiplier)), 0);\r\n }\r\n\r\n public get DisplayTotal(): number {\r\n return this.Model\r\n .reduce((total, current) => total + (this.Quote.convertAndRound(Number(current.Rate)) * Number(current.Units) * Number(current.Multiplier)), 0);\r\n }\r\n\r\n public get Activities(): ActivityModel[] {\r\n return this.Quote.Job?.Activities?.Model?.map(QuoteJobActivityToActivityModelConverter);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n

{{ 'quote.job.labour.costs' | translate }}

\r\n

{{ 'quote.job.labour.charges' | translate }}

\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n
\r\n {{ data.value | currency: Model.Quote.BaseCurrencySymbol }}\r\n {{ Model.Quote.convertAndRound(data.displayValue) | currency: Model.Quote.SelectedCurrencySymbol }}\r\n
\r\n\r\n
\r\n {{ data.value | currency: Model.Quote.BaseCurrencySymbol }}\r\n {{ data.displayValue | currency: Model.Quote.SelectedCurrencySymbol }}\r\n
\r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n {{ data.value + \" - \" + data.displayValue }}\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n","import { formatCurrency } from \"@angular/common\";\r\nimport {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { LabourRateDialogComponent } from \"../../shared/components/labour-rate-dialog/labour-rate-dialog.component\";\r\nimport { ODataService } from \"../../shared/services/odata/odata.service\";\r\nimport { ViewModelComponent } from \"../collection-view-model-component.class\";\r\nimport { QuoteJobLabour } from \"../models/quote-job-labour.model\";\r\nimport { QuotesService } from \"../services/quotes.service\";\r\nimport { QuoteJobLabourViewModel } from \"../view-models/quote-job-labour.viewmodel\";\r\nimport { ActivityModel } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-quote-job-labour\",\r\n templateUrl: \"./quote-job-labour.component.html\",\r\n styleUrls: [\"./quote-job-labour.component.scss\"]\r\n})\r\nexport class QuoteJobLabourComponent extends ViewModelComponent implements OnInit, OnChanges {\r\n\r\n @Input() public IsCost: boolean = false;\r\n @Input() public Model: QuoteJobLabourViewModel = new QuoteJobLabourViewModel([], null);\r\n\r\n @Output() public ModelChanged: EventEmitter = new EventEmitter();\r\n\r\n @Output() public Changed: EventEmitter = new EventEmitter();\r\n @ViewChild(\"labourRateDialog\", { static: false }) labourRateDialog: LabourRateDialogComponent;\r\n @ViewChild(\"RatesGrid\", { static: false }) labourGrid: DxDataGridComponent;\r\n\r\n public selectedRates: number[] = [];\r\n public AddedLabourIds: number[] = [];\r\n\r\n public LabourListDataSource: DataSource;\r\n public LabourListDataStore: ODataStore;\r\n\r\n public activities: ActivityModel[];\r\n\r\n private newLabourId: number = -1;\r\n\r\n public get IsSelectedLabourRate(): boolean {\r\n return this.selectedRates.length > 0;\r\n }\r\n\r\n public get CurrencyFormat(): string {\r\n return this.Model.Quote.SelectedCurrencySymbol + \"#,##0.00\";\r\n }\r\n\r\n constructor(\r\n private odataService: ODataService,\r\n private quoteService: QuotesService) {\r\n super();\r\n this.TotalCurrencyFormatter = this.TotalCurrencyFormatter.bind(this);\r\n this.CalculateTotal = this.CalculateTotal.bind(this);\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.Model.currentValue) {\r\n this.SetupListDataSource();\r\n }\r\n this.onChanges(changes);\r\n if (changes.Model.currentValue) {\r\n this.SetupListDataSource();\r\n }\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.SetActivities();\r\n this.LabourListDataStore = this.quoteService.GetLabourStore();\r\n this.SetupListDataSource();\r\n }\r\n\r\n public OnRemoveSelectedRates(): void {\r\n if (this.selectedRates.length > 0) {\r\n this.Model.Model.remove(rate => this.selectedRates.includes(rate.QuoteLabourId));\r\n this.SetupListDataSource();\r\n this.Changed.emit();\r\n }\r\n }\r\n\r\n public ShowRateSelectionDialog(): void {\r\n this.labourRateDialog.Show();\r\n }\r\n\r\n public OnLabourRateAdded(): void {\r\n const selectedRates = this.labourRateDialog.labourComponent.LabourRateGrid.instance.getSelectedRowsData();\r\n selectedRates.forEach((labour) => {\r\n const rate: QuoteJobLabour = {\r\n SalesQuotationId: 0,\r\n RevisionId: 0,\r\n QuoteLabourId: this.newLabourId--,\r\n LabourRateId: labour.LabourID,\r\n Rate: labour.StdHours,\r\n Units: 1,\r\n Multiplier: 1,\r\n ActivityId: null\r\n };\r\n this.Model.Model.push(rate);\r\n });\r\n this.SetupListDataSource();\r\n this.Changed.emit();\r\n }\r\n\r\n public OnRatesUpdated(labourData: QuoteJobLabour): void {\r\n const labourToUpdate: QuoteJobLabour = this.Model.Model.find(rate => rate.QuoteLabourId === labourData.QuoteLabourId);\r\n if (labourToUpdate) {\r\n // update quantity and price\r\n labourToUpdate.Rate = labourData.Rate;\r\n labourToUpdate.Units = labourData.Units;\r\n labourToUpdate.Multiplier = labourData.Multiplier;\r\n this.Changed.emit();\r\n }\r\n }\r\n\r\n public CalculateTotal(rowData: QuoteJobLabour): number {\r\n return !this.IsCost\r\n ? this.Model.Quote.convertAndRound(rowData.Rate) * rowData.Units * rowData.Multiplier\r\n : rowData.Rate * rowData.Units * rowData.Multiplier;\r\n }\r\n\r\n public TotalCurrencyFormatter(data: { value: number }): string {\r\n const currencySymbol = this.IsCost ? this.Model.Quote.BaseCurrencySymbol : this.Model.Quote.SelectedCurrencySymbol;\r\n const value: number = this.IsCost ? data.value : this.Model.Quote.Job.DisplayTotalLabour;\r\n\r\n return formatCurrency(value,\r\n JSON.parse(localStorage.getItem(\"ls.UserBrowserLocale\")),\r\n currencySymbol);\r\n }\r\n\r\n public Repaint(): void {\r\n this.labourGrid.instance.repaint();\r\n }\r\n\r\n public ActivitiesUpdated() {\r\n this.SetActivities();\r\n this.labourGrid.instance.refresh();\r\n this.Changed.emit();\r\n }\r\n\r\n public SelectActivity(event: any, cellData: any): void {\r\n cellData.setValue(event);\r\n }\r\n\r\n private SetActivities(): void {\r\n this.activities = this.Model.Activities;\r\n this.DeleteLinkedLabour();\r\n this.SetupListDataSource();\r\n }\r\n\r\n private DeleteLinkedLabour(): void {\r\n //Delete any labour where linked activity no longer exists\r\n const labourToDelete = [];\r\n this.Model.Model.forEach(l => {\r\n if (l.ActivityId !== null && !this.activities.find(a=>a.ActivityId === l.ActivityId)){\r\n labourToDelete.push(l.QuoteLabourId);\r\n }\r\n });\r\n labourToDelete.forEach(ld => this.Model.Model.remove(l=>l.QuoteLabourId === ld));\r\n }\r\n\r\n private SetupListDataSource(): void {\r\n this.LabourListDataSource = this.odataService.GetDataSourceWithLookups(\r\n this.Model.Model.map(item => item),\r\n \"QuoteLabourId\",\r\n [\r\n {\r\n store: this.LabourListDataStore,\r\n dataKey: \"LabourRateId\",\r\n lookupKey: \"LabourID\",\r\n displayExprs: [ \"Name\" ]\r\n }\r\n ]);\r\n }\r\n}\r\n","
\r\n
\r\n

\r\n {{ 'label.materials' | translate }}\r\n {{ 'quote.materials.total' | translate: { value: (Model.DisplayTotal | currency: Model.Quote.SelectedCurrencySymbol) } }}\r\n \r\n {{ 'quotes.profit' | translate: { value: ( Model.Profit | currency: Model.Quote.BaseCurrencySymbol), percent: ( Model.Total | quotePercent: Model.Profit) } }}\r\n \r\n

\r\n
\r\n \r\n \r\n
\r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n
\r\n {{ MiscTypeDataSource(t.data.MiscTypeID) }}\r\n
\r\n\r\n
\r\n {{ (charge.data.Cost ? charge.data.Cost : 0) | currency: Model.BaseCurrencySymbol}}\r\n
\r\n\r\n
{{ Model.Quote.convertAndRound(data.value) | currency: Model.Quote.SelectedCurrencySymbol }}
\r\n \r\n\r\n
\r\n
\r\n\r\n\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { JobMiscDialogComponent } from \"src/app/shared/components/job-misc-dialog/job-misc-dialog.component\";\r\nimport { MaterialTypeService } from \"src/app/shared/services/material-type/material-type.service\";\r\nimport { QuoteSummaryType } from \"../enums/quote-summary-type.enum\";\r\nimport { QuoteMaterial } from \"../models/quote-material.model\";\r\nimport { ViewModelComponent } from \"../view-model-component.class\";\r\nimport { QuoteMaterialsViewModel } from \"../view-models/materials/quote-materials.viewmodel\";\r\n\r\n@Component({\r\n selector: \"app-quote-materials\",\r\n templateUrl: \"./quote-materials.component.html\",\r\n styleUrls: [\"./quote-materials.component.scss\"]\r\n})\r\nexport class QuoteMaterialsComponent extends ViewModelComponent implements OnChanges {\r\n\r\n @Input() public Model: QuoteMaterialsViewModel;\r\n @Input() public Situation: QuoteSummaryType = QuoteSummaryType.Job;\r\n @Output() public ModelChanged = new EventEmitter();\r\n\r\n @ViewChild(\"AddMaterialDialog\") addMaterialDialog: JobMiscDialogComponent;\r\n @ViewChild(\"quoteMaterialsGrid\", { static: false }) quoteMaterialsGrid: DxDataGridComponent;\r\n public miscTypes: ODataStore;\r\n private miscTypeLookup: string[] = [];\r\n public selectedMaterialIds: any[] = [];\r\n public dataSource: QuoteMaterial[];\r\n public parentType = QuoteSummaryType;\r\n\r\n private newMiscId: number = -1;\r\n\r\n public constructor(private materialType: MaterialTypeService) {\r\n super();\r\n this.miscTypes = this.materialType.GetMaterialTypeStore();\r\n this.OnEditMaterialJob = this.OnEditMaterialJob.bind(this);\r\n this.OnEditMaterial = this.OnEditMaterial.bind(this);\r\n this.ActivityCustomizedText = this.ActivityCustomizedText.bind(this);\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if(changes.Model.currentValue) {\r\n this.SetDataSource();\r\n }\r\n this.onChanges(changes);\r\n }\r\n\r\n public OnAddMaterials(): void {\r\n this.addMaterialDialog.Show(false);\r\n }\r\n\r\n public MiscTypeDataSource(miscTypeId: number): string {\r\n if (!this.miscTypeLookup[miscTypeId]) {\r\n this.miscTypeLookup[miscTypeId] = \"loading\";\r\n this.miscTypes.byKey(miscTypeId).then(miscType => {\r\n this.miscTypeLookup[miscTypeId] = miscType.Name;\r\n });\r\n }\r\n\r\n return this.miscTypeLookup[miscTypeId];\r\n }\r\n\r\n public OnEditMaterialJob(e): void {\r\n const materialData = e.row.data as QuoteMaterial;\r\n\r\n const materialToUpdate = {\r\n MiscID: materialData.MiscID,\r\n MiscTypeID: materialData.MiscTypeID,\r\n Charge: materialData.Charge,\r\n Cost: materialData.Cost,\r\n Description: materialData.Description,\r\n ActivityId: materialData.ActivityId\r\n };\r\n\r\n this.addMaterialDialog.ShowEdit(materialToUpdate, false);\r\n }\r\n\r\n public OnEditMaterial(event: Event, material: QuoteMaterial): boolean {\r\n event.preventDefault();\r\n\r\n if(this.Model.TypeEnabled && !this.Model.Quote.IsQuoteLostOrWon && !this.Model.Quote.IsQuoteQuoted) {\r\n const materialToUpdate = {\r\n MiscID: material.MiscID,\r\n MiscTypeID: material.MiscTypeID,\r\n Charge: material.Charge,\r\n Cost: material.Cost,\r\n Description: material.Description\r\n };\r\n\r\n this.addMaterialDialog.ShowEdit(materialToUpdate, false);\r\n }\r\n return false;\r\n }\r\n\r\n public ActivityCustomizedText(cell): string {\r\n if (cell.value && this.Model.Activities) {\r\n const activity = this.Model.Activities.find(x => x.ActivityId === cell.value);\r\n\r\n return `${activity.ActivityId} - ${activity.Description}`;\r\n }\r\n return \"\";\r\n }\r\n\r\n public AddMaterials(misc: any): void {\r\n const newMisc: QuoteMaterial = {\r\n MiscTypeID: misc.MiscTypeID,\r\n Description: misc.Description,\r\n Charge: misc.Charge,\r\n Cost: misc.Cost,\r\n ActivityId: misc.ActivityId\r\n };\r\n\r\n if (misc.MiscID) {\r\n const miscToUpdateIndex = this.Model.Model.findIndex(material => material.MiscID === misc.MiscID);\r\n\r\n if (miscToUpdateIndex >= 0) {\r\n newMisc.MiscID = misc.MiscID;\r\n this.Model.Model[miscToUpdateIndex] = newMisc;\r\n }\r\n } else {\r\n newMisc.MiscID = this.newMiscId--;\r\n this.Model.Model.push(newMisc);\r\n }\r\n\r\n this.SetDataSource();\r\n }\r\n\r\n public OnUpdateMaterial(): void {\r\n this.ModelChanged.emit(this.Model);\r\n }\r\n\r\n public OnDeleteMaterials(): void {\r\n this.Model.Model.remove(o => this.selectedMaterialIds.includes(o.MiscID));\r\n this.SetDataSource();\r\n }\r\n\r\n public ActivitiesUpdated() {\r\n this.SetActivities();\r\n this.SetDataSource();\r\n this.quoteMaterialsGrid.instance.refresh();\r\n }\r\n\r\n public get EditingEnabled(): boolean {\r\n return this.Model?.EditingEnabled(this.Situation) ?? false;\r\n }\r\n\r\n private SetActivities(): void {\r\n this.DeleteLinkedMaterials();\r\n this.ModelChanged.emit();\r\n }\r\n\r\n private DeleteLinkedMaterials(): void {\r\n //Delete any materials where linked activity no longer exists\r\n const materialsToDelete = [];\r\n this.Model.Model.forEach(m => {\r\n if (m.ActivityId && m.MiscID !== null && !this.Model.Activities.find(a=>a.ActivityId === m.ActivityId)){\r\n materialsToDelete.push(m.MiscID);\r\n }\r\n });\r\n materialsToDelete.forEach(md => this.Model.Model.remove(m=>m.MiscID === md));\r\n }\r\n\r\n private SetDataSource(): void {\r\n this.dataSource = this.Model.Model.map(item => item);\r\n }\r\n}\r\n","import { CollectionViewModel, FormMessage, ActivityModel } from \"servicesight-shared\";\r\nimport { QuoteViewModel } from \"./quote.viewmodel\";\r\nimport { QuoteSummaryType } from \"../enums/quote-summary-type.enum\";\r\nimport { QuoteTab } from \"../enums/quote-tab.enum\";\r\nimport { QuoteJobPart } from \"../models/quote-job-part.model\";\r\nimport { QuoteJobActivityToActivityModelConverter } from \"../models/quote-job-activity.model\";\r\n\r\nexport class QuotePartsViewModel extends CollectionViewModel {\r\n\r\n public get ProEnabled(): boolean {\r\n return this.Quote?.ModuleAccess?.ProEnabled;\r\n }\r\n\r\n public get TotalPrice(): number {\r\n return this.Model.reduce((total, part) => total += (part.Price * part.Qty), 0);\r\n }\r\n\r\n public get TotalDisplayPrice(): number {\r\n return this.Model.reduce((total, part) => total += (this.Quote.convertAndRound(part.Price) * part.Qty), 0);\r\n }\r\n\r\n public get TotalCost(): number {\r\n return this.Model.reduce((total, part) => total += (part.Cost * part.Qty), 0);\r\n }\r\n\r\n public get TotalProfit(): number {\r\n return this.TotalPrice - this.TotalCost;\r\n }\r\n\r\n public AddingDisabled(situation: QuoteSummaryType): boolean {\r\n // don't allow adding if the quote is already lost or won, or if the current tab is not quoted for\r\n return this.Quote.IsQuoteLostOrWon || this.Quote.IsQuoteQuoted || !this.PartsEnabledForSituation(situation);\r\n }\r\n\r\n public RemovingDisabled(situation: QuoteSummaryType, selectedPartIds: number[]): boolean {\r\n // don't allow removing if the quote is already lost or won, or if the current tab is not quoted for or there is nothing to remove\r\n return this.Quote.IsQuoteLostOrWon || this.Quote.IsQuoteQuoted || !this.PartsEnabledForSituation(situation) || (selectedPartIds?.length ?? 0) === 0;\r\n }\r\n\r\n public EditingEnabled(situation: QuoteSummaryType): boolean {\r\n return !this.AddingDisabled(situation) && this.IsBaseCurrency;\r\n }\r\n\r\n public get QuoteHasCustomers(): boolean {\r\n return this.Quote?.Model?.CustomerId != null;\r\n }\r\n\r\n private get IsBaseCurrency(): boolean {\r\n return this.Quote?.SelectedCurrencyCode === this.Quote?.Model?.BaseCurrencyCode;\r\n }\r\n\r\n constructor(data: QuoteJobPart[] = null, public Quote: QuoteViewModel = null) {\r\n super(data ?? []);\r\n }\r\n\r\n public get Activities(): ActivityModel[] {\r\n return this.Quote.Job?.Activities?.Model?.map(QuoteJobActivityToActivityModelConverter);\r\n }\r\n\r\n public Validate(): FormMessage[] {\r\n return [];\r\n }\r\n\r\n public get CurrentTab(): QuoteTab {\r\n return this.Quote.CurrentTab;\r\n }\r\n\r\n public set CurrentTab(value: QuoteTab) {\r\n this.Quote.CurrentTab = value;\r\n }\r\n\r\n // returns true if quotes are enabled for the situation (i.e. which tab) this component is on\r\n private PartsEnabledForSituation(situation: QuoteSummaryType): boolean {\r\n let result: boolean = false;\r\n switch(situation) {\r\n case QuoteSummaryType.Contract:\r\n result = this.Quote?.QuoteForContract;\r\n break;\r\n case QuoteSummaryType.Job:\r\n result = this.Quote?.QuoteForJob;\r\n break;\r\n case QuoteSummaryType.SalesOrder:\r\n result = this.Quote?.QuoteForSalesOrder;\r\n break;\r\n }\r\n return result;\r\n }\r\n}\r\n","
\r\n
\r\n

\r\n {{ 'quotes.parts' | translate }}\r\n \r\n {{ 'quote.parts.total' | translate: { value: ( Model.TotalDisplayPrice | currency: Model.Quote.SelectedCurrencySymbol) } }}\r\n \r\n \r\n {{ 'quotes.profit' | translate: { value: ( Model.TotalProfit | currency: Model.Quote.BaseCurrencySymbol), percent: ( Model.TotalPrice | quotePercent: Model.TotalProfit) } }}\r\n \r\n

\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n
{{ Model.Quote.convertAndRound(data.displayValue) | currency: Model.Quote.SelectedCurrencySymbol }}
\r\n\r\n
{{ data.displayValue | currency: Model.Quote.SelectedCurrencySymbol }}
\r\n\r\n
{{ data.displayValue * data.data.Qty | currency: Model.Quote.BaseCurrencySymbol }}
\r\n\r\n \r\n\r\n
\r\n {{ data.value + \" - \" + data.displayValue }}\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n \r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\n\r\nimport { Component, Input, Output, EventEmitter, OnInit, OnChanges, ViewChild, SimpleChanges } from \"@angular/core\";\r\nimport { AddPartDialogueComponent } from \"../../shared/components/add-part-dialogue/add-part-dialogue.component\";\r\nimport { StockService } from \"../../stock/services/stock.service\";\r\nimport { ViewModelComponent } from \"../view-model-component.class\";\r\nimport { QuoteJobPart } from \"../models/quote-job-part.model\";\r\nimport { QuotePartsViewModel } from \"../view-models/quote-parts.viewmodel\";\r\nimport { ODataService } from \"../../shared/services/odata/odata.service\";\r\nimport { QuoteJobPartsService } from \"../../quotes/services/quote-job-parts-service.service\";\r\nimport { StockState } from \"../../stock/models/enums/stock-state.enum\";\r\nimport { map } from \"rxjs/operators\";\r\nimport { Observable, forkJoin } from \"rxjs\";\r\nimport { QuoteSummaryType } from \"../enums/quote-summary-type.enum\";\r\nimport { QuoteTab } from \"../enums/quote-tab.enum\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport { ActivityModel } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-quote2-parts\",\r\n templateUrl: \"./quote-parts.component.html\",\r\n styleUrls: [\"./quote-parts.component.scss\"]\r\n})\r\nexport class QuotePartsComponent extends ViewModelComponent implements OnInit, OnChanges {\r\n @Input() public Model: QuotePartsViewModel = new QuotePartsViewModel([], null);\r\n\r\n @Output() public ModelChanged: EventEmitter = new EventEmitter();\r\n\r\n @Input() public Situation: QuoteSummaryType = QuoteSummaryType.Job;\r\n\r\n @Output() public Changed: EventEmitter = new EventEmitter();\r\n\r\n @ViewChild(AddPartDialogueComponent, { static: true }) AddPartDialog: AddPartDialogueComponent;\r\n @ViewChild(\"PartGrid\", { static: false }) partGrid: DxDataGridComponent;\r\n\r\n public SelectedParts: number[] = [];\r\n\r\n public AddedPartIds: number[] = [];\r\n\r\n public ShowCustomerRequiredMessage: boolean = false;\r\n\r\n public PartsDataSource: DataSource;\r\n public PartsDataStore: ODataStore;\r\n public PartsListDataSource: DataSource;\r\n public activities: ActivityModel[];\r\n public parentType = QuoteSummaryType;\r\n\r\n constructor(\r\n private stockService: StockService,\r\n private odataService: ODataService,\r\n private quotePartService: QuoteJobPartsService) {\r\n super();\r\n this.CalculateCharge = this.CalculateCharge.bind(this);\r\n }\r\n\r\n public get CurrencyFormat(): string {\r\n return this.Model.Quote.SelectedCurrencySymbol + \"#,##0.00\";\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.Model.currentValue) {\r\n this.SetupListDataSource();\r\n }\r\n this.onChanges(changes);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.SetActivities();\r\n\r\n this.PartsDataStore = this.stockService.GetStockHeaders();\r\n this.PartsDataSource = this.stockService.GetStockStorePartsDataSource();\r\n\r\n this.SetupListDataSource();\r\n }\r\n\r\n public OnRemoveSelectedParts(): void {\r\n if (this.SelectedParts.length > 0) {\r\n this.Model.Model.remove(part => this.SelectedParts.indexOf(part.QuotePartId) >= 0);\r\n this.SetupListDataSource();\r\n this.Changed.emit();\r\n }\r\n }\r\n\r\n public OnAddParts(): void {\r\n if (this.Model.QuoteHasCustomers) {\r\n this.AddPartDialog.Show();\r\n } else {\r\n this.ShowCustomerRequiredMessage = true;\r\n }\r\n }\r\n\r\n public OnPartsAdded(stockIds: { StockHeaderId: number; StoreId: number }[]): void {\r\n const getPartObservables: Observable[] = stockIds\r\n .map(stockId => this.quotePartService.GetPrice(stockId.StockHeaderId, this.Model.Quote.CustomerId)\r\n .pipe(map((price) => {\r\n // create an object to write pack to the parts for the quote\r\n const part: QuoteJobPart = {\r\n SalesQuotationId: 0,\r\n RevisionId: 0,\r\n // generate unique but negative quote part id - negative means it is a new part\r\n QuotePartId: new Date().getMilliseconds() * -1,\r\n StockHeaderId: stockId.StockHeaderId,\r\n StockState: StockState.New,\r\n Qty: 1,\r\n Cost: price.Cost,\r\n Price: price.Price,\r\n ActivityId: null\r\n };\r\n\r\n return part;\r\n })\r\n ));\r\n\r\n forkJoin(getPartObservables).subscribe(parts => {\r\n this.Model.Model.push(...parts);\r\n this.SetupListDataSource();\r\n this.Changed.emit();\r\n });\r\n }\r\n\r\n public OnPartUpdated(partData: QuoteJobPart): void {\r\n const partToUpdate: any = this.Model.Model.find(part => part.QuotePartId === partData.QuotePartId);\r\n\r\n if (partToUpdate) {\r\n // update quantity and price\r\n partToUpdate.Qty = partData.Qty;\r\n partToUpdate.Price = partData.Price;\r\n this.Changed.emit();\r\n }\r\n }\r\n\r\n public CalculateCharge(rowData: QuoteJobPart): number {\r\n return rowData.Qty * this.Model.Quote.convertAndRound(rowData.Price);\r\n }\r\n\r\n public OnHideCustomerRequiredMessage(): void {\r\n this.Model.CurrentTab = QuoteTab.Details;\r\n }\r\n\r\n public get AddingDisabled(): boolean {\r\n return this.Model?.AddingDisabled(this.Situation);\r\n }\r\n\r\n public get RemovingDisabled(): boolean {\r\n return this.Model?.RemovingDisabled(this.Situation, this.SelectedParts);\r\n }\r\n\r\n public get EditingEnabled(): boolean {\r\n return this.Model?.EditingEnabled(this.Situation) ?? false;\r\n }\r\n\r\n public ActivitiesUpdated() {\r\n this.SetActivities();\r\n this.partGrid.instance.refresh();\r\n this.Changed.emit();\r\n }\r\n\r\n public SelectActivity(event: any, cellData: any): void {\r\n cellData.setValue(event);\r\n }\r\n\r\n private SetActivities(): void {\r\n this.activities = this.Model.Activities;\r\n this.DeleteLinkedParts();\r\n this.SetupListDataSource();\r\n }\r\n\r\n private DeleteLinkedParts(): void {\r\n //Delete any parts where linked activity no longer exists\r\n const partsToDelete = [];\r\n this.Model.Model.forEach(p => {\r\n if (p.ActivityId !== null && !this.activities.find(a=>a.ActivityId === p.ActivityId)){\r\n partsToDelete.push(p.QuotePartId);\r\n }\r\n });\r\n partsToDelete.forEach(pd => this.Model.Model.remove(p=>p.QuotePartId === pd));\r\n }\r\n\r\n private SetupListDataSource(): void {\r\n this.PartsListDataSource = this.odataService.GetDataSourceWithLookups(\r\n this.Model.Model.map(item => item),\r\n \"QuotePartId\",\r\n [\r\n {\r\n store: this.PartsDataStore,\r\n dataKey: \"StockHeaderId\",\r\n lookupKey: \"StockHeaderId\",\r\n displayExprs: [ \"PartNo\", \"Description\" ]\r\n }\r\n ]);\r\n }\r\n}\r\n","import { CollectionViewModel, FormMessage } from \"servicesight-shared\";\r\nimport { QuoteViewModel } from \"./quote.viewmodel\";\r\nimport { QuoteJobRefrigerant } from \"../models/quote-job-refrigerant.model\";\r\n\r\nexport class QuoteRefrigerantViewModel extends CollectionViewModel {\r\n ModelChanged: () => void;\r\n\r\n public get Total(): number {\r\n return this.Model\r\n .reduce((total, current) => total + (Number(current.Price) * Number(current.Qty)), 0);\r\n }\r\n\r\n public get DisplayTotal(): number {\r\n return this.Model\r\n .reduce((total, current) => total + (this.Quote.convertAndRound(Number(current.Price)) * Number(current.Qty)), 0);\r\n }\r\n\r\n public get Profit(): number {\r\n return this.Model\r\n .reduce((total, current) => total + (Number(current.Price) * Number(current.Qty) - Number(current.Cost) * Number(current.Qty)) , 0);\r\n }\r\n\r\n public get CostsVisible(): boolean {\r\n return this.Quote?.ModuleAccess?.ProEnabled;\r\n }\r\n\r\n public get EquipmentEnabled(): boolean {\r\n return this.Quote?.ModuleAccess?.EquipmentEnabled;\r\n }\r\n\r\n public get UseCustomerCurrency(): boolean {\r\n return this.Quote.UseCustomerCurrency;\r\n }\r\n\r\n public get SelectedCurrencySymbol(): string {\r\n return this.Quote.SelectedCurrencySymbol;\r\n }\r\n\r\n public get BaseCurrencySymbol(): string {\r\n return this.Quote.BaseCurrencySymbol;\r\n }\r\n\r\n public get EditingEnabled(): boolean {\r\n return !this.Quote.IsQuoteLostOrWon && !this.Quote.IsQuoteQuoted && this.Quote.QuoteForJob;\r\n }\r\n\r\n public get AllowUpdating(): boolean {\r\n return !this.Quote.UseCustomerCurrency && this.EditingEnabled;\r\n }\r\n\r\n constructor(data: QuoteJobRefrigerant[] = null, public Quote: QuoteViewModel = null) {\r\n super(data ?? []);\r\n }\r\n\r\n public Validate(): FormMessage[] {\r\n return [];\r\n }\r\n\r\n}\r\n","\r\n
\r\n
\r\n

\r\n {{ 'quote.job.refrigerant.refrigerants' | translate }}\r\n {{ 'quote.refrigerants.total' | translate: { value: Model.DisplayTotal | currency: Model.SelectedCurrencySymbol } }}\r\n {{ 'quotes.profit' | translate: { value: (Model.Profit | currency: Model.BaseCurrencySymbol), percent: RefrigerantsProfitPercentage } }}\r\n

\r\n
\r\n
\r\n \r\n {{ 'buttons.remove' | translate }}\r\n \r\n \r\n {{ 'quote.job.refrigerant.add-refrigerant' | translate }}\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n \r\n
{{ Model.Quote.convertAndRound(data.displayValue) | currency: Model.SelectedCurrencySymbol }}
\r\n
{{ Model.Quote.convertAndRound(data.data.Price) * data.data.Qty | currency: Model.SelectedCurrencySymbol }}
\r\n
{{ data.displayValue | currency: Model.BaseCurrencySymbol }}
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
{{ EquipmentListItem(data) }}
\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport CustomStore from \"devextreme/data/custom_store\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { Orientation } from \"servicesight-components\";\r\nimport { SettingData, SettingId, SettingsService } from \"servicesight-shared\";\r\nimport { AddCylinderDialogComponent } from \"src/app/shared/components/add-cylinder-dialog/add-cylinder-dialog.component\";\r\nimport { RefrigerantTypeViewItem } from \"src/app/shared/components/add-cylinder-dialog/refrigerantTypeViewItem\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\nimport { RefrigerantTypeViewService } from \"../../f-gas/services/refrigerant-type-view.service\";\r\nimport { QuoteTab } from \"../enums/quote-tab.enum\";\r\nimport { QuoteJobRefrigerant } from \"../models/quote-job-refrigerant.model\";\r\nimport { QuotePercentPipe } from \"../pipes/quote-percent.pipe\";\r\nimport { ViewModelComponent } from \"../view-model-component.class\";\r\nimport { QuoteRefrigerantViewModel } from \"../view-models/quote-refrigerant.viewmodel\";\r\n\r\n@Component({\r\n selector: \"app-quote-refrigerant\",\r\n templateUrl: \"./quote-refrigerant.component.html\",\r\n styleUrls: [\"./quote-refrigerant.component.scss\"],\r\n providers: [QuotePercentPipe]\r\n})\r\nexport class QuoteRefrigerantComponent extends ViewModelComponent implements OnChanges, OnInit {\r\n\r\n @Input() public Model: QuoteRefrigerantViewModel = new QuoteRefrigerantViewModel();\r\n @Output() public ModelChanged = new EventEmitter();\r\n @Output() public Changed: EventEmitter = new EventEmitter();\r\n\r\n @ViewChild(AddCylinderDialogComponent, { static: true }) addCylinderDialog: AddCylinderDialogComponent;\r\n\r\n public refrigerantsDataSource: DataSource;\r\n public selectedRefrigerantIds: number[] = [];\r\n public units: string;\r\n\r\n public equipmentListDataSource: {};\r\n public showMessage: boolean = false;\r\n public Orientation = Orientation;\r\n private newQuoteRefrigerantId: number = -1;\r\n\r\n public get RefrigerantsProfitPercentage(): string {\r\n return this.quotePercentPipe.transform(this.Model.Total, this.Model.Profit);\r\n }\r\n\r\n constructor(\r\n private settingsService: SettingsService,\r\n private odataService: ODataService,\r\n private refrigerantTypeViewService: RefrigerantTypeViewService,\r\n private quotePercentPipe: QuotePercentPipe\r\n ) {\r\n super();\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.settingsService.getSetting(SettingId.FGasRefrigerantUnits).subscribe((settingData: SettingData) => {\r\n this.units = settingData.ValueListSelectedId === 1 ? \"(kg)\" : \"(lb)\";\r\n });\r\n\r\n this.SetupEquipmentListDataSource();\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n this.onChanges(changes);\r\n this.setupListDataSource();\r\n }\r\n\r\n public get CurrencyFormat(): string {\r\n return this.Model.Quote.SelectedCurrencySymbol + \"#,##0.00\";\r\n }\r\n\r\n public EquipmentModelUpdated(): void {\r\n // if the list no longer contains equipment used by a refrigerant then remove it\r\n this.Model.Model.forEach(refrigerant => {\r\n if (this.Model.Quote.Job.Equipment.Model.every(eq => refrigerant.EquipmentId !== eq.EquipItemId)) {\r\n refrigerant.EquipmentId = null;\r\n }\r\n });\r\n\r\n this.SetupEquipmentListDataSource();\r\n }\r\n\r\n public get CurrentTab(): QuoteTab {\r\n return this.Model.Quote.CurrentTab;\r\n }\r\n\r\n public set CurrentTab(value: QuoteTab) {\r\n this.Model.Quote.CurrentTab = value;\r\n }\r\n\r\n public get alreadyAddedRefrigerants(): number[] {\r\n return this.Model.Model.map(i => i.RefrigerantTypeId);\r\n }\r\n\r\n public OnRemoveSelectedRefrigerants(): void {\r\n if (this.selectedRefrigerantIds.length > 0) {\r\n this.Model.Model.remove(refrigerant => this.selectedRefrigerantIds.indexOf(refrigerant.QuoteRefrigerantId) >= 0);\r\n this.setupListDataSource();\r\n this.ModelChanged.emit(this.Model);\r\n this.Changed.emit();\r\n }\r\n }\r\n\r\n public AddRefrigerant(): void {\r\n if (!this.Model.Quote.CustomerId) {\r\n this.showMessage = true;\r\n } else {\r\n this.addCylinderDialog.Show();\r\n }\r\n }\r\n\r\n public OnRefrigerantUpdated(): void {\r\n this.ModelChanged.emit(this.Model);\r\n this.Changed.emit();\r\n }\r\n\r\n public OnRefrigerantsAdded(objs: RefrigerantTypeViewItem[]): void {\r\n objs.forEach(o => {\r\n this.Model.Model.push({\r\n Cost: o.UnitCostPrice,\r\n Price: o.SellingPrice,\r\n Qty: 1,\r\n RefrigerantTypeId: o.RefrigerantTypeId,\r\n QuoteRefrigerantId: this.newQuoteRefrigerantId--,\r\n RevisionId: 0,\r\n SalesQuotationId: 0\r\n });\r\n });\r\n\r\n this.setupListDataSource();\r\n this.ModelChanged.emit(this.Model);\r\n this.Changed.emit();\r\n }\r\n\r\n public OnHideMessage(): void {\r\n this.CurrentTab = QuoteTab.Details;\r\n }\r\n\r\n public EquipmentListItem(item: any): string {\r\n return [\r\n item?.Equip,\r\n item?.Make,\r\n item?.Model,\r\n item?.SerialNo\r\n ].filter(eq => eq).join(\" / \");\r\n }\r\n\r\n public ValidateQuantity(data: any): boolean {\r\n const value: number = data.value;\r\n return (value > 0);\r\n }\r\n\r\n private SetupEquipmentListDataSource(): void {\r\n this.equipmentListDataSource = {\r\n store: new CustomStore({\r\n key: \"EquipItemId\",\r\n loadMode: \"raw\",\r\n load: () => this.Model.Quote.Job.Equipment.Model\r\n })\r\n };\r\n }\r\n\r\n private setupListDataSource(): void {\r\n this.refrigerantsDataSource = this.odataService.GetDataSourceWithLookups(\r\n this.Model.Model.map(item => item),\r\n \"QuoteRefrigerantId\",\r\n [\r\n {\r\n store: this.refrigerantTypeViewService.GetDataStore(),\r\n dataKey: \"RefrigerantTypeId\",\r\n lookupKey: \"RefrigerantTypeId\",\r\n displayExprs: [\"Name\", \"Colour1\", \"Colour2\", \"Colour3\", \"CylinderStyle\"]\r\n }\r\n ]);\r\n }\r\n}\r\n","import { ActivityModel, CollectionViewModel, FormMessage } from \"servicesight-shared\";\r\nimport { QuoteSummaryType } from \"../../enums/quote-summary-type.enum\";\r\nimport { QuoteEquipment } from \"../../models/quote-equipment.model\";\r\nimport { QuoteJobActivityToActivityModelConverter } from \"../../models/quote-job-activity.model\";\r\nimport { QuoteViewModel } from \"../quote.viewmodel\";\r\n\r\nexport abstract class QuoteEquipmentViewModel extends CollectionViewModel {\r\n constructor(data: QuoteEquipment[], public Quote: QuoteViewModel = null) {\r\n super(data ?? []);\r\n }\r\n\r\n public abstract readonly Type: QuoteSummaryType;\r\n\r\n public abstract get Total(): number;\r\n\r\n public abstract get DisplayTotal(): number;\r\n\r\n public abstract get Profit(): number;\r\n\r\n public abstract get TypeEnabled(): boolean;\r\n\r\n public get EquipmentEnabled(): boolean {\r\n return this.Quote?.ModuleAccess?.EquipmentEnabled;\r\n }\r\n\r\n public get ProEnabled(): boolean {\r\n return this.Quote?.ModuleAccess?.ProEnabled;\r\n }\r\n\r\n public get AdvancedQuotesEnabled(): boolean {\r\n return this.Quote?.ModuleAccess?.AdvancedQuotesEnabled;\r\n }\r\n\r\n public get BaseCurrencySymbol() {\r\n return this.Quote?.Model?.BaseCurrencySymbol;\r\n }\r\n\r\n public get ShowInCustomerCurrency(): boolean {\r\n return this.Quote.UseCustomerCurrency;\r\n }\r\n\r\n public get CustomerCurrencySymbol(): string {\r\n return this.Quote.CurrencySymbol;\r\n }\r\n\r\n public get CustomerExchangeRate(): number {\r\n return this.Quote.ExchangeRate;\r\n }\r\n\r\n public get Activities(): ActivityModel[] {\r\n return this.Quote.Job?.Activities?.Model?.map(QuoteJobActivityToActivityModelConverter);\r\n }\r\n\r\n public Validate(): FormMessage[] {\r\n return [];\r\n }\r\n\r\n public GetEquipmentCharge(equipment: QuoteEquipment): number {\r\n return this.Quote?.getEquipmentCharge(equipment) ?? 0;\r\n }\r\n\r\n public GetEquipmentChargeBase(equipment: QuoteEquipment): number {\r\n return this.Quote?.getEquipmentChargeBase(equipment) ?? 0;\r\n }\r\n\r\n public AddingDisabled(situation: QuoteSummaryType): boolean {\r\n // don't allow adding if the quote is already lost or won, or if the current tab is not quoted for\r\n return ((this.Quote.IsQuoteLostOrWon || this.Quote.IsQuoteQuoted) && situation !== QuoteSummaryType.SalesOrder) || !this.EquipmentEnabledForSituation(situation);\r\n }\r\n\r\n public EditingEnabled(situation: QuoteSummaryType): boolean {\r\n return !this.AddingDisabled(situation) && this.IsBaseCurrency;\r\n }\r\n\r\n private get IsBaseCurrency(): boolean {\r\n return this.Quote?.SelectedCurrencyCode === this.Quote?.Model?.BaseCurrencyCode;\r\n }\r\n\r\n // returns true if quotes are enabled for the situation (i.e. which tab) this component is on\r\n private EquipmentEnabledForSituation(situation: QuoteSummaryType): boolean {\r\n let result: boolean = false;\r\n switch(situation) {\r\n case QuoteSummaryType.Contract:\r\n result = this.Quote?.QuoteForContract;\r\n break;\r\n case QuoteSummaryType.Job:\r\n result = this.Quote?.QuoteForJob;\r\n break;\r\n case QuoteSummaryType.SalesOrder:\r\n result = this.Quote?.QuoteForSalesOrder;\r\n break;\r\n }\r\n return result;\r\n }\r\n}\r\n\r\n","import { QuoteEquipmentViewModel } from \"./quote-equipment.viewmodel\";\r\nimport { QuoteSummaryType } from \"../../enums/quote-summary-type.enum\";\r\nimport { QuoteEquipment } from \"../../models/quote-equipment.model\";\r\nimport { QuoteViewModel } from \"../quote.viewmodel\";\r\n\r\nexport class QuoteJobEquipmentViewModel extends QuoteEquipmentViewModel {\r\n\r\n public get DisplayTotal(): number {\r\n return 0;\r\n }\r\n\r\n public get Total(): number {\r\n return 0;\r\n }\r\n\r\n public get Profit(): number {\r\n return 0;\r\n }\r\n\r\n public get Type(): QuoteSummaryType {\r\n return QuoteSummaryType.Job;\r\n }\r\n\r\n public get TypeEnabled(): boolean {\r\n return this.Quote?.QuoteForJob ?? false;\r\n }\r\n\r\n constructor(data: QuoteEquipment[], quote: QuoteViewModel ) {\r\n super(data, quote);\r\n }\r\n}\r\n","import { ActivityModel, CollectionViewModel, FormMessage } from \"servicesight-shared\";\r\nimport { QuoteSummaryType } from \"../../enums/quote-summary-type.enum\";\r\nimport { QuoteJobActivityToActivityModelConverter } from \"../../models/quote-job-activity.model\";\r\nimport { QuoteMaterial } from \"../../models/quote-material.model\";\r\nimport { QuoteViewModel } from \"../quote.viewmodel\";\r\n\r\nexport abstract class QuoteMaterialsViewModel extends CollectionViewModel {\r\n constructor(data: QuoteMaterial[], public Quote: QuoteViewModel = null) {\r\n super(data ?? []);\r\n }\r\n\r\n public abstract readonly Type: QuoteSummaryType;\r\n\r\n public abstract get TypeEnabled(): boolean;\r\n\r\n public abstract get Total(): number;\r\n\r\n public abstract get DisplayTotal(): number;\r\n\r\n public abstract get Profit(): number;\r\n\r\n public abstract get ProfitPercentage(): string;\r\n\r\n public get ProEnabled(): boolean {\r\n return this.Quote?.ModuleAccess?.ProEnabled;\r\n }\r\n\r\n public get BaseCurrencySymbol(): string {\r\n return this.Quote?.Model?.BaseCurrencySymbol;\r\n }\r\n\r\n public get ExchangeRate(): number {\r\n return this.Quote?.Model?.ExchangeRate;\r\n }\r\n\r\n public get CurrentSymbol(): string {\r\n return this.Quote?.Model?.CurrencySymbol;\r\n };\r\n\r\n public get IsBaseCurrency(): boolean {\r\n return this.Quote?.SelectedCurrencyCode === this.Quote?.Model?.BaseCurrencyCode;\r\n }\r\n\r\n public get Activities(): ActivityModel[] {\r\n return this.Quote.Job?.Activities?.Model?.map(QuoteJobActivityToActivityModelConverter);\r\n }\r\n\r\n public AddingDisabled(situation: QuoteSummaryType): boolean {\r\n // don't allow adding if the quote is already lost or won, or if the current tab is not quoted for\r\n return this.Quote.IsQuoteLostOrWon || this.Quote.IsQuoteQuoted || !this.MaterialsEnabledForSituation(situation);\r\n }\r\n\r\n public EditingEnabled(situation: QuoteSummaryType): boolean {\r\n return !this.AddingDisabled(situation) && this.IsBaseCurrency;\r\n }\r\n\r\n public Validate(): FormMessage[] {\r\n return [];\r\n }\r\n\r\n protected FormatPercentage(charge: number, profit: number): string {\r\n const value = charge ? profit / charge : (profit ? -1 : 0);\r\n return (value * 100).toFixed(2).replace(\".00\", \"\");\r\n }\r\n\r\n // returns true if quotes are enabled for the situation (i.e. which tab) this component is on\r\n private MaterialsEnabledForSituation(situation: QuoteSummaryType): boolean {\r\n let result: boolean = false;\r\n switch(situation) {\r\n case QuoteSummaryType.Contract:\r\n result = this.Quote?.QuoteForContract;\r\n break;\r\n case QuoteSummaryType.Job:\r\n result = this.Quote?.QuoteForJob;\r\n break;\r\n case QuoteSummaryType.SalesOrder:\r\n result = this.Quote?.QuoteForSalesOrder;\r\n break;\r\n }\r\n return result;\r\n }\r\n\r\n\r\n}\r\n","import { QuoteMaterialsViewModel } from \"./quote-materials.viewmodel\";\r\nimport { QuoteSummaryType } from \"../../enums/quote-summary-type.enum\";\r\nimport { QuoteMaterial } from \"../../models/quote-material.model\";\r\nimport { QuoteViewModel } from \"../quote.viewmodel\";\r\n\r\nexport class QuoteJobMaterialsViewModel extends QuoteMaterialsViewModel {\r\n\r\n public get Total(): number {\r\n if(!this.Model) {\r\n return 0;\r\n }\r\n return this.Model\r\n .reduce((total, current) => total + (Number(current.Charge)), 0);\r\n }\r\n\r\n public get DisplayTotal(): number {\r\n if(!this.Model) {\r\n return 0;\r\n }\r\n return this.Model\r\n .reduce((total, current) => total + (this.Quote.convertAndRound(Number(current.Charge))), 0);\r\n }\r\n\r\n public get Profit(): number {\r\n if(!this.Model) {\r\n return 0;\r\n }\r\n return this.Model\r\n .reduce((total, current) => total + (Number(current.Charge) - Number(current.Cost)) , 0);\r\n }\r\n\r\n public get ProfitPercentage(): string {\r\n return this.FormatPercentage(this.Total, this.Profit);\r\n }\r\n\r\n public get Type(): QuoteSummaryType {\r\n return QuoteSummaryType.Job;\r\n }\r\n\r\n public get TypeEnabled(): boolean {\r\n return this.Quote.QuoteForJob;\r\n }\r\n\r\n constructor(data: QuoteMaterial[], quote: QuoteViewModel ) {\r\n super(data, quote);\r\n }\r\n}\r\n","import { CollectionViewModel, FormMessage } from \"servicesight-shared\";\r\nimport { QuoteJobActivity } from \"../models/quote-job-activity.model\";\r\nimport { QuoteViewModel } from \"./quote.viewmodel\";\r\n\r\nexport class QuoteJobActivitiesViewModel extends CollectionViewModel {\r\n constructor(data: QuoteJobActivity[], public Quote: QuoteViewModel = null) {\r\n super(data ?? []);\r\n }\r\n\r\n public get ProEnabled(): boolean {\r\n return this.Quote?.ModuleAccess?.ProEnabled;\r\n }\r\n\r\n public get TypeEnabled(): boolean {\r\n return this.Quote.QuoteForJob;\r\n }\r\n\r\n public Validate(): FormMessage[] {\r\n return [];\r\n }\r\n}\r\n","import { ActivityModel, CollectionViewModel, FormMessage } from \"servicesight-shared\";\r\nimport { QuoteJobActivityToActivityModelConverter } from \"../models/quote-job-activity.model\";\r\nimport { QuoteJobInstall } from \"../models/quote-job-install.model\";\r\nimport { QuoteViewModel } from \"./quote.viewmodel\";\r\n\r\nexport class QuoteJobInstallViewModel extends CollectionViewModel {\r\n\r\n constructor(data: QuoteJobInstall[], public Quote: QuoteViewModel = null) {\r\n super(data ?? []);\r\n }\r\n\r\n Validate(): FormMessage[] {\r\n return [];\r\n }\r\n\r\n ModelChanged: () => void;\r\n\r\n public get Activities(): ActivityModel[] {\r\n return this.Quote.Job?.Activities?.Model?.map(QuoteJobActivityToActivityModelConverter);\r\n }\r\n\r\n public get ProEnabled(): boolean {\r\n return this.Quote?.ModuleAccess?.ProEnabled;\r\n }\r\n\r\n public get EquipmentEnabled(): boolean {\r\n return this.Quote?.ModuleAccess?.EquipmentEnabled;\r\n }\r\n\r\n public get Total(): number {\r\n return this.Model\r\n .reduce((total, current) => total + (Number(current.UnitPrice) * Number(current.QtyToInstall)), 0);\r\n }\r\n\r\n public get DisplayTotal(): number {\r\n return this.Model\r\n .reduce((total, current) => total + (this.Quote.convertAndRound(Number(current.UnitPrice)) * Number(current.QtyToInstall)), 0);\r\n }\r\n\r\n public get TotalCost(): number {\r\n return this.Model.reduce((total, part) => total += (part.UnitCost * part.QtyToInstall), 0);\r\n }\r\n\r\n public get Profit(): number {\r\n return this.Total - this.TotalCost;\r\n }\r\n\r\n}\r\n","import { QuoteEquipment } from \"./quote-equipment.model\";\r\nimport { QuoteJobMakeModelInstall } from \"./quote-job-make-model-install.model\";\r\n\r\nexport class QuoteJobInstall {\r\n QuoteInstallId: number;\r\n ItemId?: number;\r\n MakeModelInstallId?: number;\r\n SalesQuotationId: number;\r\n RevisionId: number;\r\n EquipmentId?: number;\r\n EquipmentNumber?: string;\r\n MakeModelId?: number;\r\n SerialNo?: string;\r\n UnitCost: number;\r\n UnitPrice: number;\r\n Charge: number;\r\n QtyToInstall: number;\r\n ActivityId?: number;\r\n WorkRequired: string;\r\n\r\n // Construct from a makemodelinstall or an eq install\r\n constructor(tempIndex: number, mmInstall?: QuoteJobMakeModelInstall, eqInstall?: QuoteEquipment) {\r\n if (eqInstall) {\r\n this.QuoteInstallId = tempIndex;\r\n this.ItemId = eqInstall.ItemId;\r\n this.EquipmentId = eqInstall.EquipItemId;\r\n this.EquipmentNumber = eqInstall.Equip;\r\n this.MakeModelId = eqInstall.MakeModelId;\r\n this.SerialNo = eqInstall.SerialNo;\r\n this.UnitCost = eqInstall.Cost;\r\n this.UnitPrice = eqInstall.Price;\r\n this.Charge = eqInstall.Charge;\r\n this.QtyToInstall = 1; // Always 1 because an Eq is one item\r\n this.ActivityId = eqInstall.ActivityId;\r\n this.WorkRequired = eqInstall.WorkRequired;\r\n } else if (mmInstall) {\r\n this.QuoteInstallId = tempIndex;\r\n this.MakeModelInstallId = mmInstall.SalesQuotationJobMakeModelInstallId;\r\n this.MakeModelId = mmInstall.MakeModelId;\r\n this.EquipmentNumber = \"TBC\"; // Always TBC as a makemodel has no eq number\r\n this.SerialNo = \"TBC\"; // Always TBC as a makemodel has no serial no\r\n this.UnitCost = mmInstall.UnitCost;\r\n this.UnitPrice = mmInstall.UnitPrice;\r\n this.Charge = mmInstall.Charge;\r\n this.QtyToInstall = mmInstall.QtyToInstall;\r\n this.ActivityId = mmInstall.ActivityId;\r\n }\r\n }\r\n}\r\n","import { FormMessage, ViewModel } from \"servicesight-shared\";\r\nimport { QuoteEquipmentViewModel } from \"./equipment/quote-equipment.viewmodel\";\r\nimport { QuoteJobEquipmentViewModel } from \"./equipment/quote-job-equipment.viewmodel\";\r\nimport { QuoteJobMaterialsViewModel } from \"./materials/quote-job-materials.viewmodel\";\r\nimport { QuoteJobLabourViewModel } from \"./quote-job-labour.viewmodel\";\r\nimport { QuotePartsViewModel } from \"./quote-parts.viewmodel\";\r\nimport { QuoteRefrigerantViewModel } from \"./quote-refrigerant.viewmodel\";\r\nimport { QuoteViewModel } from \"./quote.viewmodel\";\r\nimport { QuoteJob } from \"../models/quote-job.model\";\r\nimport { QuoteJobActivitiesViewModel } from \"./quote-job-activities.viewmodel\";\r\nimport { QuoteJobInstallViewModel } from \"./quote-job-install.viewmodel\";\r\nimport { QuoteJobInstall } from \"../models/quote-job-install.model\";\r\n\r\nexport class QuoteJobViewModel extends ViewModel {\r\n\r\n public Parts: QuotePartsViewModel;\r\n\r\n public Activities: QuoteJobActivitiesViewModel;\r\n public Equipment: QuoteEquipmentViewModel;\r\n public Materials: QuoteJobMaterialsViewModel;\r\n public Refrigerant: QuoteRefrigerantViewModel;\r\n public LabourCharges: QuoteJobLabourViewModel;\r\n public LabourCosts: QuoteJobLabourViewModel;\r\n public JobInstalls: QuoteJobInstallViewModel;\r\n\r\n ModelChanged: () => void;\r\n\r\n public get Total(): number {\r\n return this.Quote.Job.Equipment.Total + this.Quote.Job.Materials.Total + this.TotalLabour\r\n + (this.StockEnabled ? this.Quote.Job.Parts.TotalPrice : 0)\r\n + (this.FGasEnabled ? this.Quote.Job.Refrigerant.Total : 0)\r\n + Number(this.Model.FlatCharge ?? 0)\r\n + (this.Quote.Job.JobInstalls.Total ?? 0);\r\n }\r\n\r\n public get DisplayTotal(): number {\r\n return this.Quote.Job.Equipment.DisplayTotal + this.Quote.Job.Materials.DisplayTotal + this.DisplayTotalLabour\r\n + (this.StockEnabled ? this.Quote.Job.Parts.TotalDisplayPrice : 0)\r\n + (this.FGasEnabled ? this.Quote.Job.Refrigerant.DisplayTotal : 0)\r\n + Number(this.DisplayFlatCharge ?? 0)\r\n + this.Quote.Job.JobInstalls.DisplayTotal ?? 0;\r\n }\r\n\r\n public get DisplayFlatCharge(): number {\r\n return this.Quote.convertAndRound(this.Model.FlatCharge);\r\n }\r\n\r\n public get Profit(): number {\r\n return this.Quote.Job.Equipment.Profit\r\n + this.Quote.Job.Materials.Profit\r\n + this.ProfitLabour\r\n + this.Quote.Job.Parts.TotalProfit\r\n + (this.FGasEnabled ? this.Quote.Job.Refrigerant.Profit: 0)\r\n +this.Quote.Job.JobInstalls.Profit;\r\n }\r\n\r\n public get FlatChargeInForeignCurrency(): number {\r\n return this.Model.FlatCharge * this.Quote.ExchangeRate;\r\n }\r\n\r\n public get UseCustomerCurrency(): boolean {\r\n return this.Quote.UseCustomerCurrency;\r\n }\r\n\r\n public get SelectedCurrencySymbol(): string {\r\n return this.Quote.SelectedCurrencySymbol;\r\n }\r\n\r\n public get BaseCurrencySymbol(): string {\r\n return this.Quote.BaseCurrencySymbol;\r\n }\r\n\r\n public get SelectedExchangeRate(): number {\r\n return this.Quote.SelectedExchangeRate;\r\n }\r\n\r\n public get CostsVisible(): boolean {\r\n return this.Quote?.ModuleAccess?.ProEnabled;\r\n }\r\n\r\n public get StockEnabled(): boolean {\r\n return this.Quote?.ModuleAccess?.StockEnabled;\r\n }\r\n\r\n public get FGasEnabled(): boolean {\r\n return this.Quote?.ModuleAccess?.FGasEnabled;\r\n }\r\n\r\n public get IsQuoteLostOrWon(): boolean {\r\n return this.Quote.IsQuoteLostOrWon;\r\n }\r\n\r\n public get EditingEnabled(): boolean {\r\n return !this.Quote.IsQuoteLostOrWon && !this.Quote.IsQuoteQuoted && this.QuoteForJob;\r\n }\r\n\r\n public get QuoteForJob(): boolean {\r\n return this.Quote.QuoteForJob;\r\n }\r\n\r\n public set QuoteForJob(value: boolean) {\r\n this.Quote.QuoteForJob = value;\r\n }\r\n\r\n public get TotalLabour(): number {\r\n if(!this.Quote?.Job?.LabourCharges) {\r\n return 0;\r\n }\r\n return this.Quote.Job.LabourCharges.Total;\r\n }\r\n\r\n public get DisplayTotalLabour(): number {\r\n if(!this.Quote?.Job?.LabourCharges) {\r\n return 0;\r\n }\r\n return this.Quote.Job.LabourCharges.DisplayTotal;\r\n }\r\n\r\n public get ProfitLabour(): number {\r\n if(!this.Quote?.Job?.LabourCosts) {\r\n return 0;\r\n }\r\n return this.TotalLabour - this.Quote.Job.LabourCosts.Total;\r\n }\r\n\r\n constructor(data: QuoteJob = null, public Quote: QuoteViewModel = null) {\r\n super(data ?? {\r\n FlatCharge: 0,\r\n WorkDescription: \"\",\r\n JobTypeID: 0,\r\n IsSuccess: true,\r\n LabourTotal: 0,\r\n Multiplier: 1,\r\n Rate: 0,\r\n Refrigerants: null,\r\n Parts: null,\r\n RevisionID: 0,\r\n SalesQuotationID: 0,\r\n Units: 1,\r\n Equipment: [],\r\n Materials: [],\r\n LabourCharges: [],\r\n LabourCosts: [],\r\n Activities: [],\r\n MakeModelInstalls: [],\r\n JobInstalls: []\r\n });\r\n\r\n // Only include Equipment where IsInstall is false\r\n this.Equipment = new QuoteJobEquipmentViewModel(data?.Equipment.filter(eq => !eq.IsInstall), Quote);\r\n this.Materials = new QuoteJobMaterialsViewModel(data?.Materials, Quote);\r\n this.Parts = new QuotePartsViewModel(data?.Parts ?? [], Quote);\r\n this.Refrigerant = new QuoteRefrigerantViewModel(data?.Refrigerants ?? [], Quote);\r\n this.LabourCharges = new QuoteJobLabourViewModel(data?.LabourCharges, Quote);\r\n this.LabourCosts = new QuoteJobLabourViewModel(data?.LabourCosts, Quote);\r\n this.Activities = new QuoteJobActivitiesViewModel(data?.Activities ?? [], Quote);\r\n\r\n // Get equipment where IsInstall is true\r\n // Convert eq for install & makemodelinstalls into JobInstalls\r\n const eqInstalls = data?.Equipment.filter(eq => eq.IsInstall) ?? [];\r\n const makeModelInstalls = data?.MakeModelInstalls ?? [];\r\n const jobInstalls: QuoteJobInstall[] = [];\r\n let tempIndex = 1;\r\n eqInstalls.forEach(eq => {\r\n jobInstalls.push(new QuoteJobInstall(tempIndex, null, eq));\r\n tempIndex++;\r\n });\r\n if (data?.Equipment){\r\n data.Equipment = data.Equipment.filter(eq => !eq.IsInstall);\r\n }\r\n makeModelInstalls.forEach(mm => {\r\n jobInstalls.push(new QuoteJobInstall(tempIndex, mm, null));\r\n tempIndex++;\r\n });\r\n if (data?.MakeModelInstalls) {\r\n data.MakeModelInstalls = [];\r\n }\r\n\r\n this.JobInstalls = new QuoteJobInstallViewModel(jobInstalls, Quote);\r\n }\r\n\r\n public Validate(): FormMessage[] {\r\n return [];\r\n }\r\n}\r\n","\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
{{ 'quotes.warning.activityDescriptionRequired' | translate }}
\r\n
{{ 'quotes.warning.activityTypeRequired' | translate }}
\r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n","import { Component, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\r\nimport { UntypedFormControl, UntypedFormGroup, Validators } from \"@angular/forms\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { ActivityService } from \"servicesight-shared\";\r\nimport { QuoteJobActivity } from \"../models/quote-job-activity.model\";\r\n\r\n@Component({\r\n selector: \"app-quote-job-activity-dialogue\",\r\n templateUrl: \"./quote-job-activity-dialogue.component.html\",\r\n styleUrls: [\"./quote-job-activity-dialogue.component.scss\"]\r\n})\r\nexport class QuoteJobActivityDialogueComponent implements OnInit {\r\n @Input() includeCharge: boolean = true;\r\n @Output() yes = new EventEmitter();\r\n @Output() no = new EventEmitter();\r\n\r\n public IsQuoteLostOrWon: boolean;\r\n public activityTypes: DataSource;\r\n public activityForm: UntypedFormGroup;\r\n\r\n public showDialog = false;\r\n public showError = false;\r\n public title = \"label.quotes.newActivity\";\r\n\r\n public item: QuoteJobActivity = {\r\n Description: \"\",\r\n ActivityTypeId: 0,\r\n RevisionId: null,\r\n SalesQuotationId: null,\r\n QuoteActivityId: null\r\n };\r\n\r\n constructor(private activityService: ActivityService) { }\r\n\r\n public Show(IsQuoteLostOrWon: boolean) {\r\n this.title = \"label.quotes.newActivity\";\r\n this.IsQuoteLostOrWon = IsQuoteLostOrWon;\r\n this.item = {\r\n Description: null,\r\n ActivityTypeId: 0,\r\n RevisionId: null,\r\n SalesQuotationId: null,\r\n QuoteActivityId: null\r\n };\r\n this.activityForm.reset();\r\n this.showError = false;\r\n this.showDialog = true;\r\n }\r\n\r\n public ShowEdit(item: QuoteJobActivity, IsQuoteLostOrWon: boolean) {\r\n this.title = \"label.quotes.editActivity\";\r\n this.IsQuoteLostOrWon = IsQuoteLostOrWon;\r\n this.activityService.GetJobActivityTypes().subscribe((activityTypes) => {\r\n this.activityTypes = new DataSource(activityTypes.map((x) => {\r\n return {\r\n ActivityTypeID: x.ActivityTypeID,\r\n ActivityName: x.ActivityName\r\n };\r\n }));\r\n\r\n this.item = item;\r\n if (this.item.ActivityTypeId === undefined) {\r\n this.item.ActivityTypeId = 0;\r\n }\r\n this.showError = false;\r\n this.showDialog = true;\r\n });\r\n }\r\n\r\n public onCancelClick(): void {\r\n this.showDialog = false;\r\n this.no.emit();\r\n }\r\n\r\n public onHide(): void {\r\n this.showDialog = false;\r\n }\r\n\r\n public onSaveClick() {\r\n if (this.activityForm.valid) {\r\n this.showDialog = false;\r\n this.yes.emit(this.item);\r\n } else {\r\n this.showError = true;\r\n }\r\n }\r\n\r\n public ngOnInit() {\r\n this.activityForm = new UntypedFormGroup({\r\n formDescription: new UntypedFormControl(\"\", Validators.required),\r\n formActivityType: new UntypedFormControl(\"\", Validators.required)\r\n });\r\n\r\n this.activityService.GetJobActivityTypes().subscribe((activityTypes) => {\r\n const types = activityTypes.map((x) => {\r\n return {\r\n ActivityTypeID: x.ActivityTypeID,\r\n ActivityName: x.ActivityName\r\n };\r\n });\r\n this.activityTypes = new DataSource({\r\n store: {\r\n type: \"array\",\r\n data: types,\r\n key: \"ActivityTypeID\"\r\n },\r\n sort: [\r\n { selector: \"ActivityName\", desc: false }\r\n ]\r\n });\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n

\r\n {{ 'generic.activity' | translate }}\r\n

\r\n
\r\n \r\n \r\n
\r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n
\r\n \r\n {{ t.data.Description.substring(0, t.data.Description.length > 50 ? 50 : t.data.Description.length) }}\r\n \r\n
\r\n\r\n \r\n\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { ActivityService, ActivityTypeModel } from \"servicesight-shared\";\r\nimport { QuoteJobActivity, QuoteJobActivityToActivityModelConverter } from \"../models/quote-job-activity.model\";\r\nimport { QuoteJobActivityDialogueComponent } from \"../quote-job-activity-dialogue/quote-job-activity-dialogue.component\";\r\nimport { ViewModelComponent } from \"../view-model-component.class\";\r\nimport { QuoteJobActivitiesViewModel } from \"../view-models/quote-job-activities.viewmodel\";\r\nimport { ConfirmationDialogueComponent } from \"src/app/shared/components/confirmation-dialogue/confirmation-dialogue.component\";\r\n\r\n@Component({\r\n selector: \"app-quote-job-activities\",\r\n templateUrl: \"./quote-job-activities.component.html\",\r\n styleUrls: [\"./quote-job-activities.component.scss\"]\r\n})\r\nexport class QuoteJobActivitiesComponent extends ViewModelComponent implements OnInit, OnChanges {\r\n\r\n @Input() public Model: QuoteJobActivitiesViewModel;\r\n @Output() public ModelChanged = new EventEmitter();\r\n\r\n @ViewChild(\"AddActivityDialog\") addActivityDialog: QuoteJobActivityDialogueComponent;\r\n @ViewChild(\"deleteActivitiesConfirmationDialog\") deleteActivitiesConfirmationDialog: ConfirmationDialogueComponent;\r\n\r\n public ActivityTypes: ActivityTypeModel[];\r\n public selectedActivityIds: any[] = [];\r\n public activityDeleteConfirmationMessage: string = \"\";\r\n public dataSource: QuoteJobActivity[];\r\n public showActivityDeleteDialog: boolean = false;\r\n\r\n private newActivityId: number = -1;\r\n\r\n public constructor(\r\n private activityService: ActivityService\r\n ) {\r\n super();\r\n this.OnEditActivity = this.OnEditActivity.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.activityService.GetJobActivityTypes().subscribe(data => {\r\n this.ActivityTypes = data;\r\n });\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if(changes.Model.currentValue) {\r\n this.SetDataSource();\r\n }\r\n this.onChanges(changes);\r\n }\r\n\r\n public OnAddActivity(): void {\r\n this.addActivityDialog.Show(false);\r\n }\r\n\r\n public OnEditActivity(e: any): void {\r\n const activity = e.row.data as QuoteJobActivity;\r\n\r\n if(!this.Model.Quote.IsQuoteLostOrWon && !this.Model.Quote.IsQuoteQuoted) {\r\n const activityToUpdate = {\r\n ActivityTypeId: activity.ActivityTypeId,\r\n Description: activity.Description,\r\n SalesQuotationId: activity.SalesQuotationId,\r\n RevisionId: activity.RevisionId,\r\n QuoteActivityId: activity.QuoteActivityId\r\n };\r\n\r\n this.addActivityDialog.ShowEdit(activityToUpdate, false);\r\n }\r\n }\r\n\r\n public AddActivities(activity: any): void {\r\n if (activity.QuoteActivityId) {\r\n const indexToUpdate = this.Model.Model.findIndex(material => material.QuoteActivityId === activity.QuoteActivityId);\r\n if (indexToUpdate >= 0) {\r\n const activityToUpdate = this.Model.Model[indexToUpdate];\r\n activityToUpdate.ActivityTypeId = activity.ActivityTypeId;\r\n activityToUpdate.Description = activity.Description;\r\n this.Model.Model[indexToUpdate] = activityToUpdate;\r\n }\r\n } else {\r\n const newActivity: QuoteJobActivity = {\r\n ActivityTypeId: activity.ActivityTypeId,\r\n Description: activity.Description,\r\n SalesQuotationId: 0,\r\n RevisionId: 0,\r\n QuoteActivityId: this.newActivityId\r\n };\r\n this.Model.Model.push(newActivity);\r\n }\r\n this.SetDataSource();\r\n this.ModelChanged.emit(this.Model);\r\n }\r\n\r\n public OnUpdateActivity(): void {\r\n this.ModelChanged.emit(this.Model);\r\n }\r\n\r\n public OnDeleteActivities(): void {\r\n const selectedActivitiesCount = this.selectedActivityIds.length;\r\n this.activityDeleteConfirmationMessage = `This will delete ${selectedActivitiesCount} activities and any linked items from the quote. Are you sure you want to continue?`;\r\n this.showActivityDeleteDialog = true;\r\n }\r\n\r\n public OnConfirmDeleteActivities(confirm: boolean): void {\r\n if (confirm){\r\n this.Model.Model.remove(o => this.selectedActivityIds.includes(o.QuoteActivityId));\r\n this.SetDataSource();\r\n }\r\n this.showActivityDeleteDialog = false;\r\n }\r\n\r\n private SetDataSource(): void {\r\n this.dataSource = this.Model.Model.map(item => item);\r\n this.ActivitiesChanged();\r\n this.newActivityId = 1;\r\n const ids: Array = [];\r\n for (const item of this.Model.Model) {\r\n ids.push(item.QuoteActivityId);\r\n }\r\n if (ids.length > 0) {\r\n this.newActivityId = Math.max(...ids) + 1;\r\n }\r\n }\r\n\r\n private ActivitiesChanged(): void {\r\n const activities = this.Model.Model.map(QuoteJobActivityToActivityModelConverter);\r\n this.activityService.ActivitiesChanged(activities);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
{{'quote.job.quote-for-job' | translate}}
\r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n\r\n \r\n \r\n \r\n
\r\n
\r\n

\r\n {{ 'label.labour' | translate }}\r\n {{ 'quote.job.labour.total' | translate: { value: Model.DisplayTotalLabour | currency: Model.SelectedCurrencySymbol } }}\r\n {{ 'quotes.profit' | translate: { value: (Model.ProfitLabour | currency: Model.BaseCurrencySymbol), percent: ( Model.TotalLabour | quotePercent: Model.ProfitLabour) } }}\r\n

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

\r\n {{ 'quotes.profit' | translate: { value: (Model.Profit | currency: Model.BaseCurrencySymbol), percent: TotalProfitPercentage } }}\r\n {{ 'quote.job.total' | translate: { value: Model.DisplayTotal | currency: Model.SelectedCurrencySymbol } }}\r\n

\r\n
\r\n
\r\n
\r\n
\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { PhraseBookType, SettingData, SettingId, SettingsService } from \"servicesight-shared\";\r\nimport { JobTypeModel } from \"src/app/settings/job-settings/models/job-type.model\";\r\nimport { JobTypesService } from \"src/app/settings/job-settings/services/job-types.service\";\r\nimport { QuoteSummaryType } from \"../enums/quote-summary-type.enum\";\r\nimport { QuoteJob } from \"../models/quote-job.model\";\r\nimport { QuotePercentPipe } from \"../pipes/quote-percent.pipe\";\r\nimport { QuoteEquipmentComponent } from \"../quote-equipment/quote-equipment.component\";\r\nimport { QuoteJobInstallComponent } from \"../quote-job-install/quote-job-install.component\";\r\nimport { QuoteJobLabourComponent } from \"../quote-job-labour/quote-job-labour.component\";\r\nimport { QuoteMaterialsComponent } from \"../quote-materials/quote-materials.component\";\r\nimport { QuotePartsComponent } from \"../quote-parts/quote-parts.component\";\r\nimport { QuoteRefrigerantComponent } from \"../quote-refrigerant/quote-refrigerant.component\";\r\nimport { ViewModelComponent } from \"../view-model-component.class\";\r\nimport { QuoteJobViewModel } from \"../view-models/quote-job.viewmodel\";\r\n\r\n@Component({\r\n selector: \"app-quote-job-tab\",\r\n templateUrl: \"./quote-job-tab.component.html\",\r\n styleUrls: [\"./quote-job-tab.component.scss\"],\r\n providers: [QuotePercentPipe]\r\n})\r\nexport class QuoteJobTabComponent extends ViewModelComponent implements OnChanges, OnInit {\r\n @Input() public Model: QuoteJobViewModel = new QuoteJobViewModel();\r\n @Output() public ModelChanged = new EventEmitter();\r\n\r\n @ViewChild(\"quoteRefrigerantList\", { static: false }) quoteRefrigerantList: QuoteRefrigerantComponent;\r\n @ViewChild(\"labourCharges\", { static: false }) labourList: QuoteJobLabourComponent;\r\n @ViewChild(\"quoteEquipmentList\", { static: false }) equipmentList: QuoteEquipmentComponent;\r\n @ViewChild(\"quoteMaterialsList\", { static: false }) materialsList: QuoteMaterialsComponent;\r\n @ViewChild(\"quotePartsList\", { static: false }) partsList: QuotePartsComponent;\r\n @ViewChild(\"labourCosts\", {static: false}) labourCosts: QuoteJobLabourComponent;\r\n @ViewChild(\"labourCharges\", {static: false}) labourCharges: QuoteJobLabourComponent;\r\n @ViewChild(\"jobInstalls\", {static: false}) jobInstalls: QuoteJobInstallComponent;\r\n\r\n public get TotalProfitPercentage(): string {\r\n return this.quotePercentPipe.transform(this.Model.Total, this.Model.Profit);\r\n }\r\n\r\n public jobTypes: DataSource;\r\n public phraseType = PhraseBookType;\r\n\r\n public get JobSituation(): QuoteSummaryType {\r\n return QuoteSummaryType.Job;\r\n }\r\n\r\n constructor(\r\n private settingsService: SettingsService,\r\n private jobTypesService: JobTypesService,\r\n private quotePercentPipe: QuotePercentPipe\r\n ) {\r\n super();\r\n }\r\n\r\n public ngOnInit(): void {\r\n if (this.Model.Model.JobTypeID === 0) {\r\n this.settingsService.getSetting(SettingId.QuoteDefaultJobType).subscribe((setting: SettingData) => {\r\n this.Model.Model.JobTypeID = setting.ValueListSelectedId;\r\n });\r\n }\r\n this.GetJobTypes();\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n this.onChanges(changes);\r\n }\r\n\r\n public OnEquipmentModelChanged(): void {\r\n this.quoteRefrigerantList.EquipmentModelUpdated();\r\n this.Model.ModelChanged();\r\n }\r\n\r\n public OnActivityModelChanged(): void {\r\n this.equipmentList.ActivitiesUpdated();\r\n this.materialsList.ActivitiesUpdated();\r\n this.partsList.ActivitiesUpdated();\r\n this.labourCosts.ActivitiesUpdated();\r\n this.labourCharges.ActivitiesUpdated();\r\n this.jobInstalls.ActivitiesUpdated();\r\n this.Model.ModelChanged();\r\n }\r\n\r\n public OnCurrencyChanged(): void {\r\n this.labourList.Repaint();\r\n }\r\n\r\n public OnInstallModelChanged(): void {\r\n this.Model.ModelChanged();\r\n }\r\n\r\n private GetJobTypes(): void {\r\n this.jobTypesService.GetJobTypesList().subscribe((jobTypesCollection) => {\r\n const castedJobTypes = jobTypesCollection.ModelCollection.map((el) => {\r\n const types: JobTypeModel = { JobTypeID: el.JobTypeID, Name: el.Name, AutoAllocate: el.AutoAllocate, CategoryJobCat: el.CategoryJobCat, CreatesInvoice: el.CreatesInvoice };\r\n return types;\r\n });\r\n\r\n this.jobTypes = new DataSource(castedJobTypes);\r\n });\r\n }\r\n\r\n}\r\n","import { FormMessage, ViewModel } from \"servicesight-shared\";\r\nimport { QuoteViewModel } from \"./quote.viewmodel\";\r\nimport { Example } from \"../models/example.model\";\r\n\r\nexport class ExampleViewModel extends ViewModel {\r\n ModelChanged: () => void;\r\n\r\n\r\n constructor(data: Example = null, public Quote: QuoteViewModel = null) {\r\n super(data ?? { stuff: null });\r\n }\r\n\r\n public Validate(): FormMessage[] {\r\n return [];\r\n }\r\n\r\n}\r\n","import { QuoteEquipmentViewModel } from \"./quote-equipment.viewmodel\";\r\nimport { QuoteSummaryType } from \"../../enums/quote-summary-type.enum\";\r\nimport { QuoteEquipment } from \"../../models/quote-equipment.model\";\r\nimport { QuoteViewModel } from \"../quote.viewmodel\";\r\n\r\nexport class QuoteContractEquipmentViewModel extends QuoteEquipmentViewModel {\r\n\r\n public get DisplayTotal(): number {\r\n return this.Model\r\n .reduce((total, current) => total + this.Quote.convertAndRound(Number(current.Charge)), 0);\r\n }\r\n\r\n public get Total(): number {\r\n return this.Model\r\n .reduce((total, current) => total + Number(current.Charge), 0);\r\n }\r\n\r\n public get Profit(): number {\r\n return 0;\r\n }\r\n\r\n public get Type(): QuoteSummaryType {\r\n return QuoteSummaryType.Contract;\r\n }\r\n\r\n public get TypeEnabled(): boolean {\r\n return this.Quote?.QuoteForContract ?? false;\r\n }\r\n\r\n constructor(data: QuoteEquipment[], quote: QuoteViewModel ) {\r\n super(data, quote);\r\n }\r\n}\r\n","import { CollectionViewModel, FormMessage } from \"servicesight-shared\";\r\nimport { QuoteViewModel } from \"./quote.viewmodel\";\r\nimport { QuoteContractSite } from \"../models/quote-contract-site.model\";\r\n\r\nexport class QuoteContractSitesViewModel extends CollectionViewModel {\r\n ModelChanged: () => void;\r\n\r\n public get Total(): number {\r\n return this.Model\r\n .reduce((total, current) => total + Number(current.Charge), 0);\r\n }\r\n\r\n public get DisplayTotal(): number {\r\n return this.Model\r\n .reduce((total, current) => total + this.Quote.convertAndRound(Number(current.Charge)), 0);\r\n }\r\n\r\n public get CustomerId(): number {\r\n return this.Quote.CustomerId;\r\n }\r\n\r\n public get SalesQuotationContractId(): number {\r\n return this.Quote.Model?.ServiceContract?.SalesQuotationContractId;\r\n }\r\n\r\n public get EditingEnabled(): boolean {\r\n return !this.Quote.IsQuoteLostOrWon && !this.Quote.IsQuoteQuoted && this.Quote.QuoteForContract && !this.Quote.UseCustomerCurrency;\r\n }\r\n\r\n public get AllowUpdating(): boolean {\r\n return !this.Quote.UseCustomerCurrency && this.EditingEnabled;\r\n }\r\n\r\n public get SelectedCurrencySymbol(): string {\r\n return this.Quote.SelectedCurrencySymbol;\r\n }\r\n\r\n public get RemoveSitesButtonDisabled(): boolean {\r\n return !this.Quote.QuoteForContract || this.Quote.IsQuoteLostOrWon || this.Quote.IsQuoteQuoted;\r\n }\r\n\r\n public get AddSitesButtonDisabled(): boolean {\r\n return !this.Quote.CustomerId || !this.Quote.QuoteForContract || this.Quote.IsQuoteLostOrWon || this.Quote.IsQuoteQuoted;\r\n }\r\n\r\n constructor(data: QuoteContractSite[] = null, public Quote: QuoteViewModel = null) {\r\n super(data ?? []);\r\n }\r\n\r\n public Validate(): FormMessage[] {\r\n return [];\r\n }\r\n}\r\n","import { FormMessage, ViewModel } from \"servicesight-shared\";\r\nimport { QuoteContractEquipmentViewModel } from \"./equipment/quote-contract-equipment.viewmodel\";\r\nimport { QuoteEquipmentViewModel } from \"./equipment/quote-equipment.viewmodel\";\r\nimport { QuoteContractSitesViewModel } from \"./quote-contract-sites.viewmodel\";\r\nimport { QuoteViewModel } from \"./quote.viewmodel\";\r\nimport { QuoteContract } from \"../models/quote-contract.model\";\r\n\r\nexport class QuoteContractViewModel extends ViewModel {\r\n public Equipment: QuoteEquipmentViewModel;\r\n public Sites: QuoteContractSitesViewModel;\r\n ModelChanged: () => void;\r\n\r\n constructor(data: QuoteContract = null, public Quote: QuoteViewModel = null) {\r\n super(data ?? {\r\n ContractCharge: 0,\r\n ContractTypeId: 0,\r\n EquipWorkRequired: \"\",\r\n EquipsList: [],\r\n InvoiceCycle: 0,\r\n SitesList: [],\r\n SitesWorkRequired: \"\"\r\n });\r\n\r\n this.Equipment = new QuoteContractEquipmentViewModel(data?.EquipsList ?? [], Quote);\r\n this.Sites = new QuoteContractSitesViewModel(data?.SitesList ?? [], Quote);\r\n }\r\n\r\n public get Total(): number {\r\n return Number(this.Model.ContractCharge) + this.Equipment.Total + this.Sites.Total;\r\n }\r\n\r\n public get DisplayTotal(): number {\r\n return this.Quote.convertAndRound(Number(this.Model.ContractCharge)) +\r\n this.Equipment.DisplayTotal +\r\n this.Sites.DisplayTotal;\r\n }\r\n\r\n public get ContractChargeInForeignCurrency(): number {\r\n return this.Model.ContractCharge * this.Quote.ExchangeRate;\r\n }\r\n\r\n public get UseCustomerCurrency(): boolean {\r\n return this.Quote.UseCustomerCurrency;\r\n }\r\n\r\n public get SelectedCurrencySymbol(): string {\r\n return this.Quote.SelectedCurrencySymbol;\r\n }\r\n\r\n public get BaseCurrencySymbol(): string {\r\n return this.Quote.BaseCurrencySymbol;\r\n }\r\n\r\n public get QuoteForContract(): boolean {\r\n return this.Quote.QuoteForContract;\r\n }\r\n\r\n public set QuoteForContract(value: boolean) {\r\n this.Quote.QuoteForContract = value;\r\n }\r\n\r\n public get IsQuoteLostOrWon(): boolean {\r\n return this.Quote.IsQuoteLostOrWon;\r\n }\r\n\r\n public get EditingEnabled(): boolean {\r\n return !this.Quote.IsQuoteLostOrWon && !this.Quote.IsQuoteQuoted && this.QuoteForContract;\r\n }\r\n\r\n public get EquipmentEnabled(): boolean {\r\n return this.Quote?.ModuleAccess?.EquipmentEnabled;\r\n }\r\n\r\n public Validate(): FormMessage[] {\r\n const results: FormMessage[] = [];\r\n if (this.Quote.QuoteForContract) {\r\n if (!(this.Model.ContractTypeId > 0)) {\r\n results.push({ control: \"quote.contract.type\", message: \"quotes.message.required\", args: [\"quote.contract.type\"]});\r\n }\r\n\r\n if (!(this.Model.InvoiceCycle > 0)) {\r\n results.push({ control: \"quote.contract.invoiceCycle\", message: \"quotes.message.required2\", args: [\"quote.contract.invoiceCycle\"]});\r\n }\r\n }\r\n\r\n return results;\r\n }\r\n}\r\n","import { QuoteEquipmentViewModel } from \"./quote-equipment.viewmodel\";\r\nimport { QuoteSummaryType } from \"../../enums/quote-summary-type.enum\";\r\nimport { QuoteEquipment } from \"../../models/quote-equipment.model\";\r\nimport { QuoteViewModel } from \"../quote.viewmodel\";\r\n\r\nexport class QuoteSalesOrderEquipmentViewModel extends QuoteEquipmentViewModel {\r\n\r\n public get DisplayTotal(): number {\r\n return this.Model.reduce((total, current) => total + this.GetEquipmentCharge(current), 0);\r\n }\r\n\r\n public get Total(): number {\r\n return this.Model\r\n .reduce((total, current) => total + this.GetEquipmentChargeBase(current), 0);\r\n }\r\n\r\n public get Profit(): number {\r\n return this.Model\r\n .reduce((total, current) => total + (this.GetEquipmentChargeBase(current) - Number(current.Cost) * Number(current.QtyRequired)) , 0);\r\n }\r\n\r\n public get Type(): QuoteSummaryType {\r\n return QuoteSummaryType.SalesOrder;\r\n }\r\n\r\n public get TypeEnabled(): boolean {\r\n return this.Quote?.QuoteForSalesOrder ?? false;\r\n }\r\n\r\n constructor(data: QuoteEquipment[], quote: QuoteViewModel ) {\r\n super(data, quote);\r\n }\r\n}\r\n","import { QuoteMaterialsViewModel } from \"./quote-materials.viewmodel\";\r\nimport { QuoteSummaryType } from \"../../enums/quote-summary-type.enum\";\r\nimport { QuoteMaterial } from \"../../models/quote-material.model\";\r\nimport { QuoteViewModel } from \"../quote.viewmodel\";\r\n\r\nexport class QuoteSalesOrderMaterialsViewModel extends QuoteMaterialsViewModel {\r\n\r\n public get Total(): number {\r\n if(!this.Model) {\r\n return 0;\r\n }\r\n return this.Model.reduce((total, current) => total + (Number(current.Charge)), 0);\r\n }\r\n\r\n public get DisplayTotal(): number {\r\n if(!this.Model) {\r\n return 0;\r\n }\r\n return this.Model\r\n .reduce((total, current) => total + (this.Quote.convertAndRound(Number(current.Charge))), 0);\r\n }\r\n\r\n public get Profit(): number {\r\n if(!this.Model) {\r\n return 0;\r\n }\r\n return this.Model.reduce((total, current) => total + (Number(current.Charge) - Number(current.Cost)) , 0);\r\n }\r\n\r\n public get ProfitPercentage(): string {\r\n return this.FormatPercentage(this.Total, this.Profit);\r\n }\r\n\r\n public get Type(): QuoteSummaryType {\r\n return QuoteSummaryType.SalesOrder;\r\n }\r\n\r\n public get TypeEnabled(): boolean {\r\n return this.Quote.QuoteForSalesOrder;\r\n }\r\n\r\n constructor(data: QuoteMaterial[], quote: QuoteViewModel) {\r\n super(data, quote);\r\n }\r\n}\r\n","import { FormMessage, ViewModel } from \"servicesight-shared\";\r\nimport { QuoteSalesOrderEquipmentViewModel } from \"./equipment/quote-sales-order-equipment.viewmodel\";\r\nimport { QuoteSalesOrderMaterialsViewModel } from \"./materials/quote-sales-order-materials.viewmodel\";\r\nimport { QuotePartsViewModel } from \"./quote-parts.viewmodel\";\r\nimport { QuoteViewModel } from \"./quote.viewmodel\";\r\nimport { QuoteSalesOrder } from \"../models/quote-salesorder-model\";\r\n\r\nexport class QuoteSalesOrderViewModel extends ViewModel {\r\n public Parts: QuotePartsViewModel;\r\n public Materials: QuoteSalesOrderMaterialsViewModel;\r\n public Equipment: QuoteSalesOrderEquipmentViewModel;\r\n ModelChanged: () => void;\r\n\r\n public get Total(): number {\r\n return this.Quote.SalesOrder.Equipment.Total\r\n + this.Quote.SalesOrder.Materials.Total\r\n + this.Quote.SalesOrder.Parts.TotalPrice\r\n + Number(this.Model.Carriage);\r\n }\r\n\r\n public get DisplayTotal(): number {\r\n return this.Quote.SalesOrder.Equipment.DisplayTotal\r\n + this.Quote.SalesOrder.Materials.DisplayTotal\r\n + this.Quote.SalesOrder.Parts.TotalDisplayPrice\r\n + this.Quote.convertAndRound(Number(this.Model.Carriage));\r\n }\r\n\r\n public get Profit(): number {\r\n return this.Quote.SalesOrder.Equipment.Profit + this.Quote.SalesOrder.Materials.Profit + this.Quote.SalesOrder.Parts.TotalProfit;\r\n }\r\n\r\n public get CarriageInForeignCurrency(): number {\r\n return this.Model.Carriage * this.Quote.ExchangeRate;\r\n }\r\n\r\n public get UseCustomerCurrency(): boolean {\r\n return this.Quote.UseCustomerCurrency;\r\n }\r\n\r\n public get SelectedCurrencySymbol(): string {\r\n return this.Quote.SelectedCurrencySymbol;\r\n }\r\n\r\n public get BaseCurrencySymbol(): string {\r\n return this.Quote.BaseCurrencySymbol;\r\n }\r\n\r\n public get SelectedExchangeRate(): number {\r\n return this.Quote.SelectedExchangeRate;\r\n }\r\n\r\n public get CostsVisible(): boolean {\r\n return this.Quote?.ModuleAccess?.ProEnabled;\r\n }\r\n\r\n public get PartsVisible(): boolean {\r\n return this.Quote?.ModuleAccess?.StockEnabled;\r\n }\r\n\r\n public get IsQuoteLostOrWon(): boolean {\r\n return this.Quote.IsQuoteLostOrWon;\r\n }\r\n\r\n public get EditingEnabled(): boolean {\r\n return !this.Quote.IsQuoteLostOrWon && !this.Quote.IsQuoteQuoted && this.QuoteForSalesOrder;\r\n }\r\n\r\n public get QuoteForSalesOrder(): boolean {\r\n return this.Quote.QuoteForSalesOrder;\r\n }\r\n\r\n public set QuoteForSalesOrder(value: boolean) {\r\n this.Quote.QuoteForSalesOrder = value;\r\n }\r\n\r\n constructor(data: QuoteSalesOrder = null, public Quote: QuoteViewModel = null) {\r\n super(data ?? {\r\n QuoteSalesOrderId: 0,\r\n RevisionId: 0,\r\n Instructions: \"\",\r\n Carriage: 0,\r\n Parts: null,\r\n Equipments: null,\r\n Materials: null\r\n });\r\n\r\n this.Parts = new QuotePartsViewModel(data?.Parts ?? [], Quote);\r\n this.Materials = new QuoteSalesOrderMaterialsViewModel(data?.Materials ?? [], Quote);\r\n this.Equipment = new QuoteSalesOrderEquipmentViewModel(data?.Equipments ?? [], Quote);\r\n }\r\n\r\n public Validate(): FormMessage[] {\r\n return [];\r\n }\r\n}\r\n","export enum QuoteDetailLevel {\r\n Detailed = 1,\r\n Summary = 2,\r\n Total = 3\r\n}\r\n","import { FormMessage, SalesQuoteStatus, ViewModel } from \"servicesight-shared\";\r\nimport { QuoteViewModel } from \"./quote.viewmodel\";\r\nimport { QuoteDetailLevel } from \"../enums/quote-detail-level.enum\";\r\nimport { QuoteSummaryType } from \"../enums/quote-summary-type.enum\";\r\nimport { QuoteSummaryItem } from \"../models/quote-summary-item.model\";\r\nimport { QuoteSummary } from \"../models/quote-summary.model\";\r\n\r\nexport class QuoteSummaryViewModel extends ViewModel {\r\n\r\n public detailLevelItems = [\r\n { level: QuoteDetailLevel.Detailed, name: \"label.detailed\" },\r\n { level: QuoteDetailLevel.Summary, name: \"label.summary\" },\r\n { level: QuoteDetailLevel.Total, name: \"label.totalOnly\" }\r\n ];\r\n\r\n public summaryItems: QuoteSummaryItem[] = [];\r\n\r\n public get isCustomerCurrency(): boolean {\r\n return this.Quote.UseCustomerCurrency;\r\n }\r\n\r\n public get ExchangeRate(): number {\r\n return this.Quote.SelectedExchangeRate;\r\n }\r\n\r\n public get CurrencySymbol(): string {\r\n return this.Quote.SelectedCurrencySymbol;\r\n }\r\n\r\n public get JobEnabled(): boolean {\r\n return this.Quote.getSummaryItem(QuoteSummaryType.Job).IsSelected;\r\n }\r\n\r\n public get JobTotal(): number {\r\n return this.JobEnabled ? this.Quote.Job.Total : 0;\r\n }\r\n\r\n public get JobDisplayTotal(): number {\r\n return this.JobEnabled ? this.Quote.Job.DisplayTotal : 0;\r\n }\r\n\r\n public get SalesOrderEnabled(): boolean {\r\n return this.Quote.getSummaryItem(QuoteSummaryType.SalesOrder).IsSelected;\r\n }\r\n\r\n public get SalesOrderTotal(): number {\r\n return this.SalesOrderEnabled ? this.Quote.SalesOrder.Total: 0;\r\n }\r\n\r\n public get SalesOrderDisplayTotal(): number {\r\n return this.SalesOrderEnabled ? this.Quote.SalesOrder.DisplayTotal: 0;\r\n }\r\n\r\n public get ContractEnabled(): boolean {\r\n return this.Quote.getSummaryItem(QuoteSummaryType.Contract).IsSelected;\r\n }\r\n\r\n public get ContractTotal(): number {\r\n return this.ContractEnabled ? this.Quote.ServiceContract.Total : 0;\r\n }\r\n\r\n public get ContractDisplayTotal(): number {\r\n return this.ContractEnabled ? this.Quote.ServiceContract.DisplayTotal : 0;\r\n }\r\n\r\n public get QuoteTotal(): number {\r\n return this.JobTotal + this.ContractTotal + this.SalesOrderTotal;\r\n }\r\n\r\n public get QuoteDisplayTotal(): number {\r\n return this.JobDisplayTotal +\r\n this.ContractDisplayTotal +\r\n this.SalesOrderDisplayTotal;\r\n }\r\n\r\n public get IsExchangeRateOkToChange(): boolean {\r\n return this.Quote.Model.Status !== SalesQuoteStatus.QUOTED &&\r\n this.Quote.Model.Status !== SalesQuoteStatus.WON &&\r\n this.Quote.Model.Status !== SalesQuoteStatus.LOST;\r\n }\r\n\r\n constructor(data: QuoteSummary = null, public Quote: QuoteViewModel = null) {\r\n super(data ?? { Detail: QuoteDetailLevel.Total, QuoteTerms: null, QuoteSummary: null, ShowVAT: true });\r\n this.Model.Detail = this.Model.Detail ?? QuoteDetailLevel.Detailed;\r\n this.Model.ShowVAT = this.Model.ShowVAT ?? false;\r\n }\r\n\r\n public Validate(): FormMessage[] {\r\n return [];\r\n }\r\n\r\n}\r\n","import { FormMessage, ModuleAccessModel, SalesQuoteStatus, ViewModel } from \"servicesight-shared\";\r\nimport { ExampleViewModel } from \"./example.viewmodel\";\r\nimport { QuoteContractViewModel } from \"./quote-contract.viewmodel\";\r\nimport { QuoteJobViewModel } from \"./quote-job.viewmodel\";\r\nimport { QuoteSalesOrderViewModel } from \"./quote-salesorder.viewmodel\";\r\nimport { QuoteSummaryViewModel } from \"./quote-summary.viewmodel\";\r\nimport { QuoteSummaryType } from \"../enums/quote-summary-type.enum\";\r\nimport { QuoteTab } from \"../enums/quote-tab.enum\";\r\nimport { QuoteSummaryItem } from \"../models/quote-summary-item.model\";\r\nimport { Quote } from \"../models/quote.model\";\r\nimport { QuoteEquipment } from \"../models/quote-equipment.model\";\r\nimport { DiscountType } from \"../../shared/enums/discount-type.enum\";\r\nimport { BankersRoundService } from \"src/app/shared/services/bankers-round.service\";\r\n\r\nexport class QuoteViewModel extends ViewModel {\r\n\r\n private readonly defaultSummaryItems = [\r\n { ItemId: QuoteSummaryType.Job, IsSelected: false, Summary: 0 },\r\n { ItemId: QuoteSummaryType.SalesOrder, IsSelected: false, Summary: 0 },\r\n { ItemId: QuoteSummaryType.Contract, IsSelected: false, Summary: 0 },\r\n ];\r\n\r\n public ModuleAccess: ModuleAccessModel;\r\n public BaseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n public Example: ExampleViewModel;\r\n public Summary: QuoteSummaryViewModel;\r\n public Job: QuoteJobViewModel;\r\n public SalesOrder: QuoteSalesOrderViewModel;\r\n public ServiceContract: QuoteContractViewModel;\r\n public UseCustomerCurrency: boolean = false;\r\n\r\n public get SelectedCurrencySymbol(): string {\r\n return this.UseCustomerCurrency ? this.Model.CurrencySymbol : this.Model.BaseCurrencySymbol;\r\n }\r\n\r\n public get SelectedCurrencyCode(): string {\r\n return this.UseCustomerCurrency ? this.Model.CurrencyCode : this.Model.BaseCurrencyCode;\r\n }\r\n\r\n public get SelectedExchangeRate(): number {\r\n return this.UseCustomerCurrency ? this.Model.ExchangeRate : 1;\r\n }\r\n\r\n public CurrentTab: QuoteTab = QuoteTab.Details;\r\n\r\n public get IsQuoteLostOrWon(): boolean {\r\n return this.Model && (\r\n this.Model.Status === SalesQuoteStatus.CANCELLED ||\r\n this.Model.Status === SalesQuoteStatus.WON ||\r\n this.Model.Status === SalesQuoteStatus.LOST ||\r\n this.Model.Status === SalesQuoteStatus.NOT_REQUIRED);\r\n }\r\n\r\n public get IsQuoteQuoted(): boolean {\r\n return this.Model && this.Model.Status === SalesQuoteStatus.QUOTED;\r\n }\r\n\r\n public get IsNew(): boolean {\r\n return this.Model && !this.Model.SalesQuotationId;\r\n }\r\n\r\n public get QuoteTotal(): number {\r\n let total = 0;\r\n if (this.Model && this.Model.SalesQuotationSummary) {\r\n this.Model.SalesQuotationSummary.forEach(item => {\r\n if (item.IsSelected) {\r\n total += item.Summary;\r\n }\r\n });\r\n }\r\n return total;\r\n }\r\n\r\n public get ShowCurrencySwitch(): boolean {\r\n return this.Model.BaseCurrencyCode !== this.Model.CurrencyCode;\r\n }\r\n\r\n public get QuoteForJob(): boolean {\r\n return this.getSummaryItem(QuoteSummaryType.Job).IsSelected;\r\n }\r\n\r\n public set QuoteForJob(value: boolean) {\r\n this.getSummaryItem(QuoteSummaryType.Job).IsSelected = value;\r\n if (this.ModelChanged) {\r\n this.ModelChanged();\r\n }\r\n }\r\n\r\n public get QuoteForSalesOrder(): boolean {\r\n return this.getSummaryItem(QuoteSummaryType.SalesOrder).IsSelected;\r\n }\r\n\r\n public set QuoteForSalesOrder(value: boolean) {\r\n this.getSummaryItem(QuoteSummaryType.SalesOrder).IsSelected = value;\r\n if (this.ModelChanged) {\r\n this.ModelChanged();\r\n }\r\n }\r\n\r\n public get QuoteForContract(): boolean {\r\n return this.getSummaryItem(QuoteSummaryType.Contract).IsSelected;\r\n }\r\n\r\n public set QuoteForContract(value: boolean) {\r\n this.getSummaryItem(QuoteSummaryType.Contract).IsSelected = value;\r\n if (this.ModelChanged) {\r\n this.ModelChanged();\r\n }\r\n }\r\n\r\n public get CurrencySymbol(): string {\r\n return this.Model.CurrencySymbol;\r\n }\r\n\r\n public get ExchangeRate(): number {\r\n return this.Model.ExchangeRate;\r\n }\r\n\r\n public get ProEnabled(): boolean {\r\n return this.ModuleAccess?.ProEnabled;\r\n }\r\n\r\n public get CustomerId(): number {\r\n return this.Model.CustomerId;\r\n }\r\n\r\n constructor(data: Quote, private bankersRoundService: BankersRoundService) {\r\n super(data);\r\n data.SalesQuotationSummary = data.SalesQuotationSummary || this.defaultSummaryItems;\r\n data.BaseCurrencyCode = data.BaseCurrencyCode || JSON.parse(localStorage.getItem(\"ls.BaseCurrencyCode\"));\r\n data.BaseCurrencySymbol = data.BaseCurrencySymbol || JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n data.CurrencyCode = data.CurrencyCode || JSON.parse(localStorage.getItem(\"ls.BaseCurrencyCode\"));\r\n data.CurrencySymbol = data.CurrencySymbol || JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n data.ExchangeRate = data.ExchangeRate || 1;\r\n\r\n this.Example = new ExampleViewModel(data.Example, this);\r\n this.Summary = new QuoteSummaryViewModel(data, this);\r\n this.Job = new QuoteJobViewModel(data.Job, this);\r\n this.SalesOrder = new QuoteSalesOrderViewModel(data.QuoteSalesOrder, this);\r\n this.ServiceContract = new QuoteContractViewModel(data.ServiceContract, this);\r\n }\r\n\r\n\r\n public Validate(): FormMessage[] {\r\n const results: FormMessage[] = [];\r\n if(!this.Model.CustomerId) {\r\n results.push({ control: \"quotes.customer.name\", message: \"quotes.message.required\", args: [\"quotes.customer.name\"]});\r\n }\r\n if(!this.Model.SiteId) {\r\n results.push({ control: \"quotes.site.name\", message: \"quotes.message.required\", args: [\"quotes.site.name\"]});\r\n }\r\n\r\n results.push(...this.Example.Validate());\r\n results.push(...this.Summary.Validate());\r\n results.push(...this.Job.Validate());\r\n results.push(...this.ServiceContract.Validate());\r\n return results;\r\n }\r\n\r\n public getSummaryItem(type: QuoteSummaryType): QuoteSummaryItem {\r\n return (this.Model.SalesQuotationSummary || []).find(i => i.ItemId === type);\r\n }\r\n\r\n /*\r\n Uses same steps as report:\r\n UnitCost = round(convert(price))\r\n Carriage = round(convert(carriage))\r\n FlatCharge = (UnitCost * qty) + Carriage\r\n Discount = round(convert(discount)) OR FlatCharge * (discount / 100)\r\n Total = FlatCharge - Discount\r\n */\r\n public getEquipmentCharge(equipment: QuoteEquipment): number {\r\n const unitPrice = this.convertAndRound(equipment?.Price);\r\n const carriage = this.convertAndRound(equipment?.Carriage);\r\n const flatCharge = ((equipment?.QtyRequired || 0) * unitPrice) + carriage;\r\n\r\n let discount: number = 0;\r\n\r\n switch(equipment?.DiscountType) {\r\n case DiscountType.Value:\r\n discount = this.convertAndRound(equipment.Discount);\r\n break;\r\n case DiscountType.Percentage:\r\n discount = flatCharge * ((equipment.Discount || 0) / 100);\r\n break;\r\n }\r\n\r\n return flatCharge - discount;\r\n }\r\n\r\n public getEquipmentChargeBase(equipment: QuoteEquipment): number {\r\n const unitPrice = equipment?.Price || 0;\r\n const carriage = equipment?.Carriage || 0;\r\n const flatCharge = ((equipment?.QtyRequired || 0) * unitPrice) + carriage;\r\n\r\n let discount: number = 0;\r\n\r\n switch(equipment?.DiscountType) {\r\n case DiscountType.Value:\r\n discount = equipment.Discount;\r\n break;\r\n case DiscountType.Percentage:\r\n discount = flatCharge * ((equipment.Discount || 0) / 100);\r\n break;\r\n }\r\n\r\n return flatCharge - discount;\r\n }\r\n\r\n public convertAndRound(value: number): number {\r\n return this.bankersRoundService.bankersRound((value || 0) * this.SelectedExchangeRate, 2);\r\n }\r\n}\r\n","export class AccordionCancelReasonModel {\r\n CancelReasonID: number;\r\n Name: string;\r\n Description: string;\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ 'accordion.quotes.CreatedBy' | translate }}{{createdBy.Employee}}
{{ 'accordion.quotes.CreatedDate' | translate }}{{quote.RequestedDate | date: 'short'}}
{{ 'accordion.quotes.CancellationDate' | translate }}{{quote.CancelDate | date: \"shortDate\"}}
{{ 'accordion.quotes.CancellationReason' | translate }}{{cancelReason.Name}}
{{ 'accordion.quotes.SentDate' | translate }}{{quote.QuoteDate | date: 'short'}}
{{ 'accordion.quotes.EmailedTo' | translate }}\r\n

{{email}}

\r\n
{{ 'accordion.quotes.JobNo' | translate }}\r\n {{quote.JobId}}\r\n
{{ 'accordion.quotes.ServiceContractNo' | translate }}\r\n {{quote.ServiceContractId}}\r\n
{{ 'accordion.quotes.SalesOrderNo' | translate }}\r\n {{quote.SalesOrderId}}\r\n
\r\n","import { Component, Input, OnChanges, SimpleChanges } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { SalesQuoteStatus } from \"servicesight-shared\";\r\nimport { AccordionDataService } from \"../accordion-data.service\";\r\nimport { AccordionCancelReasonModel } from \"../models/cancel-reason-model\";\r\nimport { AccordionEmployeeModel } from \"../models/employee-model\";\r\nimport { AccordionQuoteDetailsModel } from \"../models/quote-details-model\";\r\n\r\n@Component({\r\n selector: \"app-quote-details-accordion-item\",\r\n templateUrl: \"./quote-details-accordion-item.component.html\",\r\n styleUrls: [\"./quote-details-accordion-item.component.scss\"]\r\n})\r\nexport class QuoteDetailsAccordionItemComponent implements OnChanges {\r\n @Input() quoteId: number;\r\n @Input() revisionId: number;\r\n @Input() status: number;\r\n\r\n quote: AccordionQuoteDetailsModel;\r\n createdBy: AccordionEmployeeModel;\r\n cancelReason: AccordionCancelReasonModel;\r\n recipients: string[];\r\n\r\n constructor(\r\n private dataService: AccordionDataService,\r\n private translate: TranslateService) { }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if ((changes.quoteId && changes.quoteId.currentValue !== changes.quoteId.previousValue && !changes.quoteId.isFirstChange()) ||\r\n (changes.revisionId && changes.revisionId.currentValue !== changes.revisionId.previousValue && !changes.revisionId.isFirstChange()) ||\r\n (changes.status && changes.status.currentValue !== changes.status.previousValue && !changes.status.isFirstChange())) {\r\n\r\n this.reloadData();\r\n }\r\n }\r\n\r\n reloadData(): void {\r\n if (this.quoteId && this.revisionId) {\r\n this.dataService.getQuoteDetailsData(this.quoteId, this.revisionId).subscribe(x => {\r\n this.quote = x;\r\n\r\n this.recipients = this.splitSentTo(x.SentTo);\r\n\r\n if (this.quote.CreatedById && this.quote.CreatedById !== 0) {\r\n this.dataService.getEmployeeName(this.quote.CreatedById).subscribe(e => this.createdBy = e);\r\n }\r\n\r\n if (this.quote.CancelReasonId && this.quote.CancelReasonId !== 0) {\r\n if(this.quote.CancelReasonId === -1) {\r\n this.translate.get(\"accordion.quotes.system-error\").subscribe(c => {\r\n this.cancelReason = new AccordionCancelReasonModel();\r\n this.cancelReason.Name = c;\r\n });\r\n } else {\r\n this.dataService.getCancelReasonName(this.quote.CancelReasonId).subscribe(c => this.cancelReason = c);\r\n }\r\n }\r\n });\r\n }\r\n }\r\n\r\n splitSentTo(sentTo: string): string[] {\r\n if (sentTo) {\r\n return sentTo.split(/[\\s,;]+/);\r\n }\r\n return null;\r\n }\r\n\r\n IsQuoteStatusWon(): boolean {\r\n return this.status === SalesQuoteStatus.WON;\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{quote.SalesQuotationId}}/{{quote.RevisionId}}\r\n \r\n
\r\n {{quote.Status | quoteStatus | translate}}\r\n \r\n
\r\n
","import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges } from \"@angular/core\";\r\nimport { AccordionDataService } from \"../accordion-data.service\";\r\nimport { AccordionQuoteRevisionModel } from \"../models/quote-revision-model\";\r\n\r\n@Component({\r\n selector: \"app-quote-revisions-accordion-item\",\r\n templateUrl: \"./quote-revisions-accordion-item.component.html\",\r\n styleUrls: [\"./quote-revisions-accordion-item.component.scss\"]\r\n})\r\nexport class QuoteRevisionsAccordionItemComponent implements OnChanges {\r\n @Input() quoteId: number;\r\n @Input() revisionId: number;\r\n @Input() status: number;\r\n @Output() clickRevision = new EventEmitter();\r\n public quotes: AccordionQuoteRevisionModel[];\r\n\r\n constructor(private dataService: AccordionDataService) {\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if ((changes.quoteId && changes.quoteId.currentValue !== changes.quoteId.previousValue && !changes.quoteId.isFirstChange()) ||\r\n (changes.revisionId && changes.revisionId.currentValue !== changes.revisionId.previousValue && !changes.revisionId.isFirstChange()) ||\r\n (changes.status && changes.status.currentValue !== changes.status.previousValue && !changes.status.isFirstChange())) {\r\n\r\n this.Reload();\r\n }\r\n }\r\n\r\n Reload(): void {\r\n if (this.quoteId) {\r\n this.dataService.getQuoteRevisionsData(this.quoteId).subscribe(x => this.quotes = x);\r\n }\r\n }\r\n\r\n public clickRevisionLink(revisionId: number): void {\r\n this.clickRevision.emit(revisionId);\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { AbstractControl, AsyncValidatorFn } from \"@angular/forms\";\r\nimport { Observable } from \"rxjs\";\r\nimport { debounceTime, distinctUntilChanged, map } from \"rxjs/operators\";\r\nimport { CustomerService } from \"../services/customer/customer.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\n\r\nexport class AccountNumberValidator {\r\n\r\n constructor(private readonly customerService: CustomerService) {\r\n }\r\n\r\n public accountNumberAvailabilityAsyncValidator = (): AsyncValidatorFn => (c: AbstractControl): Observable<{ [key: string]: any } | null> => {\r\n if ((c.value === null) || String(c.value).length === 0) {\r\n return null;\r\n }\r\n return this.customerService.GetDoesAccountNumberAvailable(c.value).pipe(\r\n distinctUntilChanged(),\r\n debounceTime(1000),\r\n map((accountNumberResponse: boolean) => {\r\n if (accountNumberResponse) {\r\n return null;\r\n } else {\r\n return { invalid: true };\r\n }\r\n })\r\n );\r\n };\r\n}\r\n","\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n {{ 'customer.accountnumber.note1' | translate }}\r\n

\r\n \r\n {{ 'customer.accountnumber.note2' | translate }}\r\n

\r\n
\r\n \r\n \r\n {{ wonQuoteConfirmationMessage | translate }}\r\n

\r\n \r\n {{ 'customer.accountnumber.wonquote.note2' | translate }}\r\n

\r\n
\r\n
\r\n \r\n \r\n \r\n {{ 'customer.accountnumber.alreadyexist' | translate }}\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n","import { Component, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\r\nimport { UntypedFormBuilder, UntypedFormGroup, Validators } from \"@angular/forms\";\r\nimport { AccountNumberValidator } from \"../../validators/account-number.validator\";\r\n\r\n@Component({\r\n selector: \"app-account-number\",\r\n templateUrl: \"./account-number.component.html\",\r\n styleUrls: [\"./account-number.component.scss\"]\r\n})\r\n\r\nexport class AccountNumberComponent implements OnInit {\r\n\r\n @Input() wonQuoteConfirmationMessage: string = \"\";\r\n @Output() cancelAccountNumber: EventEmitter = new EventEmitter();\r\n @Output() okAccountNumber: EventEmitter = new EventEmitter();\r\n\r\n public customerFormGroup: UntypedFormGroup;\r\n\r\n constructor(\r\n private readonly formBuilder: UntypedFormBuilder,\r\n private readonly accountNumberValidator: AccountNumberValidator) { }\r\n\r\n public ngOnInit(): void {\r\n this.initialCustomerAccountNumberForm();\r\n }\r\n\r\n public get customerFormControls() {\r\n return this.customerFormGroup !== undefined\r\n ? this.customerFormGroup.controls : null;\r\n }\r\n\r\n public cancel(): void {\r\n this.cancelAccountNumber.emit();\r\n }\r\n\r\n public ok(): void {\r\n this.okAccountNumber.emit(this.customerFormControls.accountNumber.value);\r\n }\r\n\r\n public okBtnStatus(): boolean {\r\n let status = false;\r\n const errors = this.customerFormControls.accountNumber.errors;\r\n if (errors !== null) {\r\n status = errors.invalid;\r\n }\r\n return status;\r\n }\r\n\r\n public popupHiding(): void {\r\n this.cancel();\r\n }\r\n\r\n private initialCustomerAccountNumberForm(): void {\r\n // setup the initial form for customer account number.\r\n this.customerFormGroup = this.formBuilder.group({\r\n accountNumber: [\r\n // initial value\r\n null,\r\n {\r\n // sync built-in validators\r\n validators: Validators.compose([\r\n Validators.required, Validators.maxLength(52)\r\n ]),\r\n // custom async validator (for unique account number)\r\n asyncValidators: this.accountNumberValidator.accountNumberAvailabilityAsyncValidator()\r\n }\r\n ]\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
{{contact.Contact}}
\r\n
{{contact.CustomerName}}
\r\n
{{contact.JobTitle}}
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n","import { Component, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\r\nimport { ControlContainer, NgForm } from \"@angular/forms\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport {\r\n ContactService,\r\n CustomerService,\r\n CustomerStatus,\r\n PhraseBookType,\r\n SettingId,\r\n SettingsService,\r\n UICustomisation,\r\n UserReferenceService,\r\n UserRefType\r\n} from \"servicesight-shared\";\r\nimport { ContactStatus } from \"src/app/shared/enums/contact-status.eum\";\r\nimport { BankersRoundService } from \"src/app/shared/services/bankers-round.service\";\r\nimport { Ng1ContactService } from \"src/app/shared/services/ng1-contact.service\";\r\nimport { Ng1CustomerService } from \"src/app/shared/services/ng1-customer.service\";\r\nimport { Quote } from \"../models/quote.model\";\r\nimport { ViewModelComponent } from \"../view-model-component.class\";\r\nimport { QuoteViewModel } from \"../view-models/quote.viewmodel\";\r\n\r\n@Component({\r\n selector: \"app-quote-details-tab\",\r\n templateUrl: \"./quote-details-tab.component.html\",\r\n styleUrls: [\"./quote-details-tab.component.scss\"],\r\n viewProviders: [ { provide: ControlContainer, useExisting: NgForm } ]\r\n})\r\nexport class QuoteDetailsTabComponent extends ViewModelComponent implements OnInit {\r\n @Input() public Model: QuoteViewModel = new QuoteViewModel({ SalesQuotationId: null, RevisionId: null }, this.bankersRoundService);\r\n\r\n @Output() public ModelChanged = new EventEmitter();\r\n @Output() public CustomerChanged = new EventEmitter();\r\n\r\n public customers: DataSource;\r\n public contacts: DataSource;\r\n public sites: DataSource;\r\n public references: DataSource;\r\n\r\n public phraseType = PhraseBookType;\r\n public userRef1Label: string;\r\n public userRef2Label: string;\r\n public hasManagingAgentOptionEnabled: boolean = false;\r\n\r\n constructor(\r\n private userRefService: UserReferenceService,\r\n private contactService: ContactService,\r\n private customerService: CustomerService,\r\n private ng1CustomerService: Ng1CustomerService,\r\n private ng1ContactService: Ng1ContactService,\r\n private settingsService: SettingsService,\r\n private bankersRoundService: BankersRoundService){\r\n super();\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.userRef1Label = this.userRefService.getLabel(UICustomisation.QUOTE_REF1);\r\n this.userRef2Label = this.userRefService.getLabel(UICustomisation.QUOTE_REF2);\r\n this.references = this.userRefService.getListDataSource(UserRefType.QUOTE_1);\r\n\r\n this.contacts = this.contactService.GetContactsDataSource();\r\n this.customers = this.customerService.GetCustomersDataSource();\r\n this.sites = this.customerService.GetCustomersDataSource();\r\n\r\n this.settingsService.getSetting(SettingId.CustomerManagingAgents).subscribe(setting => {\r\n this.hasManagingAgentOptionEnabled = setting.ValueBool;\r\n this.filterCustomers();\r\n });\r\n }\r\n\r\n public IsSite(customer: { CustomerId: number; InvoiceId: number }): boolean {\r\n return customer.CustomerId !== customer.InvoiceId;\r\n }\r\n\r\n public NewCustomer(): void {\r\n let customerId = 0;\r\n this.ng1CustomerService.openCustomerModal(\"customer\")\r\n .then((id: number) => {\r\n customerId = id;\r\n return this.customers.reload();\r\n })\r\n .then(() => {\r\n this.Model.Model.CustomerId = customerId;\r\n this.Model.Model.ContactId = null;\r\n this.customerChanged(customerId, true);\r\n });\r\n }\r\n\r\n public NewSite() {\r\n let siteId = 0;\r\n this.ng1CustomerService.openCustomerModal(\"site\", this.Model.Model.CustomerId)\r\n .then((id: number) => {\r\n siteId = id;\r\n return this.sites.reload();\r\n })\r\n .then(() => {\r\n this.Model.Model.ContactId = null;\r\n this.Model.Model.SiteId = siteId;\r\n this.filterAndReloadContacts();\r\n this.ModelChanged.emit();\r\n });\r\n }\r\n\r\n public NewContact() {\r\n let contactId = 0;\r\n this.ng1ContactService.openContactModal(0, this.Model.Model.SiteId)\r\n .then((id: number) => {\r\n contactId = id;\r\n return this.filterAndReloadContacts();\r\n })\r\n .then(() => {\r\n this.Model.Model.ContactId = contactId;\r\n this.ModelChanged.emit();\r\n });\r\n }\r\n\r\n public OnCustomerChanged(e): void {\r\n if (e.value) {\r\n this.customerChanged(e.value, e.event);\r\n }\r\n }\r\n\r\n public OnSiteChanged(e): void {\r\n if (e.value) {\r\n this.filterAndReloadContacts().then(() => {\r\n if (e.event) {\r\n this.Model.Model.ContactId = null;\r\n }\r\n });\r\n }\r\n }\r\n\r\n public UpdateInternalNotes(notes: string): void {\r\n this.Model.Model.QuoteComment = notes; // TODO: Change phrase book component to use ngModel\r\n this.ModelChanged.emit();\r\n }\r\n\r\n private customerChanged(customerId: number, changeSite: boolean): void {\r\n this.CustomerChanged.emit(this.Model.Model.CustomerId);\r\n this.sites.filter([[\"InvoiceID\", \"=\", customerId], \"and\",\r\n [[\"Status\", \"=\", CustomerStatus.ACTIVE], \"or\", [\"Status\", \"=\", CustomerStatus.PROSPECT]]]);\r\n this.sites.load().then(() => {\r\n if (changeSite) {\r\n this.Model.Model.SiteId = customerId;\r\n this.filterAndReloadContacts();\r\n this.ModelChanged.emit();\r\n }\r\n });\r\n }\r\n\r\n private filterAndReloadContacts(): Promise {\r\n return this.customers.store().byKey(this.Model.Model.CustomerId).then(customer => {\r\n this.customers.store().byKey(this.Model.Model.SiteId).then(site => {\r\n const filter: any[] = [\r\n [\"CustomerId\", \"=\", this.Model.Model.SiteId]\r\n , \"or\",\r\n [\"CustomerId\", \"=\", this.Model.Model.CustomerId]\r\n ];\r\n if (this.hasManagingAgentOptionEnabled) {\r\n if (customer.ManagingAgentId) {\r\n filter.push(\"or\", [\"CustomerId\", \"=\", customer.ManagingAgentId]);\r\n }\r\n if (site.ManagingAgentId && site.ManagingAgentId !== customer.ManagingAgentId) {\r\n filter.push(\"or\", [\"CustomerId\", \"=\", site.ManagingAgentId]);\r\n }\r\n }\r\n this.contacts.filter([filter, \"and\", [\"Status\", \"=\", ContactStatus.ACTIVE]]);\r\n return this.contacts.reload();\r\n });\r\n });\r\n }\r\n\r\n private filterCustomers(): void {\r\n let filter;\r\n if(this.hasManagingAgentOptionEnabled) {\r\n filter = [\r\n [[\"Status\", \"=\", CustomerStatus.ACTIVE], \"or\",\r\n [\"Status\", \"=\", CustomerStatus.PROSPECT], \"or\",\r\n [\"Status\", \"=\", CustomerStatus.MANAGING_AGENT]]\r\n , \"and\", [\"IsCustomer\", \"=\", true]\r\n ];\r\n } else {\r\n filter = [\r\n [[\"Status\", \"=\", CustomerStatus.ACTIVE], \"or\",\r\n [\"Status\", \"=\", CustomerStatus.PROSPECT]]\r\n , \"and\", [\"IsCustomer\", \"=\", true]\r\n ];\r\n }\r\n this.customers.filter(filter);\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { ODataService } from \"./odata/odata.service\";\r\nimport { IExchangeRateModel } from \"../models/iexchange-rate.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class CurrencyService {\r\n\r\n constructor(\r\n private odataService: ODataService,\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) protected config: IAppConfig) { }\r\n\r\n public getExchangeRate(currencyCodeBase: string, currencyCode: string): Observable {\r\n return this.http.get(\r\n `${this.config.apiLocations.ServiceSight}ExchangeRate/GetExchangeRate?source=${currencyCodeBase}¤cies=${currencyCode}`);\r\n }\r\n\r\n public GetDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.ServiceSightOData}CurrencyOD`,\r\n key: \"Id\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n {{ itemData.name | translate }}\r\n
\r\n
\r\n
\r\n
\r\n \r\n
    \r\n
  • \r\n \r\n {{ 'label.job' | translate }}\r\n {{ Model.JobDisplayTotal | currency: Model.CurrencySymbol }}\r\n
  • \r\n
  • \r\n \r\n {{ 'label.salesOrder' | translate }}\r\n {{ Model.SalesOrderDisplayTotal | currency: Model.CurrencySymbol }}\r\n
  • \r\n
  • \r\n \r\n {{ 'label.servicecontract' | translate }}\r\n {{ Model.ContractDisplayTotal | currency: Model.CurrencySymbol }}\r\n
  • \r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n {{ 'label.getRate' | translate }}\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges\r\n} from \"@angular/core\";\r\nimport { ControlContainer, NgForm } from \"@angular/forms\";\r\nimport { AccountingService, PhraseBookType } from \"servicesight-shared\";\r\nimport { CurrencyService } from \"src/app/shared/services/currency.service\";\r\nimport { QuoteSummary } from \"../models/quote-summary.model\";\r\nimport { ViewModelComponent } from \"../view-model-component.class\";\r\nimport { QuoteSummaryViewModel } from \"../view-models/quote-summary.viewmodel\";\r\n\r\n@Component({\r\n selector: \"app-quote-summary\",\r\n templateUrl: \"./quote-summary.component.html\",\r\n styleUrls: [\"./quote-summary.component.scss\"],\r\n viewProviders: [ { provide: ControlContainer, useExisting: NgForm } ]\r\n})\r\nexport class QuoteSummaryComponent extends ViewModelComponent implements OnInit, OnChanges {\r\n\r\n @Input() public Model: QuoteSummaryViewModel = new QuoteSummaryViewModel();\r\n\r\n @Output() public ModelChanged = new EventEmitter();\r\n @Output() public CurrencyChanged = new EventEmitter();\r\n\r\n public phraseType = PhraseBookType;\r\n public isUSCompany: boolean;\r\n\r\n constructor(\r\n private accountingService: AccountingService,\r\n private currencyService: CurrencyService\r\n ) {\r\n super();\r\n }\r\n\r\n ngOnInit(): void {\r\n this.accountingService.GetAccountsInfo().subscribe(response => {\r\n this.isUSCompany = response.IsUsaTaxSystem;\r\n });\r\n }\r\n\r\n public getRate(): void {\r\n const base: string = this.Model.Quote.Model.BaseCurrencyCode;\r\n const code: string = this.Model.Quote.Model.CurrencyCode;\r\n this.currencyService\r\n .getExchangeRate(base, code)\r\n .subscribe(res => {\r\n this.Model.Quote.Model.ExchangeRate = res.quotes[base + code];\r\n });\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n this.onChanges(changes);\r\n }\r\n\r\n public SwitchCurrency(): void {\r\n this.Model.Quote.UseCustomerCurrency = !this.Model.Quote.UseCustomerCurrency;\r\n this.CurrencyChanged.emit();\r\n }\r\n\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
{{'quote.sales.quote-for-salesorder' | translate}}
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n
\r\n

\r\n {{ 'quotes.profit' | translate: { value: (Model.Profit | currency: Model.BaseCurrencySymbol), percent: TotalProfitPercentage } }}\r\n {{ 'quote.sales-order.total' | translate: { value: Model.DisplayTotal | currency: Model.SelectedCurrencySymbol } }}\r\n

\r\n
\r\n
\r\n
\r\n
\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges\r\n} from \"@angular/core\";\r\nimport { PhraseBookType } from \"servicesight-shared\";\r\nimport { QuoteSummaryType } from \"../enums/quote-summary-type.enum\";\r\nimport { QuoteSalesOrder } from \"../models/quote-salesorder-model\";\r\nimport { QuotePercentPipe } from \"../pipes/quote-percent.pipe\";\r\nimport { ViewModelComponent } from \"../view-model-component.class\";\r\nimport { QuoteSalesOrderViewModel } from \"../view-models/quote-salesorder.viewmodel\";\r\n\r\n@Component({\r\n selector: \"app-quote-sales-tab\",\r\n templateUrl: \"./quote-sales-tab.component.html\",\r\n styleUrls: [\"./quote-sales-tab.component.scss\"],\r\n providers: [QuotePercentPipe]\r\n})\r\nexport class QuoteSalesTabComponent extends ViewModelComponent implements OnChanges, OnInit {\r\n @Input() public Model: QuoteSalesOrderViewModel = new QuoteSalesOrderViewModel();\r\n @Output() public ModelChanged = new EventEmitter();\r\n\r\n public phraseType = PhraseBookType;\r\n\r\n public get TotalProfitPercentage(): string {\r\n return this.quotePercentPipe.transform(this.Model.Total, this.Model.Profit);\r\n }\r\n\r\n public get SalesOrderSituation(): QuoteSummaryType {\r\n return QuoteSummaryType.SalesOrder;\r\n }\r\n\r\n constructor(private quotePercentPipe: QuotePercentPipe) {\r\n super();\r\n }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n this.onChanges(changes);\r\n }\r\n}\r\n","import { MakeModelItem } from \"../../settings/models/makemodel\";\r\nimport { ICustomer } from \"../../shared/models/icustomer.interface\";\r\nimport { ServiceContractEquipmentModel } from \"../../service-contracts/models/service-contract-equipment.model\";\r\n\r\nexport class EquipmentContractModel {\r\n public Id?: number;\r\n public Site?: ICustomer;\r\n public EquipNo?: string;\r\n public MakeModel?: MakeModelItem;\r\n public StartDate: Date = new Date();\r\n public EndDate?: Date;\r\n public Charge: number = 0;\r\n public Equipment?: ServiceContractEquipmentModel;\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { ContractInvoiceCycleEnum } from \"../../shared/enums/contract-invoice-cycle.enum\";\r\nimport { QuoteContractInvoiceCycleModel } from \"../../shared/models/quote-contract-invoice-cycle.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class QuoteContractInvoiceTypeService {\r\n\r\n private invoiceCycle: QuoteContractInvoiceCycleModel[] = [\r\n { CycleType: ContractInvoiceCycleEnum.Daily, Description: \"label.contract.invoiceCycle.daily\" },\r\n { CycleType: ContractInvoiceCycleEnum.Weekly, Description: \"label.contract.invoiceCycle.weekly\" },\r\n { CycleType: ContractInvoiceCycleEnum.Monthly, Description: \"label.contract.invoiceCycle.monthly\" },\r\n { CycleType: ContractInvoiceCycleEnum.Quarterly, Description: \"label.contract.invoiceCycle.quarterly\" },\r\n { CycleType: ContractInvoiceCycleEnum.Annually, Description: \"label.contract.invoiceCycle.annually\" }\r\n ];\r\n\r\n public GetInvoiceCycles(): QuoteContractInvoiceCycleModel[] {\r\n return this.invoiceCycle;\r\n }\r\n}\r\n","import { Component, EventEmitter, Input, Output, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent, DxPopupComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { SiteService } from \"../../services/site/site.service\";\r\n\r\n@Component({\r\n selector: \"app-add-site-dialogue\",\r\n templateUrl: \"./add-site-dialogue.component.html\",\r\n styleUrls: [\"./add-site-dialogue.component.scss\"]\r\n})\r\nexport class AddSiteDialogueComponent {\r\n\r\n @ViewChild(\"addSitePopup\", { static: true }) popup: DxPopupComponent;\r\n @ViewChild(\"siteGrid\", { static: true }) grid: DxDataGridComponent;\r\n\r\n visible: boolean = false;\r\n\r\n available: DataSource;\r\n\r\n selected: number[] = [];\r\n\r\n @Input() CustomerId: number;\r\n @Input() AlreadyAdded: number[];\r\n\r\n @Output() SitesAdded = new EventEmitter();\r\n\r\n newSiteSearchText: string = \"\";\r\n\r\n constructor(\r\n private siteService: SiteService,\r\n ) { }\r\n\r\n /**\r\n * Shows the add site dialog\r\n */\r\n Show() {\r\n this.available = this.siteService.GetSiteDataSource(this.CustomerId);\r\n this.selected = [];\r\n\r\n this.AlreadyAdded.forEach((existingSiteId) => {\r\n const currentFilter = this.available.filter();\r\n\r\n let newFilter;\r\n\r\n if (currentFilter.indexOf(\"and\") !== -1) {\r\n newFilter = [\r\n ...currentFilter,\r\n \"and\",\r\n [\"SiteId\", \"<>\", existingSiteId],\r\n ];\r\n } else {\r\n newFilter = [\r\n currentFilter,\r\n \"and\",\r\n [\"SiteId\", \"<>\", existingSiteId],\r\n ];\r\n }\r\n\r\n this.available.filter(newFilter);\r\n });\r\n\r\n this.visible = true;\r\n }\r\n\r\n /**\r\n * Closes the popup\r\n */\r\n Close() {\r\n this.visible = false;\r\n }\r\n\r\n /**\r\n * Should emit the sites and close\r\n */\r\n AddSite() {\r\n this.SitesAdded.emit(this.selected);\r\n this.Close();\r\n }\r\n\r\n NewSiteSearchTextChanged() {\r\n this.grid.instance.searchByText(encodeURI(this.newSiteSearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n}\r\n","\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n\r\n","
\r\n
\r\n

\r\n {{ 'quote.contract.sites' | translate }}\r\n {{ 'quote.contract.site.total' | translate: { value: Model.DisplayTotal | currency: Model.SelectedCurrencySymbol } }}\r\n

\r\n
\r\n
\r\n {{'quotes.contract.sites.remove' | translate}}\r\n {{'quotes.contract.sites.add' | translate}}\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
{{ Model.Quote.convertAndRound(data.displayValue) | currency: Model.Quote.SelectedCurrencySymbol }}
\r\n \r\n
\r\n\r\n\r\n\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport moment from \"moment\";\r\nimport { CustomerService, DateOnlyService } from \"servicesight-shared\";\r\nimport { AddSiteDialogueComponent } from \"src/app/shared/components/add-site-dialogue/add-site-dialogue.component\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\nimport { QuoteContractSiteUI } from \"../models/quote-contract-site-ui.model\";\r\nimport { QuoteContractSite } from \"../models/quote-contract-site.model\";\r\nimport { ViewModelComponent } from \"../view-model-component.class\";\r\nimport { QuoteContractSitesViewModel } from \"../view-models/quote-contract-sites.viewmodel\";\r\n\r\n@Component({\r\n selector: \"app-quote-contract-site\",\r\n templateUrl: \"./quote-contract-site.component.html\",\r\n styleUrls: [\"./quote-contract-site.component.scss\"]\r\n})\r\nexport class QuoteContractSiteComponent extends ViewModelComponent implements OnChanges, OnInit {\r\n\r\n @Input() public Model: QuoteContractSitesViewModel = new QuoteContractSitesViewModel();\r\n @Output() public ModelChanged = new EventEmitter();\r\n @Output() public Changed: EventEmitter = new EventEmitter();\r\n\r\n @ViewChild(\"addSitePopup\", { static: true }) popup: AddSiteDialogueComponent;\r\n\r\n public sitesContractOData: {};\r\n public sitesList: DataSource;\r\n public SelectedSiteIds: number[] = [];\r\n private newSiteId: number = -1;\r\n\r\n public minDateValue: Date = moment().startOf(\"day\").toDate();\r\n public minEndDateValue: Date = moment().add(1, \"day\").startOf(\"day\").toDate();\r\n\r\n public getMinEndDate(ev: any) {\r\n this.minEndDateValue = new Date((new Date(ev.value)).getTime() + 1000 * 60 * 60 * 24);\r\n return true;\r\n }\r\n\r\n constructor(\r\n private customerService: CustomerService,\r\n private odataService: ODataService,\r\n private dateOnlyService: DateOnlyService\r\n ) {\r\n super();\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.setupListDataSource();\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n this.onChanges(changes);\r\n this.setupListDataSource();\r\n }\r\n\r\n public get CurrencyFormat(): string {\r\n return this.Model.SelectedCurrencySymbol + \"#,##0.00\";\r\n }\r\n\r\n public onRemoveItemButtonClicked(): void {\r\n if (this.SelectedSiteIds.length > 0) {\r\n this.Model.Model.remove(site => this.SelectedSiteIds.indexOf(site.SalesQuotationContractSiteId) >= 0);\r\n this.setupListDataSource();\r\n this.ModelChanged.emit(this.Model);\r\n this.Changed.emit();\r\n }\r\n }\r\n\r\n public onAddItemButtonClicked(): void {\r\n this.popup.Show();\r\n }\r\n\r\n public SitesAdded(items: number[]): void {\r\n items.forEach(siteId => {\r\n this.Model.Model.push({\r\n SalesQuotationContractSiteId: this.newSiteId--,\r\n SalesQuotationContractId: this.Model.SalesQuotationContractId,\r\n CustomerId: this.Model.CustomerId,\r\n SiteId: siteId,\r\n StartDate: this.dateOnlyService.RecalculateDateOnSave(this.minDateValue),\r\n Charge: 0\r\n });\r\n });\r\n\r\n this.setupListDataSource();\r\n this.ModelChanged.emit(this.Model);\r\n this.Changed.emit();\r\n }\r\n\r\n public get alreadyAddedSites(): number[] {\r\n return this.Model.Model.map(i => i.SiteId);\r\n }\r\n\r\n public onRowUpdated(): void {\r\n this.Model.Model.forEach(m => {\r\n m.StartDate = this.dateOnlyService.RecalculateDateOnSave((m as QuoteContractSiteUI).UiStartDate);\r\n m.EndDate = this.dateOnlyService.RecalculateDateOnSave((m as QuoteContractSiteUI).UiEndDate);\r\n });\r\n\r\n this.ModelChanged.emit(this.Model);\r\n this.Changed.emit();\r\n }\r\n\r\n private setupListDataSource(): void {\r\n this.sitesContractOData = this.odataService.GetDataSourceWithLookups(\r\n this.Model.Model.map(item => {\r\n const uiItem: QuoteContractSiteUI = item;\r\n uiItem.UiStartDate = this.dateOnlyService.RecalculateDateOnLoad(item.StartDate);\r\n uiItem.UiEndDate = this.dateOnlyService.RecalculateDateOnLoad(item.EndDate);\r\n return uiItem;\r\n }),\r\n \"SalesQuotationContractSiteId\",\r\n [\r\n {\r\n store: this.customerService.GetCustomerDataStore(),\r\n dataKey: \"SiteId\",\r\n lookupKey: \"CustomerId\",\r\n displayExprs: [\"Alpha\", \"Customer\"]\r\n }\r\n ]);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
{{'quote.contract.quote-for-contract' | translate}}
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n {{ item.Description | translate }}\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n
\r\n
\r\n

\r\n {{ 'quote.contract.total' | translate: { value: Model.DisplayTotal | currency: Model.SelectedCurrencySymbol } }}\r\n

\r\n
\r\n
\r\n
\r\n
\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges\r\n} from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { PhraseBookType } from \"servicesight-shared\";\r\nimport { ServiceContractService } from \"src/app/service-contracts/services/service-contract.service\";\r\nimport { QuoteContractInvoiceCycleModel } from \"src/app/shared/models/quote-contract-invoice-cycle.model\";\r\nimport { QuoteSummaryType } from \"../enums/quote-summary-type.enum\";\r\nimport { EquipmentContractModel } from \"../models/equipment-contract.model\";\r\nimport { QuoteContract } from \"../models/quote-contract.model\";\r\nimport { QuoteContractInvoiceTypeService } from \"../services/quote-contract-invoice-type.service\";\r\nimport { ViewModelComponent } from \"../view-model-component.class\";\r\nimport { QuoteContractViewModel } from \"../view-models/quote-contract.viewmodel\";\r\n\r\n@Component({\r\n selector: \"app-quote-contracts-tab\",\r\n templateUrl: \"./quote-contracts-tab.component.html\",\r\n styleUrls: [\"./quote-contracts-tab.component.scss\"]\r\n})\r\nexport class QuoteContractsTabComponent extends ViewModelComponent implements OnChanges, OnInit {\r\n @Input() public Model: QuoteContractViewModel = new QuoteContractViewModel();\r\n @Output() public ModelChanged = new EventEmitter();\r\n\r\n public contractTypes: DataSource;\r\n public invoiceCycleTypeList: QuoteContractInvoiceCycleModel[] = [];\r\n public phraseType = PhraseBookType;\r\n\r\n public selectedContractType: EquipmentContractModel = new EquipmentContractModel();\r\n\r\n public get ContractSituation(): QuoteSummaryType {\r\n return QuoteSummaryType.Contract;\r\n }\r\n\r\n constructor(\r\n private contractTypeService: ServiceContractService,\r\n private invoiceCycleService: QuoteContractInvoiceTypeService\r\n ) {\r\n super();\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.contractTypes = this.contractTypeService.GetContractTypesDataSource(\"Int32\");\r\n this.invoiceCycleTypeList = this.invoiceCycleService.GetInvoiceCycles();\r\n\r\n this.contractTypes.load().then(x => this.selectedContractType = x.find(el => el.ContractTypeId === this.Model.Model.ContractTypeId));\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (this.contractTypes && changes.Model && changes.Model.currentValue.Model.ContractTypeId !== changes.Model.previousValue.Model.ContractTypeId) {\r\n this.contractTypes.load().then(x => this.selectedContractType = x.find(el => el.ContractTypeId === this.Model.Model.ContractTypeId));\r\n }\r\n\r\n this.onChanges(changes);\r\n }\r\n\r\n public onContractTypeChanged(ev): void {\r\n if (ev.value) {\r\n this.Model.Model.ContractTypeId = ev.value.ContractTypeId;\r\n }\r\n }\r\n}\r\n","import { Component, Input } from \"@angular/core\";\r\nimport { DocumentTypeEnum } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-quote-comment-tab\",\r\n templateUrl: \"./quote-comment-tab.component.html\"\r\n})\r\nexport class QuoteCommentTabComponent {\r\n @Input() SalesQuotationId: number;\r\n @Input() disabled: boolean = false;\r\n\r\n public QuoteDocumentType: DocumentTypeEnum = DocumentTypeEnum.Quote;\r\n\r\n}\r\n","\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { SalesQuoteStatus } from \"servicesight-shared\";\r\n\r\n@Pipe({\r\n name: \"quoteStatus\"\r\n})\r\nexport class QuoteStatusPipe implements PipeTransform {\r\n\r\n private readonly quoteStatus = {\r\n [SalesQuoteStatus.CANCELLED]: \"label.quotes.cancelled\",\r\n [SalesQuoteStatus.QUOTED]: \"label.quotes.quoted\",\r\n [SalesQuoteStatus.LOST]: \"label.quotes.lost\",\r\n [SalesQuoteStatus.REQUESTED]: \"label.quotes.requested\",\r\n [SalesQuoteStatus.NOT_REQUIRED]: \"label.quotes.notRequired\",\r\n [SalesQuoteStatus.WON]: \"label.quotes.won\",\r\n };\r\n\r\n private readonly stringValueMapping = {\r\n Cancelled: SalesQuoteStatus.CANCELLED,\r\n Quoted: SalesQuoteStatus.QUOTED,\r\n Lost: SalesQuoteStatus.LOST,\r\n Won: SalesQuoteStatus.WON,\r\n Requested: SalesQuoteStatus.REQUESTED,\r\n NotRequired: SalesQuoteStatus.NOT_REQUIRED\r\n };\r\n\r\n transform(value: any): any {\r\n let safeValue = Number(value);\r\n if (isNaN(safeValue)) {\r\n safeValue = this.stringValueMapping[value];\r\n }\r\n\r\n return this.quoteStatus[safeValue];\r\n }\r\n\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { SalesQuoteStatus } from \"servicesight-shared\";\r\n\r\n\r\n@Pipe({\r\n name: \"quoteStatusBar\"\r\n})\r\nexport class QuoteStatusBarPipe implements PipeTransform {\r\n\r\n private readonly status = {\r\n [SalesQuoteStatus.CANCELLED]: \"bggraystatus\",\r\n [SalesQuoteStatus.REQUESTED]: \"bgyellowstatusshorter\",\r\n [SalesQuoteStatus.QUOTED]: \"bggreenstatusshort\",\r\n [SalesQuoteStatus.LOST]: \"bgredstatusfull\",\r\n [SalesQuoteStatus.NOT_REQUIRED]: \"bgyellowstatusfull\",\r\n [SalesQuoteStatus.WON]: \"bggreenstatuslong\"\r\n };\r\n\r\n private readonly bgcolors = {\r\n [SalesQuoteStatus.CANCELLED]: \"clrred\",\r\n [SalesQuoteStatus.REQUESTED]: \"clryellow\",\r\n [SalesQuoteStatus.QUOTED]: \"clrgreen\",\r\n [SalesQuoteStatus.NOT_REQUIRED]: \"clryellow\",\r\n [SalesQuoteStatus.WON]: \"clrgreen\",\r\n [SalesQuoteStatus.LOST]: \"clrred\"\r\n };\r\n\r\n transform(value: any, args?: any): any {\r\n const colors = {\r\n bg: this.bgcolors[value],\r\n bar: this.status[value]\r\n };\r\n return colors[args];\r\n }\r\n\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n
\r\n {{ 'label.quotes.quote' | translate }}\r\n
\r\n {{ model.Model.SalesQuotationId }}\r\n  / \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n

\r\n

{{ 'label.quotes.newQuote' | translate }}

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

\r\n {{ model.Model.Status | quoteStatus | translate}}
\r\n \r\n

\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
0\">\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import { Location } from \"@angular/common\";\r\nimport { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { ControlContainer, NgForm } from \"@angular/forms\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { forkJoin, Observable } from \"rxjs\";\r\nimport { tap } from \"rxjs/operators\";\r\nimport {\r\n ActivityService,\r\n CustomerService as SharedCustomerService,\r\n CustomerStatus,\r\n DocumentTypeEnum,\r\n EquipmentDataService,\r\n FormMesssageService,\r\n IProteanResponse,\r\n ModuleService,\r\n QuoteDataService,\r\n SalesQuoteStatus,\r\n SettingId,\r\n SettingsService\r\n} from \"servicesight-shared\";\r\nimport { MessageService } from \"src/app/messages/services/message/message.service\";\r\nimport { ServiceContractService } from \"src/app/service-contracts/services/service-contract.service\";\r\nimport { LayoutType } from \"src/app/settings/enums/layout-type.enum\";\r\nimport { LayoutTemplateModel } from \"src/app/settings/models/layout-template.model\";\r\nimport { LayoutTemplateService } from \"src/app/settings/services/layout-template.service\";\r\nimport { ConfirmationMessageComponent } from \"src/app/shared/components/confirmation-message/confirmation-message.component\";\r\nimport { MessageDocTypeIds } from \"src/app/shared/enums/messages/message-doc-type-ids.enum\";\r\nimport { MessageTypes } from \"src/app/shared/enums/messages/message-types.enum\";\r\nimport { Customer } from \"src/app/shared/models/customer\";\r\nimport { BankersRoundService } from \"src/app/shared/services/bankers-round.service\";\r\nimport { CustomerService } from \"src/app/shared/services/customer/customer.service\";\r\nimport { Ng1ReminderService } from \"src/app/shared/services/ng1-reminder.service\";\r\nimport { PreviousRouteService } from \"src/app/shared/services/previous-route.service\";\r\nimport { QuoteSummaryType } from \"../enums/quote-summary-type.enum\";\r\nimport { QuoteTab } from \"../enums/quote-tab.enum\";\r\nimport { CancelData } from \"../models/cancel-data.model\";\r\nimport { Quote } from \"../models/quote.model\";\r\nimport { Revision } from \"../models/revision.model\";\r\nimport { QuoteJobTabComponent } from \"../quote-job-tab/quote-job-tab.component\";\r\nimport { QuotesService } from \"../services/quotes.service\";\r\nimport { QuoteViewModel } from \"../view-models/quote.viewmodel\";\r\n\r\n@Component({\r\n selector: \"app-quote-detail\",\r\n templateUrl: \"./quote-detail.component.html\",\r\n styleUrls: [\"./quote-detail.component.scss\"],\r\n viewProviders: [ { provide: ControlContainer, useExisting: NgForm } ]\r\n})\r\nexport class QuoteDetailComponent implements OnInit {\r\n\r\n @ViewChild(\"quoteForm\", { static: false }) form: NgForm;\r\n @ViewChild(\"lostConfirmationMessage\", { static: true }) lostConfirmationMessage: ConfirmationMessageComponent;\r\n @ViewChild(\"wonConfirmationMessage\", { static: true }) wonConfirmationMessage: ConfirmationMessageComponent;\r\n @ViewChild(\"jobTab\", { static: false }) jobTab: QuoteJobTabComponent;\r\n\r\n public set CurrentTab(value: QuoteTab) {\r\n this.model.CurrentTab = value;\r\n }\r\n\r\n public get CurrentTab(): QuoteTab {\r\n return this.model.CurrentTab;\r\n }\r\n\r\n public formName: string = \"QuoteForm\";\r\n public model: QuoteViewModel = new QuoteViewModel({\r\n SalesQuotationId: 0,\r\n RevisionId: 0\r\n }, this.bankersRoundService);\r\n\r\n public CanNavigatePrevious: boolean = false;\r\n public CanNavigateNext: boolean = false;\r\n public IsRecordNavigationEnabled: boolean = false;\r\n public accountNumberPopupVisible: boolean = false;\r\n public showWarningNotesEye: boolean = false;\r\n public showCreditControlEye: boolean = false;\r\n public messagesMap = new Map();\r\n public equipmentDataSource: DataSource;\r\n public saveEnabled: boolean = true;\r\n public layouts: LayoutTemplateModel[] = [];\r\n\r\n public get IsProEnabled(): boolean {\r\n return this.model?.ModuleAccess?.ProEnabled;\r\n }\r\n\r\n public showCancelDialog = false;\r\n public selectedRevision = 1;\r\n public revisions: Revision[];\r\n public docType = DocumentTypeEnum;\r\n public sitesDataStore: ODataStore;\r\n\r\n constructor(\r\n private route: ActivatedRoute,\r\n private quotesService: QuotesService,\r\n private quotesDataService: QuoteDataService,\r\n private formMessageService: FormMesssageService,\r\n private moduleService: ModuleService,\r\n private router: Router,\r\n private previousRouteService: PreviousRouteService,\r\n private location: Location,\r\n private customersService: CustomerService,\r\n private sharedCustomerService: SharedCustomerService,\r\n private ng1reminderService: Ng1ReminderService,\r\n private messageService: MessageService,\r\n private equipmentService: EquipmentDataService,\r\n private activityService: ActivityService,\r\n private service: ServiceContractService,\r\n private bankersRoundService: BankersRoundService,\r\n private layoutTemplateService: LayoutTemplateService,\r\n private settingsService: SettingsService) {\r\n }\r\n\r\n ngOnInit(): void {\r\n this.moduleService.GetEnabledModulesAccess().subscribe(modules => {\r\n this.model.ModuleAccess = modules;\r\n if (modules.EquipmentEnabled) {\r\n this.equipmentDataSource = this.equipmentService.GetEquipmentDataSource();\r\n }\r\n });\r\n this.route.params.subscribe(params => {\r\n if (params.id) {\r\n const revision = params.rev !== \"latest\"? Number(params.rev) : null;\r\n this.GetQuote(Number(params.id), revision);\r\n this.GetActivities(Number(params.id), revision);\r\n this.IsRecordNavigationEnabled = this.previousRouteService.PreviousUrlContains(\"/quotes\");\r\n }\r\n\r\n if (params.customerId && params.siteId) {\r\n this.model.Model.CustomerId = Number(params.customerId);\r\n this.model.Model.SiteId = Number(params.siteId);\r\n }\r\n });\r\n\r\n this.settingsService.getSetting(SettingId.ShowVATOnQuotes).subscribe(res => {\r\n if (this.model.IsNew) {\r\n this.model.Summary.Model.ShowVAT = res.ValueBool;\r\n }\r\n });\r\n\r\n // Consider whether GetSiteArrayStore() could be safely used instead of GetSiteDataStore() to reduce SiteOD requests\r\n this.sitesDataStore = this.service.GetSiteDataStore();\r\n this.layoutTemplateService.GetLayouts(LayoutType.QuoteMixed).subscribe(layouts => {\r\n this.layouts = layouts;\r\n });\r\n }\r\n\r\n private GetActivities(quoteId: number, revisionId: number): void {\r\n this.quotesService.GetQuoteJobActivities(quoteId, revisionId).subscribe(activities => {\r\n this.activityService.ActivitiesChanged(activities);\r\n });\r\n }\r\n\r\n public Save(): void {\r\n const quoteModel = this.SetQuoteCollections();\r\n this.formMessageService.RegisterObservable(this.quotesService.SaveQuote(quoteModel), this.formName).subscribe(quote => {\r\n this.location.replaceState(`/quotes/details/${quote.SalesQuotationId}/${quote.RevisionId}`);\r\n this.GetQuote(quote.SalesQuotationId, quote.RevisionId);\r\n this.IsRecordNavigationEnabled = true;\r\n }, () => {\r\n this.saveEnabled = true;\r\n });\r\n }\r\n\r\n public Discard(): void {\r\n if(this.model.IsNew) {\r\n this.router.navigate([\"quotes\",\"list\"]);\r\n } else {\r\n this.quotesService.GetQuote(this.model.Model.SalesQuotationId, this.model.Model.RevisionId).subscribe(quote => {\r\n this.model = new QuoteViewModel(quote, this.bankersRoundService);\r\n this.SetCustomerCurrency(quote.CustomerId);\r\n this.form.form.markAsPristine();\r\n });\r\n }\r\n }\r\n\r\n public ShowCancelDialog(): void {\r\n this.showCancelDialog = true;\r\n }\r\n\r\n public CloseCancelDialog(): void {\r\n this.showCancelDialog = false;\r\n }\r\n\r\n public SaveCancelDialog(data: CancelData) {\r\n this.quotesService.CancelQuote(data).subscribe(() => {\r\n this.model.Model.Status = SalesQuoteStatus.CANCELLED;\r\n this.model.Model.CancelDate = data.CancelDate;\r\n this.model.Model.CancelReasonId = data.CancelReasonID;\r\n });\r\n\r\n this.CloseCancelDialog();\r\n }\r\n\r\n public ChangeRevision(): void {\r\n this.router.navigate([\"quotes\",\"details\", this.model.Model.SalesQuotationId, this.selectedRevision]);\r\n }\r\n\r\n public CreateNewRevision(): void {\r\n const quoteModel = this.SetQuoteCollections();\r\n this.formMessageService.RegisterObservable(this.quotesService.SaveQuote(quoteModel), this.formName).subscribe(res => {\r\n this.quotesService.CreateRevision({\r\n SalesQuotationId: res.SalesQuotationId,\r\n RevisionId: res.RevisionId }).subscribe((quote) => {\r\n this.router.navigate([\"quotes\",\"details\", quote.SalesQuotationId, quote.RevisionId]);\r\n });\r\n });\r\n }\r\n\r\n private SetCurrentItem(id: number) {\r\n if (this.IsRecordNavigationEnabled) {\r\n this.quotesDataService.SetCurrentItem(id).then(() => {\r\n this.CanNavigatePrevious = this.quotesDataService.IsPreviousAvailable();\r\n this.CanNavigateNext = this.quotesDataService.IsNextAvailable();\r\n });\r\n }\r\n }\r\n\r\n public NavigateNext(): void {\r\n if (this.CanNavigateNext) {\r\n this.quotesDataService.GetNextId().then(nextId => {\r\n this.router.navigate([\"quotes\", \"details\", nextId, \"latest\"]);\r\n });\r\n }\r\n }\r\n\r\n public NavigatePrevious(): void {\r\n if (this.CanNavigatePrevious) {\r\n this.quotesDataService.GetPreviousId().then(previousId => {\r\n this.router.navigate([\"quotes\", \"details\", previousId, \"latest\"]);\r\n });\r\n }\r\n }\r\n\r\n public RejectQuote(): void {\r\n this.quotesService.RejectQuote(this.model.Model.SalesQuotationId).subscribe(() => {\r\n this.model.Model.Status = SalesQuoteStatus.LOST;\r\n });\r\n }\r\n\r\n public WonConfirmationDialog() {\r\n this.populateMessagesMap();\r\n // in case, customer status is prospect, we have to ask for alpha code and change the customer status to active.\r\n this.sharedCustomerService.GetCustomerSimpleModel(this.model.Model.CustomerId).subscribe(customer => {\r\n if (customer.OrderNoRequired === 1 && (this.model.Model.OrderNo?.length ?? 0) === 0) { // 1 is before job, this should really be an enum\r\n this.formMessageService.ShowWarning(\"messages.quote.job.order-number-required\", this.formName);\r\n } else if (customer.Status === CustomerStatus.PROSPECT) {\r\n this.accountNumberPopupVisible = true;\r\n } else {\r\n // if the quote is for a job and some of the refrigerants do not have equipment\r\n if (this.model.QuoteForJob && this.model.Model.Job.Refrigerants.some(ref => ref.EquipmentId == null)) {\r\n this.formMessageService.ShowWarning(\"messages.quote.job.refrigerant-without-equipment\", this.formName);\r\n }\r\n else {\r\n this.wonConfirmationMessage.show();\r\n }\r\n }\r\n });\r\n }\r\n\r\n public ChangeStatusOnCancel(): void {\r\n this.accountNumberPopupVisible = false;\r\n }\r\n\r\n public ChangeStatusOnOk(accountNumber): void {\r\n // Change the current customer status to 'Active'(Should be only one time) along with account number.\r\n const customer: Customer = {\r\n CustomerID: this.model.Model.CustomerId,\r\n Alpha: accountNumber,\r\n Status: CustomerStatus.ACTIVE\r\n };\r\n this.customersService.updateStatusAndAccountNumber(customer).subscribe((res: IProteanResponse) => {\r\n if (res.IsSuccess) {\r\n this.accountNumberPopupVisible = false;\r\n // Once the customer account code get updated then we should redirect to the job creation screen.\r\n this.WinQuote();\r\n }\r\n });\r\n }\r\n\r\n public WinQuote(): void {\r\n const quoteModel = this.SetQuoteCollections();\r\n this.formMessageService.RegisterObservable(this.quotesService.SaveQuote(quoteModel), this.formName).subscribe(quote => {\r\n const observeables: Observable[] = [];\r\n if (this.model.QuoteForJob) {\r\n observeables.push(\r\n this.quotesService.AcceptQuoteAndCreateJob(quote.SalesQuotationId, quote.RevisionId));\r\n }\r\n if (this.model.QuoteForContract) {\r\n observeables.push(\r\n this.quotesService.AcceptAndCreateContract(quote.SalesQuotationId, quote.RevisionId));\r\n }\r\n if (this.model.QuoteForSalesOrder) {\r\n observeables.push(\r\n this.quotesService.AcceptAndCreateSalesOrder(quote.SalesQuotationId, quote.RevisionId));\r\n }\r\n this.formMessageService.RegisterObservable(\r\n forkJoin(observeables)\r\n .pipe(\r\n tap(data => {\r\n this.quotesService.AcceptQuote(quote.SalesQuotationId, quote.RevisionId).subscribe();\r\n return data;\r\n })\r\n ), this.formName, this.messagesMap).subscribe({\r\n next: (res) => {\r\n if (res[0]) {\r\n if (this.model.QuoteForJob) {\r\n this.router.navigate([`jobs/job/${res[0]}`]);\r\n } else if (this.model.QuoteForContract) {\r\n this.router.navigate([`contracts/detail/${res[0]}`]);\r\n } else if (this.model.QuoteForSalesOrder) {\r\n this.router.navigate([`sales-orders/detail/${res[0]}`]);\r\n }\r\n }\r\n }, error: () => this.GetQuote(quote.SalesQuotationId, quote.RevisionId)\r\n });\r\n });\r\n }\r\n\r\n public ViewQuote(event: any): void {\r\n this.GoToQuotePreview(event.itemData.TemplateId);\r\n }\r\n\r\n public ViewQuoteWithDefaultLayout(): void {\r\n this.GoToQuotePreview(0);\r\n }\r\n\r\n private GoToQuotePreview(templateId: number): void {\r\n const quoteModel = this.SetQuoteCollections();\r\n this.formMessageService.RegisterObservable(this.quotesService.SaveQuote(quoteModel), this.formName).subscribe(quote => {\r\n this.router.navigate([`/quotes/report/${quote.SalesQuotationId}/${quote.RevisionId}/${templateId}`]);\r\n });\r\n }\r\n\r\n public CustomerChanged(customerId: number): void {\r\n this.SetCustomerCurrency(customerId);\r\n }\r\n\r\n public CreateNewReminder(): void {\r\n this.ng1reminderService.CreateQuoteReminder(\r\n this.model.Model.SalesQuotationId,\r\n this.model.Model.RevisionId,\r\n this.model.Model.ContactId,\r\n this.model.Model.SalesOpportunityId,\r\n this.model.Model.CustomerId);\r\n }\r\n\r\n public CreateNewMessage(): void {\r\n this.messageService.SetNewMessageParameters(\r\n 0,\r\n MessageTypes.RefMessage,\r\n false,\r\n MessageDocTypeIds.Quotes,\r\n `${this.model.Model.SalesQuotationId}/${this.model.Model.RevisionId}`);\r\n this.router.navigate([\"messages/newmessage\"]);\r\n }\r\n\r\n public CopyQuote(): void {\r\n const model = {\r\n QuoteId: this.model.Model.SalesQuotationId,\r\n RevisionId: this.model.Model.RevisionId\r\n };\r\n\r\n if (this.IsProEnabled) {\r\n this.quotesService.CloneQuote(model).subscribe((result) => {\r\n if (result) {\r\n this.router.navigateByUrl(\"/\", { skipLocationChange: true }).then(() => { // this is work around to force reload data model\r\n this.router.navigate([\"/quotes/details\", result.QuoteId, result.RevisionId]);\r\n });\r\n }\r\n });\r\n }\r\n }\r\n\r\n public onCreditControl($event: boolean): void {\r\n this.showCreditControlEye = !!$event;\r\n }\r\n\r\n public onWarningNotes($event: boolean) {\r\n this.showWarningNotesEye = !!$event;\r\n }\r\n\r\n private SetQuoteCollections(): Quote {\r\n const quoteModel: Quote = this.model?.Model;\r\n quoteModel.Job = this.model?.Job?.Model;\r\n quoteModel.Job.Parts = this.model?.Job?.Parts?.Model;\r\n quoteModel.Job.Equipment = this.model?.Job?.Equipment?.Model;\r\n quoteModel.Job.Materials = this.model?.Job?.Materials?.Model;\r\n quoteModel.Job.LabourCosts = this.model?.Job?.LabourCosts?.Model;\r\n quoteModel.Job.LabourCharges = this.model?.Job?.LabourCharges?.Model;\r\n quoteModel.Job.Refrigerants = this.model?.Job?.Refrigerant?.Model;\r\n quoteModel.Job.Activities = this.model?.Job?.Activities?.Model;\r\n quoteModel.Job.JobInstalls = this.model?.Job?.JobInstalls?.Model;\r\n quoteModel.QuoteSalesOrder = this.model?.SalesOrder?.Model;\r\n quoteModel.QuoteSalesOrder.Equipments = this.model?.SalesOrder?.Equipment?.Model;\r\n quoteModel.QuoteSalesOrder.Materials = this.model?.SalesOrder?.Materials?.Model;\r\n quoteModel.QuoteSalesOrder.Parts = this?.model?.SalesOrder?.Parts?.Model;\r\n quoteModel.ServiceContract = this?.model?.ServiceContract?.Model;\r\n quoteModel.ServiceContract.EquipsList = this?.model?.ServiceContract?.Equipment.Model;\r\n quoteModel.ServiceContract.SitesList = this?.model?.ServiceContract?.Sites.Model;\r\n quoteModel.ServiceContract.SitesList.forEach(site => {\r\n if (site.SalesQuotationContractSiteId < 0) {\r\n site.SalesQuotationContractSiteId = 0;\r\n }\r\n });\r\n quoteModel.SalesQuotationSummary.find(i => i.ItemId === QuoteSummaryType.Job).Summary = this.model.Summary.JobTotal;\r\n quoteModel.SalesQuotationSummary.find(i => i.ItemId === QuoteSummaryType.SalesOrder).Summary = this.model.Summary.SalesOrderTotal;\r\n quoteModel.SalesQuotationSummary.find(i => i.ItemId === QuoteSummaryType.Contract).Summary = this.model.Summary.ContractTotal;\r\n return quoteModel;\r\n }\r\n\r\n private GetQuote(id: number, revisionId?: number): void {\r\n this.quotesService.GetQuote(id, revisionId).subscribe(quote => {\r\n this.revisions = quote.Revisions;\r\n this.selectedRevision = quote.RevisionId;\r\n const accessRightsCache = this.model?.ModuleAccess;\r\n const currenTabCached = this.model?.CurrentTab ?? QuoteTab.Details;\r\n this.model = new QuoteViewModel(quote, this.bankersRoundService);\r\n this.model.CurrentTab = currenTabCached;\r\n if(accessRightsCache) {\r\n this.model.ModuleAccess = accessRightsCache;\r\n }\r\n this.SetCustomerCurrency(quote.CustomerId);\r\n this.SetCurrentItem(quote.SalesQuotationId);\r\n this.form.form.markAsPristine();\r\n });\r\n }\r\n\r\n private SetCustomerCurrency(customerId: number): void {\r\n this.customersService.GetCustomerCurrency(customerId).subscribe(currency => {\r\n this.model.Model.CurrencyCode = currency.CurrencyCode;\r\n this.model.Model.CurrencySymbol = currency.CurrencySymbol;\r\n this.model.Model.BaseCurrencyCode = JSON.parse(localStorage.getItem(\"ls.BaseCurrencyCode\"));\r\n this.model.Model.BaseCurrencySymbol = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n if (!this.model.Model.SalesQuotationId) {\r\n this.model.Model.ExchangeRate = currency.ExchangeRateSales; // for new quote get the exchange rate from ServiceSight\r\n }\r\n });\r\n }\r\n\r\n private populateMessagesMap(): void {\r\n const items = this.model.Model.ServiceContract.EquipsList;\r\n if (items.length > 0) {\r\n if (!this.equipmentDataSource) {\r\n this.equipmentDataSource = this.equipmentService.GetEquipmentDataSource();\r\n }\r\n\r\n for (const e of items) {\r\n if (!this.messagesMap.has(e.EquipItemId.toString())) {\r\n this.equipmentDataSource.store().byKey(e.EquipItemId).then(equipment => {\r\n if (!this.messagesMap.has(e.EquipItemId.toString())) {\r\n this.messagesMap.set(e.EquipItemId.toString(), equipment.EquipNumber);\r\n }\r\n });\r\n }\r\n }\r\n }\r\n\r\n const sites = this.model.Model.ServiceContract.SitesList;\r\n for (const s of sites) {\r\n if (!this.messagesMap.has(\"s\" + s.SiteId)) {\r\n this.sitesDataStore.byKey(s.SiteId).then(site => {\r\n if (!this.messagesMap.has(\"s\" + s.SiteId)) {\r\n this.messagesMap.set(\"s\" + s.SiteId, site.Name);\r\n }\r\n });\r\n }\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n

\r\n Quote\r\n {{ quoteId }} /\r\n {{ revisionId }}\r\n

\r\n
\r\n

\r\n {{ quoteStatus | quoteStatus | translate}}
\r\n \r\n

\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ 'label.email.sendMessage' | translate }}
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import { Component, Inject, OnInit, ViewChild, ViewEncapsulation } from \"@angular/core\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { ajaxSetup } from \"@devexpress/analytics-core/analytics-utils\";\r\nimport { DxReportViewerComponent } from \"devexpress-reporting-angular\";\r\nimport { ActionId } from \"devexpress-reporting/dx-webdocumentviewer\";\r\nimport { IAppConfig, APP_CONFIG, Module, SalesQuoteStatus } from \"servicesight-shared\";\r\nimport { ConfirmationMessageComponent } from \"src/app/shared/components/confirmation-message/confirmation-message.component\";\r\nimport { Email } from \"src/app/shared/models/email.model\";\r\nimport { AuthService } from \"src/app/shared/services/auth/auth.service\";\r\nimport { EmailService } from \"src/app/shared/services/email/email.service\";\r\nimport { LicenseService } from \"../../shared/services/licence/license.service\";\r\nimport { QuotesService } from \"../services/quotes.service\";\r\n\r\n@Component({\r\n selector: \"app-quote-preview\",\r\n templateUrl: \"./quote-preview.component.html\",\r\n encapsulation: ViewEncapsulation.None,\r\n styleUrls: [\r\n \"./quote-preview.component.scss\",\r\n \"../../../../node_modules/@devexpress/analytics-core/dist/css/dx-analytics.common.css\",\r\n \"../../../../node_modules/@devexpress/analytics-core/dist/css/dx-analytics.light.css\",\r\n \"../../../../node_modules/devexpress-reporting/dist/css/dx-webdocumentviewer.css\"]\r\n})\r\n\r\nexport class QuotePreviewComponent implements OnInit {\r\n @ViewChild(DxReportViewerComponent, { static: true }) viewer: DxReportViewerComponent;\r\n @ViewChild(\"PrintConfirmationMessage\", { static: true }) printConfirmationMessage: ConfirmationMessageComponent;\r\n @ViewChild(\"EmailConfirmationMessage\", { static: true }) emailConfirmationMessage: ConfirmationMessageComponent;\r\n @ViewChild(\"DownloadConfirmationMessage\", { static: true }) downloadConfirmationMessage: ConfirmationMessageComponent;\r\n\r\n public quoteId: number = null;\r\n public revisionId: number = null;\r\n public quoteStatus: SalesQuoteStatus = null;\r\n public showTemplateDialog: boolean = false;\r\n public emailData: Email = new Email();\r\n public showSuccessSendMessage: boolean = false;\r\n public showErrorSendMessage: boolean = false;\r\n public isPreviewLoaded: boolean = false;\r\n public isProEnabled: boolean = false;\r\n public templateId: number = 0;\r\n\r\n // The URL of a report to open in the Report Designer when the application starts.\r\n public reportUrl: string = \"Quotes/\";\r\n\r\n // URI of your backend project.\r\n public hostUrl: string;\r\n\r\n // ASP.NET Core backend\r\n public invokeAction: string = \"DXXRDV\";\r\n\r\n public get markAsQuotedVisible(): boolean {\r\n return this.quoteStatus === SalesQuoteStatus.REQUESTED;\r\n }\r\n\r\n constructor(\r\n auth: AuthService,\r\n private route: ActivatedRoute,\r\n private quotesService: QuotesService,\r\n private emailService: EmailService,\r\n private licenseService: LicenseService,\r\n private router: Router,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) {\r\n ajaxSetup.ajaxSettings = {\r\n headers: { Authorization: \"Bearer \" + auth.Token }\r\n };\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.licenseService.GetCompanyHasAccessToModule(Module.Pro).subscribe(x => this.isProEnabled = x);\r\n this.hostUrl = this.appConfig.apiLocations.Quotes.substring(0, this.appConfig.apiLocations.Quotes.lastIndexOf(\"/api/\") + 1);\r\n this.quoteId = parseInt(this.route.snapshot.paramMap.get(\"id\"), 10);\r\n this.revisionId = parseInt(this.route.snapshot.paramMap.get(\"rev\"), 10);\r\n this.templateId = parseInt(this.route.snapshot.paramMap.get(\"template\"), 10);\r\n this.reportUrl = `Quotes/${this.quoteId}/${this.revisionId}/${this.templateId}`;\r\n this.setQuoteStatus();\r\n }\r\n\r\n public DocumentReadyAction(): void {\r\n this.isPreviewLoaded = true;\r\n }\r\n\r\n public CustomizeMenuActions(event): void {\r\n const zoomAction = event.args.GetById(ActionId.ZoomSelector);\r\n if (zoomAction) {\r\n zoomAction.zoom(1);\r\n }\r\n\r\n const multiPageToggle = event.args.GetById(ActionId.MultipageToggle);\r\n if (multiPageToggle) {\r\n multiPageToggle.clickAction();\r\n }\r\n }\r\n\r\n public GoBack(): void {\r\n this.router.navigate([`/quotes/details/${this.quoteId}/${this.revisionId}`]);\r\n }\r\n\r\n public openPrintDialog(): void {\r\n if (this.quoteStatus === SalesQuoteStatus.REQUESTED) {\r\n this.printConfirmationMessage.show();\r\n } else {\r\n this.print(false);\r\n }\r\n }\r\n\r\n public print(changeStatus: boolean): void {\r\n this.viewer.bindingSender.Print();\r\n if (this.quoteId && this.revisionId) {\r\n if (changeStatus) {\r\n this.quotesService.SetQuoteStatusToQuoted(this.quoteId, this.revisionId).subscribe(() => this.setQuoteStatus());\r\n }\r\n }\r\n }\r\n\r\n public markAsQuoted(): void {\r\n this.quotesService.SetQuoteStatusToQuoted(this.quoteId, this.revisionId).subscribe(() => this.setQuoteStatus());\r\n }\r\n\r\n public openDownloadDialog(): void {\r\n if (this.quoteStatus === SalesQuoteStatus.REQUESTED) {\r\n this.downloadConfirmationMessage.show();\r\n } else {\r\n this.download(false);\r\n }\r\n }\r\n\r\n public download(changeStatus: boolean): void {\r\n this.viewer.bindingSender.ExportTo(\"pdf\", false);\r\n if (this.quoteId && this.revisionId) {\r\n if (changeStatus) {\r\n this.quotesService.SetQuoteStatusToQuoted(this.quoteId, this.revisionId).subscribe(() => this.setQuoteStatus());\r\n }\r\n }\r\n }\r\n\r\n public openEmailDialog(): void {\r\n if (this.quoteStatus === SalesQuoteStatus.REQUESTED) {\r\n this.emailConfirmationMessage.show();\r\n } else {\r\n this.send(false);\r\n }\r\n }\r\n\r\n public openDialog(): void {\r\n this.emailService\r\n .GetQuoteEmailData(this.quoteId, this.revisionId, this.templateId)\r\n .subscribe(x => this.emailData = x, () => { }, () => {\r\n this.showErrorSendMessage = false;\r\n this.showTemplateDialog = true;\r\n });\r\n }\r\n\r\n public send(changeStatus: boolean): void {\r\n this.emailService.SendQuoteEmail(this.emailData).subscribe(() => {\r\n this.showTemplateDialog = false;\r\n this.showSuccessSendMessage = true;\r\n if (changeStatus) {\r\n this.quotesService.SetQuoteStatusToQuoted(this.quoteId, this.revisionId).subscribe(() => this.setQuoteStatus());\r\n }\r\n }, () => {\r\n this.showErrorSendMessage = true;\r\n });\r\n }\r\n\r\n public closeDialog(): void {\r\n this.showTemplateDialog = false;\r\n }\r\n\r\n private setQuoteStatus(): void {\r\n this.quotesService.GetQuote(this.quoteId, this.revisionId).subscribe(q => this.quoteStatus = q.Status);\r\n }\r\n\r\n public IncludeFiles($event: boolean): void {\r\n this.emailData.IncludeFiles = $event;\r\n this.emailService.IncludeQuoteFiles(this.emailData)\r\n .subscribe(x => this.emailData.Attachments = x.Attachments);\r\n }\r\n}\r\n","import { NgModule } from \"@angular/core\";\r\nimport { RouterModule, Routes } from \"@angular/router\";\r\nimport { CanDeactivateGuard, QuotesListComponent } from \"servicesight-shared\";\r\nimport { QuoteDetailComponent } from \"./quote-detail/quote-detail.component\";\r\nimport { QuotePreviewComponent } from \"./quote-preview/quote-preview.component\";\r\n\r\nconst routes: Routes = [\r\n { path: \"list\", component: QuotesListComponent },\r\n { path: \"details/:id/:rev\", component: QuoteDetailComponent, canDeactivate: [CanDeactivateGuard] },\r\n { path: \"details/:id/latest\", component: QuoteDetailComponent, canDeactivate: [CanDeactivateGuard] },\r\n { path: \"new-quote/:customerId/:siteId\", component: QuoteDetailComponent, canDeactivate: [CanDeactivateGuard] },\r\n { path: \"new-quote\", component: QuoteDetailComponent, canDeactivate: [CanDeactivateGuard] },\r\n { path: \"report/:id/:rev/:template\", component: QuotePreviewComponent, canDeactivate: [CanDeactivateGuard] },\r\n { path: \"\", redirectTo: \"list\", pathMatch: \"full\" },\r\n { path: \"**\", redirectTo: \"list\" }\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class Quotes2RoutingModule {\r\n public static readonly Routes: Routes = routes;\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { GoodsReceivedStatus } from \"../../goods-received/enums/goods-received-status.enum\";\r\nimport { ReturnsNoteStatusEnum } from \"../enums/returns-note-status.enum\";\r\n\r\n@Pipe({\r\n name: \"returnsNoteStatusBar\"\r\n})\r\nexport class ReturnsNoteStatusBarPipe implements PipeTransform {\r\n private readonly status = {\r\n [ReturnsNoteStatusEnum.Pending]: \"bgredstatusshort\",\r\n [ReturnsNoteStatusEnum.Returned]: \"bggreenstatusshort\",\r\n [ReturnsNoteStatusEnum.Cancelled]: \"bggraystatus\",\r\n [ReturnsNoteStatusEnum.PcMatchedBu]: \"bggreenstatuslong\"\r\n };\r\n\r\n private readonly bgcolors = {\r\n [ReturnsNoteStatusEnum.Pending]: \"clrred\",\r\n [ReturnsNoteStatusEnum.Returned]: \"clrgreen\",\r\n [ReturnsNoteStatusEnum.Cancelled]: \"clrred\",\r\n [ReturnsNoteStatusEnum.PcMatchedBu]: \"clrgreen\"\r\n };\r\n\r\n private readonly stringValueMapping = {\r\n Pending: ReturnsNoteStatusEnum.Pending,\r\n Returned: ReturnsNoteStatusEnum.Returned,\r\n Cancelled: ReturnsNoteStatusEnum.Cancelled,\r\n PcMatchedBu: ReturnsNoteStatusEnum.PcMatchedBu\r\n };\r\n\r\n transform(value: GoodsReceivedStatus, args?: any): string {\r\n if (value) {\r\n let safeValue = Number(value);\r\n if (isNaN(safeValue)) {\r\n safeValue = this.stringValueMapping[value];\r\n }\r\n\r\n const colors = {\r\n bg: this.bgcolors[safeValue],\r\n bar: this.status[safeValue]\r\n };\r\n\r\n return colors[args];\r\n }\r\n\r\n return null;\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'returns-note.list.title' | translate }}

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n
{{ item.value | returnsNoteStatus | translate }}
\r\n
\r\n
\r\n
\r\n\r\n \r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DomSanitizer, SafeResourceUrl } from \"@angular/platform-browser\";\r\nimport { Router } from \"@angular/router\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { EdmLiteral } from \"devextreme/data/odata/utils\";\r\nimport { GridKind, GridService } from \"servicesight-shared\";\r\nimport { EmployeeService } from \"../../shared/services/employee/employee.service\";\r\nimport { SupplierService } from \"../../shared/services/supplier/supplier.service\";\r\nimport { ReturnsNoteStatusEnum } from \"../enums/returns-note-status.enum\";\r\nimport { ReturnsService } from \"../returns.service\";\r\n\r\n@Component({\r\n selector: \"app-returns-list\",\r\n templateUrl: \"./returns-list.component.html\",\r\n styleUrls: [\r\n \"./returns-list.component.scss\",\r\n \"../../../../projects/servicesight-shared/src/lib/styles/global.scss\",\r\n \"../../../../projects/servicesight-shared/src/lib/styles/backgrounds.scss\",\r\n \"../../../../projects/servicesight-shared/src/lib/styles/servicesight-shared.scss\"\r\n ]\r\n})\r\nexport class ReturnsListComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n\r\n public SearchText: string = \"\";\r\n public isAllowedCreate: boolean = false;\r\n\r\n public filters: any = {\r\n 1: [\"Status\", \"=\", new EdmLiteral(\"PurchaseOrders.Enums.ReturnsNoteStatus'Pending'\")],\r\n 2: [\r\n [\"Status\", \"=\", new EdmLiteral(\"PurchaseOrders.Enums.ReturnsNoteStatus'Returned'\")],\r\n \"or\",\r\n [\"Status\", \"=\", new EdmLiteral(\"PurchaseOrders.Enums.ReturnsNoteStatus'PcMatchedBu'\")]\r\n ],\r\n 3: [\"Status\", \"=\", new EdmLiteral(\"PurchaseOrders.Enums.ReturnsNoteStatus'Cancelled'\")]\r\n };\r\n\r\n public returnsNoteStatus = ReturnsNoteStatusEnum;\r\n\r\n public dataSource: DataSource;\r\n public employeesDataStore: ODataStore;\r\n public suppliersDataStore: ODataStore;\r\n\r\n constructor(\r\n private sanitizer: DomSanitizer,\r\n private gridService: GridService,\r\n private router: Router,\r\n private suppliersService: SupplierService,\r\n private employeeService: EmployeeService,\r\n private returnService: ReturnsService\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.gridService.GetLayout(GridKind.ReturnsNote).subscribe(value => {\r\n if (value) {\r\n this.dataGrid.instance.state(value);\r\n }\r\n this.GetDataSources();\r\n }, () => this.GetDataSources());\r\n }\r\n\r\n public SaveLayout(): void {\r\n const state = this.dataGrid.instance.state();\r\n this.gridService.SaveLayout(state, GridKind.ReturnsNote);\r\n }\r\n\r\n public ResetLayout(): void {\r\n this.gridService.ResetLayout(GridKind.ReturnsNote);\r\n this.dataGrid.instance.state(null);\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public FilterChanged($event: any): void {\r\n const filterValue = $event.currentTarget.value;\r\n if (filterValue === \"0\") {\r\n this.dataGrid.instance.clearFilter();\r\n } else {\r\n this.dataGrid.instance.filter(this.filters[filterValue]);\r\n }\r\n }\r\n\r\n public GetImage(data: string): SafeResourceUrl {\r\n if (!data) {\r\n // eslint-disable-next-line max-len\r\n data = \"iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAIAAACRXR/mAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAd8SURBVFhH7VZ7UFTXGb/nPhZYsbIsDxNpOxlcpSjasVqQxEd8jA0+iRZLoHmQlrAgWFunphk0VowY46szWtOUaaeJkziGFYKCCe2IdZWXgrVtggi2migIu+zyuOzr3nNvv3P38ljzgLVpkz/2N8tw73e/832/853vcZAsy9TXD7T6/2uGAC1/EKDlDwK0/EGAlj8I0PIHnzETBUH4Egclx3EIIfVl3Lif1rVr//jZLwo9okwjhpJVexhRkvI0WtX7iZEpWlblmFZtyUhSdCVK8qSlrtmSn+cvs/tpFe87ZCo7K0k0IpzAI5iTZSSDnyEmw/rEFaxXpPAPVoDa8FeSHrLk/ubD4RWmEwzDeKXjxP20dhW/duq9qripsbkvZMEWfb59EUYUlSdCteV62+slf5rykL6i9J3/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==\";\r\n }\r\n return this.sanitizer.bypassSecurityTrustResourceUrl(\"data:image/bmp;charset=utf-8;base64,\" + data);\r\n }\r\n\r\n public ViewDetails(event: any): void {\r\n this.router.navigate([\"/returns/detail/\", event.data.ReturnsNoteId]);\r\n }\r\n\r\n public CalculateType(rowData: any): number {\r\n //One of the triangle rule is used to calculate sorting: \"The sum of the length of any two sides of a triangle is greater than the length of the third side.\"\r\n const types = [\r\n {\r\n value: rowData.IncludeParts,\r\n priorityWeight: 4\r\n },\r\n {\r\n value: rowData.IncludeEquip,\r\n priorityWeight: 3\r\n },\r\n {\r\n value: rowData.IncludeMisc,\r\n priorityWeight: 2\r\n }];\r\n return types.map(x => (x.value ? 1 : 0) * x.priorityWeight).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n private GetDataSources(): void {\r\n this.dataSource = this.returnService.GetDataSource(true);\r\n\r\n this.employeesDataStore = this.employeeService.GetEmployeeDataStore();\r\n this.suppliersDataStore = this.suppliersService.GetSupplierStore();\r\n }\r\n}\r\n","export class ReturnsNoteCancel {\r\n ReturnsNoteNumber: number;\r\n CancelReasonId: number;\r\n}\r\n","import { ReturnsNoteMaterial } from \"./returns-note-material.model\";\r\nimport { ReturnsNoteStatusEnum } from \"../enums/returns-note-status.enum\";\r\nimport { ReturnsNoteEquipment } from \"./returns-note-equipment.model\";\r\nimport { ReturnsNotePart } from \"./returns-note-part.model\";\r\nimport { ReturnsNoteCylinder } from \"./returns-note-cylinder.model\";\r\n\r\nexport class ReturnsNote {\r\n constructor() {\r\n this.Equipments = [] as ReturnsNoteEquipment[];\r\n }\r\n\r\n ReturnsNoteNumber: number;\r\n GoodsReceivedNumber: number | null;\r\n SupplierId: number;\r\n Status: ReturnsNoteStatusEnum;\r\n ReturnDate: Date;\r\n DeliverReplacementsToId: number;\r\n SupplierReturnRef: string;\r\n Carriage: number;\r\n ExchangeRate: number;\r\n CarrierId?: number;\r\n CarrierRef: string;\r\n CarrierContactId?: number;\r\n InternalNotes: string;\r\n Instructions: string;\r\n CancelledById?: number;\r\n CancelDate: Date;\r\n CancelReasonId: number;\r\n DefaultStoreId: number;\r\n Equipments: ReturnsNoteEquipment[];\r\n Materials: ReturnsNoteMaterial[];\r\n Parts: ReturnsNotePart[];\r\n Cylinders: ReturnsNoteCylinder[];\r\n IncludeParts: boolean;\r\n IncludeMaterials: boolean;\r\n IncludeEquipment: boolean;\r\n IncludeCylinders: boolean;\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{ \"accordion.titles.returned-by\" | translate }}\r\n \r\n {{ returnsDetails.ReturnedBy }}\r\n
\r\n {{ \"accordion.titles.grn-no\" | translate }}\r\n \r\n {{ returnsDetails.GRNNo }}\r\n
\r\n {{ \"accordion.titles.grn-date\" | translate }}\r\n \r\n {{ returnsDetails.GRNDate | date:'shortDate' }}\r\n
\r\n","import { Component, Input, OnChanges } from \"@angular/core\";\r\nimport { AccordionDataService } from \"../accordion-data.service\";\r\nimport { ReturnsDetailsDataModel } from \"../models/returns-details-data.model\";\r\n\r\n@Component({\r\n selector: \"app-returns-details-accordion-item\",\r\n templateUrl: \"./returns-details-accordion-item.component.html\",\r\n styleUrls: [\"./returns-details-accordion-item.component.scss\"]\r\n})\r\nexport class ReturnsDetailsAccordionItemComponent implements OnChanges {\r\n @Input() returnsId: number;\r\n public returnsDetails: ReturnsDetailsDataModel = {\r\n GRNNo: null,\r\n GRNDate: null,\r\n ReturnedBy: null\r\n };\r\n\r\n public constructor(\r\n private dataService: AccordionDataService) { }\r\n\r\n public ngOnChanges(): void {\r\n if (this.returnsId) {\r\n this.dataService.GetReturnsDetail(this.returnsId).subscribe(result => {\r\n this.returnsDetails = result;\r\n });\r\n }\r\n }\r\n\r\n}\r\n","import { Component, Input } from \"@angular/core\";\r\nimport { DocumentTypeEnum } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-returns-files-tab\",\r\n templateUrl: \"./returns-files-tab.component.html\",\r\n styleUrls: [\"./returns-files-tab.component.scss\"]\r\n})\r\nexport class ReturnsFilesTabComponent {\r\n @Input() ReturnsNoteNumber: number;\r\n public docType = DocumentTypeEnum;\r\n}\r\n","
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ data.value | currency: baseCurrencySymbol }}
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n","\r\n","import { formatCurrency } from \"@angular/common\";\r\nimport { Component, Input, OnInit } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { MaterialTypeService } from \"src/app/shared/services/material-type/material-type.service\";\r\nimport { ReturnsNoteMaterial } from \"../models/returns-note-material.model\";\r\n\r\n@Component({\r\n selector: \"app-returns-note-materials\",\r\n templateUrl: \"./returns-note-materials.component.html\",\r\n styleUrls: [\"./returns-note-materials.component.scss\"]\r\n})\r\nexport class ReturnsNoteMaterialsComponent implements OnInit {\r\n @Input() materials: ReturnsNoteMaterial[] = [];\r\n @Input() formDisabled: boolean = true;\r\n @Input() public form: NgForm;\r\n public materialTypeStore: ODataStore;\r\n public baseCurrencySymbol: string = null;\r\n public selectedMaterialIds: [] = [];\r\n\r\n constructor(\r\n private materialTypeService: MaterialTypeService) { }\r\n\r\n public ngOnInit(): void {\r\n this.materialTypeStore = this.materialTypeService.GetMaterialTypeStore();\r\n this.baseCurrencySymbol = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n }\r\n\r\n public TotalCostFormatter(data: any): string {\r\n return formatCurrency(data.value,\r\n JSON.parse(localStorage.getItem(\"ls.UserBrowserLocale\")),\r\n JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\")));\r\n }\r\n\r\n public DeleteSelectedMaterials(): void {\r\n this.selectedMaterialIds.forEach(id => {\r\n const index = this.materials.findIndex(x => x.ReturnsNoteLineId === id);\r\n this.materials.splice(index, 1);\r\n });\r\n this.SetFormDirty();\r\n }\r\n\r\n public SetFormDirty(): void {\r\n this.form.form.markAsDirty();\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ data.value * returnsNote.ExchangeRate | currency: currencySymbol }}
\r\n \r\n
\r\n
{{ data.displayValue | equipmentStatus | translate }}
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n","import { Component, Input, OnInit } from \"@angular/core\";\r\nimport { formatCurrency } from \"@angular/common\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { EquipmentDataService, MakeModelSharedService } from \"servicesight-shared\";\r\nimport { ICurrency } from \"src/app/shared/models/icurrency.model\";\r\nimport { ReturnsNote } from \"../models/returns-note.model\";\r\n\r\n@Component({\r\n selector: \"app-returns-note-equipment\",\r\n templateUrl: \"./returns-note-equipment.component.html\",\r\n styleUrls: [\"./returns-note-equipment.component.scss\"]\r\n})\r\nexport class ReturnsNoteEquipmentComponent implements OnInit {\r\n @Input() public returnsNote: ReturnsNote = new ReturnsNote();\r\n @Input() public currency: ICurrency;\r\n @Input() public form: NgForm;\r\n @Input() formDisabled: boolean = true;\r\n\r\n public selectedEquipmentIds: number[] = [];\r\n public makeModelStore: ODataStore;\r\n public equipmentStore: ODataStore;\r\n public currencySymbol: string;\r\n\r\n public get disableRemove(): boolean {\r\n return this.formDisabled || this.selectedEquipmentIds.length === 0;\r\n }\r\n\r\n constructor(\r\n private makeModelService: MakeModelSharedService,\r\n private equipmentService: EquipmentDataService\r\n ) {\r\n this.TotalPriceFormatter = this.TotalPriceFormatter.bind(this);\r\n this.OnEquipRowUpdating = this.OnEquipRowUpdating.bind(this);\r\n }\r\n\r\n ngOnInit(): void {\r\n this.makeModelStore = this.makeModelService.GetMakeModelsDataStore();\r\n this.equipmentStore = this.equipmentService.GetEquipmentDataStore();\r\n this.currencySymbol = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n }\r\n\r\n public DeleteSelectedEquipment(): void {\r\n this.selectedEquipmentIds.forEach(id => {\r\n const index = this.returnsNote.Equipments.findIndex(x => x.ReturnsNoteLineId === id);\r\n this.returnsNote.Equipments.splice(index, 1);\r\n });\r\n this.SetFormDirty();\r\n }\r\n\r\n public SetFormDirty(): void {\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public GetMakeModelDisplayValue(data: any): string {\r\n return `${data.Make} / ${data.Model}`;\r\n }\r\n\r\n public TotalPriceFormatter(data: any): string {\r\n return formatCurrency(data.value * this.returnsNote.ExchangeRate,\r\n JSON.parse(localStorage.getItem(\"ls.UserBrowserLocale\")),\r\n this.currencySymbol);\r\n }\r\n\r\n public OnEquipRowUpdating(): void {\r\n this.SetFormDirty();\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n\r\n
\r\n \r\n {{ 'buttons.serial-number.abbreviation' | translate }}\r\n \r\n
\r\n\r\n
\r\n {{ data.value | currency: currency }}\r\n
\r\n\r\n \r\n\r\n\r\n\r\n\r\n","import { formatCurrency } from \"@angular/common\";\r\nimport { Component, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { SettingId, SettingsService } from \"servicesight-shared\";\r\nimport { GoodsReceived } from \"src/app/goods-received/models/goods-received.model\";\r\nimport { GoodsReceivedService } from \"src/app/goods-received/services/goods-received.service\";\r\nimport { StoreService } from \"src/app/settings/services/store.service\";\r\nimport { PartSerialNumberDialogueComponent } from \"src/app/shared/components/part-serial-number-dialogue/part-serial-number-dialogue.component\";\r\nimport { ICurrency } from \"src/app/shared/models/icurrency.model\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\nimport { StockService } from \"src/app/stock/services/stock.service\";\r\nimport { ReturnsNoteStatusEnum } from \"../enums/returns-note-status.enum\";\r\nimport { ReturnsNotePart } from \"../models/returns-note-part.model\";\r\nimport { ReturnsNote } from \"../models/returns-note.model\";\r\n\r\n@Component({\r\n selector: \"app-returns-note-parts\",\r\n templateUrl: \"./returns-note-parts.component.html\",\r\n styleUrls: [\"./returns-note-parts.component.scss\"]\r\n})\r\nexport class ReturnsNotePartsComponent implements OnInit, OnChanges {\r\n\r\n @Input() public returnsNote: ReturnsNote;\r\n @Input() public form: NgForm;\r\n @Input() public formDisabled: boolean = true;\r\n @Input() public currency: ICurrency;\r\n @Input() public colCountByScreen: object = {\r\n lg: 3,\r\n md: 2,\r\n sm: 2,\r\n xs: 1\r\n };\r\n @ViewChild(\"SerialNoDialog\", { static: true }) serialNumberDialogue: PartSerialNumberDialogueComponent;\r\n\r\n public partsListDataSource: DataSource;\r\n public stockHeaderDataStore: ODataStore;\r\n public storeDataStore: ODataStore;\r\n public selectedPartIds: [] = [];\r\n public additionalStoresEnabled: boolean = false;\r\n private goodsReceived: GoodsReceived = new GoodsReceived();\r\n\r\n public get readonly(): boolean {\r\n return this.returnsNote.Status === ReturnsNoteStatusEnum.Returned;\r\n }\r\n\r\n public constructor(\r\n private stockService: StockService,\r\n private odataService: ODataService,\r\n private translateService: TranslateService,\r\n private goodsReceivedService: GoodsReceivedService,\r\n private storeService: StoreService,\r\n private settingsService: SettingsService\r\n ) { }\r\n\r\n public ngOnInit(): void {\r\n this.stockHeaderDataStore = this.stockService.GetStockHeaders();\r\n this.storeDataStore = this.storeService.GetDataStore();\r\n\r\n this.settingsService.getSetting(SettingId.UseAdditionalStores).subscribe(res => {\r\n this.additionalStoresEnabled = res.ValueBool;\r\n });\r\n\r\n this.setupPartListDataSource();\r\n this.ReloadGoodReceivedNote();\r\n\r\n this.ValidateLessOrEqualThanQuantityReturned = this.ValidateLessOrEqualThanQuantityReturned.bind(this);\r\n this.OnPartUpdating = this.OnPartUpdating.bind(this);\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.returnsNote) {\r\n this.ReloadGoodReceivedNote();\r\n this.setupPartListDataSource();\r\n }\r\n }\r\n\r\n public TotalPartsCost(data: any): string {\r\n return formatCurrency(data.value,\r\n JSON.parse(localStorage.getItem(\"ls.UserBrowserLocale\")),\r\n JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\")));\r\n }\r\n\r\n public DeleteSelectedParts(): void {\r\n this.selectedPartIds.forEach(id => {\r\n const index = this.returnsNote.Parts.findIndex(x => x.ReturnsNoteLineId === id);\r\n this.returnsNote.Parts.splice(index, 1);\r\n });\r\n\r\n this.selectedPartIds = [];\r\n this.partsListDataSource.reload();\r\n this.setFormDirty();\r\n }\r\n\r\n public OpenSerialNo(event: ReturnsNotePart): void {\r\n const lineId = event.ReturnsNoteLineId;\r\n const partRow = this.GetReturnsNotePart(lineId);\r\n\r\n if (partRow) {\r\n // reserve any serial numbers that are added to parts but have not been saved yet\r\n const reserved: number[] = [];\r\n this.returnsNote.Parts\r\n .filter(i => i.ReturnsNoteLineId !== lineId && i.StockHeaderId === partRow.StockHeaderId)\r\n .forEach(i => reserved.concat(i.SerialIds));\r\n\r\n this.serialNumberDialogue.storeId = partRow.StoreId;\r\n this.serialNumberDialogue.show(event.Returned, event.StockHeaderId, partRow.SerialIds, reserved, \"\", lineId);\r\n }\r\n }\r\n\r\n public PartUpdated(): void {\r\n this.setFormDirty();\r\n }\r\n\r\n public OnPartUpdating(e: any): void {\r\n const data = e.newData as ReturnsNotePart;\r\n data.LandedCost = (e.oldData.Cost) * (data.Returned || e.oldData.Returned);\r\n }\r\n\r\n public OnPartValidating(e: any): void {\r\n const newData = e.newData as ReturnsNotePart;\r\n const oldData = e.oldData as ReturnsNotePart;\r\n if (newData.Returned) {\r\n const goodReceivedPart = this.goodsReceived?.Parts.find(x => x.GoodReceivedNoteLineId === oldData.GoodsReceivedNoteLineId);\r\n\r\n if (goodReceivedPart == null || newData.Returned <= goodReceivedPart.Received) {\r\n return;\r\n };\r\n\r\n const message = this.translateService.instant(\r\n \"returns-note.detail.parts.validator.quantity-returned.range-exceeded\",\r\n { goodReceivedQuantity: goodReceivedPart.Received }\r\n );\r\n e.errorText = message;\r\n e.isValid = false;\r\n }\r\n }\r\n\r\n public ValidateLessOrEqualThanQuantityReturned(e): boolean {\r\n return e.value <= e.data.Returned;\r\n }\r\n\r\n public OnSerialNumberUpdate(event: any): void {\r\n const partToUpdate = this.GetReturnsNotePart(event.uniqueId);\r\n if (partToUpdate) {\r\n partToUpdate.SerialIds = event.serialIds;\r\n this.setFormDirty();\r\n }\r\n }\r\n\r\n public SerialNumbersOutstanding(row: ReturnsNotePart): boolean {\r\n return row.SerialNumbered && (row.SerialIds ? row.SerialIds.length : 0) !== row.Returned;\r\n }\r\n\r\n private setupPartListDataSource(): void {\r\n this.partsListDataSource = this.odataService.GetDataSourceWithLookups(\r\n this.returnsNote.Parts,\r\n \"ReturnsNoteLineId\",\r\n [\r\n {\r\n store: this.stockHeaderDataStore,\r\n dataKey: \"StockHeaderId\",\r\n lookupKey: \"StockHeaderId\",\r\n displayExprs: [\"PartNo\"]\r\n }\r\n ]\r\n );\r\n }\r\n\r\n private setFormDirty(): void {\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n private ReloadGoodReceivedNote(): void {\r\n if (this.returnsNote?.GoodsReceivedNumber) {\r\n this.goodsReceivedService.Get(this.returnsNote.GoodsReceivedNumber).subscribe(grn => {\r\n this.goodsReceived = grn;\r\n });\r\n }\r\n }\r\n\r\n private GetReturnsNotePart(lineId: number): ReturnsNotePart {\r\n return this.returnsNote.Parts.find(part => part.ReturnsNoteLineId === lineId);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ 'returns-note.detail.return' | translate }}{{ 'returns-note.detail.received' | translate }}{{ 'returns-note.detail.retrurned' | translate }}{{ 'returns-note.detail.cost' | translate }}{{ 'returns-note.detail.replacements-reqd' | translate }}
\r\n
\r\n
\r\n \r\n
\r\n
{{ 'label.parts' | translate }}
\r\n
\r\n
{{ partsReceived }}{{ partsReturned }}{{ currencyFormat(partsCost) }}{{ partsFlaggedForReturn }}
\r\n
\r\n
\r\n \r\n
\r\n
{{ 'label.equipment' | translate }}
\r\n
\r\n
{{ equipmentReceived }}{{ equipmentReturned }}{{ currencyFormat(equipmentCost) }}{{ equipmentFlaggedForReturn }}
\r\n
\r\n
\r\n \r\n
\r\n
{{ 'label.materials' | translate }}
\r\n
\r\n
{{ materialsReceived }}{{ materialsReturned }}{{ currencyFormat(materialsCost) }}{{ materialsFlaggedForReturn }}
\r\n
\r\n
\r\n \r\n
\r\n
{{ 'label.refrigerants' | translate }}
\r\n
\r\n
{{ refrigerantsReceived }}{{ refrigerantsReturned }}{{ currencyFormat(refrigerantsCost) }}{{ refrigerantsFlaggedForReturn }}
{{ 'returns-note.detail.combined-total' | translate }}{{ totalReceived }}{{ totalReturned }}{{ currencyFormat(totalCost) }}{{ totalFlaggedForReturn }}
{{ 'returns-note.detail.carriage' | translate }}  {{ currencyFormat(returnsNote.Carriage) }}  
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
","import { formatCurrency } from \"@angular/common\";\r\nimport { Component, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { DxSelectBoxComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { GoodsReceived } from \"src/app/goods-received/models/goods-received.model\";\r\nimport { GoodsReceivedService } from \"src/app/goods-received/services/goods-received.service\";\r\nimport { ChildContactType } from \"src/app/shared/components/child-contacts-list/child-contact-type.enum\";\r\nimport { ContactStatus } from \"src/app/shared/enums/contact-status.eum\";\r\nimport { SupplierStatus } from \"src/app/shared/pipes/enums/supplier-status.enum\";\r\nimport { ChildContactsService } from \"src/app/shared/services/child-contacts/child-contracts.service\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { SupplierService } from \"src/app/shared/services/supplier/supplier.service\";\r\nimport { ReturnsNote } from \"../models/returns-note.model\";\r\n\r\n@Component({\r\n selector: \"app-returns-note-summary\",\r\n templateUrl: \"./returns-note-summary.component.html\",\r\n styleUrls: [\"./returns-note-summary.component.scss\"]\r\n})\r\nexport class ReturnsNoteSummaryComponent implements OnInit, OnChanges {\r\n @Input() public returnsNote: ReturnsNote;\r\n @Input() public form: NgForm;\r\n @Input() public formDisabled: boolean;\r\n\r\n @ViewChild(\"carrierContactSelectBox\", { static: false }) carrierContactSelectBoxComponent: DxSelectBoxComponent;\r\n\r\n public supplierDataStore: ODataStore;\r\n public supplierDataSource: DataSource;\r\n public supplierContactsDataStore: ODataStore;\r\n public supplierContactsDataSource: DataSource;\r\n public HasAccessToFGas: boolean = false;\r\n\r\n private goodsRecevied: GoodsReceived = new GoodsReceived();\r\n\r\n public get partsReceived(): number {\r\n let partsReceived = 0;\r\n\r\n if (this.goodsRecevied.Parts) {\r\n partsReceived = this.goodsRecevied.Parts.map(x => x.Received).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return partsReceived;\r\n }\r\n\r\n public get partsReturned(): number {\r\n let partsReturned = 0;\r\n\r\n if (this.returnsNote.Parts && this.returnsNote.IncludeParts) {\r\n partsReturned = this.returnsNote.Parts.map(x => x.Returned).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return partsReturned;\r\n }\r\n\r\n public get partsCost(): number {\r\n let partsCost = 0;\r\n\r\n if (this.returnsNote.Parts && this.returnsNote.IncludeParts) {\r\n partsCost = this.returnsNote.Parts.map(x => x.Returned * x.Cost).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return partsCost;\r\n }\r\n\r\n public get partsFlaggedForReturn(): number {\r\n let partsFlaggedForReturn = 0;\r\n\r\n if (this.returnsNote.Parts && this.returnsNote.IncludeParts) {\r\n partsFlaggedForReturn = this.returnsNote.Parts.map(x => x.QtyRequired).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return partsFlaggedForReturn;\r\n }\r\n\r\n public get equipmentReceived(): number {\r\n let equipmentReceived = 0;\r\n\r\n if (this.goodsRecevied.Equipment) {\r\n equipmentReceived = this.goodsRecevied.Equipment.length;\r\n }\r\n\r\n return equipmentReceived;\r\n }\r\n\r\n public get equipmentReturned(): number {\r\n let equipmentReturned = 0;\r\n\r\n if (this.returnsNote.Equipments && this.returnsNote.IncludeEquipment) {\r\n equipmentReturned = this.returnsNote.Equipments.length;\r\n }\r\n\r\n return equipmentReturned;\r\n }\r\n\r\n public get equipmentCost(): number {\r\n let equipmentCost = 0;\r\n\r\n if (this.returnsNote.Equipments && this.returnsNote.IncludeEquipment) {\r\n equipmentCost = this.returnsNote.Equipments.map(x => x.Cost).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return equipmentCost;\r\n }\r\n\r\n public get equipmentFlaggedForReturn(): number {\r\n let equipmentFlaggedForReturn = 0;\r\n\r\n if (this.returnsNote.Equipments && this.returnsNote.IncludeEquipment) {\r\n equipmentFlaggedForReturn = this.returnsNote.Equipments.filter(x => x.ToBeReplaced).length;\r\n }\r\n\r\n return equipmentFlaggedForReturn;\r\n }\r\n\r\n public get materialsReceived(): number {\r\n let materialsReceived = 0;\r\n\r\n if (this.goodsRecevied.Materials) {\r\n materialsReceived = this.goodsRecevied.Materials.length;\r\n }\r\n\r\n return materialsReceived;\r\n }\r\n\r\n public get materialsReturned(): number {\r\n let materialsReturned = 0;\r\n\r\n if (this.returnsNote.Materials && this.returnsNote.IncludeMaterials) {\r\n materialsReturned = this.returnsNote.Materials.length;\r\n }\r\n\r\n return materialsReturned;\r\n }\r\n\r\n public get materialsCost(): number {\r\n let materialsCost = 0;\r\n\r\n if (this.returnsNote.Materials && this.returnsNote.IncludeMaterials) {\r\n materialsCost = this.returnsNote.Materials.map(x => x.Cost).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return materialsCost;\r\n }\r\n\r\n public get materialsFlaggedForReturn(): number {\r\n let materialsFlaggedForReturn = 0;\r\n\r\n if (this.returnsNote.Materials && this.returnsNote.IncludeMaterials) {\r\n materialsFlaggedForReturn = this.returnsNote.Materials.filter(x => x.ToBeReplaced).length;\r\n }\r\n return materialsFlaggedForReturn;\r\n }\r\n\r\n public get refrigerantsReceived(): number {\r\n let refrigerantsReceived = 0;\r\n if (this.returnsNote.Cylinders) {\r\n refrigerantsReceived = this.returnsNote.Cylinders.filter(x => x.GoodsReceivedNoteLineId).length;\r\n }\r\n\r\n return refrigerantsReceived;\r\n }\r\n\r\n public get refrigerantsReturned(): number {\r\n let refrigerantsReturned = 0;\r\n\r\n if (this.returnsNote.Cylinders && this.returnsNote.IncludeCylinders) {\r\n refrigerantsReturned = this.returnsNote.Cylinders.length;\r\n }\r\n\r\n return refrigerantsReturned;\r\n }\r\n\r\n public get refrigerantsCost(): number {\r\n return 0;\r\n }\r\n\r\n public get refrigerantsFlaggedForReturn(): number {\r\n return 0;\r\n }\r\n\r\n public get totalReceived(): number {\r\n return this.partsReceived + this.materialsReceived + this.equipmentReceived + this.refrigerantsReceived;\r\n }\r\n\r\n public get totalReturned(): number {\r\n return this.partsReturned + this.materialsReturned + this.equipmentReturned + this.refrigerantsReturned;\r\n }\r\n\r\n public get totalCost(): number {\r\n return this.partsCost + this.materialsCost + this.equipmentCost + this.refrigerantsCost;\r\n }\r\n\r\n public get totalFlaggedForReturn(): number {\r\n return this.partsFlaggedForReturn + this.materialsFlaggedForReturn + this.equipmentFlaggedForReturn + this.refrigerantsFlaggedForReturn;\r\n }\r\n\r\n constructor(\r\n private childContactsService: ChildContactsService,\r\n private supplierService: SupplierService,\r\n private goodsReceviedService: GoodsReceivedService,\r\n private licenseService: LicenseService) { }\r\n\r\n public ngOnInit(): void {\r\n this.supplierDataStore = this.supplierService.GetSupplierStore();\r\n this.supplierDataSource = new DataSource({\r\n store: this.supplierDataStore,\r\n filter: [\"Status\", \"=\", SupplierStatus.Active]\r\n });\r\n\r\n this.supplierContactsDataStore = this.childContactsService.GetDataStore(ChildContactType.Supplier);\r\n this.supplierContactsDataSource = new DataSource({\r\n store: this.supplierContactsDataStore,\r\n filter: [\"Status\", \"=\", ContactStatus.ACTIVE]\r\n });\r\n\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(x => {\r\n this.HasAccessToFGas = x.FGasEnabled;\r\n });\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.returnsNote.currentValue && this.returnsNote.GoodsReceivedNumber && (!changes.returnsNote.previousValue ||\r\n changes.returnsNote.currentValue.GoodsReceivedNumber !== changes.returnsNote.previousValue.GoodsReceivedNumber)) {\r\n this.goodsReceviedService.Get(this.returnsNote.GoodsReceivedNumber).subscribe((gr) => {\r\n this.goodsRecevied = gr;\r\n });\r\n }\r\n }\r\n\r\n public CarrierChanged(e: any): void {\r\n if (e.value) {\r\n const dataSource = this.carrierContactSelectBoxComponent.instance.getDataSource();\r\n dataSource.filter([[\"CustomerId\", \"=\", e.value], \"and\", [\"Status\", \"=\", ContactStatus.ACTIVE]]);\r\n dataSource.load().then(() => {\r\n if (e.event) {\r\n this.returnsNote.CarrierContactId = null;\r\n }\r\n });\r\n this.SetFormDirty();\r\n }\r\n }\r\n\r\n public SetFormDirty(): void {\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public currencyFormat(value: number): string {\r\n return formatCurrency(value,\r\n JSON.parse(localStorage.getItem(\"ls.UserBrowserLocale\")),\r\n JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\")));\r\n }\r\n}\r\n","import { Component, EventEmitter, Input, Output, ViewChild } from \"@angular/core\";\r\nimport { SettingData, SettingId, SettingsService } from \"servicesight-shared\";\r\nimport { CylindersListComponent } from \"src/app/shared/components/cylinders-list/cylinders-list.component\";\r\n\r\n@Component({\r\n selector: \"app-returns-note-add-cylinder-dialogue\",\r\n templateUrl: \"./returns-note-add-cylinder-dialogue.component.html\",\r\n styleUrls: [\"./returns-note-add-cylinder-dialogue.component.scss\"]\r\n})\r\nexport class ReturnsNoteAddCylinderDialogueComponent {\r\n @ViewChild(\"cylindersList\") cylindersList: CylindersListComponent;\r\n\r\n @Input() alreadyAdded: number[];\r\n @Input() supplierId: number = null;\r\n @Output() cylindersAdded = new EventEmitter();\r\n\r\n public storesEnabled: boolean = false;\r\n public selected: number[] = [];\r\n public visible: boolean = false;\r\n\r\n constructor(\r\n private settingService: SettingsService) { }\r\n\r\n public Show(): void {\r\n this.selected = [];\r\n this.cylindersList.SetFilters();\r\n\r\n this.settingService.getSetting(SettingId.UseAdditionalStores).subscribe((settingData: SettingData) => {\r\n this.storesEnabled = settingData.ValueBool;\r\n });\r\n\r\n this.visible = true;\r\n }\r\n\r\n public Close(): void {\r\n this.visible = false;\r\n }\r\n\r\n public AddCylinder(): void {\r\n this.cylindersAdded.emit(this.selected);\r\n this.Close();\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n {{ data.value }} {{ units }}\r\n
\r\n\r\n
\r\n {{ data.value }} {{ units }}\r\n
\r\n\r\n \r\n\r\n
\r\n \r\n
\r\n\r\n\r\n\r\n\r\n","\r\n
\r\n \r\n >\r\n
\r\n
\r\n \r\n \r\n
\r\n\r\n","import { Component, Input, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Guid } from \"guid-typescript\";\r\nimport { SettingData, SettingId, SettingsService } from \"servicesight-shared\";\r\nimport { CylinderService } from \"src/app/f-gas/services/cylinder.service\";\r\nimport { CylinderTypesService } from \"src/app/settings/services/cylinder-types.service\";\r\nimport { RefrigerantTypeService } from \"src/app/settings/services/refrigerant-type.service\";\r\nimport { StoreService } from \"src/app/settings/services/store.service\";\r\nimport { ICurrency } from \"src/app/shared/models/icurrency.model\";\r\nimport { ReturnsNoteStatusEnum } from \"../enums/returns-note-status.enum\";\r\nimport { ReturnsNote } from \"../models/returns-note.model\";\r\nimport { ReturnsNoteAddCylinderDialogueComponent } from \"../returns-note-add-cylinder-dialogue/returns-note-add-cylinder-dialogue.component\";\r\n\r\n@Component({\r\n selector: \"app-returns-note-refrigerants\",\r\n templateUrl: \"./returns-note-refrigerants.component.html\",\r\n styleUrls: [\"./returns-note-refrigerants.component.scss\"]\r\n})\r\nexport class ReturnsNoteRefrigerantsComponent implements OnInit {\r\n @ViewChild(ReturnsNoteAddCylinderDialogueComponent, { static: true }) AddCylinderDialog: ReturnsNoteAddCylinderDialogueComponent;\r\n\r\n @Input() public returnsNote: ReturnsNote;\r\n @Input() public form: NgForm;\r\n @Input() public formDisabled: boolean = true;\r\n @Input() public currency: ICurrency;\r\n\r\n public storeDataStore: ODataStore;\r\n public cylinderDataStore: ODataStore;\r\n public cylinderTypesDataStore: ODataStore;\r\n public refrigerantTypesDataStore: ODataStore;\r\n public selectedCylinderIds: [] = [];\r\n public additionalStoresEnabled: boolean = false;\r\n public units: string = \"kg\";\r\n\r\n public get readonly(): boolean {\r\n return this.returnsNote.Status === ReturnsNoteStatusEnum.Returned;\r\n }\r\n\r\n public constructor(\r\n private storeService: StoreService,\r\n private settingsService: SettingsService,\r\n private cylinderService: CylinderService,\r\n private cylinderTypesService: CylinderTypesService,\r\n private refrigerantTypeService: RefrigerantTypeService,\r\n ) {\r\n this.CurrentWeightTotal = this.CurrentWeightTotal.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.storeDataStore = this.storeService.GetDataStore();\r\n this.cylinderDataStore = this.cylinderService.GetCylinders();\r\n this.cylinderTypesDataStore = this.cylinderTypesService.GetDataStore();\r\n this.refrigerantTypesDataStore = this.refrigerantTypeService.GetDataStore();\r\n\r\n this.settingsService.getSetting(SettingId.UseAdditionalStores).subscribe(res => {\r\n this.additionalStoresEnabled = res.ValueBool;\r\n });\r\n\r\n this.settingsService.getSetting(SettingId.FGasRefrigerantUnits).subscribe((settingData: SettingData) => {\r\n this.units = settingData.ValueListSelectedId === 1 ? \"kg\" : \"lb\";\r\n });\r\n }\r\n\r\n public get alreadyAddedCylinderIds(): number[] {\r\n return this.returnsNote.Cylinders.map(i => i.CylinderId);\r\n }\r\n\r\n public CurrentWeightTotal(data: any): string {\r\n return data.value + \" \" + this.units;\r\n }\r\n\r\n public DeleteSelectedCylinders(): void {\r\n this.selectedCylinderIds.forEach(id => {\r\n const index = this.returnsNote.Cylinders.findIndex(x => x.ReturnsNoteLineId === id);\r\n this.returnsNote.Cylinders.splice(index, 1);\r\n });\r\n\r\n this.setFormDirty();\r\n }\r\n\r\n public AddCylinder(): void {\r\n this.AddCylinderDialog.Show();\r\n }\r\n\r\n public async OnCylinderIdsAdded(ids: number[]): Promise {\r\n const cylinderTypeIdRecovery = 1;\r\n const cylinderTypeIdWaste = 4;\r\n\r\n for (const id of ids) {\r\n\r\n const cylinder = await this.cylinderDataStore.byKey(id);\r\n\r\n if (!cylinder) {\r\n throw new Error(\"Error loading cylinder data\");\r\n }\r\n\r\n this.returnsNote.Cylinders.push({\r\n ReturnsNoteLineId: Guid.create().toString(),\r\n GoodReceivedNoteId: null,\r\n GoodsReceivedNoteLineId: null,\r\n CylinderId: id,\r\n SerialNo: cylinder.SerialNumber,\r\n CylinderTypeId: cylinder.CylinderTypeId,\r\n RefrigerantTypeId: cylinder.RefrigerantTypeId,\r\n Weight: cylinder.Weight,\r\n CurrentWeight: cylinder.CurrentWeight,\r\n StoreId: cylinder.StoreId,\r\n WasteTransferNoteRequired: cylinder.CurrentWeight > 0 && (cylinder.CylinderTypeId === cylinderTypeIdRecovery || cylinder.CylinderTypeId === cylinderTypeIdWaste)\r\n });\r\n }\r\n this.setFormDirty();\r\n }\r\n\r\n public CylinderUpdated(): void {\r\n this.setFormDirty();\r\n }\r\n\r\n private setFormDirty(): void {\r\n this.form.form.markAsDirty();\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

{{ 'returns-note.detail.returns-note' | translate }} {{ returnsNote.ReturnsNoteNumber }}

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

{{ returnsNote.Status | returnsNoteStatus | translate }}

\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxSelectBoxComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport {\r\n ContactService,\r\n CustomerService,\r\n CustomerStatus,\r\n DocumentTypeEnum,\r\n DocumentTypePipe,\r\n FormMesssageService,\r\n MakeModelSharedService,\r\n SettingData,\r\n SettingId,\r\n SettingsService\r\n} from \"servicesight-shared\";\r\nimport { JobService } from \"src/app/jobs/services/job.service\";\r\nimport { CancelData } from \"src/app/quotes/models/CancelData\";\r\nimport { StoreService } from \"src/app/settings/services/store.service\";\r\nimport { BasePopSopDetailComponent } from \"src/app/shared-pop-sop/components/base-pop-sop-detail/base-pop-sop-detail.component\";\r\nimport { ConfirmationMessageComponent } from \"src/app/shared/components/confirmation-message/confirmation-message.component\";\r\nimport { MessageDocTypeIds } from \"src/app/shared/enums/messages/message-doc-type-ids.enum\";\r\nimport { MessageTypes } from \"src/app/shared/enums/messages/message-types.enum\";\r\nimport { ICurrency } from \"src/app/shared/models/icurrency.model\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { MaterialTypeService } from \"src/app/shared/services/material-type/material-type.service\";\r\nimport { Ng1ReminderService } from \"src/app/shared/services/ng1-reminder.service\";\r\nimport { PreviousRouteService } from \"src/app/shared/services/previous-route.service\";\r\nimport { SupplierService } from \"src/app/shared/services/supplier/supplier.service\";\r\nimport { StockService } from \"src/app/stock/services/stock.service\";\r\nimport { MessageService } from \"./../../messages/services/message/message.service\";\r\nimport { ModuleAccessModel } from \"./../../shared/models/module-access.model\";\r\nimport { ReturnsNoteStatusEnum } from \"../enums/returns-note-status.enum\";\r\nimport { ReturnsNoteCancel } from \"../models/returns-note-cancel.model\";\r\nimport { ReturnsNote } from \"../models/returns-note.model\";\r\nimport { ReturnsService } from \"../returns.service\";\r\nimport { DateOnlyService } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-returns-note-details\",\r\n templateUrl: \"./returns-note-details.component.html\",\r\n styleUrls: [\"./returns-note-details.component.scss\"]\r\n})\r\nexport class ReturnsNoteDetailsComponent extends BasePopSopDetailComponent implements OnInit {\r\n\r\n @ViewChild(\"form\", { static: true }) form: NgForm;\r\n @ViewChild(\"discardChangesMessage\") discardMessage: ConfirmationMessageComponent;\r\n @ViewChild(\"supplierSelectBox\", { static: false }) supplierSelectBox: DxSelectBoxComponent;\r\n @ViewChild(\"storeSelectBox\", { static: false }) storeSelectBox: DxSelectBoxComponent;\r\n\r\n public returnsNote: ReturnsNote = new ReturnsNote();\r\n public goodsReceivedId: number = null;\r\n public IsNew: boolean = false;\r\n public currency: ICurrency;\r\n public showInForeignCurrency: boolean = false;\r\n public baseCurrencySymbol: string = null;\r\n public additionalStoresEnabled: boolean = false;\r\n public customerDataSource: DataSource;\r\n public stockStoreDataStore: ODataStore;\r\n public IsRecordNavigationEnabled: boolean = false;\r\n public CanNavigatePrevious: boolean = false;\r\n public CanNavigateNext: boolean = false;\r\n public showCancelDialog: boolean = false;\r\n public showWarningNotesEye: boolean = false;\r\n public piAllowManualMatchingEnabled: boolean = false;\r\n public isPurchaseInvoicePopupVisible: boolean = false;\r\n public today: Date = new Date();\r\n public moduleAccess: ModuleAccessModel = { } as ModuleAccessModel;\r\n\r\n public retunsNoteStatus = ReturnsNoteStatusEnum;\r\n public documentType = DocumentTypeEnum;\r\n\r\n public get formDisabled(): boolean {\r\n return this.returnsNote.Status !== ReturnsNoteStatusEnum.Pending;\r\n }\r\n\r\n public get currencySymbol(): string {\r\n return this.showInForeignCurrency && this.currency ? this.currency.CurrencySymbol : this.baseCurrencySymbol;\r\n }\r\n\r\n public get isForeignCustomer(): boolean {\r\n return this.currency && this.currency.IsForeignCustomer;\r\n }\r\n\r\n constructor(\r\n materialType: MaterialTypeService,\r\n customerService: CustomerService,\r\n contactService: ContactService,\r\n makeModelSharedService: MakeModelSharedService,\r\n translate: TranslateService,\r\n supplierService: SupplierService,\r\n stockService: StockService,\r\n documentTypePipe: DocumentTypePipe,\r\n jobDataService: JobService,\r\n private storeService: StoreService,\r\n private settingsService: SettingsService,\r\n private messageService: MessageService,\r\n private licenseService: LicenseService,\r\n private formMessageService: FormMesssageService,\r\n private returnsNoteService: ReturnsService,\r\n private router: Router,\r\n private route: ActivatedRoute,\r\n private previousRouteService: PreviousRouteService,\r\n private ng1reminderService: Ng1ReminderService,\r\n private dateOnlyService: DateOnlyService\r\n ) {\r\n super(\r\n translate,\r\n documentTypePipe,\r\n materialType,\r\n customerService,\r\n contactService,\r\n makeModelSharedService,\r\n jobDataService,\r\n supplierService,\r\n stockService\r\n );\r\n }\r\n\r\n ngOnInit(): void {\r\n super.ngOnInit();\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(x => {\r\n this.moduleAccess = x;\r\n });\r\n\r\n this.route.params.subscribe(params => {\r\n if (params.goodsReceivedId) {\r\n this.goodsReceivedId = Number(params.goodsReceivedId);\r\n this.returnsNoteService.GetByGoodsReceived(this.goodsReceivedId).subscribe(rn => {\r\n this.returnsNote = rn;\r\n this.GetCurrency(this.returnsNote.SupplierId, null);\r\n });\r\n }\r\n\r\n if (params.id) {\r\n this.returnsNoteService.Get(params.id).subscribe(rn => {\r\n this.returnsNote = rn;\r\n this.GetCurrency(this.returnsNote.SupplierId, null);\r\n this.SetCurrentItem(params.id);\r\n });\r\n this.IsNew = false;\r\n } else {\r\n this.IsNew = true;\r\n }\r\n this.IsRecordNavigationEnabled = !this.IsNew && this.previousRouteService.PreviousUrlContains(\"/returns\");\r\n });\r\n\r\n this.stockStoreDataStore = this.storeService.GetDataStore();\r\n this.settingsService.getSetting(SettingId.UseAdditionalStores).subscribe(res => {\r\n this.additionalStoresEnabled = res.ValueBool;\r\n });\r\n\r\n this.settingsService.getSetting(SettingId.PIAllowManualMatching).subscribe((res: SettingData) => {\r\n this.piAllowManualMatchingEnabled = res.ValueBool;\r\n });\r\n\r\n this.customerDataSource = new DataSource({\r\n store: this.customersStore,\r\n filter: [[\"Status\", \"=\", CustomerStatus.ACTIVE], \"and\", [\"IsCustomer\", \"=\", true]]\r\n });\r\n\r\n this.baseCurrencySymbol = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n }\r\n\r\n public Save(): void {\r\n this.formMessageService\r\n .RegisterObservable(this.returnsNoteService.Save(this.returnsNote), \"form\");\r\n }\r\n\r\n public DiscardChanges(): void {\r\n if (!this.IsNew) {\r\n this.returnsNoteService.Get(this.returnsNote.ReturnsNoteNumber).subscribe(rn => {\r\n this.returnsNote = rn;\r\n this.SetCurrentItem(this.returnsNote.ReturnsNoteNumber);\r\n this.discardMessage.showPopup = false;\r\n });\r\n } else {\r\n this.router.navigate([\"/returns\"]);\r\n }\r\n }\r\n\r\n public SetFormDirty(): void {\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public onSupplierChanged(e): void {\r\n if (e.value) {\r\n this.GetCurrency(e.value, (cur: ICurrency) => {\r\n if (this.returnsNote && !this.returnsNote.ReturnsNoteNumber || e.event) {\r\n this.returnsNote.ExchangeRate = cur.ExchangeRateSales;\r\n }\r\n });\r\n }\r\n }\r\n\r\n public GetCustomerDisplayExpr(item): string {\r\n if (!item) {\r\n return \"\";\r\n }\r\n\r\n return item.Customer + (item.Address ? `, ${item.Address}` : \"\");\r\n }\r\n\r\n public NavigateNext(): void {\r\n if (this.CanNavigateNext) {\r\n this.returnsNoteService.GetNextId().then(nextId => {\r\n this.router.navigate([\"returns\", \"detail\", nextId]);\r\n });\r\n }\r\n }\r\n\r\n public NavigatePrevious(): void {\r\n if (this.CanNavigatePrevious) {\r\n this.returnsNoteService.GetPreviousId().then(previousId => {\r\n this.router.navigate([\"returns\", \"detail\", previousId]);\r\n });\r\n }\r\n }\r\n\r\n public ToggleCurrency(): void {\r\n this.showInForeignCurrency = !this.showInForeignCurrency;\r\n }\r\n\r\n public CancelReturn(): void {\r\n this.showCancelDialog = true;\r\n }\r\n\r\n public BookOut(): void {\r\n const supplierName = this.supplierSelectBox.displayValue;\r\n this.formMessageService.RegisterObservable(this.returnsNoteService.BookOut(this.returnsNote, supplierName), \"form\")\r\n .subscribe(rn => this.returnsNote = rn);\r\n }\r\n\r\n public SaveCancelDialog(data: CancelData): void {\r\n this.returnsNote.CancelReasonId = data.CancelReasonID;\r\n const rtc = new ReturnsNoteCancel();\r\n rtc.ReturnsNoteNumber = this.returnsNote.ReturnsNoteNumber;\r\n rtc.CancelReasonId = data.CancelReasonID;\r\n this.formMessageService.RegisterObservable(this.returnsNoteService.Cancel(rtc), \"form\")\r\n .subscribe(rn => {\r\n this.returnsNote = rn;\r\n });\r\n this.showCancelDialog = false;\r\n }\r\n\r\n public CloseCancelDialog(): void {\r\n this.showCancelDialog = false;\r\n }\r\n\r\n public CreateMessage(): void {\r\n this.messageService.SetNewMessageParameters(0, MessageTypes.RefMessage, false, MessageDocTypeIds.ReturnsNote, this.returnsNote.ReturnsNoteNumber);\r\n this.router.navigate([\"messages/newmessage\"]);\r\n }\r\n\r\n public StoreChanged(e: any): void {\r\n if (e.value && e.event) {\r\n this.stockStoreDataStore.byKey(e.value).then(store => {\r\n this.returnsNote.DeliverReplacementsToId = store.SiteId;\r\n });\r\n }\r\n }\r\n\r\n public NewReminder() {\r\n this.ng1reminderService.CreateReturnsNoteReminder(\r\n this.returnsNote.ReturnsNoteNumber,\r\n this.returnsNote.SupplierId);\r\n }\r\n\r\n public onWarningNotes(show: boolean): void {\r\n this.showWarningNotesEye = show;\r\n }\r\n\r\n public ShowPurchaseInvoicePopup(): void {\r\n this.isPurchaseInvoicePopupVisible = true;\r\n }\r\n\r\n public MarkAsPurchaseInvoiceMatched(data: { invoiceDate: Date; invoiceReference: string }): void {\r\n this.isPurchaseInvoicePopupVisible = false;\r\n const invoiceDate = this.dateOnlyService.RecalculateDateOnSave(data.invoiceDate);\r\n this.returnsNoteService.Matched(this.returnsNote.ReturnsNoteNumber, invoiceDate, data.invoiceReference)\r\n .subscribe(result => { this.returnsNote = result; });\r\n }\r\n\r\n private GetCurrency(supplierId: number, func: (cur: ICurrency) => void): void {\r\n this.supplierService.GetSupplierCurrency(supplierId).subscribe(currency => {\r\n this.currency = currency;\r\n if (func) {\r\n func(currency);\r\n }\r\n });\r\n }\r\n\r\n private SetCurrentItem(id: number) {\r\n if (this.IsRecordNavigationEnabled) {\r\n this.returnsNoteService.SetCurrentItem(id).then(() => {\r\n this.CanNavigatePrevious = this.returnsNoteService.IsPreviousAvailable();\r\n this.CanNavigateNext = this.returnsNoteService.IsNextAvailable();\r\n });\r\n }\r\n }\r\n\r\n public ViewReturn(): void {\r\n this.router.navigate([\"/returns/detail\", this.returnsNote.ReturnsNoteNumber, \"document\"]);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n

{{ 'returns-note.preview.returns-note' | translate }} {{id}}

\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
{{ 'label.email.sendMessage' | translate }}
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n ","import { Component, Inject, OnInit, ViewChild } from \"@angular/core\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { IAppConfig, APP_CONFIG, ReportViewerComponent } from \"servicesight-shared\";\r\nimport { Email } from \"src/app/shared/models/email.model\";\r\nimport { ReturnsService } from \"../returns.service\";\r\n\r\n@Component({\r\n selector: \"app-returns-note-preview\",\r\n templateUrl: \"./returns-note-preview.component.html\",\r\n styleUrls: [\"./returns-note-preview.component.scss\"]\r\n})\r\nexport class ReturnsNotePreviewComponent implements OnInit {\r\n\r\n @ViewChild(\"report\") report: ReportViewerComponent;\r\n\r\n public url: string;\r\n public hostUrl: string;\r\n public id: number;\r\n public status: number;\r\n public showTemplateDialog: boolean = false;\r\n public emailData: Email = new Email();\r\n public showSuccessSendMessage: boolean = false;\r\n public showErrorSendMessage: boolean = false;\r\n\r\n constructor(\r\n private route: ActivatedRoute,\r\n private returnsNoteService: ReturnsService,\r\n private router: Router,\r\n @Inject(APP_CONFIG) private config: IAppConfig) {\r\n this.id = Number(this.route.snapshot.paramMap.get(\"id\"));\r\n this.url = `returns-note/${this.id}`;\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.hostUrl = this.config.apiLocations.PurchaseOrders.substr(0, this.config.apiLocations.PurchaseOrders.lastIndexOf(\"/api/\") + 1);\r\n }\r\n\r\n public CallPrint(): void {\r\n this.report.print();\r\n }\r\n\r\n public CallDownload(): void {\r\n this.report.download();\r\n }\r\n\r\n public GoBack(): void {\r\n this.router.navigate([`/returns/detail/${this.id}`]);\r\n }\r\n\r\n public OpenEmailDialog(): void {\r\n this.send();\r\n }\r\n\r\n public OpenDialog(): void {\r\n this.returnsNoteService\r\n .GetGoodsReceivedEmailData(this.id)\r\n .subscribe(x => this.emailData = x, () => { }, () => {\r\n this.showErrorSendMessage = false;\r\n this.showTemplateDialog = true;\r\n });\r\n }\r\n\r\n public send(): void {\r\n this.returnsNoteService.SendGoodsReceivedEmail(this.emailData).subscribe(() => {\r\n this.showTemplateDialog = false;\r\n this.showSuccessSendMessage = true;\r\n }, () => {\r\n this.showErrorSendMessage = true;\r\n });\r\n }\r\n\r\n public CloseDialog(): void {\r\n this.showTemplateDialog = false;\r\n }\r\n}\r\n","import { NgModule } from \"@angular/core\";\r\nimport { Routes, RouterModule } from \"@angular/router\";\r\nimport { ReturnsListComponent } from \"./returns-list/returns-list.component\";\r\nimport { ReturnsNoteDetailsComponent } from \"./returns-note-details/returns-note-details.component\";\r\nimport { ReturnsNotePreviewComponent } from \"./returns-note-preview/returns-note-preview.component\";\r\n\r\nconst routes: Routes = [\r\n { path: \"list\", component: ReturnsListComponent },\r\n { path: \"detail/from-goods-received/:goodsReceivedId\", component: ReturnsNoteDetailsComponent },\r\n { path: \"detail/:id\", component: ReturnsNoteDetailsComponent },\r\n { path: \"detail/:id/document\", component: ReturnsNotePreviewComponent },\r\n { path: \"\", redirectTo: \"list\", pathMatch: \"full\" },\r\n { path: \"**\", redirectTo: \"list\" }\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class ReturnsNoteRoutingModule {\r\n public static Routes: Routes = routes;\r\n}\r\n","import { Component, OnInit } from \"@angular/core\";\r\nimport { Module, ModuleService, PermissionsService } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-sales-campaigns-list\",\r\n templateUrl: \"./sales-campaigns-list.component.html\",\r\n styleUrls: [\r\n \"../../../../projects/servicesight-shared/src/lib/styles/global.scss\",\r\n \"../../../../projects/servicesight-shared/src/lib/styles/backgrounds.scss\",\r\n \"../../../../projects/servicesight-shared/src/lib/styles/servicesight-shared.scss\",\r\n \"./sales-campaigns-list.component.scss\"\r\n ]\r\n})\r\nexport class SalesCampaignsListComponent implements OnInit {\r\n\r\n public salesOpportunityEnabled: boolean = false;\r\n public hasQuotesEnabled: boolean = false;\r\n\r\n public SearchText: string = \"\";\r\n\r\n constructor(\r\n private moduleService: ModuleService,\r\n private permissionsService: PermissionsService\r\n ) { }\r\n\r\n public ngOnInit(): void {\r\n this.moduleService.GetEnabledModules().subscribe(enabledModules => {\r\n this.salesOpportunityEnabled = enabledModules.includes(Module.SalesOpportunity);\r\n });\r\n\r\n this.permissionsService.CurrentUserHasPermission(\"QuoteView\").subscribe(permission => {\r\n this.hasQuotesEnabled = permission;\r\n });\r\n }\r\n\r\n public SaveLayout(): void {\r\n throw new Error(\"Not implemented\");\r\n }\r\n\r\n public ResetLayout(): void {\r\n throw new Error(\"Not implemented\");\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n throw new Error(\"Not implemented\");\r\n }\r\n\r\n public FilterChanged($event): void {\r\n const filterValue = $event.currentTarget.value;\r\n if (filterValue === \"0\") {\r\n throw new Error(\"Not implemented\");\r\n // this.dataGrid.instance.clearFilter();\r\n } else {\r\n throw new Error(\"Not implemented\");\r\n // this.dataGrid.instance.filter(this.Filters[filterValue]);\r\n }\r\n }\r\n\r\n}\r\n","
\r\n
\r\n

{{ 'sales-campaigns.list.title' | translate }}

\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n","import { NgModule } from \"@angular/core\";\r\nimport { RouterModule, Routes } from \"@angular/router\";\r\nimport { SalesCampaignsListComponent } from \"./sales-campaigns-list/sales-campaigns-list.component\";\r\n\r\nconst routes: Routes = [\r\n { path: \"list\", component: SalesCampaignsListComponent },\r\n { path: \"\", redirectTo: \"list\", pathMatch: \"full\" },\r\n { path: \"**\", redirectTo: \"list\" }\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class SalesCampaignsRoutingModule {\r\n public static readonly Routes: Routes = routes;\r\n}\r\n","export enum SalesOpportunityStatusColourEnum {\r\n Grey = 1,\r\n Red = 2,\r\n Yellow = 3,\r\n Green = 4\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { Reminder } from \"../../models/reminder.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class ReminderService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private config: IAppConfig) { }\r\n\r\n public Get(reminderId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Task/Get?id=${reminderId}`);\r\n };\r\n}\r\n","import { SystemSalesOpportunityStatus } from \"servicesight-shared\";\r\nimport { Competitor } from \"./competitor.model\";\r\nimport { SalesBarrier } from \"./sales-barrier.model\";\r\nimport { SalesOpportunity } from \"./sales-opportunity.model\";\r\n\r\nexport class SalesOpportunityBusiness {\r\n private data: SalesOpportunity;\r\n\r\n public constructor(data: SalesOpportunity) {\r\n this.data = data;\r\n }\r\n\r\n public get model(): SalesOpportunity {\r\n return this.data;\r\n }\r\n public get canBeChangedToSystemStatus(): boolean {\r\n return this.isCreated && this.isActive;\r\n }\r\n\r\n public get isActive(): boolean {\r\n return this.data.Status !== SystemSalesOpportunityStatus.Won &&\r\n this.data.Status !== SystemSalesOpportunityStatus.Lost &&\r\n this.data.Status !== SystemSalesOpportunityStatus.Canncelled;\r\n }\r\n\r\n public get isCreated(): boolean {\r\n return !!this.data.Id;\r\n }\r\n\r\n public get hasLostToSelected(): boolean {\r\n return this.data.Competitors.some(i => i.LostTo);\r\n }\r\n\r\n public get lostToCopmetitor(): Competitor {\r\n return this.data.Competitors.find(i => i.LostTo);\r\n }\r\n\r\n public get hasReasonLostSelected(): boolean {\r\n return this.data.Barriers.some(i => i.ReasonLost);\r\n }\r\n\r\n public get reasonLostToBarriers(): SalesBarrier[] {\r\n return this.data.Barriers.filter(i => i.ReasonLost);\r\n }\r\n}\r\n","\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
{{lostToCompetitor.Name}}
\r\n
({{ 'sales-opp.lost-dialog.lost-to-not-selected' | translate }})
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
    \r\n
  • \r\n {{item.Name}}\r\n
  • \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
{{ 'sales-opp.lost-dialog.reason-lost-not-selected' | translate }}
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n","import { EventEmitter, Input, Output, ViewChild } from \"@angular/core\";\r\nimport { Component, OnInit } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { SalesOpportunityLostDetail } from \"../models/sales-opportunity-lost-detail.model\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { SalesOpportunityService } from \"../services/sales-opportunity.service\";\r\nimport { SalesOpportunityBusiness } from \"../models/sales-opportunity-business.model\";\r\n\r\n@Component({\r\n selector: \"app-sales-opportunity-lost-dialog\",\r\n templateUrl: \"./sales-opportunity-lost-dialog.component.html\",\r\n styleUrls: [\"./sales-opportunity-lost-dialog.component.scss\"]\r\n})\r\nexport class SalesOpportunityLostDialogComponent implements OnInit {\r\n @ViewChild(\"lostForm\", { static: true }) form: NgForm;\r\n @Input() public so: SalesOpportunityBusiness;\r\n @Output() confirm = new EventEmitter();\r\n\r\n public showDialog = false;\r\n public salesOpportunityLostDetail: SalesOpportunityLostDetail;\r\n public competitorsDataSource: DataSource;\r\n public title: string;\r\n public competitors: any[];\r\n public barriers: any[];\r\n\r\n constructor(\r\n private translate: TranslateService,\r\n private salesOpportunityService: SalesOpportunityService\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.title = this.translate.instant(\"sales-opp.lost-dialog.title\");\r\n this.resetModel();\r\n this.salesOpportunityService\r\n .GetCompetitorsStore()\r\n .load()\r\n .then(competitors => this.competitors = competitors);\r\n this.salesOpportunityService\r\n .GetBarriersStore()\r\n .load()\r\n .then(barriers => this.barriers = barriers);\r\n }\r\n\r\n public Hide(): void {\r\n this.showDialog = false;\r\n }\r\n\r\n public Save() {\r\n this.showDialog = false;\r\n this.confirm.emit(this.salesOpportunityLostDetail);\r\n }\r\n\r\n public Show(): void {\r\n this.showDialog = true;\r\n this.resetModel();\r\n }\r\n\r\n public Cancel(): void {\r\n this.showDialog = false;\r\n }\r\n\r\n private resetModel(): void {\r\n this.form.resetForm();\r\n this.salesOpportunityLostDetail = {\r\n CloseDate: new Date()\r\n };\r\n }\r\n\r\n public get lostToCompetitor(): any {\r\n return this.so.hasLostToSelected && this.competitors.find(i => i.CompetitorId === this.so.lostToCopmetitor.CompetitorId);\r\n }\r\n\r\n public get reasonLostBarriers(): any {\r\n const lostBarriersIds = this.so.reasonLostToBarriers.map(i => i.BarrierId);\r\n return this.so.hasReasonLostSelected && this.barriers.filter(i => lostBarriersIds.includes(i.BarrierId));\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject } from \"@angular/core\";\r\nimport { Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class QuoteService {\r\n\r\n constructor(\r\n @Inject(APP_CONFIG) protected config: IAppConfig,\r\n private http: HttpClient\r\n ) { }\r\n\r\n public CreateFromSalesOpportunity(id: number): Observable {\r\n return this.http.post(`${this.config.apiLocations.Quotes}CreateFromSalesOpportunity/${id}`, null);\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ 'accordion.sales-opportunity.entered' | translate }}\r\n {{ salesOpportunity.Entered | date:'short' }}\r\n
{{ 'accordion.sales-opportunity.entered-by' | translate }}\r\n {{ salesOpportunity.EnteredBy }}\r\n
{{ 'accordion.sales-opportunity.quote-no' | translate }}\r\n \r\n {{ quote.SalesQuotationId }}/{{ quote.SalesQuotationRevisionId}}, \r\n \r\n
{{ 'accordion.sales-opportunity.job-no' | translate }}\r\n \r\n {{ jobId }}, \r\n \r\n
{{ 'accordion.sales-opportunity.sales-order-no' | translate }}\r\n \r\n {{ orderId }}, \r\n \r\n
{{ 'accordion.sales-opportunity.service-contract-no' | translate }}\r\n \r\n {{ contractId }}, \r\n \r\n
","import { Component, Input, OnChanges } from \"@angular/core\";\r\nimport { AccordionDataService } from \"../accordion-data.service\";\r\nimport { SalesOpportunityDetails } from \"../models/sales-opportunity-details.model\";\r\n\r\n@Component({\r\n selector: \"app-sales-opportunity-details-accordion-item\",\r\n templateUrl: \"./sales-opportunity-details-accordion-item.component.html\",\r\n styleUrls: [\"./sales-opportunity-details-accordion-item.component.scss\"]\r\n})\r\nexport class SalesOpportunityDetailsAccordionItemComponent implements OnChanges {\r\n @Input() salesOpportunityId: number;\r\n public salesOpportunity: SalesOpportunityDetails;\r\n constructor(\r\n private dataService: AccordionDataService) { }\r\n\r\n public ngOnChanges(): void {\r\n if (this.salesOpportunityId) {\r\n this.dataService.GetSalesOpportunityDetails(this.salesOpportunityId).subscribe(result => {\r\n this.salesOpportunity = result;\r\n });\r\n }\r\n }\r\n}\r\n","import { Component, Input, OnInit, ViewChild } from \"@angular/core\";\r\nimport { ControlContainer, NgForm } from \"@angular/forms\";\r\nimport { DxSelectBoxComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { EdmLiteral } from \"devextreme/data/odata/utils\";\r\nimport {\r\n ContactService,\r\n CustomerService,\r\n CustomerStatus,\r\n SettingId,\r\n SettingsService,\r\n UICustomisation,\r\n UserRefType,\r\n UserReferenceService\r\n} from \"servicesight-shared\";\r\nimport { EmployeeService } from \"src/app/shared/services/employee/employee.service\";\r\nimport { SalesOpportunity } from \"../models/sales-opportunity.model\";\r\nimport { SalesOpportunityService } from \"../services/sales-opportunity.service\";\r\nimport { ContactStatus } from \"../../shared/enums/contact-status.eum\";\r\n\r\n@Component({\r\n selector: \"app-sales-opportunity-general\",\r\n templateUrl: \"./sales-opportunity-general.component.html\",\r\n styleUrls: [\"./sales-opportunity-general.component.scss\"],\r\n viewProviders: [ { provide: ControlContainer, useExisting: NgForm } ]\r\n})\r\nexport class SalesOpportunityGeneralComponent implements OnInit {\r\n\r\n @ViewChild(\"siteSelectBox\", { static: false }) siteSelectBoxComponent: DxSelectBoxComponent;\r\n @ViewChild(\"customerContactSelectBox\", { static: false }) customerContactSelectBoxComponent: DxSelectBoxComponent;\r\n @Input() public salesOpportunity: SalesOpportunity;\r\n\r\n public formDisabled: boolean = false;\r\n public userRef1Label: string = \"UserRef1SalesOpportunity\";\r\n public userRef2Label: string = \"UserRef2SalesOpportunity\";\r\n public currencySymbol: string = \"\";\r\n\r\n public customerDataSource: DataSource;\r\n public siteDataSource: DataSource;\r\n public contactDataSource: DataSource;\r\n public employeeDataStore: ODataStore;\r\n public userRefStore: ODataStore;\r\n public statusDataSource: DataSource;\r\n public hasManagingAgentEnabled: boolean = false;\r\n\r\n private readonly customerFilter = [[\"Status\", \"=\", CustomerStatus.ACTIVE], \"or\", [\"Status\", \"=\", CustomerStatus.PROSPECT]];\r\n\r\n constructor(\r\n private customerService: CustomerService,\r\n private contactService: ContactService,\r\n private userRefService: UserReferenceService,\r\n private employeeService: EmployeeService,\r\n private salesOpportunityService: SalesOpportunityService,\r\n private settingsService: SettingsService\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.userRef1Label = this.userRefService.getLabel(UICustomisation.SALES_OPPORTUNITY_REF1);\r\n this.userRef2Label = this.userRefService.getLabel(UICustomisation.SALES_OPPORTUNITY_REF2);\r\n\r\n this.userRefStore = this.userRefService.getListDataStore(UserRefType.SALES_OPPORTUNITY_1);\r\n this.customerDataSource = this.customerService.GetCustomersDataSource();\r\n this.siteDataSource = this.customerService.GetCustomersDataSource();\r\n this.contactDataSource = this.contactService.GetContactsDataSource();\r\n this.employeeDataStore = this.employeeService.GetEmployeeDataStore();\r\n this.statusDataSource = this.salesOpportunityService.StatusDataSource();\r\n this.settingsService.getSetting(SettingId.CustomerManagingAgents).subscribe(x => {\r\n this.hasManagingAgentEnabled = x.ValueBool;\r\n\r\n if (x.ValueBool) {\r\n this.customerFilter.push(\"or\", [ \"Status\", \"=\", CustomerStatus.MANAGING_AGENT ]);\r\n }\r\n\r\n this.customerDataSource.filter([[\"InvoiceID\", \"=\", new EdmLiteral(\"CustomerID\")], \"and\", this.customerFilter]);\r\n this.siteDataSource.filter(this.customerFilter);\r\n });\r\n }\r\n\r\n public CustomerChanged(e: any): void {\r\n if (e.value) {\r\n const dataSource = this.siteSelectBoxComponent.instance.getDataSource();\r\n dataSource.filter([[\"InvoiceID\", \"=\", e.value], \"and\", this.customerFilter]);\r\n dataSource.load().then(() => {\r\n if (e.event) {\r\n this.salesOpportunity.SiteId = e.value;\r\n }\r\n });\r\n }\r\n }\r\n\r\n public SiteChanged(e: any): void {\r\n if (e.value) {\r\n (this.customerDataSource.store())\r\n .byKey(this.salesOpportunity.CustomerId)\r\n .then( () => {\r\n const dataSource = this.customerContactSelectBoxComponent.instance.getDataSource();\r\n const filter = [\r\n [\"CustomerId\", \"=\", e.value]\r\n , \"or\",\r\n [\"CustomerId\", \"=\", this.salesOpportunity.CustomerId]\r\n ];\r\n\r\n dataSource.filter([filter, \"and\", [ \"Status\", \"=\", ContactStatus.ACTIVE ]]);\r\n dataSource.load().then(() => {\r\n if (e.event) {\r\n this.salesOpportunity.ContactId = null;\r\n }\r\n });\r\n });\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n","import { Component, Input, OnInit } from \"@angular/core\";\r\nimport { ControlContainer, NgForm } from \"@angular/forms\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { SalesOpportunity } from \"../models/sales-opportunity.model\";\r\nimport { SalesOpportunityService } from \"../services/sales-opportunity.service\";\r\n\r\n@Component({\r\n selector: \"app-sales-opportunity-additional\",\r\n templateUrl: \"./sales-opportunity-additional.component.html\",\r\n styleUrls: [\"./sales-opportunity-additional.component.scss\"],\r\n viewProviders: [ { provide: ControlContainer, useExisting: NgForm } ]\r\n})\r\nexport class SalesOpportunityAdditionalComponent implements OnInit {\r\n @Input() so: SalesOpportunity;\r\n @Input() form: NgForm;\r\n\r\n public competitorsStore: ODataStore;\r\n public barriersStore: ODataStore;\r\n\r\n constructor(private salesOpportunityService: SalesOpportunityService) {\r\n this.ValidateCompetitor = this.ValidateCompetitor.bind(this);\r\n this.ValidateBarrier = this.ValidateBarrier.bind(this);\r\n this.ValidateExistingSupplier = this.ValidateExistingSupplier.bind(this);\r\n this.ValidateLostTo = this.ValidateLostTo.bind(this);\r\n this.MarkDirty = this.MarkDirty.bind(this);\r\n }\r\n\r\n ngOnInit(): void {\r\n this.barriersStore = this.salesOpportunityService.GetBarriersStore();\r\n this.competitorsStore = this.salesOpportunityService.GetCompetitorsStore();\r\n }\r\n\r\n public OnInitNewBarrier(e): void {\r\n e.data.SalesOpportunityId = this.so.Id;\r\n e.data.ReasonLost = false;\r\n e.data.Id = new Date().getTime();\r\n this.MarkDirty();\r\n }\r\n\r\n public OnInitNewCompetitor(e): void {\r\n e.data.SalesOpportunityId = this.so.Id;\r\n e.data.ExistingSupplier = false;\r\n e.data.LostTo = false;\r\n e.data.Id = new Date().getTime();\r\n this.MarkDirty();\r\n }\r\n\r\n public ValidateCompetitor(e): boolean {\r\n return !this.so.Competitors.some(s => s.CompetitorId === e.value && s.Id !== e.data.Id);\r\n }\r\n\r\n public ValidateBarrier(e): boolean {\r\n return !this.so.Barriers.some(s => s.BarrierId === e.value && s.Id !== e.data.Id);\r\n }\r\n\r\n public ValidateExistingSupplier(e): boolean {\r\n if (e.value) {\r\n this.so.Competitors.filter(c => c.Id !== e.data.Id).forEach(c => c.ExistingSupplier = false);\r\n }\r\n return true;\r\n }\r\n\r\n public ValidateLostTo(e): boolean {\r\n if (e.value) {\r\n this.so.Competitors.filter(c => c.Id !== e.data.Id).forEach(c => c.LostTo = false);\r\n }\r\n return true;\r\n }\r\n\r\n public MarkDirty(): void {\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public DeleteClicked(e) {\r\n e.component.cancelEditData();\r\n if (!e.row.isNewRow) {\r\n e.component.deleteRow(e.row.rowIndex);\r\n }\r\n }\r\n\r\n public OnRowInserted(e) {\r\n e.component.cancelEditData();\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n

{{ 'sales-opp.additional.competitors' | translate }}

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

{{ 'sales-opp.additional.sales-barriers' | translate }}

\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n","import { Component, Input } from \"@angular/core\";\r\nimport { DocumentTypeEnum } from \"servicesight-shared\";\r\nimport { NgForm } from \"@angular/forms\";\r\n\r\n@Component({\r\n selector: \"app-sales-opportunity-files\",\r\n templateUrl: \"./sales-opportunity-files.component.html\",\r\n styleUrls: [\"./sales-opportunity-files.component.scss\"]\r\n})\r\n\r\nexport class SalesOpportunityFilesComponent {\r\n public docType = DocumentTypeEnum;\r\n @Input() salesOpportunityId: number;\r\n @Input() form: NgForm;\r\n}\r\n","\r\n\r\n","
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n","import { SalesOpportunityService } from \"./../services/sales-opportunity.service\";\r\nimport { Component, Input, OnChanges, OnInit, ViewChild } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { DocumentTypeEnum } from \"servicesight-shared\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\n\r\n\r\n@Component({\r\n selector: \"app-sales-opportunity-history\",\r\n templateUrl: \"./sales-opportunity-history.component.html\",\r\n styleUrls: [\"./sales-opportunity-history.component.scss\"]\r\n})\r\nexport class SalesOpportunityHistoryComponent implements OnInit, OnChanges {\r\n @Input() opportunityId: number;\r\n @ViewChild(\"historyDataGrid\") private dataGrid: DxDataGridComponent;\r\n\r\n public searchText: string = \"\";\r\n public historyDataSource: DataSource;\r\n public historyType = DocumentTypeEnum;\r\n public historyFilterTypes: DataSource;\r\n private readonly filterTypes = [\r\n {\r\n ID: DocumentTypeEnum.Quote,\r\n name: this.translate.instant(\"sales-opp.history.type.quotes\")\r\n },\r\n {\r\n ID: DocumentTypeEnum.SalesOrder,\r\n name: this.translate.instant(\"sales-opp.history.type.sales-orders\")\r\n },\r\n {\r\n ID: DocumentTypeEnum.Job,\r\n name: this.translate.instant(\"sales-opp.history.type.jobs\")\r\n },\r\n {\r\n ID: DocumentTypeEnum.ServiceContract,\r\n name: this.translate.instant(\"sales-opp.history.type.service-contracts\")\r\n },\r\n {\r\n ID: DocumentTypeEnum.Reminder,\r\n name: this.translate.instant(\"sales-opp.history.type.reminders\")\r\n },\r\n {\r\n ID: DocumentTypeEnum.Message,\r\n name: this.translate.instant(\"sales-opp.history.type.messages\")\r\n }];\r\n\r\n constructor(\r\n private salesOpportunityService: SalesOpportunityService,\r\n private translate: TranslateService) { }\r\n\r\n ngOnInit() {\r\n this.historyFilterTypes = new DataSource(this.filterTypes);\r\n }\r\n\r\n ngOnChanges() {\r\n if (!this.historyDataSource && this.opportunityId > 0) {\r\n this.historyDataSource = this.salesOpportunityService.GetSalesOpportunityHistory(this.opportunityId);\r\n }\r\n }\r\n\r\n public SearchByText() {\r\n this.dataGrid.instance.searchByText(encodeURI(this.searchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public FilterChanged(selectedFilters) {\r\n if (selectedFilters.length === 0) {\r\n this.dataGrid.instance.clearFilter();\r\n } else {\r\n const filter = [];\r\n selectedFilters.forEach(key => {\r\n filter.push([\"ElementType\", \"=\", key]);\r\n filter.push(\"or\");\r\n });\r\n filter.pop();\r\n this.dataGrid.instance.filter(filter);\r\n }\r\n this.SearchByText();\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

{{ 'sales-opp.detail.title' | translate }} {{ so.model.Id > 0 ? so.model.Id : null }}

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

{{ so.model.StatusName }}

\r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n","import { ViewChild } from \"@angular/core\";\r\nimport { Component, OnInit } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport {\r\n ContactService,\r\n CustomerService,\r\n DocumentTypeEnum,\r\n DocumentTypePipe,\r\n FormMesssageService,\r\n JobDataService,\r\n MakeModelSharedService,\r\n PermissionsService\r\n} from \"servicesight-shared\";\r\nimport { MessageService } from \"src/app/messages/services/message/message.service\";\r\nimport { SalesOpportunityStatusColourEnum } from \"src/app/settings/enums/sales-opportunity-status-colour.enum\";\r\nimport { BasePopSopDetailComponent } from \"src/app/shared-pop-sop/components/base-pop-sop-detail/base-pop-sop-detail.component\";\r\nimport { MessageDocTypeIds } from \"src/app/shared/enums/messages/message-doc-type-ids.enum\";\r\nimport { MessageTypes } from \"src/app/shared/enums/messages/message-types.enum\";\r\nimport { ModuleAccessModel } from \"src/app/shared/models/module-access.model\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { MaterialTypeService } from \"src/app/shared/services/material-type/material-type.service\";\r\nimport { Ng1ReminderService } from \"src/app/shared/services/ng1-reminder.service\";\r\nimport { PreviousRouteService } from \"src/app/shared/services/previous-route.service\";\r\nimport { ReminderService } from \"src/app/shared/services/reminders/reminder.service\";\r\nimport { SupplierService } from \"src/app/shared/services/supplier/supplier.service\";\r\nimport { StockService } from \"src/app/stock/services/stock.service\";\r\nimport { JobDocumentDataService } from \"../../jobs/services/job-document-data.service\";\r\nimport { SalesOpportunityBusiness } from \"../models/sales-opportunity-business.model\";\r\nimport { SalesOpportunityLostDetail } from \"../models/sales-opportunity-lost-detail.model\";\r\nimport { SalesOpportunity } from \"../models/sales-opportunity.model\";\r\nimport { SalesOpportunityLostDialogComponent } from \"../sales-opportunity-lost-dialog/sales-opportunity-lost-dialog.component\";\r\nimport { QuoteService } from \"../services/quote.service\";\r\nimport { SalesOpportunityService } from \"../services/sales-opportunity.service\";\r\n\r\n@Component({\r\n selector: \"app-sales-opportunity-detail\",\r\n templateUrl: \"./sales-opportunity-detail.component.html\",\r\n styleUrls: [\"./sales-opportunity-detail.component.scss\"]\r\n})\r\nexport class SalesOpportunityDetailComponent extends BasePopSopDetailComponent implements OnInit {\r\n @ViewChild(\"salesopform\", { static: true }) form: NgForm;\r\n @ViewChild(SalesOpportunityLostDialogComponent, { static: true }) SalesOpportunityLostDialog: SalesOpportunityLostDialogComponent;\r\n\r\n public salesCampaignsEnabled: boolean = false;\r\n public hasQuotesEnabled: boolean = false;\r\n\r\n public readonly formName: string = \"salesopform\";\r\n\r\n public docType: typeof DocumentTypeEnum = DocumentTypeEnum;\r\n public so: SalesOpportunityBusiness = new SalesOpportunityBusiness({\r\n Id: 0,\r\n CustomerId: null,\r\n ContactId: null,\r\n CreatedForId: null,\r\n ForecastCloseDate: null,\r\n SalesValueEst: null,\r\n SiteId: null,\r\n Status: null,\r\n StatusBarSize: 0,\r\n StatusColour: 0,\r\n StatusName: null,\r\n Description: null,\r\n ProfitValueEst: null,\r\n UserRef1Id: null,\r\n UserRef2: null,\r\n Competitors: [],\r\n Barriers: [],\r\n Notes: null,\r\n Attributes: []\r\n });\r\n\r\n public ModulesAccess: ModuleAccessModel = new ModuleAccessModel();\r\n public CanNavigatePrevious: boolean = false;\r\n public CanNavigateNext: boolean = false;\r\n public IsRecordNavigationEnabled: boolean = false;\r\n public formDisabled: boolean = false;\r\n public canBeCancelled: boolean = false;\r\n public saveEnabled: boolean = true;\r\n\r\n public statusColourEnum = SalesOpportunityStatusColourEnum;\r\n\r\n constructor(\r\n private ng1reminderService: Ng1ReminderService,\r\n translate: TranslateService,\r\n documentTypePipe: DocumentTypePipe,\r\n materialType: MaterialTypeService,\r\n customerService: CustomerService,\r\n contactService: ContactService,\r\n makeModelSharedService: MakeModelSharedService,\r\n jobDataService: JobDataService,\r\n stockService: StockService,\r\n supplierService: SupplierService,\r\n private licenseService: LicenseService,\r\n private quoteService: QuoteService,\r\n private formMessageService: FormMesssageService,\r\n private messageService: MessageService,\r\n private salesOpportunityService: SalesOpportunityService,\r\n private permissionsService: PermissionsService,\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private previousRouteService: PreviousRouteService,\r\n private reminderService: ReminderService,\r\n private jobDocumentDataService: JobDocumentDataService) {\r\n super(\r\n translate,\r\n documentTypePipe,\r\n materialType,\r\n customerService,\r\n contactService,\r\n makeModelSharedService,\r\n jobDataService,\r\n supplierService,\r\n stockService);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.route.params.subscribe(params => {\r\n const id = Number(params.id);\r\n if (!isNaN(id)) {\r\n this.salesOpportunityService.Get(id)\r\n .subscribe(s => {\r\n this.so = new SalesOpportunityBusiness(s);\r\n this.SetCurrentItem(id);\r\n });\r\n }\r\n\r\n const reminderId = Number(params.reminderId);\r\n if (!isNaN(reminderId)) {\r\n this.reminderService.Get(reminderId).subscribe(reminder => {\r\n this.so.model.CustomerId = reminder.CustomerID;\r\n this.so.model.SiteId = reminder.CustomerID;\r\n this.so.model.ContactId = reminder.ContactID;\r\n this.so.model.CreatedForId = reminder.CreatedForID;\r\n this.so.model.Description = reminder.TaskDescription;\r\n this.so.model.Notes = reminder.Details;\r\n this.so.model.FromReminderId = reminderId;\r\n });\r\n }\r\n\r\n this.IsRecordNavigationEnabled = id && this.previousRouteService.PreviousUrlContains(\"/sales-opportunities\");\r\n });\r\n\r\n this.permissionsService.CurrentUserHasPermission(\"QuoteView\").subscribe(permission => {\r\n this.hasQuotesEnabled = permission;\r\n });\r\n\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(x => {\r\n this.ModulesAccess = x;\r\n this.salesCampaignsEnabled = x.SalesCampaignsEnabled;\r\n });\r\n }\r\n\r\n public Save(): void {\r\n this.saveEnabled = false;\r\n const saveMethod = this.so.isCreated ? this.Update.bind(this) : this.Add.bind(this);\r\n saveMethod().subscribe(s => {\r\n this.saveEnabled = true;\r\n this.so = new SalesOpportunityBusiness(s);\r\n if (this.jobDocumentDataService.SubmitFormData) {\r\n this.jobDocumentDataService.OpenUploadFileModal.next();\r\n this.jobDocumentDataService.SubmitFormData = false;\r\n }\r\n });\r\n }\r\n\r\n public CreateReminder(): void {\r\n this.ng1reminderService.CreateSalesOpportunityReminder(this.so.model.Id, this.so.model.CustomerId, this.so.model.ContactId);\r\n }\r\n\r\n public CreateMessage(): void {\r\n this.messageService.SetNewMessageParameters(0, MessageTypes.RefMessage, false, MessageDocTypeIds.SalesOpportunity, this.so.model.Id);\r\n this.router.navigate([\"messages/newmessage\"]);\r\n }\r\n\r\n public Cancel(): void {\r\n this.salesOpportunityService.Cancel(this.so.model.Id)\r\n .subscribe(s => this.so = new SalesOpportunityBusiness(s));\r\n }\r\n\r\n public ConfirmLost(): void {\r\n this.SalesOpportunityLostDialog.Show();\r\n }\r\n\r\n public CreateQuote(): void {\r\n this.saveEnabled = false;\r\n if (this.form.form.dirty) {\r\n const saveMethod = this.so.isCreated ? this.Update.bind(this) : this.Add.bind(this);\r\n saveMethod().subscribe(s => {\r\n this.so = new SalesOpportunityBusiness(s);\r\n this.SaveQuoteAndNavigate();\r\n });\r\n } else {\r\n this.SaveQuoteAndNavigate();\r\n }\r\n }\r\n\r\n public Lost(lostModel: SalesOpportunityLostDetail): void {\r\n this.salesOpportunityService.Lost(this.so.model.Id, lostModel)\r\n .subscribe(s => this.so = new SalesOpportunityBusiness(s));\r\n this.SalesOpportunityLostDialog.Hide();\r\n }\r\n\r\n public Won(): void {\r\n this.salesOpportunityService.Won(this.so.model.Id)\r\n .subscribe(s => this.so = new SalesOpportunityBusiness(s));\r\n }\r\n\r\n private SetCurrentItem(id: number) {\r\n if (this.IsRecordNavigationEnabled) {\r\n this.salesOpportunityService.SetCurrentItem(id).then(() => {\r\n this.CanNavigatePrevious = this.salesOpportunityService.IsPreviousAvailable();\r\n this.CanNavigateNext = this.salesOpportunityService.IsNextAvailable();\r\n });\r\n }\r\n }\r\n\r\n public NavigateNext(): void {\r\n if (this.CanNavigateNext) {\r\n this.salesOpportunityService.GetNextId().then(nextId => {\r\n this.router.navigate([\"sales-opportunities\", \"detail\", nextId]);\r\n });\r\n }\r\n }\r\n\r\n public NavigatePrevious(): void {\r\n if (this.CanNavigatePrevious) {\r\n this.salesOpportunityService.GetPreviousId().then(previousId => {\r\n this.router.navigate([\"sales-opportunities\", \"detail\", previousId]);\r\n });\r\n }\r\n }\r\n\r\n public DiscardChanges(): void {\r\n if (this.so.isCreated) {\r\n this.salesOpportunityService.Get(this.so.model.Id)\r\n .subscribe(s => {\r\n this.so = new SalesOpportunityBusiness(s);\r\n this.SetCurrentItem(this.so.model.Id);\r\n });\r\n } else {\r\n this.router.navigate([\"/sales-opportunity\"]);\r\n }\r\n }\r\n\r\n private Add(): Observable {\r\n return this.formMessageService\r\n .RegisterObservable(\r\n this.salesOpportunityService.Create(this.so.model), this.formName);\r\n }\r\n\r\n private Update(): Observable {\r\n return this.formMessageService\r\n .RegisterObservable(\r\n this.salesOpportunityService.Update(this.so.model), this.formName);\r\n }\r\n\r\n private SaveQuoteAndNavigate(): void {\r\n this.quoteService.CreateFromSalesOpportunity(this.so.model.Id)\r\n .subscribe(i => this.router.navigate([\"/quotes\", \"details\", i, 1]));\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'sales-opp.list.title' | translate }}

\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n
\r\n
{{ item.data.StatusName }}
\r\n
\r\n \r\n
\r\n
\r\n\r\n
{{ data.value | currency: baseCurrencySymbol }}
\r\n\r\n
\r\n \r\n
\r\n \r\n
\r\n","import { Component, Inject, OnInit, ViewChild } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { lastValueFrom, map } from \"rxjs\";\r\nimport {\r\n GridExportService,\r\n GridKind,\r\n GridService,\r\n Module,\r\n ModuleService,\r\n PermissionsService,\r\n UICustomisation,\r\n UserReferenceService\r\n} from \"servicesight-shared\";\r\nimport { AuthService } from \"src/app/shared/services/auth/auth.service\";\r\nimport { SalesOpportunityStatusColourEnum } from \"../../settings/enums/sales-opportunity-status-colour.enum\";\r\nimport SalesOpportunityStatus from \"../models/sales-opportunity-status.model\";\r\nimport { SalesOpportunityService } from \"../services/sales-opportunity.service\";\r\n\r\n@Component({\r\n selector: \"app-sales-opportunity-list\",\r\n templateUrl: \"./sales-opportunity-list.component.html\",\r\n styleUrls: [\r\n \"./sales-opportunity-list.component.scss\",\r\n \"../../../../projects/servicesight-shared/src/lib/styles/global.scss\",\r\n \"../../../../projects/servicesight-shared/src/lib/styles/backgrounds.scss\",\r\n \"../../../../projects/servicesight-shared/src/lib/styles/servicesight-shared.scss\"\r\n ]\r\n})\r\nexport class SalesOpportunityListComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n\r\n public salesCampaignsEnabled: boolean = false;\r\n public hasQuotesEnabled: boolean = false;\r\n\r\n public dataSource: DataSource;\r\n public employeesDataStore: ODataStore;\r\n public suppliersDataStore: ODataStore;\r\n public customersDataStore: ODataStore;\r\n public userReferenceDataStore: ODataStore;\r\n public SearchText: string = \"\";\r\n public isAllowedCreate = false;\r\n public filters: any = { };\r\n public statuses: SalesOpportunityStatus[];\r\n public userRef1Label: string = null;\r\n public userRef2Label: string = null;\r\n public statusColourEnum = SalesOpportunityStatusColourEnum;\r\n\r\n public exportOptions: { id: number; label: string }[] = [\r\n { id: 1, label: \"Export data as xlsx\" },\r\n { id: 2, label: \"Export data as csv\" },\r\n { id: 3, label: \"Export data as pdf\" }\r\n ];\r\n\r\n private gridState: any = {};\r\n\r\n public baseCurrencySymbol = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n\r\n constructor(\r\n @Inject(\"AuthService\") private authService: AuthService,\r\n private moduleService: ModuleService,\r\n private salesOpportunityService: SalesOpportunityService,\r\n private gridService: GridService,\r\n private userRefService: UserReferenceService,\r\n private translateService: TranslateService,\r\n private permissionsService: PermissionsService,\r\n private gridExportService: GridExportService,\r\n private router: Router) {\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.userRef1Label = this.userRefService.getLabel(UICustomisation.SALES_OPPORTUNITY_REF1);\r\n this.userRef2Label = this.userRefService.getLabel(UICustomisation.SALES_OPPORTUNITY_REF2);\r\n\r\n this.permissionsService.CurrentUserHasPermission(\"QuoteView\").subscribe(permission => {\r\n this.hasQuotesEnabled = permission;\r\n });\r\n\r\n this.moduleService.GetEnabledModules().subscribe(enabledModules => {\r\n this.salesCampaignsEnabled = enabledModules.includes(Module.SalesCampaigns);\r\n });\r\n\r\n this.salesOpportunityService.StatusDataSource().load()\r\n .then((statuses: SalesOpportunityStatus[]) => {\r\n this.statuses = statuses;\r\n this.SetupFilters();\r\n });\r\n\r\n this.gridService.GetLayout(GridKind.SalesOpportunity).subscribe(state => {\r\n this.SearchText = \"\";\r\n this.RestoreSavedLayout(state);\r\n this.GetDataSources();\r\n });\r\n }\r\n\r\n public GetStatus(statusId: number): SalesOpportunityStatus {\r\n return this.statuses.find(i => i.Status === statusId);\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n const search = encodeURI(this.SearchText).replace(/%20/g, \" \");\r\n this.dataGrid.instance.searchByText(search);\r\n }\r\n\r\n public FilterChanged($event): void {\r\n const filterValue = $event.currentTarget.value;\r\n if (filterValue === \"no-filter\" || this.filters[filterValue].length === 0) {\r\n this.dataGrid.instance.clearFilter();\r\n } else {\r\n this.dataGrid.instance.filter(this.filters[filterValue]);\r\n }\r\n }\r\n\r\n public loadState = () => lastValueFrom(this.gridService.GetLayout(GridKind.SalesOpportunity).pipe(map((state) => {\r\n if (state) {\r\n this.SearchText = \"\";\r\n state.searchText = \"\";\r\n }\r\n })));\r\n\r\n public SaveLayout(): void {\r\n const state = this.dataGrid.instance.state();\r\n this.gridService.SaveLayout(state, GridKind.SalesOpportunity);\r\n }\r\n\r\n public ResetLayout(): void {\r\n this.gridService.ResetLayout(GridKind.SalesOpportunity);\r\n this.dataGrid.instance.state(null);\r\n this.gridState = null;\r\n }\r\n\r\n public OpenColumnChooser(): void {\r\n this.dataGrid.instance.showColumnChooser();\r\n }\r\n\r\n public columnVisible(name: string, defaultValue: boolean): boolean {\r\n if (this.gridState && this.gridState.columns) {\r\n const column = this.gridState.columns.find(x => x.name === name);\r\n\r\n if (column) {\r\n return column.visible;\r\n }\r\n }\r\n\r\n return defaultValue;\r\n }\r\n\r\n public onExportItemClick(e: any): void {\r\n const title = this.translateService.instant(\"sales-opp.list.title\");\r\n switch (e.itemData.id) {\r\n case 1:\r\n this.gridExportService.exportGridAsXlsx(this.dataGrid.instance, title);\r\n break;\r\n case 2:\r\n this.gridExportService.exportGridAsCsv(this.dataGrid.instance, title);\r\n break;\r\n case 3:\r\n this.gridExportService.exportGridAsPdf(this.dataGrid.instance, title, { orientation: \"l\" });\r\n break;\r\n default:\r\n throw new Error(\"Unhandled export type: \" + e.itemData.id);\r\n }\r\n }\r\n\r\n public ViewDetails(event): void {\r\n this.router.navigate([\"/sales-opportunities/detail/\", event.data.SalesOpportunityNumber]);\r\n }\r\n\r\n private RestoreSavedLayout(state: any): void {\r\n if (state) {\r\n state.searchText = \"\";\r\n this.gridState = state;\r\n this.dataGrid.instance.state(state);\r\n }\r\n }\r\n\r\n private GetDataSources(): void {\r\n this.dataSource = this.salesOpportunityService.GetDataSource(true);\r\n if (this.filters[\"active-opportunities\"] && this.filters[\"active-opportunities\"].length > 0) {\r\n this.dataSource.filter(this.filters[\"active-opportunities\"]);\r\n }\r\n }\r\n\r\n private SetupFilters() {\r\n const nonSystemStatuses = this.statuses.filter(i => !i.IsSystem);\r\n let activeOpportunitiesFilters = [];\r\n if (nonSystemStatuses.length > 0) {\r\n activeOpportunitiesFilters = [].concat(...nonSystemStatuses.map(s => [[\"Status\", \"=\", s.Status], \"or\"])).slice(0, -1);\r\n }\r\n const myOpportunities = [\"CreatedForId\", \"=\", Number(this.authService.EmployeeId)];\r\n this.filters[\"my-active-opportunities\"] = activeOpportunitiesFilters.length > 0 ? [activeOpportunitiesFilters, \"and\", myOpportunities] : myOpportunities;\r\n this.filters[\"my-opportunities\"] = myOpportunities;\r\n this.filters[\"active-opportunities\"] = activeOpportunitiesFilters;\r\n }\r\n}\r\n","import { NgModule } from \"@angular/core\";\r\nimport { RouterModule, Routes } from \"@angular/router\";\r\nimport { SalesOpportunityDetailComponent } from \"./sales-opportunity-detail/sales-opportunity-detail.component\";\r\nimport { SalesOpportunityListComponent } from \"./sales-opportunity-list/sales-opportunity-list.component\";\r\n\r\nconst routes: Routes = [\r\n { path: \"list\", component: SalesOpportunityListComponent },\r\n { path: \"new\", component: SalesOpportunityDetailComponent },\r\n { path: \"from-reminder/:reminderId\", component: SalesOpportunityDetailComponent },\r\n { path: \"detail/:id\", component: SalesOpportunityDetailComponent },\r\n { path: \"\", redirectTo: \"list\", pathMatch: \"full\" },\r\n { path: \"**\", redirectTo: \"list\" }\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class SalesOpportunityRoutingModule {\r\n public static readonly Routes: Routes = routes;\r\n}\r\n","\r\n
    \r\n
  • {{ 'sales.marketing.feature-1' | translate }}
  • \r\n
  • {{ 'sales.marketing.feature-2' | translate }}
  • \r\n
  • {{ 'sales.marketing.feature-3' | translate }}
  • \r\n
  • {{ 'sales.marketing.feature-4' | translate }}
  • \r\n
  • {{ 'sales.marketing.feature-5' | translate }}
  • \r\n
  • {{ 'sales.marketing.feature-6' | translate }}
  • \r\n
\r\n
\r\n

{{ 'sales.marketing.price-1' | translate: { price1: price1, price2: price2 } }}

\r\n

{{ 'sales.marketing.price-2' | translate: { price2: price2, price3: price3 } }}

\r\n
\r\n\r\n","import { Component, OnInit } from \"@angular/core\";\r\nimport { Module } from \"servicesight-shared\";\r\nimport { LicenseService } from \"../../shared/services/licence/license.service\";\r\n\r\nconst Ireland: number = 100;\r\nconst USA: number = 224;\r\n\r\n@Component({\r\n selector: \"app-sales-marketing\",\r\n templateUrl: \"./sales-marketing.component.html\",\r\n styleUrls: [\"../../../assets/css/marketing.component.scss\"]\r\n})\r\nexport class SalesMarketingComponent implements OnInit {\r\n\r\n public ready: boolean = false;\r\n public videoId: string;\r\n public price1: string = \"£10\";\r\n public price2: string = \"£15\";\r\n public price3: string = \"£30\";\r\n public type: Module = Module.SalesOrders;\r\n\r\n constructor(private licenseService: LicenseService) { }\r\n\r\n public ngOnInit(): void {\r\n this.licenseService.GetCompanyCountryId().then(countryId => {\r\n if (countryId === USA) {\r\n this.videoId = \"t1qt_C3ctBc\";\r\n } else if (countryId === Ireland) {\r\n this.videoId = \"KAOF6_xUX6c\";\r\n this.price1 = \"€10\";\r\n this.price2 = \"€15\";\r\n this.price3 = \"€30\";\r\n } else {\r\n this.videoId = \"edgS9c6rFrc\";\r\n }\r\n\r\n this.ready = true;\r\n });\r\n }\r\n}\r\n","import { SalesOrderStatus } from \"servicesight-shared\";\r\nimport { SalesOrderEquipment } from \"./sales-order-equipment.model\";\r\nimport { SalesOrderMaterial } from \"./sales-order-material.model\";\r\nimport { SalesOrderPartModel } from \"./sales-order-part.model\";\r\nimport { DespatchNotesAccordionItem } from \"./despatch-notes-accordion-item\";\r\nimport { StoreTypesEnum } from \"src/app/shared/enums/store-types.enum\";\r\n\r\nexport class SalesOrder {\r\n constructor() {\r\n this.Status = SalesOrderStatus.Pending;\r\n this.Equipment = [];\r\n this.Materials = [];\r\n this.Parts = [];\r\n this.IncludeEquipment = true;\r\n this.IncludeMaterials = true;\r\n this.IncludeParts = true;\r\n this.StoreId = StoreTypesEnum.MainStore;\r\n }\r\n\r\n // eslint-disable-next-line id-blacklist\r\n Number: number;\r\n CustomerId: number;\r\n DeliveryId: number;\r\n ContactId: number;\r\n EmployeeId?: number;\r\n CustomerRef: string;\r\n OrderDate: Date;\r\n OrderDateUI: Date;\r\n DueDate: Date;\r\n DueDateUI: Date;\r\n Carriage: number;\r\n CarriageFc: number;\r\n IsBaseCurrency: boolean;\r\n ExchangeRate: number;\r\n UserRef1Id: number;\r\n UserRef2: string;\r\n InternalNotes: string;\r\n Instructions: string;\r\n CarrierId: number;\r\n CarrierRef: number;\r\n CarrierContactId: number;\r\n Status: SalesOrderStatus;\r\n CancelDate?: Date;\r\n CancelReasonId?: number;\r\n Equipment: SalesOrderEquipment[];\r\n Materials: SalesOrderMaterial[];\r\n Parts: SalesOrderPartModel[];\r\n IncludeParts: boolean;\r\n IncludeEquipment: boolean;\r\n IncludeMaterials: boolean;\r\n CancelledBy?: number;\r\n SalesQuotationId?: number;\r\n SalesQuotationRevisionId?: number;\r\n DespatchNotes: DespatchNotesAccordionItem[];\r\n Timestamp?: number;\r\n SalesOpportunityId?: number;\r\n StoreId: number;\r\n InvGroupingId: number;\r\n}\r\n","
\r\n
\r\n
\r\n

\r\n {{ 'salesorder.report.title' | translate }}\r\n {{ salesOrderId }}\r\n

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

\r\n {{ salesOrder.Status | salesOrderStatus | translate }}
\r\n \r\n

\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
{{ 'label.email.sendMessage' | translate }}
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n","import { Component, Inject, OnInit, ViewChild } from \"@angular/core\";\r\nimport { IAppConfig, APP_CONFIG, ReportViewerComponent } from \"servicesight-shared\";\r\nimport { Email } from \"src/app/shared/models/email.model\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { SalesOrderService } from \"../services/sales-order.service\";\r\nimport { SalesOrder } from \"../models/sales-order.model\";\r\n\r\n@Component({\r\n selector: \"app-sales-order-preview\",\r\n templateUrl: \"./sales-order-preview.component.html\",\r\n styleUrls: [\"./sales-order-preview.component.scss\"]\r\n})\r\nexport class SalesOrderPreviewComponent implements OnInit {\r\n @ViewChild(\"report\", { static: true }) report: ReportViewerComponent;\r\n public salesOrder: SalesOrder = new SalesOrder();\r\n\r\n public reportUrl: string;\r\n public hostUrl: string;\r\n public salesOrderId: number;\r\n public showTemplateDialog: boolean = false;\r\n public emailData: Email = new Email();\r\n public showSuccessSendMessage: boolean = false;\r\n public showErrorSendMessage: boolean = false;\r\n\r\n constructor(\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private salesOrderService: SalesOrderService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.hostUrl = this.appConfig.apiLocations.SalesOrders.substr(0, this.appConfig.apiLocations.SalesOrders.lastIndexOf(\"/api/\") + 1);\r\n\r\n this.route.params.subscribe(params => {\r\n this.salesOrderId = parseInt(params.id, 10);\r\n this.reportUrl = `sales-order/${this.salesOrderId}`;\r\n this.salesOrderService.Get(this.salesOrderId).subscribe(salesOrder => {\r\n this.salesOrder = salesOrder;\r\n });\r\n });\r\n }\r\n\r\n public CallPrint(): void {\r\n this.report.print();\r\n }\r\n\r\n public CallDownload(): void {\r\n this.report.download();\r\n }\r\n\r\n public GoBack(): void {\r\n this.router.navigate([`/sales-orders/detail/${this.salesOrderId}`]);\r\n }\r\n\r\n public OpenEmailDialog(): void {\r\n this.send();\r\n }\r\n\r\n public OpenDialog(): void {\r\n this.salesOrderService.GetSalesOrderEmailData(this.salesOrderId).subscribe(x => this.emailData = x, () => { }, () => {\r\n this.showErrorSendMessage = false;\r\n this.showTemplateDialog = true;\r\n });\r\n }\r\n\r\n public send(): void {\r\n this.salesOrderService.SendSalesOrderEmailData(this.emailData).subscribe(() => {\r\n this.showTemplateDialog = false;\r\n this.showSuccessSendMessage = true;\r\n }, () => {\r\n this.showErrorSendMessage = true;\r\n });\r\n }\r\n\r\n public CloseDialog(): void {\r\n this.showTemplateDialog = false;\r\n }\r\n}\r\n","import { SalesOrder } from \"./sales-order.model\";\r\n\r\nexport class SalesOrderViewModel {\r\n\r\n constructor(private salesOrder: SalesOrder) { }\r\n\r\n public get partsOutstanding(): number {\r\n let partsOutstanding = 0;\r\n\r\n if (this.salesOrder.Parts && this.salesOrder.IncludeParts) {\r\n partsOutstanding = this.salesOrder.Parts.map(x => (x.Demand - x.Despatched)).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return partsOutstanding;\r\n }\r\n\r\n public get equipmentOutstanding(): number {\r\n let equipmentOutstanding = 0;\r\n\r\n if (this.salesOrder.Equipment && this.salesOrder.IncludeEquipment) {\r\n equipmentOutstanding = this.salesOrder.Equipment.map(x => x.Outstanding).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return equipmentOutstanding;\r\n }\r\n\r\n public get materialsOutstanding(): number {\r\n let materialOutstanding = 0;\r\n\r\n if (this.salesOrder.Materials && this.salesOrder.IncludeMaterials) {\r\n materialOutstanding = this.salesOrder.Materials.filter(x => !x.Despatched).length;\r\n }\r\n\r\n return materialOutstanding;\r\n }\r\n\r\n public get totalOutstanding(): number {\r\n return this.partsOutstanding +\r\n this.equipmentOutstanding +\r\n this.materialsOutstanding;\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n","import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from \"@angular/core\";\r\nimport { ControlContainer, NgForm } from \"@angular/forms\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxSelectBoxComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport {\r\n ContactService,\r\n CustomerService,\r\n CustomerStatus,\r\n DocumentTypePipe,\r\n JobDataService,\r\n SalesOrderStatus,\r\n SettingId,\r\n SettingsService,\r\n UICustomisation,\r\n UserRefType,\r\n UserReferenceService,\r\n DespatchNoteStatus,\r\n MakeModelSharedService,\r\n FormMesssageService\r\n} from \"servicesight-shared\";\r\nimport { BasePopSopDetailComponent } from \"src/app/shared-pop-sop/components/base-pop-sop-detail/base-pop-sop-detail.component\";\r\nimport { ChildContactType } from \"src/app/shared/components/child-contacts-list/child-contact-type.enum\";\r\nimport { ContactStatus } from \"src/app/shared/enums/contact-status.eum\";\r\nimport { ICurrency } from \"src/app/shared/models/icurrency.model\";\r\nimport { SupplierStatus } from \"src/app/shared/pipes/enums/supplier-status.enum\";\r\nimport { ChildContactsService } from \"src/app/shared/services/child-contacts/child-contracts.service\";\r\nimport { CustomerService as CustomerCurrencyService } from \"src/app/shared/services/customer/customer.service\";\r\nimport { MaterialTypeService } from \"src/app/shared/services/material-type/material-type.service\";\r\nimport { SupplierService } from \"src/app/shared/services/supplier/supplier.service\";\r\nimport { StockService } from \"src/app/stock/services/stock.service\";\r\nimport { SalesOrder } from \"../models/sales-order.model\";\r\nimport { SalesOrderService } from \"../services/sales-order.service\";\r\nimport { StoreService } from \"src/app/settings/services/store.service\";\r\nimport { SalesOrderEquipment } from \"../models/sales-order-equipment.model\";\r\n\r\n@Component({\r\n selector: \"app-sales-order-general\",\r\n templateUrl: \"./sales-order-general.component.html\",\r\n styleUrls: [\"./sales-order-general.component.scss\"],\r\n viewProviders: [ { provide: ControlContainer, useExisting: NgForm } ]\r\n})\r\nexport class SalesOrderGeneralComponent extends BasePopSopDetailComponent implements OnInit, OnChanges {\r\n\r\n @Input() public salesorder: SalesOrder = new SalesOrder();\r\n @Input() public currency: ICurrency;\r\n @Output() public currencyChange: EventEmitter = new EventEmitter();\r\n @Output() public load = new EventEmitter();\r\n @ViewChild(\"siteSelectBox\", { static: false }) siteSelectBoxComponent: DxSelectBoxComponent;\r\n @ViewChild(\"customerContactSelectBox\", { static: false }) customerContactSelectBoxComponent: DxSelectBoxComponent;\r\n @ViewChild(\"supplierContactSelectBox\", { static: false }) supplierContactSelectBoxComponent: DxSelectBoxComponent;\r\n\r\n public readonly formName: string = \"salesorderForm\";\r\n public userRef1Label: string;\r\n public userRef2Label: string;\r\n\r\n public customerDataSource: DataSource;\r\n public supplierDataSource: DataSource;\r\n public userRefDataSource: DataSource;\r\n public supplierContactsDataSource: DataSource;\r\n public sitesDataStore: ODataStore;\r\n public supplierContactsDataStore: ODataStore;\r\n public stockStoreDataStore: ODataStore;\r\n\r\n public baseCurrencySymbol: string = null;\r\n public showInForeignCurrency: boolean = false;\r\n public hasManagingAgentSettingEnabled: boolean = false;\r\n public additionalStoresEnabled: boolean = false;\r\n public equipmentCarriageSum: number = 0;\r\n public showEquipmentCarriage: boolean = false;\r\n\r\n public connectedDespatchNoteInvoiced: boolean = false;\r\n public showWarningPopup: boolean = false;\r\n\r\n private oldCustomerId: number;\r\n\r\n public get isForeignCustomer(): boolean {\r\n return this.currency && this.currency.IsForeignCustomer;\r\n }\r\n\r\n public get currencySymbol(): string {\r\n return this.showInForeignCurrency ? this.currency.CurrencySymbol : this.baseCurrencySymbol;\r\n }\r\n\r\n public get SalesOrderDisabled(): boolean {\r\n return !this.salesorder || (this.salesorder.Status >= SalesOrderStatus.Placed || this.salesorder.Status === SalesOrderStatus.Cancelled);\r\n }\r\n\r\n public get OrderNumberDisabled(): boolean {\r\n return !this.salesorder || this.connectedDespatchNoteInvoiced || this.salesorder.Status === SalesOrderStatus.Cancelled;\r\n }\r\n\r\n private readonly settingsService: SettingsService;\r\n\r\n constructor(\r\n private userRefService: UserReferenceService,\r\n private salesOrderService: SalesOrderService,\r\n private childContactsService: ChildContactsService,\r\n private customerCurrencyService: CustomerCurrencyService,\r\n private formMessageService: FormMesssageService,\r\n translate: TranslateService,\r\n documentTypePipe: DocumentTypePipe,\r\n materialType: MaterialTypeService,\r\n customerService: CustomerService,\r\n contactService: ContactService,\r\n makeModelSharedService: MakeModelSharedService,\r\n jobDataService: JobDataService,\r\n stockService: StockService,\r\n supplierService: SupplierService,\r\n settingsService: SettingsService,\r\n private storeService: StoreService\r\n ) {\r\n super(\r\n translate,\r\n documentTypePipe,\r\n materialType,\r\n customerService,\r\n contactService,\r\n makeModelSharedService,\r\n jobDataService,\r\n supplierService,\r\n stockService);\r\n this.settingsService = settingsService;\r\n }\r\n\r\n ngOnInit(): void {\r\n this.baseCurrencySymbol = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n this.userRef1Label = this.userRefService.getLabel(UICustomisation.SALES_REF1);\r\n this.userRef2Label = this.userRefService.getLabel(UICustomisation.SALES_REF2);\r\n\r\n this.userRefDataSource = this.userRefService.getListDataSource(UserRefType.SALES_ORDER_1);\r\n this.supplierContactsDataStore = this.childContactsService.GetDataStore(ChildContactType.Supplier);\r\n this.sitesDataStore = this.salesOrderService.GetSiteDataStore();\r\n this.stockStoreDataStore = this.storeService.GetDataStore();\r\n super.ngOnInit();\r\n\r\n this.customerDataSource = new DataSource ({\r\n store: this.customersStore,\r\n filter: [[\"Status\", \"=\", CustomerStatus.ACTIVE], \"and\", [\"IsCustomer\", \"=\", true]]\r\n });\r\n this.supplierDataSource = new DataSource({\r\n store: this.supplierStore,\r\n filter: [\"Status\", \"=\", SupplierStatus.Active]\r\n });\r\n\r\n this.supplierContactsDataSource = new DataSource({\r\n store: this.supplierContactsDataStore,\r\n filter: [\"Status\", \"=\", ContactStatus.ACTIVE]\r\n });\r\n\r\n this.settingsService.getSetting(SettingId.CustomerManagingAgents).subscribe(isEnabled => {\r\n this.hasManagingAgentSettingEnabled = isEnabled.ValueBool;\r\n if (isEnabled.ValueBool) {\r\n const filter = [\r\n [[\"Status\", \"=\", CustomerStatus.ACTIVE], \"or\", [\"Status\", \"=\", CustomerStatus.MANAGING_AGENT]]\r\n , \"and\", [\"IsCustomer\", \"=\", true]\r\n ];\r\n this.customerDataSource.filter(filter);\r\n }\r\n });\r\n\r\n this.settingsService.getSetting(SettingId.UseAdditionalStores).subscribe(res => {\r\n this.additionalStoresEnabled = res.ValueBool;\r\n });\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (changes.salesorder) {\r\n this.calculateEquipmentCarriageSum(this.salesorder.Equipment);\r\n if (changes.salesorder.currentValue.UserRef1Id && !changes.salesorder.previousValue.UserRef1Id) {\r\n this.selectUserRef1();\r\n }\r\n\r\n if (this.salesorder.Number) {\r\n this.salesOrderService.GetSalesOrderDespatchNotes(this.salesorder.Number).subscribe(depatchNotes => {\r\n this.connectedDespatchNoteInvoiced = depatchNotes.some(x => x.Status === DespatchNoteStatus.Invoiced);\r\n });\r\n }\r\n }\r\n }\r\n\r\n public toggleCurrency(): void {\r\n this.showInForeignCurrency = !this.showInForeignCurrency;\r\n }\r\n\r\n public onCustomerChanged(e): void {\r\n if (e.value) {\r\n if (this.salesorder) {\r\n this.customerService.GetCustomerSimpleModel(e.value).subscribe(c => {\r\n this.salesorder.InvGroupingId = c.InvGroupingID;\r\n if (e.event && this.salesorder.DeliveryId) {\r\n if (this.salesorder.DeliveryId === c.InvoiceID) {\r\n this.changeCustomerInDatabase();\r\n } else {\r\n this.showWarningPopup = true;\r\n this.oldCustomerId = e.previousValue;\r\n }\r\n }\r\n });\r\n }\r\n this.customerCurrencyService.GetCustomerCurrency(e.value).subscribe(currency => {\r\n this.currency = currency;\r\n if (this.salesorder && !this.salesorder.Number || e.event) {\r\n this.salesorder.ExchangeRate = currency.ExchangeRateSales;\r\n }\r\n this.currencyChange.emit(currency);\r\n });\r\n const dataSource = this.siteSelectBoxComponent.instance.getDataSource();\r\n dataSource.filter([[\"InvoiceID\", \"=\", e.value], \"and\", [\"Status\", \"=\", CustomerStatus.ACTIVE]]);\r\n dataSource.load();\r\n }\r\n }\r\n\r\n public confirmAction(result): void {\r\n if (!result) {\r\n this.salesorder.CustomerId = this.oldCustomerId;\r\n } else {\r\n this.changeCustomerInDatabase();\r\n }\r\n this.showWarningPopup = false;\r\n }\r\n\r\n public onSiteChanged(e: any): void {\r\n const siteId = e.value;\r\n if (siteId) {\r\n const dataSource = this.customerContactSelectBoxComponent.instance.getDataSource();\r\n this.customerService.GetCustomerAndSite(this.salesorder.CustomerId, siteId).subscribe(result => {\r\n const filter: any[] = [\r\n [ \"CustomerID\", \"=\", this.salesorder.CustomerId ], \"or\",\r\n [ \"CustomerID\", \"=\", siteId ],\r\n ];\r\n if (this.hasManagingAgentSettingEnabled) {\r\n if (result.customer && result.customer.ManagingAgentID) {\r\n filter.push(\"or\", [ \"CustomerId\", \"=\", result.customer.ManagingAgentID ]);\r\n }\r\n if (result.site && result.site.ManagingAgentID && result.customer.ManagingAgentID !== result.site.ManagingAgentID) {\r\n filter.push(\"or\", [ \"CustomerId\", \"=\", result.site.ManagingAgentID ]);\r\n }\r\n }\r\n dataSource.filter([filter, \"and\", [ \"Status\", \"=\", ContactStatus.ACTIVE ]]);\r\n dataSource.load().then(() => {\r\n if (e.event) {\r\n this.salesorder.ContactId = null;\r\n }\r\n });\r\n });\r\n }\r\n }\r\n\r\n public onSupplierChanged(e): void {\r\n if (e.value) {\r\n const dataSource = this.supplierContactSelectBoxComponent.instance.getDataSource();\r\n dataSource.filter([[\"CustomerId\", \"=\", e.value], \"and\", [\"Status\", \"=\" , ContactStatus.ACTIVE]]);\r\n dataSource.load().then(() => {\r\n if (e.event) {\r\n this.salesorder.CarrierContactId = null;\r\n }\r\n });\r\n }\r\n }\r\n\r\n private calculateEquipmentCarriageSum(equipment: SalesOrderEquipment[]): void {\r\n this.equipmentCarriageSum = equipment.reduce((sum, equip) => sum + equip.Carriage, 0);\r\n this.showEquipmentCarriage = this.equipmentCarriageSum > 0;\r\n }\r\n\r\n private selectUserRef1(): void {\r\n const cached = this.salesorder.UserRef1Id;\r\n this.salesorder.UserRef1Id = null;\r\n this.userRefDataSource.load().then(() => {\r\n this.salesorder.UserRef1Id = cached;\r\n });\r\n }\r\n\r\n private changeCustomerInDatabase(): void {\r\n this.formMessageService.RegisterObservable(\r\n this.salesOrderService.UpdateSalesOrderCustomer(this.salesorder.Number, this.salesorder.CustomerId), this.formName)\r\n .subscribe(() => {\r\n this.load.emit();\r\n });\r\n }\r\n}\r\n","\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ data.value | currency: baseCurrencySymbol }}
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges\r\n} from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { FormMesssageService, DocumentTypeEnum } from \"servicesight-shared\";\r\nimport { BulkEquipmentOrderLine } from \"../../models/bulk-equipment-order-line.model\";\r\nimport { BulkPurchaseOrderService } from \"../../services/bulk-purchase-order/bulk-purchase-order.service\";\r\nimport { SupplierService } from \"../../services/supplier/supplier.service\";\r\n\r\n@Component({\r\n selector: \"app-bulk-equipment-order-popup\",\r\n templateUrl: \"./bulk-equipment-order-popup.component.html\",\r\n styleUrls: [\"./bulk-equipment-order-popup.component.scss\"]\r\n})\r\nexport class BulkEquipmentOrderPopupComponent implements OnInit, OnChanges {\r\n @Input() equipments: BulkEquipmentOrderLine[];\r\n @Input() documentId: number;\r\n @Input() siteId: number;\r\n @Input() documentType: DocumentTypeEnum;\r\n @Output() ordersRaised = new EventEmitter();\r\n\r\n public readonly formName: string = \"raiseEquipmentsPoForm\";\r\n public warningIsShowing: boolean = false;\r\n public supplierStore: ODataStore;\r\n public showPopup = false;\r\n public lookup: any;\r\n public baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n\r\n public get missingSuppliers(): boolean {\r\n return this.equipments && this.equipments.some(p => !p.SupplierId);\r\n }\r\n\r\n constructor(\r\n private supplierService: SupplierService,\r\n private bulkPurchaseOrderService: BulkPurchaseOrderService,\r\n private router: Router,\r\n private formMessageService: FormMesssageService) { }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.equipments && changes.equipments.currentValue) {\r\n this.showWarningMessage();\r\n }\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.supplierStore = this.supplierService.GetSupplierStore();\r\n }\r\n\r\n public Show(): void {\r\n this.showPopup = true;\r\n }\r\n\r\n public Cancel(): void {\r\n this.showPopup = false;\r\n this.equipments = [];\r\n this.warningIsShowing = false;\r\n this.formMessageService.ClearForm(this.formName);\r\n }\r\n\r\n public RaisePO(): void {\r\n this.bulkPurchaseOrderService.RaiseEquipmentPO({\r\n LinkNumber: this.documentId,\r\n LinkType: this.documentType,\r\n SiteId: this.siteId,\r\n Equipment: this.equipments.map(e =>\r\n e.DueDate === null ? { ...e, DueDate: new Date() } : e\r\n )\r\n }).subscribe(res => {\r\n if (res.length === 1) {\r\n this.router.navigate([\"/purchase-orders/detail\", res[0]]);\r\n } else {\r\n this.router.navigate([\"/purchase-orders/list\"], { queryParams: { ids: res }});\r\n }\r\n this.showPopup = false;\r\n this.ordersRaised.emit(true);\r\n });\r\n }\r\n\r\n public SupplierSortValue(data: any): void {\r\n return this.lookup.calculateCellValue(data.SupplierId);\r\n }\r\n\r\n public showWarningMessage(): void {\r\n const showWarning = this.equipments.some(p => !p.SupplierId);\r\n if (showWarning && !this.warningIsShowing) {\r\n this.warningIsShowing = true;\r\n this.formMessageService.ShowWarning(\"equipment.raise-po.missing-suppliers\", this.formName);\r\n } else if (!showWarning && this.warningIsShowing) {\r\n this.warningIsShowing = false;\r\n this.formMessageService.ClearForm(this.formName);\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n \r\n {{ 'purchase-orders.equipment.remove-equipment' | translate }}\r\n \r\n \r\n {{ 'purchase-orders.raise-po' | translate }}\r\n \r\n \r\n {{ 'purchase-orders.show-pos' | translate }}\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ data.value * (showInForeignCurrency ? salesorder.ExchangeRate: 1) | currency: currencySymbol }}
\r\n
\r\n {{ data.data.WarrantyMonth ?\r\n data.data.WarrantyMonth + ' ' + 'Month(s)' :\r\n data.data.WarrantyMeter ?\r\n data.data.WarrantyMeter + ' ' + 'Meter unit(s)' :\r\n '0 ' + 'Month(s)'}}\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n\r\n \r\n \r\n
\r\n
{{equipment.data.Notes}}
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n
\r\n purchaseOrderStatuses.Pending && data.data.Status < purchaseOrderStatuses.Complete\">\r\n {{ data.value | daysUntilNow }}\r\n \r\n
\r\n\r\n
\r\n
= purchaseOrderStatuses.Pending\">\r\n {{ item.value | purchaseOrderStatus | translate }}\r\n
\r\n
\r\n\r\n
\r\n {{ data.value | currency: baseCurrencySymbol }}\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{ currencySymbol }}\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n","import { formatCurrency } from \"@angular/common\";\r\nimport { Component, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport ArrayStore from \"devextreme/data/array_store\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Guid } from \"guid-typescript\";\r\nimport { DocumentTypeEnum, MakeModelSharedService, ModuleService, SalesOrderStatus } from \"servicesight-shared\";\r\nimport { PurchaseOrderStatus } from \"src/app/purchase-orders/enums/purchase-order-status.enum\";\r\nimport { QuotesService } from \"src/app/quotes2/services/quotes.service\";\r\nimport { AddMakeModelDialogueComponent } from \"src/app/shared/components/add-make-model-dialogue/add-make-model-dialogue.component\";\r\nimport { BulkEquipmentOrderPopupComponent } from \"src/app/shared/components/bulk-equipment-order-popup/bulk-equipment-order-popup.component\";\r\nimport { BulkEquipmentOrderLine } from \"src/app/shared/models/bulk-equipment-order-line.model\";\r\nimport { ICurrency } from \"src/app/shared/models/icurrency.model\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { SupplierService } from \"src/app/shared/services/supplier/supplier.service\";\r\nimport { EquipmentPurchaseOrderModel } from \"../../shared/models/equipment-purchase-order.model\";\r\nimport { JobTypeService } from \"../../shared/services/job-type/job-type.service\";\r\nimport { MakeModelListItem } from \"../models/make-model-list-item\";\r\nimport { SalesOrderEquipment } from \"../models/sales-order-equipment.model\";\r\nimport { SalesOrder } from \"../models/sales-order.model\";\r\nimport { SalesOrderService } from \"../services/sales-order.service\";\r\n\r\n@Component({\r\n selector: \"app-sales-order-equipment\",\r\n templateUrl: \"./sales-order-equipment.component.html\",\r\n styleUrls: [\"./sales-order-equipment.component.scss\"]\r\n})\r\nexport class SalesOrderEquipmentComponent implements OnInit, OnChanges {\r\n @Input() public salesorder: SalesOrder = new SalesOrder();\r\n @Input() public currency: ICurrency;\r\n @Input() public form: NgForm;\r\n @Input() public salesOrderDisabled: boolean = false;\r\n\r\n @ViewChild(AddMakeModelDialogueComponent, { static: true }) AddMakeModelDialog: AddMakeModelDialogueComponent;\r\n @ViewChild(DxDataGridComponent, { static: true }) EquipmentGrid: DxDataGridComponent;\r\n @ViewChild(\"raisePO\", { static: true }) private RaisePO: BulkEquipmentOrderPopupComponent;\r\n\r\n public isProEnabled: boolean = false;\r\n public selectedMakeModelIds: number[] = [];\r\n public makeModelStore: ODataStore;\r\n public lookup: any;\r\n public makeModelsToOrder: BulkEquipmentOrderLine[] = [];\r\n public documentType = DocumentTypeEnum.SalesOrder;\r\n public purchaseOrderStatuses = PurchaseOrderStatus;\r\n private makeModels: MakeModelListItem[] = [];\r\n\r\n public colCountByScreen: { lg: number; md: number; sm: number; xs: number } = {\r\n lg: 5,\r\n md: 4,\r\n sm: 2,\r\n xs: 1\r\n };\r\n\r\n public notesColspan: number = 5;\r\n\r\n public suppliersDataStore: ODataStore;\r\n public baseCurrencySymbol: string = null;\r\n public showInForeignCurrency: boolean = false;\r\n public jobTypeDataSource: DataSource;\r\n private purchaseOrderEquipments: EquipmentPurchaseOrderModel[];\r\n private purchaseOrderEquipmentsDataSourceStorage = [];\r\n\r\n public get isForeignCustomer(): boolean {\r\n return this.currency && this.currency.IsForeignCustomer;\r\n }\r\n\r\n public get currencySymbol(): string {\r\n return this.showInForeignCurrency ? this.foreignCurrencySymbol : this.baseCurrencySymbol;\r\n }\r\n\r\n public get foreignCurrencySymbol(): string {\r\n return this.currency ? this.currency.CurrencySymbol : null;\r\n }\r\n\r\n public get formDisabled(): boolean {\r\n return this.salesorder.Status !== SalesOrderStatus.Pending || this.salesOrderDisabled;\r\n }\r\n\r\n public get formClass(): string {\r\n return this.ShowPreparationAndInstallationJobTypes ? \"pd1 narrow-items\" : \"pd1\";\r\n }\r\n\r\n public get disableRemove(): boolean {\r\n return this.formDisabled ||\r\n this.selectedMakeModelIds.length === 0 ||\r\n this.salesorder.Equipment.every((i) => this.selectedMakeModelIds.indexOf(i.LineId) >= 0 && i.Despatched > 0);\r\n }\r\n\r\n public get totalMargin(): number {\r\n const totalPrice = this.salesorder.Equipment.reduce((a: number, i) => a + i.TotalSellingPrice, 0);\r\n const totalCost = this.salesorder.Equipment.reduce((a: number, i) => a + i.Cost * i.Demand, 0);\r\n return totalPrice ? (totalPrice - totalCost) / totalPrice : null;\r\n }\r\n\r\n public get raisePOButtonDisabled(): boolean {\r\n return !this.salesorder.Equipment.filter(x => this.selectedMakeModelIds.includes(x.LineId)).some(y => !y.OnPurchaseOrder);\r\n }\r\n\r\n public ShowPreparationAndInstallationJobTypes: boolean = false;\r\n\r\n constructor(\r\n moduleService: ModuleService,\r\n private makeModelService: MakeModelSharedService,\r\n private jobTypeService: JobTypeService,\r\n private licenseService: LicenseService,\r\n private salesOrderService: SalesOrderService,\r\n private suppliersService: SupplierService,\r\n private quoteService: QuotesService\r\n ) {\r\n this.baseCurrencySymbol = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n this.onEquipRowUpdating = this.onEquipRowUpdating.bind(this);\r\n this.TotalPriceFormatter = this.TotalPriceFormatter.bind(this);\r\n this.TotalMarginFormatter = this.TotalMarginFormatter.bind(this);\r\n this.OnRowPrepared = this.OnRowPrepared.bind(this);\r\n this.onInitialize = this.onInitialize.bind(this);\r\n\r\n moduleService.GetEnabledModulesAccess().subscribe(access => {\r\n const showJobTypes = access.ProEnabled || access.AdvancedQuotesEnabled;\r\n this.ShowPreparationAndInstallationJobTypes = showJobTypes;\r\n this.colCountByScreen.lg = showJobTypes ? 7 : 5;\r\n this.notesColspan = showJobTypes ? 7 : 5;\r\n });\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.makeModelStore ??= this.makeModelService.GetMakeModelsDataStore();\r\n this.suppliersDataStore = this.suppliersService.GetSupplierStore();\r\n\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(x => {\r\n this.isProEnabled = x.ProEnabled;\r\n });\r\n\r\n this.jobTypeService.GetAll().subscribe(jobTypes => {\r\n this.jobTypeDataSource = new DataSource({\r\n store: new ArrayStore({\r\n key: \"JobTypeID\",\r\n data: jobTypes.ModelCollection\r\n })\r\n });\r\n });\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.salesorder && this.salesorder.Number) {\r\n this.salesOrderService.GetSalesOrderEquipmentPurchaseOrders(this.salesorder.Number).subscribe(x => {\r\n this.purchaseOrderEquipments = x;\r\n this.SetOnPOValue();\r\n });\r\n }\r\n }\r\n\r\n public ExpandAllRowsWithChild(): void {\r\n this.salesorder.Equipment.forEach(e => {\r\n if (this.CheckPurchaseOrderExist(e.LineId)) {\r\n this.EquipmentGrid.instance.expandRow(e.LineId);\r\n }\r\n });\r\n }\r\n\r\n public OnRowPrepared(row: any): void {\r\n if (this.purchaseOrderEquipments && row.rowType === \"data\" && !row.data.Notes) {\r\n const foundElement = this.purchaseOrderEquipments\r\n .find(i => i.SubDocId === row.data.LineId && i.Status >= PurchaseOrderStatus.Pending && i.Status <= PurchaseOrderStatus.Complete);\r\n if (!foundElement) {\r\n const expandItems = row.rowElement.querySelector(\".dx-command-expand\");\r\n if (expandItems) {\r\n expandItems.firstChild.classList.remove(\"dx-datagrid-group-closed\");\r\n expandItems.firstChild.classList.remove(\"dx-datagrid-group-opened\");\r\n expandItems.classList.remove(\"dx-datagrid-expand\");\r\n }\r\n }\r\n }\r\n }\r\n\r\n public onInitialize(): void {\r\n this.salesorder.Equipment.forEach(e => {\r\n if (e.Notes && this.EquipmentGrid.instance) {\r\n this.EquipmentGrid.instance.expandRow(e.LineId);\r\n }\r\n });\r\n }\r\n\r\n public CheckPurchaseOrderExist(equipId): boolean {\r\n return this.purchaseOrderEquipments ? !!this.purchaseOrderEquipments.find(i => i.SubDocId === equipId) : false;\r\n }\r\n\r\n public GetPurchaseOrderEquipment(equipId: number): DataSource {\r\n let item = this.purchaseOrderEquipmentsDataSourceStorage.find(i => i.key === equipId);\r\n if (!item) {\r\n item = {\r\n key: equipId,\r\n dataSourceInstance: new DataSource({\r\n store: new ArrayStore({\r\n data: this.purchaseOrderEquipments,\r\n key: \"SubDocId\"\r\n }),\r\n filter: [[\"SubDocId\", \"=\", equipId], \"and\", [\"Status\", \"<>\", PurchaseOrderStatus.AuthorisationReq], \"and\", [\"Status\", \"<>\", PurchaseOrderStatus.Cancelled]]\r\n })\r\n };\r\n\r\n this.purchaseOrderEquipmentsDataSourceStorage.push(item);\r\n }\r\n return item.dataSourceInstance;\r\n }\r\n\r\n public SetFormDirty(): void {\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public toggleCurrency(): void {\r\n this.showInForeignCurrency = !this.showInForeignCurrency;\r\n this.EquipmentGrid.instance.repaint();\r\n }\r\n\r\n public GetMakeModelDisplayValue(data: any): string {\r\n return `${data.Make} / ${data.Model}`;\r\n }\r\n\r\n public AddEquipment(): void {\r\n this.AddMakeModelDialog.Show();\r\n }\r\n\r\n public DeleteSelectedEquipment(): void {\r\n this.selectedMakeModelIds.forEach(id => {\r\n const index = this.salesorder.Equipment.findIndex(x => x.LineId === id);\r\n this.salesorder.Equipment.splice(index, 1);\r\n });\r\n this.SetFormDirty();\r\n }\r\n\r\n public async OnMakeModelIdsAdded(ids: number[]): Promise {\r\n if (!this.salesorder.Equipment) {\r\n this.salesorder.Equipment = [];\r\n }\r\n\r\n for (const id of ids) {\r\n this.makeModelStore.byKey(id)\r\n .then((mm) => {\r\n if (this.makeModels.findIndex(x => x.MakeModelId === mm.MakeModelId) === -1) {\r\n this.makeModels.push(mm);\r\n }\r\n this.quoteService.GetMakeModelPrice(this.salesorder.CustomerId, id).subscribe((price) => {\r\n this.salesorder.Equipment.push({\r\n LineId: Guid.create().toString() as any,\r\n MakeModelId: id,\r\n Demand: 1,\r\n WarrantyMonth: mm.WarrantyMonth,\r\n WarrantyMeter: mm.WarrantyMeter,\r\n UnitPrice: price,\r\n TotalSellingPrice: price,\r\n Margin: price ? (price - mm.Cost) / price : null,\r\n Despatched: 0,\r\n Outstanding: 1,\r\n Notes: null,\r\n Cost: mm.Cost,\r\n OnPurchaseOrder: 0,\r\n Attributes: [],\r\n InstallationJobTypeId: null,\r\n PreparationJobTypeId: null,\r\n Carriage: 0\r\n });\r\n });\r\n }).then(() => this.RefreshEquipmentAfterAdd());\r\n }\r\n }\r\n\r\n public onKeyDown(e: any): void {\r\n if (e.event.keyCode === 13) {\r\n e.handled = true;\r\n }\r\n }\r\n\r\n public RefreshEquipmentAfterAdd(): void {\r\n this.EquipmentGrid.instance.refresh();\r\n this.SetFormDirty();\r\n }\r\n\r\n public onEquipRowUpdating(e: any): void {\r\n e.newData.TotalSellingPrice =\r\n (e.newData.UnitPrice || e.oldData.UnitPrice) *\r\n (e.newData.Demand || e.oldData.Demand);\r\n e.newData.Outstanding =\r\n (e.newData.Demand || e.oldData.Demand) -\r\n (e.newData.Despatched || e.oldData.Despatched);\r\n e.newData.Margin = e.newData.TotalSellingPrice ?\r\n (e.newData.TotalSellingPrice - e.oldData.Cost * (e.newData.Demand || e.oldData.Demand)) / e.newData.TotalSellingPrice :\r\n null;\r\n this.SetFormDirty();\r\n }\r\n\r\n public TotalPriceFormatter(data: any): string {\r\n return formatCurrency(data.value * (this.showInForeignCurrency ? this.salesorder.ExchangeRate : 1),\r\n JSON.parse(localStorage.getItem(\"ls.UserBrowserLocale\")),\r\n this.currencySymbol);\r\n }\r\n\r\n public TotalMarginFormatter(): string {\r\n return this.totalMargin ? `${Math.round(this.totalMargin * 100)}%` : null;\r\n }\r\n\r\n public MakeModelSortValue(data: any): void {\r\n return this.lookup.calculateCellValue(data.MakeModelId);\r\n }\r\n\r\n public RepaintGrid(): void {\r\n this.EquipmentGrid.instance.repaint();\r\n }\r\n\r\n public onRaisePO(): void {\r\n this.makeModelsToOrder = this.getSelectedMakeModels().map(m => this.mapSalesOrderEquipmentToBulkEquipment(m)).filter(item => item);\r\n\r\n this.RaisePO.Show();\r\n }\r\n\r\n private getSelectedMakeModels(): SalesOrderEquipment[] {\r\n return this.salesorder.Equipment.filter(i => this.selectedMakeModelIds.some(s => s === i.LineId));\r\n }\r\n\r\n private mapSalesOrderEquipmentToBulkEquipment(salesOrderEquipment: SalesOrderEquipment): BulkEquipmentOrderLine {\r\n const makeModel = this.makeModels.find(x => x.MakeModelId === salesOrderEquipment.MakeModelId);\r\n\r\n if (!salesOrderEquipment.OnPurchaseOrder) {\r\n return {\r\n MakeModelLineId: salesOrderEquipment.LineId,\r\n SupplierId: makeModel.SupplierId,\r\n Quantity: salesOrderEquipment.Demand,\r\n LinkItemQuantity: salesOrderEquipment.Demand,\r\n MakeModelId: salesOrderEquipment.MakeModelId,\r\n MakeModel: `${makeModel.Make} / ${makeModel.Model}`,\r\n DueDate: makeModel.SupplierId ? this.calculateDueDate(makeModel.LeadTime) : null,\r\n BuyingPrice: makeModel.Cost,\r\n WarrantyPeriod: makeModel.WarrantyMonth,\r\n SubDocId: salesOrderEquipment.LineId,\r\n Attributes: salesOrderEquipment.Attributes\r\n };\r\n }\r\n }\r\n\r\n private calculateDueDate(leadTime: number): Date {\r\n const date = new Date();\r\n date.setDate(date.getDate() + leadTime);\r\n\r\n return date;\r\n }\r\n\r\n private SetOnPOValue(): void {\r\n this.makeModelStore ??= this.makeModelService.GetMakeModelsDataStore();\r\n\r\n this.salesorder.Equipment.forEach(sale => {\r\n sale.OnPurchaseOrder = this.GetPurchaseOrderOutstandingQuantity(sale.LineId);\r\n });\r\n\r\n const makeModelIds = this.salesorder.Equipment\r\n .map(sale => sale.MakeModelId)\r\n .filter((item, i, ar) => ar.indexOf(item) === i);\r\n\r\n makeModelIds.forEach(id => {\r\n this.makeModelStore.byKey(id)\r\n .then((mm) => {\r\n if (this.makeModels.findIndex(x => x.MakeModelId === mm.MakeModelId) === -1) {\r\n this.makeModels.push(mm);\r\n }\r\n });\r\n });\r\n }\r\n\r\n private GetPurchaseOrderOutstandingQuantity(lineId: number): number {\r\n let outstandingTotal = 0;\r\n\r\n if (this.purchaseOrderEquipments) {\r\n\r\n const purchaseOrders = this.purchaseOrderEquipments.filter(i => i.LinkNumber === this.salesorder.Number && i.SubDocId === lineId);\r\n purchaseOrders.forEach(po => {\r\n if (po && po.Status >= PurchaseOrderStatus.Placed && po.Status <= PurchaseOrderStatus.PartReceived) {\r\n outstandingTotal += po.Outstanding;\r\n }\r\n });\r\n }\r\n return outstandingTotal;\r\n }\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { Observable } from \"rxjs/internal/Observable\";\r\nimport { MaterialTypeListModel } from \"../models/material-type-list.model\";\r\nimport { IAppConfig, APP_CONFIG, IProteanResponse } from \"servicesight-shared\";\r\nimport { MaterialTypeModel } from \"../models/material-type.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class MaterialTypesService {\r\n private readonly baseUrl = this.appConfig.apiLocations.ServiceSight;\r\n private readonly miscTypesUrl = this.baseUrl + \"MiscType/\";\r\n\r\n constructor(private http: HttpClient, @Inject(APP_CONFIG) private appConfig: IAppConfig) { }\r\n\r\n public GetMaterialTypesList(): Observable {\r\n return this.http.get(this.miscTypesUrl + \"GetAllMiscTypes\");\r\n }\r\n\r\n public GetMiscType(miscTypeId: number): Observable {\r\n return this.http.get(`${this.miscTypesUrl}GetMiscType?miscTypeId=${miscTypeId}`);\r\n }\r\n\r\n public GetNewMiscType(): Observable {\r\n return this.http.get(`${this.miscTypesUrl}GetNewMiscType`);\r\n }\r\n\r\n public DeleteItem(miscTypeId: number): Observable {\r\n return this.http.post(`${this.miscTypesUrl}DeleteMiscType?miscTypeId=${miscTypeId}`, miscTypeId);\r\n }\r\n\r\n public CreateItem(model: MaterialTypeModel): Observable {\r\n return this.http.post(`${this.miscTypesUrl}InsertMiscType`, model);\r\n }\r\n\r\n public UpdateItem(model: MaterialTypeModel): Observable {\r\n return this.http.post(`${this.miscTypesUrl}UpdateMiscType`, model);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n \r\n \r\n {{ 'purchase-orders.raise-po' | translate }}\r\n \r\n \r\n {{ 'purchase-orders.show-pos' | translate }}\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{ data.value * (showInForeignCurrency ? salesorder.ExchangeRate: 1) | currency: currencySymbol }}\r\n
\r\n \r\n \r\n
\r\n
{{material.data.Notes}}
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n
\r\n purchaseOrderStatuses.Pending && data.data.Status < purchaseOrderStatuses.Complete\">\r\n {{ data.value | daysUntilNow }}\r\n \r\n
\r\n\r\n
\r\n
= purchaseOrderStatuses.Pending\">\r\n {{ item.value | purchaseOrderStatus | translate }}\r\n
\r\n
\r\n\r\n
\r\n {{ data.value | currency: baseCurrencySymbol }}\r\n
\r\n \r\n
\r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{ currencySymbol }}\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n {{ currencySymbol }}\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import { formatCurrency } from \"@angular/common\";\r\nimport { Component, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from \"@angular/core\";\r\nimport { ControlContainer, NgForm } from \"@angular/forms\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport ArrayStore from \"devextreme/data/array_store\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Guid } from \"guid-typescript\";\r\nimport { SalesOrderStatus, DocumentTypeEnum } from \"servicesight-shared\";\r\nimport { MaterialListModel } from \"src/app/jobs/models/material-list.model\";\r\nimport { IJobMisc } from \"src/app/quotes/models/IJobMisc\";\r\nimport { MaterialTypeModel } from \"src/app/settings/job-settings/models/material-type.model\";\r\nimport { MaterialTypesService } from \"src/app/settings/job-settings/services/material-types.service\";\r\nimport { BulkMaterialOrderPopupComponent } from \"src/app/shared/components/bulk-material-order-popup/bulk-material-order-popup.component\";\r\nimport { JobMiscDialogComponent } from \"src/app/shared/components/job-misc-dialog/job-misc-dialog.component\";\r\nimport { ICurrency } from \"src/app/shared/models/icurrency.model\";\r\nimport { MaterialTypeService } from \"src/app/shared/services/material-type/material-type.service\";\r\nimport { SalesOrderMaterial } from \"../models/sales-order-material.model\";\r\nimport { SalesOrder } from \"../models/sales-order.model\";\r\nimport { PurchaseOrdersMiscModel } from \"src/app/jobs/models/purchase-orders-misc.model\";\r\nimport { PurchaseOrderStatus } from \"src/app/purchase-orders/enums/purchase-order-status.enum\";\r\nimport { SupplierService } from \"src/app/shared/services/supplier/supplier.service\";\r\nimport { SalesOrderService } from \"../services/sales-order.service\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\n\r\n@Component({\r\n selector: \"app-sales-order-materials\",\r\n templateUrl: \"./sales-order-materials.component.html\",\r\n styleUrls: [\"./sales-order-materials.component.scss\"],\r\n viewProviders: [ { provide: ControlContainer, useExisting: NgForm } ]\r\n})\r\nexport class SalesOrderMaterialsComponent implements OnInit, OnChanges {\r\n @Input() public salesorder: SalesOrder = new SalesOrder();\r\n @Input() public currency: ICurrency;\r\n @Input() public form: NgForm;\r\n @Input() public salesOrderDisabled: boolean = false;\r\n\r\n @ViewChild(JobMiscDialogComponent, { static: true }) AddMaterialDialog: JobMiscDialogComponent;\r\n @ViewChild(DxDataGridComponent, { static: true }) MaterialsGrid: DxDataGridComponent;\r\n @ViewChild(\"raisePO\", { static: true }) private RaisePO: BulkMaterialOrderPopupComponent;\r\n\r\n public showSaveMessage: boolean = false;\r\n public saveBeforeRaisePurchaseOrder: boolean = false;\r\n public isProEnabled: boolean = false;\r\n public documentType = DocumentTypeEnum.SalesOrder;\r\n public selectedMaterialIds: number[] = [];\r\n public miscTypeStore: ODataStore;\r\n public colCountByScreen: object = {\r\n lg: 3,\r\n md: 2,\r\n sm: 2,\r\n xs: 1\r\n };\r\n\r\n public materialsToOrder: MaterialListModel[] = [];\r\n\r\n public baseCurrencySymbol: string = null;\r\n public showInForeignCurrency: boolean = false;\r\n\r\n public purchaseOrderMiscs: PurchaseOrdersMiscModel[];\r\n public purchaseOrderStatuses = PurchaseOrderStatus;\r\n\r\n private materialTypes: MaterialTypeModel[];\r\n private purchaseOrderMaterialsDataSourceStorage = [];\r\n\r\n public suppliersDataStore: ODataStore;\r\n\r\n public get isForeignCustomer(): boolean {\r\n return this.currency && this.currency.IsForeignCustomer;\r\n }\r\n\r\n public get currencySymbol(): string {\r\n return this.showInForeignCurrency ? this.foreignCurrencySymbol : this.baseCurrencySymbol;\r\n }\r\n\r\n public get foreignCurrencySymbol(): string {\r\n return this.currency ? this.currency.CurrencySymbol : null;\r\n }\r\n\r\n public get formDisabled(): boolean {\r\n return this.salesorder.Status !== SalesOrderStatus.Pending || this.salesOrderDisabled;\r\n }\r\n\r\n public get disableRemove(): boolean {\r\n return this.formDisabled ||\r\n this.selectedMaterialIds.length === 0 ||\r\n this.salesorder.Materials.every((i) => this.selectedMaterialIds.indexOf(i.LineId) >= 0 && !i.Despatched);\r\n }\r\n\r\n public get totalMargin(): number {\r\n const totalPrice = this.salesorder.Materials.reduce((a: number, i) => a + i.SellingPrice, 0);\r\n const totalCost = this.salesorder.Materials.reduce((a: number, i) => a + Number(i.Cost), 0);\r\n return totalPrice ? (totalPrice - totalCost) / totalPrice : null;\r\n }\r\n\r\n public get raisePOButtonDisabled(): boolean {\r\n return !this.salesorder.Materials.filter(x => this.selectedMaterialIds.includes(x.LineId)).some(y => !y.OnPO);\r\n }\r\n\r\n constructor(\r\n private materialType: MaterialTypeService,\r\n private materialTypesService: MaterialTypesService,\r\n private suppliersService: SupplierService,\r\n private salesOrderService: SalesOrderService,\r\n private licenseService: LicenseService\r\n ) {\r\n this.baseCurrencySymbol = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n this.onMiscRowUpdating = this.onMiscRowUpdating.bind(this);\r\n this.TotalPriceFormatter = this.TotalPriceFormatter.bind(this);\r\n this.TotalMarginFormatter = this.TotalMarginFormatter.bind(this);\r\n this.onInitialize = this.onInitialize.bind(this);\r\n this.OnRowPrepared = this.OnRowPrepared.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(x => {\r\n this.isProEnabled = x.ProEnabled;\r\n });\r\n this.miscTypeStore = this.materialType.GetMaterialTypeStore();\r\n this.materialTypesService.GetMaterialTypesList().subscribe(types => {\r\n this.materialTypes = types.ModelCollection;\r\n });\r\n this.suppliersDataStore = this.suppliersService.GetSupplierStore();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.salesorder && this.salesorder.Number) {\r\n this.salesOrderService.GetSalesOrderMiscPurchaseOrders(this.salesorder.Number).subscribe(x => {\r\n this.purchaseOrderMiscs = x;\r\n this.SetOnPOValue();\r\n });\r\n }\r\n }\r\n\r\n public onInitialize(): void {\r\n this.salesorder.Materials.forEach(e => {\r\n if (e.Notes && this.MaterialsGrid.instance) {\r\n this.MaterialsGrid.instance.expandRow(e.LineId);\r\n }\r\n });\r\n }\r\n\r\n public OnRowPrepared(row: any): void {\r\n if (this.purchaseOrderMiscs && row.rowType === \"data\" && !row.data.Notes) {\r\n const foundElement = this.purchaseOrderMiscs\r\n .find(i => i.SubDocId === row.data.LineId && i.Status >= PurchaseOrderStatus.Pending && i.Status <= PurchaseOrderStatus.Complete);\r\n\r\n if (!foundElement) {\r\n const expandItems = row.rowElement.querySelector(\".dx-command-expand\");\r\n if (expandItems) {\r\n expandItems.firstChild.classList.remove(\"dx-datagrid-group-closed\");\r\n expandItems.firstChild.classList.remove(\"dx-datagrid-group-opened\");\r\n expandItems.classList.remove(\"dx-datagrid-expand\");\r\n }\r\n }\r\n }\r\n }\r\n\r\n public ExpandAllRowsWithChild(): void {\r\n this.salesorder.Materials.forEach(e => {\r\n if (this.CheckPurchaseOrderExist(e.LineId)) {\r\n this.MaterialsGrid.instance.expandRow(e.LineId);\r\n }\r\n });\r\n }\r\n\r\n public CheckPurchaseOrderExist(miscId): boolean {\r\n return this.purchaseOrderMiscs ? !!this.purchaseOrderMiscs.find(i => i.SubDocId === miscId) : false;\r\n }\r\n\r\n public GetPurchaseOrderMisc(miscId: number): DataSource {\r\n let item = this.purchaseOrderMaterialsDataSourceStorage.find(i => i.key === miscId);\r\n if (!item) {\r\n item = {\r\n key: miscId,\r\n dataSourceInstance: new DataSource({\r\n store: new ArrayStore({\r\n data: this.purchaseOrderMiscs,\r\n key: \"SubDocId\"\r\n }),\r\n filter: [[\"SubDocId\", \"=\", miscId], \"and\", [\"Status\", \"<>\", PurchaseOrderStatus.AuthorisationReq], \"and\", [\"Status\", \"<>\", PurchaseOrderStatus.Cancelled]]\r\n })\r\n };\r\n\r\n this.purchaseOrderMaterialsDataSourceStorage.push(item);\r\n }\r\n return item.dataSourceInstance;\r\n }\r\n\r\n public SetFormDirty(): void {\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public toggleCurrency(): void {\r\n this.showInForeignCurrency = !this.showInForeignCurrency;\r\n this.MaterialsGrid.instance.repaint();\r\n }\r\n\r\n public AddMaterial(): void {\r\n this.AddMaterialDialog.Show(false);\r\n }\r\n\r\n public DeleteSelectedMaterials(): void {\r\n this.selectedMaterialIds.forEach(id => {\r\n const index = this.salesorder.Materials.findIndex(x => x.LineId === id);\r\n this.salesorder.Materials.splice(index, 1);\r\n });\r\n this.SetFormDirty();\r\n }\r\n\r\n public AddMisc(data: IJobMisc): void {\r\n if (!this.salesorder.Materials) {\r\n this.salesorder.Materials = [];\r\n }\r\n\r\n this.salesorder.Materials.push({\r\n LineId: Guid.create().toString() as any,\r\n MaterialTypeId: data.MiscTypeID,\r\n Description: data.Description,\r\n Cost: data.Cost,\r\n SellingPrice: data.Charge,\r\n Margin: data.Charge ? (data.Charge - data.Cost) / data.Charge : null,\r\n Despatched: false,\r\n Notes: null,\r\n OnPO: false\r\n });\r\n\r\n this.RefreshMisc();\r\n this.SetFormDirty();\r\n }\r\n\r\n public RefreshMisc(): void {\r\n this.MaterialsGrid.instance.refresh();\r\n }\r\n\r\n public RepaintGrid(): void {\r\n this.MaterialsGrid.instance.repaint();\r\n }\r\n\r\n public onMiscRowUpdating(e: any): void {\r\n const price = e.newData.SellingPrice || e.oldData.SellingPrice;\r\n const cost = e.newData.Cost || e.oldData.Cost;\r\n e.newData.Margin = price ? (price - cost) / price : null;\r\n this.SetFormDirty();\r\n }\r\n\r\n public TotalPriceFormatter(data: any): string {\r\n return formatCurrency(data.value * (this.showInForeignCurrency ? this.salesorder.ExchangeRate : 1),\r\n JSON.parse(localStorage.getItem(\"ls.UserBrowserLocale\")),\r\n this.currencySymbol);\r\n }\r\n\r\n public TotalMarginFormatter(): string {\r\n return this.totalMargin ? `${Math.round(this.totalMargin * 100)}%` : null;\r\n }\r\n\r\n public onKeyDown(e: any): void {\r\n if (e.event.keyCode === 13) {\r\n e.handled = true;\r\n }\r\n }\r\n\r\n public onRaisePO(): void {\r\n if (!this.salesorder.Number) {\r\n this.saveBeforeRaisePurchaseOrder = true;\r\n return;\r\n }\r\n const selectedMaterials = this.getSelectedMaterials();\r\n\r\n if (selectedMaterials && selectedMaterials.length) {\r\n const needsSaving = selectedMaterials.some(part => part.LineId < 0);\r\n if (needsSaving) {\r\n this.showSaveMessage = true;\r\n return;\r\n }\r\n }\r\n\r\n this.materialsToOrder = selectedMaterials.map(m => this.mapSalesOrderMaterialToMaterialList(m)).filter(item => item);\r\n this.RaisePO.Show();\r\n }\r\n\r\n public CheckPurchaseOrderRaised(lineId: number): boolean {\r\n if (this.purchaseOrderMiscs) {\r\n const searchedPurchaseOrder = this.purchaseOrderMiscs.find(i => i.SubDocId === lineId);\r\n if (!searchedPurchaseOrder) {\r\n return false;\r\n }\r\n return searchedPurchaseOrder.Status >= PurchaseOrderStatus.Placed && searchedPurchaseOrder.Status <= PurchaseOrderStatus.PartReceived;\r\n }\r\n return false;\r\n }\r\n\r\n private getSelectedMaterials(): SalesOrderMaterial[] {\r\n return this.salesorder.Materials.filter(i => this.selectedMaterialIds.some(s => s === i.LineId));\r\n }\r\n\r\n private SetOnPOValue(): void {\r\n this.salesorder.Materials.forEach(sale => {\r\n sale.OnPO = this.CheckPurchaseOrderRaised(sale.LineId);\r\n });\r\n }\r\n\r\n private mapSalesOrderMaterialToMaterialList(salesOrderMaterial: SalesOrderMaterial): MaterialListModel {\r\n const materialType = this.materialTypes.find(x => x.MiscTypeID === salesOrderMaterial.MaterialTypeId);\r\n if (!salesOrderMaterial.OnPO) {\r\n return {\r\n MiscID: salesOrderMaterial.LineId,\r\n Description: salesOrderMaterial.Description,\r\n MiscTypeID: salesOrderMaterial.MaterialTypeId,\r\n MiscType: materialType.Description,\r\n Cost: salesOrderMaterial.Cost,\r\n PreferredSupplierID: materialType?.PreferredSupplierID\r\n };\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ 'purchase-orders.summary.header.order' | translate }}{{ 'purchase-orders.summary.header.items' | translate }}{{ 'salesorder.summary.qty-ordered' | translate }}{{ 'salesorder.summary.price' | translate }}{{ 'salesorder.detail.despatched' | translate }}{{ 'salesorder.equipment.os' | translate }}
\r\n
\r\n
\r\n \r\n
\r\n
{{ 'purchase-orders.tab.parts' | translate }}
\r\n
\r\n
{{ partsCount }}{{ partsQuantity }}{{ currencyFormat(prepareCurrencyValue(partsPrice)) }}{{ partsDespatched }}{{ salesOrderViewModel.partsOutstanding }}
\r\n
\r\n
\r\n \r\n
\r\n
{{ 'purchase-orders.tab.equipment' | translate }}
\r\n
\r\n
{{ equipmentCount }}{{ equipmentQuantity }}{{ currencyFormat(prepareCurrencyValue(equipmentPrice)) }}{{ equipmentDespatched }}{{ salesOrderViewModel.equipmentOutstanding }}
\r\n
\r\n
\r\n \r\n
\r\n
{{ 'purchase-orders.tab.materials' | translate }}
\r\n
\r\n
{{ materialsCount }}{{ materialsQuantity }}{{ currencyFormat(prepareCurrencyValue(materialsPrice)) }}{{ materialsDespatched }}{{ salesOrderViewModel.materialsOutstanding }}
{{ 'purchase-orders.summary.combined-order-total' | translate }}{{ itemCount }}{{ totalQuantity }}{{ currencyFormat(prepareCurrencyValue(totalPrice)) }}{{ totalDespatched }}{{ salesOrderViewModel.totalOutstanding }}
{{ 'purchase-orders.detail.carriage' | translate }}  {{ currencyFormat(prepareCurrencyValue(totalCarriage)) }}  
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n","import { formatCurrency } from \"@angular/common\";\r\nimport { Component, Input, OnChanges, SimpleChanges } from \"@angular/core\";\r\nimport { ControlContainer, NgForm } from \"@angular/forms\";\r\nimport { SalesOrderStatus } from \"servicesight-shared\";\r\nimport { ICurrency } from \"../../shared/models/icurrency.model\";\r\nimport { SalesOrder } from \"../models/sales-order.model\";\r\nimport { SalesOrderViewModel } from \"../models/sales-order.view-model\";\r\n\r\n@Component({\r\n selector: \"app-sales-order-summary\",\r\n templateUrl: \"./sales-order-summary.component.html\",\r\n styleUrls: [\"./sales-order-summary.component.scss\"],\r\n viewProviders: [{ provide: ControlContainer, useExisting: NgForm }]\r\n})\r\nexport class SalesOrderSummaryComponent implements OnChanges {\r\n @Input() public salesorder: SalesOrder = new SalesOrder();\r\n @Input() public salesOpportunitiesEnabled: boolean = false;\r\n @Input() public partsEnabled: boolean = false;\r\n @Input() public equipmentEnabled: boolean = false;\r\n @Input() public currency: ICurrency;\r\n @Input() parentForm: any;\r\n\r\n public salesOrderViewModel: SalesOrderViewModel = new SalesOrderViewModel(this.salesorder);\r\n public baseCurrencySymbol: string = null;\r\n public showInForeignCurrency: boolean = false;\r\n\r\n public get isForeignCustomer(): boolean {\r\n return this.currency && this.currency.IsForeignCustomer;\r\n }\r\n\r\n public get currencySymbol(): string {\r\n return this.showInForeignCurrency ? this.currency.CurrencySymbol : this.baseCurrencySymbol;\r\n }\r\n\r\n public get foreignCurrencySymbol(): string {\r\n return this.currency ? this.currency.CurrencySymbol : null;\r\n }\r\n\r\n public get orderPending(): boolean {\r\n return this.salesorder.Status === SalesOrderStatus.Pending;\r\n }\r\n\r\n public get partsCount(): number {\r\n let itemCount = 0;\r\n\r\n if (this.salesorder.Parts && this.salesorder.IncludeParts) {\r\n itemCount = this.salesorder.Parts.length;\r\n }\r\n\r\n return itemCount;\r\n }\r\n\r\n public get equipmentCount(): number {\r\n let itemCount = 0;\r\n\r\n if (this.salesorder.Equipment && this.salesorder.IncludeEquipment) {\r\n itemCount = this.salesorder.Equipment.length;\r\n }\r\n\r\n return itemCount;\r\n }\r\n\r\n public get materialsCount(): number {\r\n let itemCount = 0;\r\n\r\n if (this.salesorder.Materials && this.salesorder.IncludeMaterials) {\r\n itemCount = this.salesorder.Materials.length;\r\n }\r\n\r\n return itemCount;\r\n }\r\n\r\n public get itemCount(): number {\r\n return this.partsCount +\r\n this.equipmentCount +\r\n this.materialsCount;\r\n }\r\n\r\n public get partsQuantity(): number {\r\n let partsQuantity = 0;\r\n\r\n if (this.salesorder.Parts && this.salesorder.IncludeParts) {\r\n partsQuantity = this.salesorder.Parts.map(x => x.Demand).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return partsQuantity;\r\n }\r\n\r\n public get equipmentQuantity(): number {\r\n let equipmentQuantity = 0;\r\n\r\n if (this.salesorder.Equipment && this.salesorder.IncludeEquipment) {\r\n equipmentQuantity = this.salesorder.Equipment.map(x => x.Demand).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return equipmentQuantity;\r\n }\r\n\r\n public get materialsQuantity(): number {\r\n return this.materialsCount;\r\n }\r\n\r\n public get totalQuantity(): number {\r\n return this.partsQuantity +\r\n this.equipmentQuantity +\r\n this.materialsQuantity;\r\n }\r\n\r\n public get partsPrice(): number {\r\n let partsPrice = 0;\r\n\r\n if (this.salesorder.Parts && this.salesorder.IncludeParts) {\r\n partsPrice = this.salesorder.Parts.map(x => (x.Demand * x.UnitPrice)).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return partsPrice;\r\n }\r\n\r\n public get equipmentPrice(): number {\r\n let equipmentPrice = 0;\r\n\r\n if (this.salesorder.Equipment && this.salesorder.IncludeEquipment) {\r\n equipmentPrice = this.salesorder.Equipment.map(x => x.TotalSellingPrice).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return equipmentPrice;\r\n }\r\n\r\n public get materialsPrice(): number {\r\n let materialsPrice = 0;\r\n\r\n if (this.salesorder.Materials && this.salesorder.IncludeMaterials) {\r\n materialsPrice = this.salesorder.Materials.map(x => x.SellingPrice).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return materialsPrice;\r\n }\r\n\r\n public get totalPrice(): number {\r\n return this.partsPrice +\r\n this.equipmentPrice +\r\n this.materialsPrice;\r\n }\r\n\r\n public get totalCarriage(): number {\r\n const equipmentCarriageSum = this.salesorder.Equipment.reduce((sum, equip) => sum + equip.Carriage, 0);\r\n return this.salesorder.Carriage + equipmentCarriageSum;\r\n }\r\n\r\n public get partsDespatched(): number {\r\n let partsDespatched = 0;\r\n\r\n if (this.salesorder.Parts && this.salesorder.IncludeParts) {\r\n partsDespatched = this.salesorder.Parts.map(x => x.Despatched).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return partsDespatched;\r\n }\r\n\r\n public get equipmentDespatched(): number {\r\n let equipmentDespatched = 0;\r\n\r\n if (this.salesorder.Equipment && this.salesorder.IncludeEquipment) {\r\n equipmentDespatched = this.salesorder.Equipment.map(x => x.Despatched).reduce((a, b) => {\r\n return a + b;\r\n }, 0);\r\n }\r\n\r\n return equipmentDespatched;\r\n }\r\n\r\n public get materialsDespatched(): number {\r\n let materialsDespatched = 0;\r\n\r\n if (this.salesorder.Materials && this.salesorder.IncludeMaterials) {\r\n materialsDespatched = this.salesorder.Materials.filter(x => x.Despatched).length;\r\n }\r\n\r\n return materialsDespatched;\r\n }\r\n\r\n public get totalDespatched(): number {\r\n return this.partsDespatched +\r\n this.equipmentDespatched +\r\n this.materialsDespatched;\r\n }\r\n\r\n public get SalesOrderDisabled(): boolean {\r\n return !this.salesorder || (this.salesorder.Status >= SalesOrderStatus.Placed || this.salesorder.Status === SalesOrderStatus.Cancelled);\r\n }\r\n\r\n public get InstructionsDisabled(): boolean {\r\n return !this.salesorder ||\r\n this.salesorder.Status === SalesOrderStatus.Complete ||\r\n this.salesorder.Status === SalesOrderStatus.Cancelled ||\r\n this.salesorder.Status === SalesOrderStatus.Archived;\r\n }\r\n\r\n constructor() {\r\n this.baseCurrencySymbol = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.salesorder && changes.salesorder.currentValue) {\r\n this.salesOrderViewModel = new SalesOrderViewModel(changes.salesorder.currentValue);\r\n }\r\n }\r\n\r\n public currencyFormat(value: number): string {\r\n return formatCurrency(value ? value : 0,\r\n JSON.parse(localStorage.getItem(\"ls.UserBrowserLocale\")),\r\n this.currencySymbol);\r\n }\r\n\r\n public salesOpportunityValueChanged(salesOpportunityId: number): void {\r\n if (this.salesorder.SalesOpportunityId !== salesOpportunityId) {\r\n this.salesorder.SalesOpportunityId = salesOpportunityId;\r\n this.parentForm.form.markAsDirty();\r\n }\r\n }\r\n\r\n public toggleCurrency(): void {\r\n this.showInForeignCurrency = !this.showInForeignCurrency;\r\n }\r\n\r\n public prepareCurrencyValue(value: number): number {\r\n return this.showInForeignCurrency ? value * this.currency.ExchangeRateSales : value;\r\n }\r\n}\r\n","export class SalesOrderPartModel {\r\n LineId: number;\r\n StockHeaderId: number;\r\n Demand: number;\r\n UnitPrice: number;\r\n TotalCost: number;\r\n Despatched: number;\r\n Outstanding: number;\r\n Picked: number;\r\n Notes: string;\r\n OnPurchaseOrder: number;\r\n}\r\n","
\r\n
\r\n
\r\n \r\n {{ 'salesorder.parts.remove' | translate }}\r\n \r\n \r\n {{ 'salesorder.parts.raise-purchase-order' | translate }}\r\n \r\n \r\n {{ 'purchase-orders.show-pos' | translate }}\r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n\r\n \r\n {{ 'salesorder.parts.add' | translate }}\r\n \r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n
{{ (data.value * exchangeRate) | currency: currencySymbol }}
\r\n\r\n \r\n
\r\n {{ part.data.Notes }}\r\n
\r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n
\r\n {{ data.value | customDate: 'shortDate' }}\r\n
\r\n\r\n
\r\n purchaseOrderStatus.Pending && data.data.Status < purchaseOrderStatus.Complete\">\r\n {{ data.value | daysUntilNow }}\r\n \r\n
\r\n\r\n
\r\n
\r\n {{ item.value | purchaseOrderStatus | translate }}\r\n
\r\n
\r\n\r\n
\r\n {{ data.value | currency: baseCurrencySymbol }}\r\n
\r\n \r\n
\r\n
\r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{ currencySymbol }}\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import { formatCurrency } from \"@angular/common\";\r\nimport { Component, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { DxoGridComponent } from \"devextreme-angular/ui/nested\";\r\nimport ArrayStore from \"devextreme/data/array_store\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { PurchaseOrderStatus } from \"src/app/purchase-orders/enums/purchase-order-status.enum\";\r\nimport { DocumentTypeEnum } from \"servicesight-shared\";\r\nimport { StoreService } from \"src/app/settings/services/store.service\";\r\nimport { PartPurchaseOrderModel } from \"src/app/shared/models/part-purchase-order.model\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\nimport { SupplierService } from \"src/app/shared/services/supplier/supplier.service\";\r\nimport { StockService } from \"src/app/stock/services/stock.service\";\r\nimport { AddPartDialogueComponent } from \"../../shared/components/add-part-dialogue/add-part-dialogue.component\";\r\nimport { BulkPartOrderPopupComponent } from \"../../shared/components/bulk-part-order-popup/bulk-part-order-popup.component\";\r\nimport { ICurrency } from \"../../shared/models/icurrency.model\";\r\nimport { SalesOrderPartModel } from \"../models/sales-order-part.model\";\r\nimport { BulkPartOrderListModel } from \"../../shared/models/bulk-part-order-list-model\";\r\nimport { SalesOrder } from \"../models/sales-order.model\";\r\nimport { SalesOrderService } from \"../services/sales-order.service\";\r\nimport { LicenseService } from \"../../shared/services/licence/license.service\";\r\n\r\n\r\n@Component({\r\n selector: \"app-sales-order-parts\",\r\n templateUrl: \"./sales-order-parts.component.html\",\r\n styleUrls: [\"./sales-order-parts.component.scss\"]\r\n})\r\nexport class SalesOrderPartsComponent implements OnInit, OnChanges {\r\n\r\n @Input() public salesorder: SalesOrder = new SalesOrder();\r\n @Input() public currency: ICurrency;\r\n @Input() public parentForm: NgForm;\r\n @Input() public salesOrderDisabled: boolean = false;\r\n\r\n @ViewChild(AddPartDialogueComponent, { static: true }) addPartDialog: AddPartDialogueComponent;\r\n @ViewChild(\"PartsGrid\", { static: true }) PartsGrid: DxoGridComponent;\r\n @ViewChild(\"PoPartsPopup\", { static: true }) poPartsPopup: BulkPartOrderPopupComponent;\r\n\r\n public purchaseOrderStatus = PurchaseOrderStatus;\r\n public stockDataSource: DataSource;\r\n public stockPartsDataSource: ODataStore;\r\n public storeDataStore: ODataStore;\r\n public stockHeaderDataStore: ODataStore = null;\r\n public showMessage: boolean = false;\r\n public showSaveMessage: boolean = false;\r\n public SelectedLineIds: number[] = [];\r\n public baseCurrencySymbol: string = null;\r\n public showInForeignCurrency: boolean = false;\r\n public isProEnabled: boolean = false;\r\n public partsListDataSource: DataSource;\r\n public purchaseOrderParts: PartPurchaseOrderModel[];\r\n public suppliersDataStore: ODataStore;\r\n public colCountByScreen: object = {\r\n lg: 4,\r\n md: 4,\r\n sm: 2,\r\n xs: 1\r\n };\r\n\r\n private purchaseOrderMaterialsDataSourceStorage = [];\r\n\r\n public get isForeignCustomer(): boolean {\r\n return this.currency && this.currency.IsForeignCustomer;\r\n }\r\n\r\n public get currencySymbol(): string {\r\n return this.showInForeignCurrency ? this.currency.CurrencySymbol : this.baseCurrencySymbol;\r\n }\r\n\r\n // used to give unique line numbers to newly added parts\r\n private nextLineNumber: number = -1;\r\n\r\n public get exchangeRate(): number {\r\n return this.showInForeignCurrency ? this.salesorder.ExchangeRate ?? 1 : 1;\r\n }\r\n\r\n public get RaisePurchaseOrderDisabled(): boolean {\r\n let disabled = true;\r\n if (this.PartsGrid?.instance?.getSelectedRowsData) {\r\n const selectedParts = this.PartsGrid.instance.getSelectedRowsData();\r\n // raise po is disabled if\r\n // there are no selected parts\r\n // or\r\n // every selected part is on a purchase order\r\n disabled = !(selectedParts && selectedParts.length) || selectedParts.every(part => part.OnPurchaseOrder > 0);\r\n }\r\n return disabled;\r\n }\r\n\r\n constructor(\r\n private storeService: StoreService,\r\n private stockService: StockService,\r\n private salesOrderService: SalesOrderService,\r\n private suppliersService: SupplierService,\r\n private odataService: ODataService,\r\n private licenseService: LicenseService) {\r\n this.CalculateRowMargin = this.CalculateRowMargin.bind(this);\r\n this.CalculateTotalMargin = this.CalculateTotalMargin.bind(this);\r\n this.TotalSellingPrice = this.TotalSellingPrice.bind(this);\r\n this.onInitialize = this.onInitialize.bind(this);\r\n this.OnRowPrepared = this.OnRowPrepared.bind(this);\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(modules => {\r\n this.isProEnabled = modules.ProEnabled;\r\n });\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.baseCurrencySymbol = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n this.stockDataSource = this.stockService.GetStockStorePartsDataSource();\r\n this.stockPartsDataSource = this.stockService.GetStockStorePartsStore();\r\n this.storeDataStore = this.storeService.GetDataStore();\r\n this.stockHeaderDataStore = this.stockService.GetStockHeaders();\r\n this.suppliersDataStore = this.suppliersService.GetSupplierStore();\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.salesorder) {\r\n this.setupPartListDataSource();\r\n if (this.salesorder.Number) {\r\n this.salesOrderService.GetSalesOrderPartsPurchaseOrders(this.salesorder.Number).subscribe(x => {\r\n this.purchaseOrderParts = x;\r\n this.SetOnPOValue();\r\n });\r\n }\r\n }\r\n }\r\n\r\n public ExpandAllRowsWithChild(): void {\r\n this.salesorder.Parts.forEach(e => {\r\n if (this.CheckPurchaseOrderExist(e.LineId)) {\r\n this.PartsGrid.instance.expandRow(e.LineId);\r\n }\r\n });\r\n }\r\n\r\n public OnAddParts(): void {\r\n if (!this.salesorder.CustomerId) {\r\n this.showMessage = true;\r\n } else {\r\n if (this.salesorder.StoreId) {\r\n this.storeDataStore.byKey(this.salesorder.StoreId).then(x => {\r\n this.addPartDialog.SetTitle(x.StoreName);\r\n });\r\n }\r\n this.addPartDialog.Show(this.salesorder.StoreId);\r\n }\r\n }\r\n\r\n public OnHideMessage(): void {\r\n this.salesOrderService.NavigateToTab(0);\r\n }\r\n\r\n public OnPartsAdded(addedParts: { StockHeaderId: number; StoreId: number }[]): void {\r\n\r\n // handle case where sales order has been created but the Parts array hasn't\r\n if (this.salesorder && this.salesorder.Parts == null) {\r\n this.salesorder.Parts = [];\r\n }\r\n\r\n addedParts.forEach(async stockPart => {\r\n\r\n const partData = await this.stockPartsDataSource.byKey({ StockHeaderId: stockPart.StockHeaderId, StoreId: this.salesorder.StoreId });\r\n\r\n this.salesOrderService.GetPrice(stockPart.StockHeaderId, this.salesorder.CustomerId).subscribe((costAndPrice) => {\r\n\r\n const partModel = new SalesOrderPartModel();\r\n\r\n partModel.StockHeaderId = partData.StockHeaderId;\r\n partModel.Demand = 1;\r\n partModel.UnitPrice = costAndPrice.Price;\r\n partModel.Despatched = 0;\r\n partModel.Picked = 0;\r\n partModel.Notes = partData.Notes;\r\n partModel.TotalCost = costAndPrice.Cost;\r\n partModel.OnPurchaseOrder = 0;\r\n\r\n // assign a unique id to the line - the value doesn't matter as it is overwritten when the item is saved\r\n partModel.LineId = this.nextLineNumber--;\r\n\r\n this.salesorder.Parts.push(partModel);\r\n this.partsListDataSource.reload();\r\n });\r\n });\r\n\r\n this.SetFormDirty();\r\n }\r\n\r\n public OnRemoveSelectedParts(): void {\r\n this.salesorder.Parts = this.salesorder.Parts.filter(part => this.SelectedLineIds.indexOf(part.LineId) < 0);\r\n this.SetFormDirty();\r\n this.setupPartListDataSource();\r\n }\r\n\r\n public OnRaisePurchaseOrder(): void {\r\n const selectedParts = this.PartsGrid.instance.getSelectedRowsData() as SalesOrderPartModel[];\r\n\r\n if (selectedParts && selectedParts.length) {\r\n const needsSaving = selectedParts.some(part => part.LineId < 0);\r\n if (needsSaving) {\r\n this.showSaveMessage = true;\r\n return;\r\n }\r\n }\r\n\r\n Promise.all(\r\n selectedParts.map(async (part) => {\r\n const partData = await this.stockPartsDataSource.byKey({ StockHeaderId: part.StockHeaderId, StoreId: this.salesorder.StoreId });\r\n return { part, partData };\r\n })\r\n ).then(partData => {\r\n const partsToPurchase: BulkPartOrderListModel[] = partData.map(part => {\r\n return {\r\n StockHeaderId: part.part.StockHeaderId,\r\n QuantityOutstanding: part.part.Demand,\r\n PartId: part.part.LineId,\r\n PartNumber: part.partData.PartNo,\r\n PartDescription: part.partData.Description,\r\n StoreId: this.salesorder.StoreId\r\n };\r\n });\r\n\r\n this.poPartsPopup.Open(partsToPurchase, this.salesorder.Number, DocumentTypeEnum.SalesOrder, this.salesorder.CustomerId);\r\n });\r\n }\r\n\r\n public OnRowUpdated(event: any): void {\r\n if (event) {\r\n const part: SalesOrderPartModel = event.data;\r\n //TODO: To pass the correct store Id after PBI 45951 is done\r\n this.stockService.GetEstimatedCost(part.StockHeaderId, 1, part.Demand).subscribe(cost => part.TotalCost = cost);\r\n }\r\n this.SetFormDirty();\r\n }\r\n\r\n private CannotSelectPart(part: SalesOrderPartModel): boolean {\r\n return part.Despatched > 0;\r\n }\r\n\r\n public onInitialize(): void {\r\n this.salesorder.Parts.forEach(e => {\r\n if (e.Notes && this.PartsGrid.instance) {\r\n this.PartsGrid.instance.expandRow(e.LineId);\r\n }\r\n });\r\n }\r\n\r\n public OnRowPrepared(row: any): void {\r\n if (this.purchaseOrderParts && row.rowType === \"data\" && !row.data.Notes) {\r\n const foundElement = this.purchaseOrderParts\r\n .find(i => i.SubDocId === row.data.LineId && i.Status >= PurchaseOrderStatus.Pending && i.Status <= PurchaseOrderStatus.Complete);\r\n if (!foundElement) {\r\n const expandItems = row.rowElement.querySelector(\".dx-command-expand\");\r\n if (expandItems) {\r\n expandItems.firstChild.classList.remove(\"dx-datagrid-group-closed\");\r\n expandItems.firstChild.classList.remove(\"dx-datagrid-group-opened\");\r\n expandItems.classList.remove(\"dx-datagrid-expand\");\r\n }\r\n }\r\n }\r\n }\r\n\r\n public CheckPurchaseOrderExist(lineId: number): boolean {\r\n return this.purchaseOrderParts ? !!this.purchaseOrderParts.find(i => i.SubDocId === lineId) : false;\r\n }\r\n\r\n public GetPurchaseOrderParts(partId: number): DataSource {\r\n let item = this.purchaseOrderMaterialsDataSourceStorage.find(i => i.key === partId);\r\n if (!item) {\r\n item = {\r\n key: partId,\r\n dataSourceInstance: new DataSource({\r\n store: new ArrayStore({\r\n data: this.purchaseOrderParts,\r\n key: \"SubDocId\"\r\n }),\r\n filter: [[\"SubDocId\", \"=\", partId], \"and\", [\"Status\", \"<>\", PurchaseOrderStatus.AuthorisationReq], \"and\", [\"Status\", \"<>\", PurchaseOrderStatus.Cancelled]]\r\n })\r\n };\r\n this.purchaseOrderMaterialsDataSourceStorage.push(item);\r\n }\r\n return item.dataSourceInstance;\r\n }\r\n\r\n public OnEditorPreparing(row: any): void {\r\n // disable the select box if the part line has any despatched items\r\n // this displays the select box but it can still be clicked!\r\n if (row.command === \"select\") {\r\n if (row.parentType === \"dataRow\" && row.row) {\r\n if (this.CannotSelectPart(row.row.data)) {\r\n row.editorOptions.disabled = true;\r\n }\r\n }\r\n }\r\n }\r\n\r\n public OnSelectionChanged(grid: any): void {\r\n // if the checkbox is selected on a row for which it has been disabled, unselect it again\r\n const deselectedRowKeys: number[] = [];\r\n grid.selectedRowsData.forEach(row => {\r\n if (this.CannotSelectPart(row)) {\r\n deselectedRowKeys.push(row.LineId);\r\n }\r\n });\r\n if (deselectedRowKeys.length) {\r\n grid.component.deselectRows(deselectedRowKeys);\r\n }\r\n }\r\n\r\n public toggleCurrency(): void {\r\n this.showInForeignCurrency = !this.showInForeignCurrency;\r\n }\r\n\r\n public CalculateTotalSellingPrice(rowData: any): number {\r\n return rowData.Demand * rowData.UnitPrice;\r\n }\r\n\r\n public CalculateRowMargin(rowData: any): number {\r\n return this.CalculateMargin(rowData.Demand * rowData.UnitPrice, rowData.TotalCost);\r\n }\r\n\r\n public CalculateTotalMargin(): string {\r\n const totalPrice: number = this.salesorder.Parts.reduce((total, part) => total + (part.Demand * part.UnitPrice), 0);\r\n const totalCost: number = this.salesorder.Parts.reduce((total, part) => total + part.TotalCost, 0);\r\n const margin: number = this.CalculateMargin(totalPrice, totalCost);\r\n return margin ? `${Math.round(margin * 100)}%` : null;\r\n }\r\n\r\n public CurrencyFormat(data: any): string {\r\n return this.ToCurrency(data.value);\r\n }\r\n\r\n public GetQuantityOutstanding(data: SalesOrderPartModel): number {\r\n return data.Demand - data.Despatched;\r\n }\r\n\r\n public RepaintGrid(): void {\r\n this.PartsGrid.instance.repaint();\r\n }\r\n\r\n public TotalSellingPrice(data: any): string {\r\n const total: number = data.value * this.exchangeRate;\r\n return this.ToCurrency(total);\r\n }\r\n\r\n private ToCurrency(value: number): string {\r\n return formatCurrency(value,\r\n JSON.parse(localStorage.getItem(\"ls.UserBrowserLocale\")),\r\n this.currencySymbol);\r\n }\r\n\r\n private CalculateMargin(totalPrice: number, totalCost: number): number {\r\n const profit: number = totalPrice - totalCost;\r\n const margin: number = totalPrice ? (profit / totalPrice) : null;\r\n\r\n return margin;\r\n }\r\n\r\n private SetFormDirty(): void {\r\n this.parentForm.form.markAsDirty();\r\n }\r\n\r\n private setupPartListDataSource(): void {\r\n if (this.stockHeaderDataStore === null || this.stockHeaderDataStore === undefined) {\r\n this.stockHeaderDataStore = this.stockService.GetStockHeaders();\r\n }\r\n\r\n this.partsListDataSource = this.odataService.GetDataSourceWithLookups(\r\n this.salesorder.Parts,\r\n \"LineId\",\r\n [\r\n {\r\n store: this.stockHeaderDataStore,\r\n dataKey: \"StockHeaderId\",\r\n lookupKey: \"StockHeaderId\",\r\n displayExprs: [\"PartNo\", \"Description\"]\r\n }\r\n ]);\r\n }\r\n\r\n private SetOnPOValue(): void {\r\n this.salesorder.Parts.forEach(sale => {\r\n sale.OnPurchaseOrder = this.GetPurchaseOrderOutstandingQuantity(sale.LineId);\r\n });\r\n }\r\n\r\n private GetPurchaseOrderOutstandingQuantity(lineId: number): number {\r\n let outstandingTotal = 0;\r\n\r\n if (this.purchaseOrderParts) {\r\n\r\n const purchaseOrders = this.purchaseOrderParts.filter(i => i.LinkNumber === this.salesorder.Number && i.SubDocId === lineId);\r\n purchaseOrders.forEach(po => {\r\n if (po && po.Status >= PurchaseOrderStatus.Placed && po.Status <= PurchaseOrderStatus.PartReceived) {\r\n outstandingTotal += po.Outstanding;\r\n }\r\n });\r\n }\r\n return outstandingTotal;\r\n }\r\n}\r\n","import { Component, Input } from \"@angular/core\";\r\nimport { DocumentTypeEnum } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-sales-order-file\",\r\n templateUrl: \"./sales-order-file.component.html\",\r\n styleUrls: [\"./sales-order-file.component.scss\"]\r\n})\r\nexport class SalesOrderFileComponent {\r\n public docType = DocumentTypeEnum;\r\n @Input() salesOrderId: number;\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ 'accordion.entered-by' | translate }}\r\n {{ employee.Name }}\r\n
{{ 'accordion.quote-no' | translate }}\r\n \r\n {{salesOrder.SalesQuotationId}}/{{salesOrder.SalesQuotationRevisionId}}\r\n \r\n
{{ 'accordion.quote-total' | translate }}\r\n {{ quoteTotal | currency: currencySymbol }}\r\n
{{ 'accordion.cancelled' | translate }}{{salesOrder.CancelDate | date:'short'}}
{{ 'accordion.cancelled-by' | translate }}{{cancelledBy}}
{{ 'accordion.cancel-reason' | translate }}{{cancelReason.Name}}
\r\n","\r\n\r\n","import { Component, Input, OnChanges, SimpleChanges } from \"@angular/core\";\r\nimport { SalesOrder } from \"../../models/sales-order.model\";\r\nimport { CancellationReasonModel } from \"../../../jobs/models/cancellation-reason\";\r\nimport { Employee } from \"servicesight-shared\";\r\nimport { QuoteService } from \"src/app/quotes/services/quote.service\";\r\n\r\n@Component({\r\n selector: \"app-sales-order-accordion-detail\",\r\n templateUrl: \"./sales-order-accordion-detail.component.html\",\r\n styleUrls: [\"./sales-order-accordion-detail.component.scss\"]\r\n})\r\nexport class SalesOrderAccordionDetailComponent implements OnChanges {\r\n\r\n @Input() salesOrder: SalesOrder;\r\n @Input() cancelReason: CancellationReasonModel;\r\n @Input() cancelledBy: string;\r\n @Input() employee: Employee;\r\n public currencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n public quoteTotal: number;\r\n\r\n constructor(private quoteService: QuoteService) { }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n const employee = changes.employeee;\r\n const salesOrder = changes.salesOrder;\r\n\r\n if (employee && employee.currentValue !== employee.previousValue) {\r\n this.employee = employee.currentValue;\r\n }\r\n\r\n if (salesOrder && salesOrder.currentValue !== salesOrder.previousValue && !!this.salesOrder.SalesQuotationId) {\r\n this.quoteService.GetSalesTotal(this.salesOrder.SalesQuotationId, this.salesOrder.SalesQuotationRevisionId).subscribe(res => {\r\n this.quoteTotal = res;\r\n });\r\n }\r\n }\r\n}\r\n","{{ 'accordion.despatches.no-despatches' | translate}}\r\n 0\">\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{ 'accordion.despatch.despatch-no' | translate}}\r\n \r\n {{row.DespatchId}}\r\n \r\n {{row.DespatchDate | date: 'shortDate'}}\r\n \r\n {{row.Status | despatchNoteStatus | translate }}\r\n
\r\n","import { Component, Input } from \"@angular/core\";\r\nimport { DespatchNotesAccordionItem } from \"../../models/despatch-notes-accordion-item\";\r\n\r\n@Component({\r\n selector: \"app-sales-order-accordion-despatch\",\r\n templateUrl: \"./sales-order-accordion-despatch.component.html\",\r\n styleUrls: [\"./sales-order-accordion-despatch.component.scss\"]\r\n})\r\nexport class SalesOrderAccordionDespatchComponent {\r\n\r\n @Input() despatchNotes: DespatchNotesAccordionItem[];\r\n\r\n constructor() { }\r\n}\r\n","\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n","import { Component, Input, OnChanges, SimpleChanges } from \"@angular/core\";\r\nimport { SalesOrder } from \"../models/sales-order.model\";\r\nimport { EmployeeService } from \"../../shared/services/employee/employee.service\";\r\nimport { SalesOrderService } from \"../services/sales-order.service\";\r\nimport { CancellationReasonModel } from \"../../jobs/models/cancellation-reason\";\r\nimport { DocumentTypeEnum, Employee } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-sales-orders-accordion\",\r\n templateUrl: \"./sales-orders-accordion.component.html\",\r\n styleUrls: [\"./sales-orders-accordion.component.scss\"]\r\n})\r\nexport class SalesOrdersAccordionComponent implements OnChanges {\r\n\r\n @Input() salesOrder: SalesOrder;\r\n public documentType = DocumentTypeEnum;\r\n public employee: Employee;\r\n public cancelReason: CancellationReasonModel;\r\n public cancelledBy: string;\r\n\r\n public get ShowWarningNotes(): boolean {\r\n return this.isWarningNoteEyeVisible;\r\n }\r\n\r\n public get ShowCreditWarning(): boolean {\r\n return this.isCreditWarning;\r\n }\r\n\r\n private isWarningNoteEyeVisible: boolean = false;\r\n private isCreditWarning: boolean = false;\r\n\r\n public constructor(\r\n private employeeService: EmployeeService,\r\n private salesOrderService: SalesOrderService) { }\r\n\r\n public WarningNotesEye($event: boolean): void {\r\n this.isWarningNoteEyeVisible = !!$event;\r\n }\r\n\r\n public onCreditControl($event: boolean): void {\r\n this.isCreditWarning = !!$event;\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.salesOrder.currentValue && changes.salesOrder.previousValue) {\r\n const salesOrder = changes.salesOrder.currentValue;\r\n\r\n this.employeeService.GetEmployeeById(this.salesOrder.EmployeeId).subscribe(x => this.employee = x);\r\n\r\n if (salesOrder.CancelReasonId) {\r\n this.salesOrderService.GetCancelReasonById(salesOrder.CancelReasonId).subscribe(x => this.cancelReason = x);\r\n this.employeeService.GetEmployeeById(salesOrder.CancelledBy).subscribe(x => this.cancelledBy = x.Name);\r\n }\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

{{ 'salesorder.detail.sales-no' | translate }}  {{ id ? id : null }}

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

{{ salesorder.Status | salesOrderStatus | translate }}

\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import { Location } from \"@angular/common\";\r\nimport { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { DateOnlyService, DespatchNoteStatus, DocumentTypeEnum, FormMesssageService, Module, ModuleService } from \"servicesight-shared\";\r\nimport { SalesOrderStatus } from \"servicesight-shared\";\r\nimport { DespatchNotesService } from \"src/app/despatch-notes/services/despatch-notes.service\";\r\nimport { MessageService } from \"src/app/messages/services/message/message.service\";\r\nimport { CancelData } from \"src/app/quotes/models/CancelData\";\r\nimport { MessageDocTypeIds } from \"src/app/shared/enums/messages/message-doc-type-ids.enum\";\r\nimport { MessageTypes } from \"src/app/shared/enums/messages/message-types.enum\";\r\nimport { ICurrency } from \"src/app/shared/models/icurrency.model\";\r\nimport { CustomerService } from \"src/app/shared/services/customer/customer.service\";\r\nimport { Ng1ReminderService } from \"src/app/shared/services/ng1-reminder.service\";\r\nimport { SalesOrder } from \"../models/sales-order.model\";\r\nimport { SalesOrderViewModel } from \"../models/sales-order.view-model\";\r\nimport { SalesOrderService } from \"../services/sales-order.service\";\r\n\r\n@Component({\r\n selector: \"app-sales-order\",\r\n templateUrl: \"./sales-order.component.html\",\r\n styleUrls: [\"./sales-order.component.scss\"]\r\n})\r\nexport class SalesOrderComponent implements OnInit {\r\n\r\n @ViewChild(\"salesorderForm\", { static: true }) form: NgForm;\r\n public readonly formName: string = \"salesorderForm\";\r\n public salesorder: SalesOrder = new SalesOrder();\r\n\r\n private previousId: number = 0;\r\n public id: number = 0;\r\n\r\n public partsEnabled: boolean = false;\r\n public equipmentEnabled: boolean = false;\r\n public salesOpportunitiesEnabled: boolean = false;\r\n public isLoading: boolean = false;\r\n public showCancelDialog: boolean = false;\r\n public showWarning: boolean = false;\r\n public showCompleteWarning: boolean = false;\r\n public currency: ICurrency;\r\n public orderStatus = SalesOrderStatus;\r\n public documentType = DocumentTypeEnum;\r\n public outstandingDespatchNotes = false;\r\n public activeTab: number = 0;\r\n private salesOrderViewModel: SalesOrderViewModel = new SalesOrderViewModel(this.salesorder);\r\n\r\n public get isNew(): boolean {\r\n return !this.salesorder || !this.salesorder.Number;\r\n }\r\n\r\n public get SalesOrderDisabled(): boolean {\r\n return this.isLoading || !this.salesorder || (this.salesorder.Status >= SalesOrderStatus.Placed || this.salesorder.Status === SalesOrderStatus.Cancelled);\r\n }\r\n\r\n public get placeOrderEnabled(): boolean {\r\n return this.salesorder &&\r\n (\r\n (this.salesorder.Materials && this.salesorder.Materials.length > 0 && this.salesorder.IncludeMaterials) ||\r\n (this.salesorder.Parts && this.salesorder.Parts.length > 0 && this.salesorder.IncludeParts) ||\r\n (this.salesorder.Equipment && this.salesorder.Equipment.length > 0 && this.salesorder.IncludeEquipment)\r\n ) &&\r\n this.salesorder.CustomerId > 0 &&\r\n this.salesorder.DeliveryId > 0;\r\n }\r\n\r\n public get despatchButtonDisabled(): boolean {\r\n return this.salesOrderViewModel.totalOutstanding === 0 || this.hasUndespatchedDespatchNote;\r\n }\r\n\r\n private hasUndespatchedDespatchNote: boolean = false;\r\n\r\n constructor(\r\n private messageService: MessageService,\r\n private route: ActivatedRoute,\r\n private service: SalesOrderService,\r\n private router: Router,\r\n private customerService: CustomerService,\r\n private formMessageService: FormMesssageService,\r\n private dateOnlyService: DateOnlyService,\r\n private moduleService: ModuleService,\r\n private despatchNoteService: DespatchNotesService,\r\n private ng1reminderService: Ng1ReminderService,\r\n private location: Location) { }\r\n\r\n public ngOnInit(): void {\r\n this.moduleService.GetEnabledModules().subscribe(x => {\r\n this.partsEnabled = x.includes(Module.Stock);\r\n this.equipmentEnabled = x.includes(Module.Equipment);\r\n this.salesOpportunitiesEnabled = x.includes(Module.SalesOpportunity);\r\n });\r\n\r\n this.service.navigateToTab.subscribe(index => this.activeTab = index);\r\n this.route.params.subscribe(params => {\r\n this.id = Number(params.id);\r\n if (this.id && this.id !== this.previousId) {\r\n this.previousId = this.id;\r\n this.LoadSalesOrder();\r\n } else {\r\n this.salesorder.DueDateUI = new Date(new Date().setHours(0, 0, 0, 0));\r\n this.salesorder.OrderDateUI = new Date(new Date().setHours(0, 0, 0, 0));\r\n }\r\n });\r\n }\r\n\r\n public NewReminder(): void {\r\n this.ng1reminderService.CreateSalesOrderReminder(this.id, this.salesorder.ContactId);\r\n }\r\n\r\n public NewMessage(): void {\r\n this.messageService.SetNewMessageParameters(0, MessageTypes.RefMessage, false, MessageDocTypeIds.SalesOrder, this.id);\r\n this.router.navigate([\"messages/newmessage\"]);\r\n }\r\n\r\n public CancelOrder(): void {\r\n if (this.salesorder.Status === SalesOrderStatus.PartiallyDispatched && this.salesOrderViewModel.totalOutstanding > 0) {\r\n this.showCompleteWarning = true;\r\n return;\r\n }\r\n this.showCancelDialog = true;\r\n }\r\n\r\n public ConfirmCancel(confirmed) {\r\n if (confirmed) {\r\n this.isLoading = true;\r\n this.formMessageService.RegisterObservable(this.service.Cancel(this.salesorder), this.formName).subscribe({\r\n next: res => {\r\n if (this.id) {\r\n this.LoadSalesOrder();\r\n } else {\r\n this.router.navigate([\"/sales-orders\", \"detail\", res.Number]);\r\n }\r\n },\r\n error: () => this.isLoading = false\r\n });\r\n }\r\n this.showCompleteWarning = false;\r\n }\r\n\r\n public PlaceOrder(): void {\r\n this.reclaculateDatesOnSave();\r\n this.formMessageService.RegisterObservable(this.service.Place(this.salesorder), this.formName).subscribe({\r\n next: res => {\r\n if (this.id) {\r\n this.LoadSalesOrder();\r\n } else {\r\n this.router.navigate([\"/sales-orders\", \"detail\", res.Number]);\r\n }\r\n },\r\n error: () => this.isLoading = false\r\n });\r\n }\r\n\r\n public Discard(): void {\r\n if (this.salesorder.Number) {\r\n this.LoadSalesOrder();\r\n } else {\r\n this.router.navigate([\"/sales-orders\", \"list\"]);\r\n }\r\n }\r\n\r\n public Save(customCallback: () => void = null): void {\r\n this.isLoading = true;\r\n this.reclaculateDatesOnSave();\r\n const func = this.salesorder.Number ? this.service.Update(this.salesorder) : this.service.Create(this.salesorder);\r\n this.formMessageService.RegisterObservable(func, this.formName).subscribe(res => {\r\n this.location.replaceState(`/sales-orders/detail/${res.Number}`);\r\n this.id = res.Number;\r\n this.setSalesOrder(res);\r\n if (customCallback !== null) {\r\n customCallback();\r\n }\r\n this.isLoading = false;\r\n }, () => this.isLoading = false);\r\n }\r\n\r\n public LoadSalesOrder(): void {\r\n this.isLoading = true;\r\n this.service.Get(this.id).subscribe({\r\n next: res => {\r\n this.setSalesOrder(res);\r\n this.service.Outstanding(this.salesorder.Number)\r\n .subscribe((outstanding) => this.outstandingDespatchNotes = outstanding);\r\n this.GetCurrency(this.salesorder.CustomerId);\r\n this.checkForUndespatchedDespatchNotes();\r\n this.isLoading = false;\r\n },\r\n error: () => this.isLoading = false\r\n });\r\n }\r\n\r\n public CopyOrder(): void {\r\n this.isLoading = true;\r\n this.salesorder.DueDateUI = new Date(new Date().setHours(0, 0, 0, 0));\r\n this.salesorder.OrderDateUI = new Date(new Date().setHours(0, 0, 0, 0));\r\n // eslint-disable-next-line id-blacklist\r\n this.salesorder.Number = 0;\r\n this.reclaculateDatesOnSave();\r\n this.formMessageService.RegisterObservable(this.service.Create(this.salesorder), this.formName).subscribe({\r\n next: res => {\r\n this.router.navigate([\"/sales-orders\", \"detail\", res.Number]);\r\n },\r\n error: () => this.isLoading = false\r\n });\r\n }\r\n\r\n public ViewOrder(): void {\r\n const salesOrderPrintOutUrl = [\"sales-orders\", \"report\", this.salesorder.Number];\r\n if (this.form.form.dirty && this.salesorder.Status === SalesOrderStatus.Pending) {\r\n this.Save(() => {\r\n this.router.navigate(salesOrderPrintOutUrl);\r\n });\r\n } else {\r\n this.router.navigate(salesOrderPrintOutUrl);\r\n }\r\n }\r\n\r\n public CloseCancelDialog(): void {\r\n this.showCancelDialog = false;\r\n }\r\n\r\n public SaveCancelDialog(data: CancelData): void {\r\n this.salesorder.CancelDate = data.CancelDate;\r\n this.salesorder.CancelReasonId = data.CancelReasonID;\r\n this.isLoading = true;\r\n this.formMessageService.RegisterObservable(this.service.Cancel(this.salesorder), this.formName).subscribe({\r\n next: res => {\r\n if (this.id) {\r\n this.LoadSalesOrder();\r\n } else {\r\n this.router.navigate([\"/sales-orders\", \"detail\", res.Number]);\r\n }\r\n },\r\n error: () => this.isLoading = false\r\n });\r\n\r\n this.CloseCancelDialog();\r\n }\r\n\r\n public Despatch(): void {\r\n if (this.salesOrderViewModel.totalOutstanding === 0) {\r\n this.showWarning = true;\r\n return;\r\n }\r\n this.isLoading = true;\r\n this.formMessageService.RegisterObservable(this.despatchNoteService.Create(this.salesorder.Number), this.formName).subscribe({\r\n next: res => {\r\n this.router.navigate([\"/despatch-notes\", \"detail\", res.Id]);\r\n },\r\n error: () => this.isLoading = false\r\n });\r\n }\r\n\r\n public RecallOrder(): void {\r\n this.isLoading = true;\r\n this.formMessageService.RegisterObservable(this.service.Recall(this.salesorder.Number), this.formName).subscribe({\r\n next: timestamp => {\r\n this.salesorder.Status = SalesOrderStatus.Pending;\r\n this.salesorder.Timestamp = timestamp;\r\n this.isLoading = false;\r\n },\r\n error: () => this.isLoading = false\r\n });\r\n }\r\n\r\n private setSalesOrder(salesOrder: SalesOrder): void {\r\n this.salesorder = salesOrder;\r\n this.salesOrderViewModel = new SalesOrderViewModel(this.salesorder);\r\n this.recalculateDatesOnLoad();\r\n }\r\n\r\n private GetCurrency(customerId: number): void {\r\n this.customerService.GetCustomerCurrency(customerId).subscribe(currency => this.currency = currency);\r\n }\r\n\r\n private reclaculateDatesOnSave(): void {\r\n this.salesorder.OrderDate = this.dateOnlyService.RecalculateDateOnSave(this.salesorder.OrderDateUI);\r\n this.salesorder.DueDate = this.dateOnlyService.RecalculateDateOnSave(this.salesorder.DueDateUI);\r\n }\r\n\r\n private recalculateDatesOnLoad(): void {\r\n this.salesorder.OrderDateUI = this.dateOnlyService.RecalculateDateOnLoad(this.salesorder.OrderDate);\r\n this.salesorder.DueDateUI = this.dateOnlyService.RecalculateDateOnLoad(this.salesorder.DueDate);\r\n }\r\n\r\n private checkForUndespatchedDespatchNotes(): void {\r\n this.despatchNoteService.GetDespatchNotesForSalesOrder(this.salesorder.Number).subscribe(dns => {\r\n // the button is disabled if any of them have not been despatched yet\r\n this.hasUndespatchedDespatchNote = dns.some(dn => dn.Status < DespatchNoteStatus.Despatched && dn.Status !== DespatchNoteStatus.Cancelled);\r\n });\r\n }\r\n}\r\n","import { NgModule } from \"@angular/core\";\r\nimport { RouterModule, Routes } from \"@angular/router\";\r\nimport { SalesOrdersListComponent } from \"servicesight-shared\";\r\nimport { SalesMarketingComponent } from \"./sales-marketing/sales-marketing.component\";\r\nimport { SalesOrderPreviewComponent } from \"./sales-order-preview/sales-order-preview.component\";\r\nimport { SalesOrderComponent } from \"./sales-order/sales-order.component\";\r\n\r\nconst routes: Routes = [\r\n { path: \"list\", component: SalesOrdersListComponent},\r\n { path: \"marketing\", component: SalesMarketingComponent},\r\n { path: \"detail/:id\", component: SalesOrderComponent},\r\n { path: \"report/:id\", component: SalesOrderPreviewComponent},\r\n { path: \"\", redirectTo: \"list\", pathMatch: \"full\"},\r\n { path: \"**\", redirectTo: \"list\"}\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class SalesOrdersRoutingModule {\r\n public static readonly Routes: Routes = routes;\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { ImportServerSummary } from \"src/app/shared/models/import/import-server-summary.model\";\r\nimport { ServiceContractHeaderUpload } from \"../models/service-contract-header-upload.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class ContractHeaderUploadService {\r\n private readonly contractUploadBaseUrl: string = \"\";\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private config: IAppConfig\r\n ) {\r\n this.contractUploadBaseUrl = `${this.config.apiLocations.ServiceContracts}HeaderUpload`;\r\n }\r\n\r\n public GetSample(): Observable {\r\n return this.http.get(`${this.contractUploadBaseUrl}`, { observe: \"response\", responseType: \"blob\" as \"json\" });\r\n }\r\n\r\n public Upload(rows: ServiceContractHeaderUpload[]): Observable {\r\n return this.http.post(this.contractUploadBaseUrl, rows);\r\n }\r\n\r\n public GetRemainingCount(): Observable {\r\n return this.http.get(`${this.contractUploadBaseUrl}/Progress`);\r\n }\r\n\r\n public GetSummary(): Observable {\r\n return this.http.get(`${this.contractUploadBaseUrl}/Summary`);\r\n }\r\n}\r\n","import { AfterViewInit, Component, OnDestroy, OnInit, ViewChild } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport * as moment from \"moment\";\r\nimport { AccountingService, DateOnlyService, ToasterService, ToastType } from \"servicesight-shared\";\r\nimport { ImporterComponent } from \"src/app/shared/components/importer/importer.component\";\r\nimport { ImportColumnDictionary } from \"src/app/shared/models/import/import-column-dictionary.model\";\r\nimport { ImportMap } from \"src/app/shared/models/import/import-map.model\";\r\nimport { ImportValidationObject } from \"src/app/shared/models/import/import-validation-object.model\";\r\nimport { ImportValidationFunc } from \"src/app/shared/models/import/import-validation.type\";\r\nimport { ServiceContractHeaderUpload } from \"../models/service-contract-header-upload.model\";\r\nimport { ContractHeaderUploadService } from \"../services/contract-header-upload.service\";\r\n\r\n@Component({\r\n selector: \"app-contract-header-upload\",\r\n templateUrl: \"./contract-header-upload.component.html\",\r\n styleUrls: [\"./contract-header-upload.component.scss\"]\r\n})\r\nexport class ContractHeaderUploadComponent implements OnInit, AfterViewInit, OnDestroy {\r\n @ViewChild(\"importer\", { static: true }) importer: ImporterComponent;\r\n\r\n public noMatch: number = -1;\r\n public contractMap: Map = new Map();\r\n public isProcessing: boolean = false;\r\n public remainingRows: number = 0;\r\n\r\n private poll: any;\r\n private isUSCompany: boolean = false;\r\n\r\n public defaultMap: ImportColumnDictionary = {\r\n ContractNo: { displayName: \"service.contract.upload.contract.no\", value: this.noMatch, required: true },\r\n CustomerAlpha: { displayName: \"service.contract.upload.customer.acc.no\", value: this.noMatch, required: true },\r\n ContractType: { displayName: \"service.contract.upload.type\", value: this.noMatch, required: true },\r\n OrderNo: { displayName: \"service.contract.upload.order.no\", value: this.noMatch },\r\n RenewalDate: { displayName: \"service.contract.upload.renewal.date\", value: this.noMatch },\r\n InvoiceCycle: { displayName: \"service.contract.upload.invoice.cycle\", value: this.noMatch, required: true },\r\n ContractCharge: { displayName: \"service.contract.upload.contract.charge\", value: this.noMatch },\r\n UserRef1: { displayName: \"service.contract.upload.userref1\", value: this.noMatch },\r\n UserRef2: { displayName: \"service.contract.upload.userref2\", value: this.noMatch },\r\n Notes: { displayName: \"service.contract.upload.notes\", value: this.noMatch },\r\n Start: { displayName: \"service.contract.upload.start-contract\", value: this.noMatch }\r\n };\r\n\r\n public defaultMapper: { [key: string]: string } = {\r\n ContractNo: \"ContractNo\",\r\n Contractno: \"ContractNo\",\r\n contractNo: \"ContractNo\",\r\n contractno: \"ContractNo\",\r\n CustomerAlpha: \"CustomerAlpha\",\r\n Customeralpha: \"CustomerAlpha\",\r\n customerAlpha: \"CustomerAlpha\",\r\n customeralpha: \"CustomerAlpha\",\r\n CustomerAccNo: \"CustomerAlpha\",\r\n CustomeraccNo: \"CustomerAlpha\",\r\n CustomerAccno: \"CustomerAlpha\",\r\n customerAccNo: \"CustomerAlpha\",\r\n customeraccNo: \"CustomerAlpha\",\r\n customerAccno: \"CustomerAlpha\",\r\n customeraccno: \"CustomerAlpha\",\r\n AccountCode: \"AccountCode\",\r\n Accountcode: \"AccountCode\",\r\n accountCode: \"AccountCode\",\r\n accountcode: \"AccountCode\",\r\n ContractType: \"ContractType\",\r\n Contracttype: \"ContractType\",\r\n contractType: \"ContractType\",\r\n contracttype: \"ContractType\",\r\n OrderNo: \"OrderNo\",\r\n Orderno: \"OrderNo\",\r\n orderNo: \"OrderNo\",\r\n orderno: \"OrderNo\",\r\n RenewalDate: \"RenewalDate\",\r\n Renewaldate: \"RenewalDate\",\r\n renewalDate: \"RenewalDate\",\r\n renewaldate: \"RenewalDate\",\r\n InvoiceCycle: \"InvoiceCycle\",\r\n Invoicecycle: \"InvoiceCycle\",\r\n invoiceCycle: \"InvoiceCycle\",\r\n invoicecycle: \"InvoiceCycle\",\r\n ContractCharge: \"ContractCharge\",\r\n Contractcharge: \"ContractCharge\",\r\n contractCharge: \"ContractCharge\",\r\n contractcharge: \"ContractCharge\",\r\n UserRef1: \"UserRef1\",\r\n Userref1: \"UserRef1\",\r\n userRef1: \"UserRef1\",\r\n userref1: \"UserRef1\",\r\n UserRef2: \"UserRef2\",\r\n Userref2: \"UserRef2\",\r\n userRef2: \"UserRef2\",\r\n userref2: \"UserRef2\",\r\n Notes: \"Notes\",\r\n notes: \"Notes\",\r\n Start: \"Start\",\r\n start: \"Start\"\r\n };\r\n\r\n public preDefinedMaps: Array = [\r\n {\r\n columns: [\r\n \"Contract No\",\r\n \"Customer Acc No\",\r\n \"Contract Type\",\r\n \"Order No\",\r\n \"Renewal Date\",\r\n \"Invoice Cycle\",\r\n \"Contract Charge\",\r\n \"Contract User Ref 1\",\r\n \"Contract User Ref 2\",\r\n \"Notes\",\r\n \"Start Contract\"\r\n ],\r\n name: \"ServiceSight\",\r\n map: {\r\n ContractNo: { displayName: \"service.contract.upload.contract.no\", value: 0 },\r\n CustomerAlpha: { displayName: \"service.contract.upload.customer.acc.no\", value: 1 },\r\n ContractType: { displayName: \"service.contract.upload.type\", value: 2 },\r\n OrderNo: { displayName: \"service.contract.upload.order.no\", value: 3 },\r\n RenewalDate: { displayName: \"service.contract.upload.renewal.date\", value: 4 },\r\n InvoiceCycle: { displayName: \"service.contract.upload.invoice.cycle\", value: 5 },\r\n ContractCharge: { displayName: \"service.contract.upload.contract.charge\", value: 6 },\r\n UserRef1: { displayName: \"service.contract.upload.userref1\", value: 7 },\r\n UserRef2: { displayName: \"service.contract.upload.userref2\", value: 8 },\r\n Notes: { displayName: \"service.contract.upload.notes\", value: 9 },\r\n Start: { displayName: \"service.contract.upload.start-contract\", value: 10 }\r\n }\r\n }\r\n ];\r\n\r\n public columnValidations: ImportValidationObject = {\r\n ContractNo: (val) => !isNaN(val),\r\n CustomerAlpha: (val) => val && val.toString().length <= 52,\r\n ContractType: (val) => val && val.toString().length > 0,\r\n OrderNo: (val) => !val || val.toString().length <= 30,\r\n RenewalDate: (val) => !val || this.validDate(val),\r\n InvoiceCycle: (val) => {\r\n if (!val) {\r\n return false;\r\n }\r\n\r\n const invoiceCycle = val.trim().toLowerCase();\r\n return invoiceCycle === \"daily\" ||\r\n invoiceCycle === \"weekly\" ||\r\n invoiceCycle === \"monthly\" ||\r\n invoiceCycle === \"quarterly\" ||\r\n invoiceCycle === \"yearly\" ||\r\n invoiceCycle === \"annual\";\r\n },\r\n ContractCharge: (val) => !val || !isNaN(val),\r\n UserRef1: () => true,\r\n UserRef2: () => true,\r\n Notes: (val) => !val || val.toString().length <= 50,\r\n Start: (val) => {\r\n if (!val) {\r\n return true;\r\n }\r\n\r\n const startContactValue = val.trim().toLowerCase();\r\n return startContactValue === \"y\" ||\r\n startContactValue === \"n\" ||\r\n startContactValue === \"yes\" ||\r\n startContactValue === \"no\";\r\n }\r\n };\r\n\r\n public converters = {\r\n RenewalDate: this.parseDate.bind(this)\r\n };\r\n\r\n public rowValidator: ImportValidationFunc = (row: ServiceContractHeaderUpload) => {\r\n const errors: string[] = [];\r\n const key = `${row.ContractNo}`;\r\n const isDuplicateContract = this.contractMap.has(key);\r\n\r\n if (!isDuplicateContract) {\r\n this.contractMap.set(key, true);\r\n } else {\r\n errors.push(this.translateService.instant(\"service.contract.upload.contract.duplicate\", { ContractNo: row.ContractNo }));\r\n }\r\n\r\n return {\r\n isValid: !isDuplicateContract,\r\n errors\r\n };\r\n };\r\n\r\n constructor(\r\n private translateService: TranslateService,\r\n private contractHeaderUploadService: ContractHeaderUploadService,\r\n private toasterService: ToasterService,\r\n private router: Router,\r\n private accountsLinkService: AccountingService,\r\n private dateOnlyService: DateOnlyService\r\n ) {\r\n this.rowValidator = this.rowValidator.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.accountsLinkService.GetAccountsInfo().subscribe(response => {\r\n this.isUSCompany = response.IsUsaTaxSystem;\r\n });\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n moment.locale(JSON.parse(localStorage.getItem(\"ls.UserBrowserLocale\")).toLowerCase());\r\n this.getRemainingCount();\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n if (this.poll) {\r\n clearTimeout(this.poll);\r\n this.poll = null;\r\n }\r\n }\r\n\r\n public reset(): void {\r\n this.contractMap.clear();\r\n }\r\n\r\n public getSample(): void {\r\n this.contractHeaderUploadService.GetSample().subscribe(response => {\r\n const fileName = this.isUSCompany ? \"servicecontracts-sample-us.csv\" : \"servicecontracts-sample.csv\";\r\n const contentType = \"text/csv\";\r\n const blob = new Blob([response.body], { type: contentType });\r\n const data = window.URL.createObjectURL(blob);\r\n const link = document.createElement(\"a\");\r\n link.hidden = true;\r\n link.href = data;\r\n link.download = fileName;\r\n document.body.appendChild(link);\r\n link.click();\r\n document.body.removeChild(link);\r\n setTimeout(() => {\r\n // For Firefox it is necessary to delay revoking the ObjectURL\r\n window.URL.revokeObjectURL(data);\r\n }, 100);\r\n });\r\n }\r\n\r\n public upload(rows: ServiceContractHeaderUpload[]): void {\r\n this.isProcessing = true;\r\n\r\n this.contractHeaderUploadService.Upload(rows).subscribe(() => {\r\n this.getRemainingCount();\r\n }, () => {\r\n this.isProcessing = false;\r\n });\r\n }\r\n\r\n private getRemainingCount(): void {\r\n this.contractHeaderUploadService.GetRemainingCount().subscribe(remainingRows => {\r\n this.remainingRows = remainingRows;\r\n if (remainingRows > 0) {\r\n this.isProcessing = true;\r\n this.poll = setTimeout(this.getRemainingCount.bind(this), 3000);\r\n } else {\r\n if (this.isProcessing) {\r\n this.getSummary();\r\n }\r\n\r\n this.isProcessing = false;\r\n if (this.poll) {\r\n clearTimeout(this.poll);\r\n this.poll = null;\r\n }\r\n }\r\n });\r\n }\r\n\r\n private getSummary(): void {\r\n this.contractHeaderUploadService.GetSummary().subscribe(response => {\r\n if (response.FailedRows === 0) {\r\n this.toasterService.pop(\"service.contract.upload.contract.complete\", ToastType.medium);\r\n this.router.navigate([\"/contract/list\"]);\r\n } else {\r\n this.toasterService.pop(\"service.contract.upload.contract.complete-with-errors\", ToastType.dark);\r\n this.importer.uploadError(response.FailedRows, response.Errors);\r\n }\r\n });\r\n }\r\n\r\n private validDate(val: any): boolean {\r\n return moment(val, \"L\").isValid();\r\n }\r\n\r\n private parseDate(val: string | Date) {\r\n // regex test for non empty string\r\n if (typeof val === \"string\") {\r\n return /\\S+/.test(val.toString()) ? moment(val, \"L\").toDate() : null;\r\n } else if (val && val.getDate) {\r\n return this.dateOnlyService.RecalculateDateOnLoad(this.dateOnlyService.ReverseUTC(val));\r\n }\r\n return val;\r\n }\r\n}\r\n","\r\n\r\n\r\n","
\r\n
\r\n
\r\n

{{ 'service.contract.service.contract' | translate }}

\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
{{ 'contract.marketing.top-strap' | translate }}
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n

{{ 'contract.marketing.features' | translate }}

\r\n
    \r\n
  • {{ 'contract.marketing.feature-1' | translate }}
  • \r\n
  • {{ 'contract.marketing.feature-2' | translate }}
  • \r\n
  • {{ 'contract.marketing.feature-3' | translate }}
  • \r\n
  • {{ 'contract.marketing.feature-4' | translate }}
  • \r\n
  • {{ 'contract.marketing.feature-5' | translate }}
  • \r\n
  • {{ 'contract.marketing.feature-6' | translate }}
  • \r\n
  • {{ 'contract.marketing.feature-7' | translate }}
  • \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

{{ 'contract.marketing.price-1' | translate: { price1: price1, price2: price2 } }}

\r\n

{{ 'contract.marketing.price-2' | translate: { price2: price2, price3: price3 } }}

\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { Component, OnInit } from \"@angular/core\";\r\nimport { DomSanitizer, SafeResourceUrl } from \"@angular/platform-browser\";\r\nimport { Module, ToasterService, ToastType } from \"servicesight-shared\";\r\nimport { AuthService } from \"../../shared/services/auth/auth.service\";\r\nimport { LicenseService } from \"../../shared/services/licence/license.service\";\r\n\r\nconst Ireland: number = 100;\r\nconst USA: number = 224;\r\n\r\n@Component({\r\n selector: \"app-contract-marketing\",\r\n templateUrl: \"./contract-marketing.component.html\",\r\n styleUrls: [\"./contract-marketing.component.scss\"]\r\n})\r\nexport class ContractMarketingComponent implements OnInit {\r\n\r\n public ready: boolean = false;\r\n public videoUrl: SafeResourceUrl;\r\n public price1: string = \"£10\";\r\n public price2: string = \"£15\";\r\n public price3: string = \"£30\";\r\n\r\n constructor(\r\n private authService: AuthService,\r\n private licenseService: LicenseService,\r\n private toaster: ToasterService,\r\n private sanitizer: DomSanitizer) { }\r\n\r\n ngOnInit(): void {\r\n this.licenseService.GetCompanyCountryId().then(countryId => {\r\n if (countryId === USA) {\r\n this.videoUrl = this.makeSafeUrl(\"1EQb9JPPs4o\");\r\n } else if (countryId === Ireland) {\r\n this.videoUrl = this.makeSafeUrl(\"f62S9E3FGPs\");\r\n this.price1 = \"€10\";\r\n this.price2 = \"€15\";\r\n this.price3 = \"€30\";\r\n } else {\r\n this.videoUrl = this.makeSafeUrl(\"nd1XvvuZdto\");\r\n }\r\n\r\n this.ready = true;\r\n });\r\n }\r\n\r\n public contactMe() {\r\n const companyId = this.authService.AuthorizationData.defaultcompanyid;\r\n const userName = this.authService.Username;\r\n\r\n this.licenseService.RequestContactMe(Module.ServiceContract, userName, companyId)\r\n .then(_ => this.toaster.pop(\"equipment.marketing.contact-me-confirm\", ToastType.medium));\r\n }\r\n\r\n private makeSafeUrl(videoId): SafeResourceUrl {\r\n const url = `https://www.youtube.com/embed/${videoId}?autoplay=1&loop=1&mute=1&playlist=${videoId}&controls=1&rel=0`;\r\n return this.sanitizer.bypassSecurityTrustResourceUrl(url);\r\n }\r\n\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { ImportServerSummary } from \"src/app/shared/models/import/import-server-summary.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class ContractSiteUploadService {\r\n\r\n constructor(\r\n @Inject(APP_CONFIG) private config: IAppConfig,\r\n private http: HttpClient\r\n ) { }\r\n\r\n public GetSample(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceContracts}ContractSiteUpload`, { observe: \"response\", responseType: \"blob\" as \"json\" });\r\n }\r\n\r\n public GetRemainingCount(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceContracts}ContractSiteUpload/Progress`);\r\n }\r\n\r\n public GetSummary(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceContracts}ContractSiteUpload/Summary`);\r\n }\r\n\r\n public Upload(rows: any[]): Observable {\r\n return this.http.post(`${this.config.apiLocations.ServiceContracts}ContractSiteUpload`, rows);\r\n }\r\n}\r\n","import { Component, OnDestroy, OnInit, ViewChild } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport * as moment from \"moment\";\r\nimport { DateOnlyService, ToasterService, ToastType } from \"servicesight-shared\";\r\nimport { ImporterComponent } from \"src/app/shared/components/importer/importer.component\";\r\nimport { ImportColumnDictionary } from \"src/app/shared/models/import/import-column-dictionary.model\";\r\nimport { ImportMap } from \"src/app/shared/models/import/import-map.model\";\r\nimport { ImportValidationObject } from \"src/app/shared/models/import/import-validation-object.model\";\r\nimport { ImportValidationFunc } from \"src/app/shared/models/import/import-validation.type\";\r\nimport { ContractSiteUpload } from \"./contract-site-upload.model\";\r\nimport { ContractSiteUploadService } from \"../services/contract-site-upload.service\";\r\n\r\n@Component({\r\n selector: \"app-contract-site-upload\",\r\n templateUrl: \"./contract-site-upload.component.html\",\r\n styleUrls: [\"./contract-site-upload.component.scss\"]\r\n})\r\nexport class ContractSiteUploadComponent implements OnInit, OnDestroy {\r\n private poll: any;\r\n\r\n @ViewChild(\"importer\", { static: true }) importer: ImporterComponent;\r\n\r\n public noMatch: number = -1;\r\n public isProcessing: boolean = false;\r\n public remainingRows: number = 0;\r\n public contractSiteMap: Map = new Map();\r\n\r\n public defaultMap: ImportColumnDictionary = {\r\n ContractNo: { displayName: \"service.contract.upload.contract.no\", value: this.noMatch, required: true },\r\n Site: { displayName: \"service.contract.sites.acc.no\", value: this.noMatch, required: true },\r\n StartDate: { displayName: \"service.contract.sites.start.date\", value: this.noMatch, required: true },\r\n EndDate: { displayName: \"service.contract.sites.end.date\", value: this.noMatch },\r\n InvoiceFrom: { displayName: \"service.contract.sites.invoice.from\", value: this.noMatch, required: true },\r\n Charge: { displayName: \"service.contract.sites.charge\", value: this.noMatch }\r\n };\r\n\r\n public defaultMaps: { [key: string]: string } = {\r\n ContractNo: \"ContractNo\",\r\n contractNo: \"ContractNo\",\r\n contractno: \"ContractNo\",\r\n Site: \"Site\",\r\n site: \"Site\",\r\n SiteAccNo: \"Site\",\r\n siteaccno: \"Site\",\r\n AccNo: \"Site\",\r\n accno: \"Site\",\r\n StartDate: \"StartDate\",\r\n startDate: \"StartDate\",\r\n startdate: \"StartDate\",\r\n EndDate: \"EndDate\",\r\n endDate: \"EndDate\",\r\n enddate: \"EndDate\",\r\n InvoiceFrom: \"InvoiceFrom\",\r\n invoiceFrom: \"InvoiceFrom\",\r\n invoicefrom: \"InvoiceFrom\",\r\n invoicefromdate: \"InvoiceFrom\",\r\n From: \"InvoiceFrom\",\r\n from: \"InvoiceFrom\",\r\n Charge: \"Charge\",\r\n charge: \"Charge\"\r\n };\r\n\r\n public preDefinedMaps: Array = [\r\n {\r\n columns: [\"Contract No\", \"Site Acc No\", \"Start Date\", \"End Date\", \"Invoice From\", \"Charge\"],\r\n name: \"ServiceSight\",\r\n map: {\r\n ContractNo: { displayName: \"service.contract.upload.contract.no\", value: 0 },\r\n Site: { displayName: \"service.contract.sites.acc.no\", value: 1 },\r\n StartDate: { displayName: \"service.contract.sites.start.date\", value: 2 },\r\n EndDate: { displayName: \"service.contract.sites.end.date\", value: 3 },\r\n InvoiceFrom: { displayName: \"service.contract.sites.invoice.from\", value: 4 },\r\n Charge: { displayName: \"service.contract.sites.charge\", value: 5 }\r\n }\r\n }\r\n ];\r\n\r\n public columnValidations: ImportValidationObject = {\r\n ContractNo: (val) => !isNaN(val),\r\n Site: (val) => val.toString().length <= 19,\r\n StartDate: (val) => this.validDate(val),\r\n EndDate: (val) => !val || this.validDate(val),\r\n InvoiceFrom: (val) => this.validDate(val),\r\n Charge: (val) => !val || !isNaN(val) && Number(val) >= 0\r\n };\r\n\r\n public converters = {\r\n StartDate: this.parseDate.bind(this),\r\n EndDate: this.parseDate.bind(this),\r\n InvoiceFrom: this.parseDate.bind(this)\r\n };\r\n\r\n private validDate(val: any): boolean {\r\n return moment(val).isValid() || moment(val, \"L\").isValid();\r\n }\r\n\r\n public rowValidator: ImportValidationFunc = (row: ContractSiteUpload) => {\r\n const errors: string[] = [];\r\n const key = `${row.ContractNo}.${row.Site}`;\r\n const isDuplicateSiteContract = this.contractSiteMap.has(key);\r\n\r\n if (!isDuplicateSiteContract) {\r\n this.contractSiteMap.set(key, true);\r\n } else {\r\n errors.push(this.translateService.instant(\"service.contract.upload.sites.duplicate\", row));\r\n }\r\n\r\n if (row.EndDate && new Date(row.StartDate) > new Date(row.EndDate)) {\r\n errors.push(this.translateService.instant(\"service.contract.upload.sites.date-error\", row));\r\n }\r\n\r\n return {\r\n isValid: errors.length === 0,\r\n errors\r\n };\r\n };\r\n\r\n constructor(\r\n private router: Router,\r\n private contractSiteUploadService: ContractSiteUploadService,\r\n private toasterService: ToasterService,\r\n private translateService: TranslateService,\r\n private dateOnlyService: DateOnlyService\r\n ) {\r\n this.rowValidator = this.rowValidator.bind(this);\r\n }\r\n\r\n public ngOnInit() {\r\n moment.locale(JSON.parse(localStorage.getItem(\"ls.UserBrowserLocale\")).toLowerCase());\r\n this.getRemainingCount();\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n if (this.poll) {\r\n clearTimeout(this.poll);\r\n this.poll = null;\r\n }\r\n }\r\n\r\n public reset(): void {\r\n this.contractSiteMap.clear();\r\n }\r\n\r\n public getSample(): void {\r\n this.contractSiteUploadService.GetSample().subscribe(response => {\r\n const contentType = \"text/csv\";\r\n const blob = new Blob([response.body], { type: contentType });\r\n const data = window.URL.createObjectURL(blob);\r\n const link = document.createElement(\"a\");\r\n link.hidden = true;\r\n link.href = data;\r\n link.download = \"servicecontractsites-sample.csv\";\r\n document.body.appendChild(link);\r\n link.click();\r\n document.body.removeChild(link);\r\n setTimeout(() => {\r\n // For Firefox it is necessary to delay revoking the ObjectURL\r\n window.URL.revokeObjectURL(data);\r\n }, 100);\r\n });\r\n }\r\n\r\n public upload(rows: ContractSiteUpload[]): void {\r\n this.isProcessing = true;\r\n\r\n this.contractSiteUploadService.Upload(rows).subscribe(() => {\r\n this.getRemainingCount();\r\n }, () => {\r\n this.isProcessing = false;\r\n });\r\n }\r\n\r\n public getRemainingCount(): void {\r\n this.contractSiteUploadService.GetRemainingCount().subscribe(s => {\r\n this.remainingRows = s;\r\n if (s > 0) {\r\n this.isProcessing = true;\r\n this.poll = setTimeout(this.getRemainingCount.bind(this), 3000);\r\n } else {\r\n if (this.isProcessing) {\r\n this.getSummary();\r\n }\r\n\r\n this.isProcessing = false;\r\n if (this.poll) {\r\n clearTimeout(this.poll);\r\n this.poll = null;\r\n }\r\n }\r\n });\r\n }\r\n\r\n private getSummary(): void {\r\n this.contractSiteUploadService.GetSummary().subscribe(res => {\r\n if (res.FailedRows === 0) {\r\n this.toasterService.pop(\"service.contract.upload.sites.complete\", ToastType.medium);\r\n this.router.navigate([\"/contracts/list\"]); // TODO: check this\r\n } else {\r\n this.toasterService.pop(\"service.contract.upload.sites.completewitherrors\", ToastType.dark);\r\n res.Errors = res.Errors.map(row => {\r\n row.Errors = row.Errors.map(e => this.translateService.instant(e));\r\n return row;\r\n });\r\n this.importer.uploadError(res.FailedRows, res.Errors);\r\n }\r\n });\r\n }\r\n\r\n private parseDate(val: string | Date) {\r\n // regex test for non empty string\r\n if (typeof val === \"string\") {\r\n return /\\S+/.test(val.toString()) ? this.dateOnlyService.RecalculateDateOnSave(moment(val, \"L\").toDate()) : null;\r\n } else if (val && val.getDate) {\r\n return this.dateOnlyService.ReverseUTC(val);\r\n }\r\n return val;\r\n }\r\n}\r\n","\r\n\r\n","export enum InvCycle {\r\n Daily = 2,\r\n Weekly = 3,\r\n Monthly = 5,\r\n Quarterly = 6,\r\n Annually = 8\r\n}\r\n","import { ServiceContractStatus } from \"servicesight-shared\";\r\nimport { ServiceContractEquipmentModel } from \"./service-contract-equipment.model\";\r\nimport { ServiceContractSite } from \"./service-contract-site.model\";\r\n\r\nexport class ServiceContractModel {\r\n constructor() {\r\n this.ContractEquipmentList = new Array();\r\n this.Sites = new Array();\r\n }\r\n ContractId: number;\r\n Status: ServiceContractStatus;\r\n CustomerId: number;\r\n ContractTypeId: number;\r\n ContractType: string;\r\n Reference: string;\r\n RenewalDate: Date;\r\n UserRef1Id: number;\r\n UserRef2: string;\r\n Notes: string;\r\n ContractEquipmentList: ServiceContractEquipmentModel[];\r\n Sites: ServiceContractSite[];\r\n InvCycleId: number;\r\n InvoiceGroupingId: number;\r\n ExchangeRate: number;\r\n InvoiceText: string;\r\n FlatCharge: number;\r\n CurrencySymbol: string;\r\n CancelDate?: Date;\r\n CancelReasonId?: number;\r\n CancelledBy?: string;\r\n SalesQuotationId?: number;\r\n SalesQuotationRevisionId?: number;\r\n IsInvoiced: boolean;\r\n SalesOpportunityId?: number;\r\n ReverseChargeVAT: boolean;\r\n DefaultInvoiceFrequency: number = 1;\r\n}\r\n","{{ 'service.contract.accordion.no.contract' | translate }}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ 'service.contract.accordion.number' | translate }}\r\n {{ contract.ContractId }}\r\n
{{ 'service.contract.accordion.quote-no' | translate }}\r\n {{contract.SalesQuotationId}}/{{contract.SalesQuotationRevisionId}}\r\n
{{ 'service.contract.list.start.date' | translate }}\r\n {{ startDate | customDate: 'shortDate' }}\r\n
{{ 'service.contract.list.end.date' | translate }}\r\n {{ endDate | customDate: 'shortDate' }}\r\n
{{ 'service.contract.equipment' | translate }}\r\n {{ contract.ContractEquipmentList ? contract.ContractEquipmentList.length : 0 }}\r\n
{{ 'service.contract.sites' | translate }}\r\n {{ contract.Sites ? contract.Sites.length : 0 }}\r\n
{{ 'service.contract.accordion.total.value' | translate }}\r\n {{ totalSum | currency: currencySymbol }} {{ period | translate }}\r\n
{{ 'service.contract.cancellation.date' | translate }}\r\n {{ contract.CancelDate | customDate: 'shortDate' }}\r\n
{{ 'service.contract.cancellation.reason' | translate }}\r\n {{ cancelReason }}\r\n
{{ 'service.contract.accordion.cancelled.by' | translate }}\r\n {{ contract.CancelledBy }}\r\n
\r\n","import { Component, Input, OnInit } from \"@angular/core\";\r\nimport { CancellationReasonModel } from \"src/app/jobs/models/cancellation-reason\";\r\nimport { JobService } from \"src/app/jobs/services/job.service\";\r\nimport { InvCycle } from \"src/app/service-contracts/enums/inv-cycle.enum\";\r\nimport { ServiceContractModel } from \"src/app/service-contracts/models/service-contract.model\";\r\n\r\n@Component({\r\n selector: \"app-contract-accordion-item\",\r\n templateUrl: \"./contract-accordion-item.component.html\",\r\n styleUrls: [\"./contract-accordion-item.component.scss\"]\r\n})\r\nexport class ContractAccordionItemComponent implements OnInit {\r\n\r\n @Input() contract: ServiceContractModel;\r\n @Input() equipmentEnabled: boolean;\r\n\r\n private reasons: CancellationReasonModel[];\r\n public currencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n\r\n public get startDate(): Date {\r\n if (!this.contract) {\r\n return null;\r\n }\r\n const equipStartDate = this.contract.ContractEquipmentList.length > 0 ?\r\n this.contract.ContractEquipmentList.reduce((a, b) => a.StartDateUI < b.StartDateUI ? a : b).StartDateUI :\r\n null;\r\n const sitesStartDate = this.contract.Sites.length > 0 ? this.contract.Sites.reduce((a, b) => a.StartDateUI < b.StartDateUI ? a : b).StartDateUI : null;\r\n return !sitesStartDate || (equipStartDate && equipStartDate < sitesStartDate) ? equipStartDate : sitesStartDate;\r\n }\r\n\r\n public get endDate(): Date {\r\n if (!this.contract) {\r\n return null;\r\n }\r\n const equipEndDate = this.contract.ContractEquipmentList.length > 0 ? this.contract.ContractEquipmentList.reduce((a, b) => a.EndDateUI > b.EndDateUI ? a : b).EndDateUI : null;\r\n const sitesEndDate = this.contract.Sites.length > 0 ? this.contract.Sites.reduce((a, b) => a.EndDateUI > b.EndDateUI ? a : b).EndDateUI : null;\r\n return !sitesEndDate || equipEndDate > sitesEndDate ? equipEndDate : sitesEndDate;\r\n }\r\n\r\n public get cancelReason(): string {\r\n return this.contract && this.reasons && this.contract.CancelReasonId ? this.reasons.find(i => i.CancelReasonID === this.contract.CancelReasonId).Name : null;\r\n }\r\n\r\n public get siteCharge(): number {\r\n return this.contract && this.contract.Sites ? this.contract.Sites.reduce((a, b) => a + (b.Charge || 0), 0) : 0;\r\n }\r\n\r\n public get equipmentCharge(): number {\r\n return this.contract && this.contract.ContractEquipmentList ? this.contract.ContractEquipmentList.reduce((a, b) => a + (b.Charge || 0), 0) : 0;\r\n }\r\n\r\n public get totalSum(): number {\r\n return this.contract ? (this.siteCharge + this.equipmentCharge + (this.contract.FlatCharge ? Number(this.contract.FlatCharge) : 0)) : 0;\r\n }\r\n\r\n public get period(): string {\r\n if (!this.contract) {\r\n return null;\r\n }\r\n\r\n switch (this.contract.InvCycleId) {\r\n case InvCycle.Daily:\r\n return \"service.contract.accordion.per.day\";\r\n case InvCycle.Weekly:\r\n return \"service.contract.accordion.per.week\";\r\n case InvCycle.Monthly:\r\n return \"service.contract.accordion.per.month\";\r\n case InvCycle.Quarterly:\r\n return \"service.contract.accordion.per.quarter\";\r\n case InvCycle.Annually:\r\n return \"service.contract.accordion.per.year\";\r\n }\r\n }\r\n\r\n constructor(\r\n private jobService: JobService) { }\r\n\r\n ngOnInit() {\r\n this.jobService.GetCancelationReasons()\r\n .subscribe((res) => this.reasons = res);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n

{{ 'service.contract.detail.references' | translate }}

\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n\r\n","import { Component, Input, OnChanges, OnInit, SimpleChanges } from \"@angular/core\";\r\nimport { ControlContainer, UntypedFormControl, NgForm } from \"@angular/forms\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport {\r\n CustomerService,\r\n CustomerStatus,\r\n IUserReferences,\r\n ServiceContractStatus,\r\n UICustomisation,\r\n UserRefType,\r\n UserReferenceService\r\n} from \"servicesight-shared\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { ServiceContractModel } from \"../models/service-contract.model\";\r\nimport { ServiceContractService } from \"../services/service-contract.service\";\r\n\r\n@Component({\r\n selector: \"app-contract-detail\",\r\n templateUrl: \"./contract-detail.component.html\",\r\n styleUrls: [\"./contract-detail.component.scss\"],\r\n viewProviders: [ { provide: ControlContainer, useExisting: NgForm } ]\r\n})\r\nexport class ContractDetailComponent implements OnInit, OnChanges {\r\n @Input() contract: ServiceContractModel;\r\n @Input() form: UntypedFormControl;\r\n public userRef1DataSource: DataSource;\r\n public customersDataSource: DataSource;\r\n public contractTypesDataSource: DataSource;\r\n public model: ServiceContractModel;\r\n public userRef1Label: string;\r\n public userRef2Label: string;\r\n public UICustomisations: IUserReferences;\r\n public showWarningPopup = false;\r\n public oldCustomerId: number;\r\n public saleOppEnabled: boolean = false;\r\n\r\n constructor(\r\n private customerODataService: CustomerService,\r\n private service: ServiceContractService,\r\n private userRefsService: UserReferenceService,\r\n private licenseService: LicenseService) {\r\n this.model = new ServiceContractModel();\r\n }\r\n\r\n public get ContractFixed(): boolean {\r\n return this.contract.Status >= ServiceContractStatus.Terminated || this.contract.Status === ServiceContractStatus.Cancelled;\r\n }\r\n\r\n ngOnInit() {\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(result => {\r\n this.saleOppEnabled = result.SalesOpportunityEnabled;\r\n });\r\n this.customersDataSource = this.customerODataService.GetCustomersDataSource();\r\n this.customersDataSource.filter(c => c.InvoiceId === c.CustomerId && c.Status === CustomerStatus.ACTIVE);\r\n this.contractTypesDataSource = this.service.GetContractTypesDataSource();\r\n this.userRef1DataSource = this.userRefsService.getListDataSource(UserRefType.MAINTENANCE_CONTRACT_1);\r\n this.GetUserReferences();\r\n this.onLoad();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (changes.contract.currentValue.ContractId) {\r\n this.onLoad();\r\n }\r\n }\r\n\r\n public OnCustomerChanged(e: any) {\r\n if (e.event && !this.contract.ContractId && (this.contract.ContractEquipmentList.length > 0 || this.contract.Sites.length > 0)) {\r\n this.oldCustomerId = e.previousValue;\r\n this.showWarningPopup = true;\r\n } else if (e.event) {\r\n this.contract.CustomerId = e.value;\r\n this.UpdateInvoiceGroupingId();\r\n this.service.ContractCustomerChanged(e.value);\r\n }\r\n }\r\n\r\n public OnConirmChangeCustomer(isConfirmed: boolean): void {\r\n if (isConfirmed) {\r\n this.UpdateInvoiceGroupingId();\r\n this.service.ContractCustomerChanged(this.contract.CustomerId);\r\n } else {\r\n this.contract.CustomerId = this.oldCustomerId;\r\n }\r\n\r\n this.showWarningPopup = false;\r\n }\r\n\r\n private UpdateInvoiceGroupingId(): void {\r\n this.customerODataService.GetCustomerSimpleModel(this.contract.CustomerId).subscribe(c => {\r\n this.contract.InvoiceGroupingId = c.InvGroupingID;\r\n });\r\n }\r\n\r\n private GetUserReferences(): void {\r\n this.userRef1Label = this.userRefsService.getLabel(UICustomisation.MAINT_CONTRACT_REF1);\r\n this.userRef2Label = this.userRefsService.getLabel(UICustomisation.MAINT_CONTRACT_REF2);\r\n }\r\n\r\n private onLoad(): void {\r\n this.customersDataSource.load()\r\n .then(() => this.contractTypesDataSource.load())\r\n .then(() => this.userRef1DataSource.load())\r\n .then(() => {\r\n this.model = this.contract;\r\n });\r\n }\r\n\r\n public salesOpportunityValueChanged(salesOpportunityId: number): void {\r\n if (this.contract.SalesOpportunityId !== salesOpportunityId) {\r\n this.contract.SalesOpportunityId = salesOpportunityId;\r\n this.form.markAsDirty();\r\n }\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { InvCycle } from \"../enums/inv-cycle.enum\";\r\n\r\n@Pipe({\r\n name: \"invCycle\"\r\n})\r\nexport class InvCyclePipe implements PipeTransform {\r\n\r\n private readonly cycle = {\r\n [InvCycle.Daily]: \"service.contract.invoicing.daily\",\r\n [InvCycle.Weekly]: \"service.contract.invoicing.weekly\",\r\n [InvCycle.Monthly]: \"service.contract.invoicing.monthly\",\r\n [InvCycle.Quarterly]: \"service.contract.invoicing.quarterly\",\r\n [InvCycle.Annually]: \"service.contract.invoicing.annually\",\r\n };\r\n\r\n transform(value: any): any {\r\n return this.cycle[value];\r\n }\r\n}\r\n","
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
{{ data.value | currency: baseCurrencySymbol }}
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
{{ item.data.Status | equipmentStatus | translate }}
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n\r\n","import { formatCurrency, formatDate } from \"@angular/common\";\r\nimport {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnDestroy,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { UntypedFormControl } from \"@angular/forms\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Subscription } from \"rxjs\";\r\nimport { CustomerService, EquipmentDataService, EquipmentStatus, Module, ServiceContractStatus } from \"servicesight-shared\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { ServiceContractEquipmentModel } from \"../models/service-contract-equipment.model\";\r\nimport { ServiceContractModel } from \"../models/service-contract.model\";\r\nimport { InvCyclePipe } from \"../pipes/inv-cycle.pipe\";\r\nimport { ServiceContractService } from \"../services/service-contract.service\";\r\n\r\n@Component({\r\n selector: \"app-contract-equipment\",\r\n templateUrl: \"./contract-equipment.component.html\",\r\n styleUrls: [\"./contract-equipment.component.scss\"],\r\n providers: [InvCyclePipe]\r\n})\r\nexport class ContractEquipmentComponent implements OnInit, OnChanges, OnDestroy {\r\n @Input() contract: ServiceContractModel;\r\n @Input() form: UntypedFormControl;\r\n @Output() equipmentChanged: EventEmitter = new EventEmitter();\r\n @ViewChild(\"grid\") private dataGrid: DxDataGridComponent;\r\n @ViewChild(\"equipmentgrid\") private newEquipmentDataGrid: DxDataGridComponent;\r\n\r\n private equipLookup: any[] = [];\r\n\r\n public equipmentDataSource: DataSource;\r\n public allEquipmentDataStore: ODataStore;\r\n public usedEquipment: number[] = [];\r\n public sitesDataSource: DataSource;\r\n public selectedEquipIds: number[] = [];\r\n public selectedContractEquipIds: number[] = [];\r\n public SearchText: string = \"\";\r\n public newEquipmentSearchText: string = \"\";\r\n public baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n public BoundCalculateSummary = this.calculateSummary.bind(this);\r\n public showDialog = false;\r\n public today = new Date().setHours(0, 0, 0, 0);\r\n public lookup: any;\r\n public equipmentEnabled = false;\r\n public sitesLoaded = false;\r\n public customerSubscription: Subscription;\r\n public invCycleSubscription: Subscription;\r\n\r\n public newEquipmentFilters: any[] = [\r\n { StatusId: EquipmentStatus.Stock, Status: this.translate.instant(\"equipment.status.stock\") },\r\n { StatusId: EquipmentStatus.ForHire, Status: this.translate.instant(\"equipment.status.forHire\") },\r\n { StatusId: EquipmentStatus.OnHire, Status: this.translate.instant(\"equipment.status.onHire\") },\r\n { StatusId: EquipmentStatus.Rental, Status: this.translate.instant(\"equipment.status.rental\") },\r\n { StatusId: EquipmentStatus.CustomersOwn, Status: this.translate.instant(\"equipment.status.customersOwn\") },\r\n { StatusId: EquipmentStatus.Sold, Status: this.translate.instant(\"equipment.status.sold\") }\r\n ];\r\n\r\n public newEquipmentFilterSelected: number = 0;\r\n\r\n public get isCustomerSelected() {\r\n return this.contract && this.contract.CustomerId;\r\n }\r\n\r\n public get ContractFixed(): boolean {\r\n return this.contract.Status >= ServiceContractStatus.Terminated || this.contract.Status === ServiceContractStatus.Cancelled;\r\n }\r\n private arr;\r\n private isRefreshing: boolean = false;\r\n\r\n constructor(\r\n private customerODataService: CustomerService,\r\n private equipmentService: EquipmentDataService,\r\n private service: ServiceContractService,\r\n private licenseService: LicenseService,\r\n private invCyclePipe: InvCyclePipe,\r\n private translate: TranslateService) {\r\n this.calculateEquipNumber = this.calculateEquipNumber.bind(this);\r\n this.calculateMakeModel = this.calculateMakeModel.bind(this);\r\n this.calculateSite = this.calculateSite.bind(this);\r\n this.calculateLocation = this.calculateLocation.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.customerSubscription = this.service.contractCustomerChanged.subscribe(() => {\r\n this.contract.ContractEquipmentList = new Array();\r\n this.usedEquipment = new Array();\r\n this.selectedEquipIds = new Array();\r\n this.loadData();\r\n });\r\n\r\n this.invCycleSubscription = this.service.contractInvCycleChanged.subscribe(() => {\r\n this.calculateCaption();\r\n });\r\n\r\n this.licenseService.GetCompanyHasAccessToModule(Module.Equipment).subscribe(enabled => {\r\n if (enabled) {\r\n this.equipmentEnabled = enabled;\r\n this.loadDataSources();\r\n }\r\n });\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.contract &&\r\n changes.contract.currentValue.CustomerId &&\r\n (\r\n !changes.contract.previousValue ||\r\n changes.contract.currentValue.CustomerId !== changes.contract.previousValue.CustomerId\r\n )) {\r\n this.loadData();\r\n }\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.customerSubscription.unsubscribe();\r\n this.invCycleSubscription.unsubscribe();\r\n }\r\n\r\n public EquipDataLookup(equipId: number, key: string): string {\r\n const equipment = this.EquipDataSource(equipId);\r\n if (equipment) {\r\n return equipment[key];\r\n }\r\n\r\n return \"loading\";\r\n }\r\n\r\n public calculateFilterExpression(filterValue) {\r\n const column = this as any;\r\n return [ column.calculateCellValue, \"contains\", filterValue ];\r\n }\r\n\r\n public calculateEquipNumber(rowData): any {\r\n return this.EquipDataLookup(rowData.EquipId, \"EquipNumber\");\r\n }\r\n\r\n public calculateSite(rowData): any {\r\n return this.EquipDataLookup(rowData.EquipId, \"SiteName\");\r\n }\r\n\r\n public calculateLocation(rowData): any {\r\n return this.EquipDataLookup(rowData.EquipId, \"Location\");\r\n }\r\n\r\n public calculateMakeModel(rowData): any {\r\n return `${this.EquipDataLookup(rowData.EquipId, \"Make\")}/${this.EquipDataLookup(rowData.EquipId, \"Model\")}`;\r\n }\r\n\r\n public OnContentReady(): void {\r\n if (this.contract.InvCycleId) {\r\n this.calculateCaption();\r\n }\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public SetDisplayValue(item: any): string {\r\n return `${item.Make}/${item.Model}`;\r\n }\r\n\r\n public TotalText(data: any): string {\r\n return formatCurrency(data.value,\r\n JSON.parse(localStorage.getItem(\"ls.UserBrowserLocale\")),\r\n JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\")));\r\n }\r\n\r\n public RemoveLabel(data: any): string {\r\n return formatDate(data.value, \"shortDate\", JSON.parse(localStorage.getItem(\"ls.UserBrowserLocale\")));\r\n }\r\n\r\n public RemoveCount(data: any): string {\r\n return data.value;\r\n }\r\n\r\n public ShowAddEquipmentDialogue(): void {\r\n this.selectedEquipIds = [];\r\n this.filterUsedEquipment().then(() => {\r\n this.showDialog = true;\r\n document.querySelector(\"body\").style.overflow = \"hidden\";\r\n });\r\n }\r\n\r\n public AddEquipment(): void {\r\n if (this.selectedEquipIds.length > 0) {\r\n this.usedEquipment = this.usedEquipment.concat(this.selectedEquipIds);\r\n\r\n let startDate: Date;\r\n let invoiceDate: Date;\r\n let endDate: Date;\r\n if (!this.contract.ContractEquipmentList.length) {\r\n startDate = new Date(new Date().setHours(0, 0, 0, 0));\r\n invoiceDate = new Date(new Date().setHours(0, 0, 0, 0));\r\n } else {\r\n const lastElement = this.contract.ContractEquipmentList[this.contract.ContractEquipmentList.length - 1];\r\n startDate = lastElement.StartDateUI;\r\n invoiceDate = lastElement.InvoiceFromUI;\r\n endDate = lastElement.EndDateUI;\r\n }\r\n\r\n const newData: ServiceContractEquipmentModel[] = this.selectedEquipIds.map(i => { // adds contract equipment to the model\r\n return {\r\n ContractId: this.contract.ContractId,\r\n EquipId: i,\r\n StartDateUI: startDate,\r\n InvoiceFromUI: invoiceDate,\r\n EndDateUI: endDate,\r\n SiteId: undefined,\r\n Charge: undefined\r\n };\r\n });\r\n\r\n this.contract.ContractEquipmentList = this.contract.ContractEquipmentList.concat(newData);\r\n this.equipmentChanged.emit(this.contract);\r\n }\r\n\r\n this.FormMarkDirty();\r\n this.showDialog = false;\r\n }\r\n\r\n public RemoveEquipment(): void {\r\n if (this.selectedContractEquipIds) {\r\n this.usedEquipment = this.usedEquipment.filter((a) => this.selectedContractEquipIds.indexOf(a) < 0);\r\n this.selectedContractEquipIds // removes contract equipment from the model\r\n .forEach(f => {\r\n return this.contract.ContractEquipmentList.splice(this.contract.ContractEquipmentList.findIndex(e => e.EquipId === f), 1);\r\n });\r\n this.equipmentChanged.emit(this.contract);\r\n this.FormMarkDirty();\r\n }\r\n }\r\n\r\n public CloseAddEquipmentDialogue(): void {\r\n this.showDialog = false;\r\n }\r\n\r\n public DialogClosed(): void {\r\n document.querySelector(\"body\").style.overflow = \"\";\r\n }\r\n\r\n public DialogOpened(): void {\r\n this.newEquipmentDataGrid?.instance?.repaint();\r\n }\r\n\r\n public FormMarkDirty(): void {\r\n this.form.markAsDirty();\r\n }\r\n\r\n public FilterChanged($event): void {\r\n const filterValue = $event.currentTarget.value;\r\n if (filterValue === \"0\") {\r\n this.dataGrid.instance.clearFilter();\r\n } else if (filterValue === \"1\") {\r\n this.dataGrid.instance.filter(this.filterActive.bind(this));\r\n } else if (filterValue === \"2\") {\r\n this.dataGrid.instance.filter(this.filterInactive.bind(this));\r\n }\r\n }\r\n\r\n public NewEquipmentSearchTextChanged(): void {\r\n this.newEquipmentDataGrid.instance.searchByText(encodeURI(this.newEquipmentSearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public NewEquipmentFilterChanged(event): void {\r\n const newValue = Number(event.target.value);\r\n\r\n if (newValue !== this.newEquipmentFilterSelected) {\r\n this.newEquipmentFilterSelected = newValue;\r\n this.filterUsedEquipment().then();\r\n }\r\n }\r\n\r\n public ValidateEndDate(data): boolean {\r\n if (data.data.EndDateUI && (new Date(data.data.EndDateUI) < new Date(data.data.StartDateUI))) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n private EquipDataSource(equipId: number): any {\r\n if (this.equipLookup[equipId] === undefined) {\r\n this.equipLookup[equipId] = null;\r\n\r\n this.allEquipmentDataStore.byKey(equipId).then(equipment => {\r\n this.equipLookup[equipId] = equipment;\r\n });\r\n }\r\n\r\n return this.equipLookup[equipId];\r\n }\r\n\r\n private calculateCaption(): void {\r\n if (this.contract.InvCycleId) {\r\n const chargePeriod = this.invCyclePipe.transform(this.contract.InvCycleId);\r\n const newCaption = this.translate.instant(chargePeriod) + \" \" + this.translate.instant(\"service.contract.equipment.charge.small.letters\");\r\n this.dataGrid.instance.columnOption(\"Charge\", \"caption\", newCaption);\r\n }\r\n }\r\n\r\n private filterActive(item: ServiceContractEquipmentModel): boolean {\r\n const started = new Date(item.StartDateUI) <= new Date(this.today);\r\n const notFinished = !item.EndDateUI || (new Date(item.EndDateUI) >= new Date(this.today));\r\n return started && notFinished;\r\n }\r\n\r\n private filterInactive(item: ServiceContractEquipmentModel): boolean {\r\n const notStarted = new Date(item.StartDateUI) > new Date(this.today);\r\n const finished = item.EndDateUI && (new Date(item.EndDateUI) < new Date(this.today));\r\n return notStarted || finished;\r\n }\r\n\r\n private filterUsedEquipment(): Promise {\r\n const sitesRows = this.sitesDataSource\r\n .items()\r\n .filter((s) => s.InvoiceId === this.contract.CustomerId)\r\n .map((s) => s.CustomerId);\r\n\r\n const filter = [];\r\n filter.push([\"Status\", \"<>\", EquipmentStatus.Retired]);\r\n\r\n if (this.newEquipmentFilterSelected !== 0) {\r\n filter.push(\"and\");\r\n filter.push([\"Status\", \"=\", this.newEquipmentFilterSelected]);\r\n }\r\n\r\n if (this.usedEquipment.length) {\r\n const equipmentFilter = [];\r\n this.usedEquipment.forEach(x => {\r\n equipmentFilter.push([\"EquipId\", \"<>\", x]);\r\n equipmentFilter.push(\"and\");\r\n });\r\n equipmentFilter.pop();\r\n filter.push(\"and\");\r\n filter.push([equipmentFilter]);\r\n }\r\n\r\n if (sitesRows.length) {\r\n const sitesFilter = [];\r\n sitesRows.forEach(x => {\r\n sitesFilter.push([\"SiteId\", \"=\", x]);\r\n sitesFilter.push(\"or\");\r\n });\r\n sitesFilter.pop();\r\n filter.push(\"and\");\r\n filter.push([sitesFilter]);\r\n }\r\n\r\n this.equipmentDataSource.filter(filter);\r\n return this.equipmentDataSource.load();\r\n }\r\n\r\n private calculateSummary(options: any): void {\r\n if (options.name === \"distinct\") {\r\n if (options.summaryProcess === \"start\") {\r\n this.arr = [];\r\n options.totalValue = 0;\r\n }\r\n if (options.summaryProcess === \"calculate\") {\r\n if (options.value === \"loading\") {\r\n if (!this.isRefreshing) {\r\n this.isRefreshing = true;\r\n setTimeout(() => {\r\n this.dataGrid.instance.refresh();\r\n this.isRefreshing = false;\r\n }, 250);\r\n }\r\n return;\r\n }\r\n if (this.arr.indexOf(options.value) === -1) {\r\n options.totalValue = options.totalValue + 1;\r\n }\r\n this.arr.push(options.value);\r\n }\r\n }\r\n }\r\n\r\n private loadDataSources() {\r\n this.allEquipmentDataStore = this.equipmentService.GetEquipmentDataStore();\r\n this.equipmentDataSource = this.equipmentService.GetEquipmentDataSource(true);\r\n this.sitesDataSource = new DataSource({\r\n store: this.customerODataService.GetCustomerDataStore(),\r\n paginate: false,\r\n onChanged: () => setTimeout(() => this.sitesLoaded = true, 100)\r\n });\r\n this.sitesDataSource.load();\r\n }\r\n\r\n private loadData() {\r\n if (this.contract.CustomerId) {\r\n this.usedEquipment = this.contract.ContractEquipmentList.map((i) => i.EquipId);\r\n }\r\n }\r\n}\r\n","export class ServiceContractInvoice {\r\n ContractId: number;\r\n TaxPoint: Date;\r\n From: Date;\r\n To: Date;\r\n CycleCount: number;\r\n Preview: boolean;\r\n}\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { DateOnlyService, FormMesssageService } from \"servicesight-shared\";\r\nimport { InvCycle } from \"../enums/inv-cycle.enum\";\r\nimport { ServiceContractInvoice } from \"../models/service-contract-invoice.model\";\r\nimport { ServiceContractModel } from \"../models/service-contract.model\";\r\nimport { ServiceContractService } from \"../services/service-contract.service\";\r\n\r\n@Component({\r\n selector: \"app-contract-invoicing-dialogue\",\r\n templateUrl: \"./contract-invoicing-dialogue.component.html\",\r\n styleUrls: [\"./contract-invoicing-dialogue.component.scss\"]\r\n})\r\nexport class ContractInvoicingDialogueComponent implements OnChanges {\r\n\r\n @Input() contract: ServiceContractModel;\r\n @Input() isPreview: boolean;\r\n @Output() invoicing = new EventEmitter();\r\n\r\n @ViewChild(\"invoicecontractform\", { static: true }) form: NgForm;\r\n public readonly formName: string = \"invoicecontractform\";\r\n\r\n public model: ServiceContractInvoice = new ServiceContractInvoice();\r\n public isLoading = true;\r\n public translations = {\r\n [InvCycle.Daily]: \"service.contract.accordion.days\",\r\n [InvCycle.Weekly]: \"service.contract.accordion.weeks\",\r\n [InvCycle.Monthly]: \"service.contract.accordion.months\",\r\n [InvCycle.Quarterly]: \"service.contract.accordion.quarters\",\r\n [InvCycle.Annually]: \"service.contract.accordion.years\"\r\n };\r\n\r\n constructor(private formMessageService: FormMesssageService,\r\n private contractService: ServiceContractService,\r\n private dateOnlyService: DateOnlyService) { }\r\n\r\n public get invoiceFromDate(): Date {\r\n // Remove sites & equipment where the End date is greater than the invoice date.\r\n // We don't want to consider those lines for invoicing.\r\n const validEquips = this.contract.ContractEquipmentList.filter(eq => !eq.EndDate || eq.InvoiceFrom <= eq.EndDate);\r\n const equipInvoiceFrom = validEquips.length > 0 ?\r\n validEquips.reduce((a, b) => a.InvoiceFrom < b.InvoiceFrom ? a : b).InvoiceFrom :\r\n null;\r\n const validSites = this.contract.Sites.filter(s => !s.EndDate || s.InvoiceFrom <= s.EndDate);\r\n const sitesInvoiceFrom = validSites.length > 0 ?\r\n validSites.reduce((a, b) => a.InvoiceFrom < b.InvoiceFrom ? a : b).InvoiceFrom :\r\n null;\r\n return !equipInvoiceFrom || sitesInvoiceFrom < equipInvoiceFrom ? sitesInvoiceFrom : equipInvoiceFrom;\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.contract.currentValue.ContractId) {\r\n this.isLoading = false;\r\n this.model.ContractId = this.contract.ContractId;\r\n this.model.Preview = this.isPreview;\r\n this.model.TaxPoint = new Date(new Date().setHours(0, 0, 0, 0));\r\n this.model.CycleCount = this.contract.DefaultInvoiceFrequency;\r\n this.model.From = this.invoiceFromDate ? this.dateOnlyService.RecalculateDateOnLoad(new Date(this.invoiceFromDate)) : null;\r\n }\r\n }\r\n\r\n public InvoiceContract(): void {\r\n this.isLoading = true;\r\n this.model.TaxPoint = this.dateOnlyService.RecalculateDateOnSave(this.model.TaxPoint);\r\n this.model.From = this.dateOnlyService.RecalculateDateOnSave(this.model.From);\r\n this.model.To = this.dateOnlyService.RecalculateDateOnSave(this.model.To);\r\n\r\n this.formMessageService\r\n .RegisterObservable(this.contractService.InvoiceContract(this.model), this.formName)\r\n .subscribe((res) => {\r\n this.invoicing.emit(res.EntityId);\r\n });\r\n }\r\n\r\n public Discard(): void {\r\n this.invoicing.emit();\r\n }\r\n\r\n public CalculateUpToDate(): void {\r\n if (!this.model.From) {\r\n return;\r\n }\r\n const result = new Date(this.model.From.getFullYear(), this.model.From.getMonth(), this.model.From.getDate());\r\n switch (this.contract.InvCycleId) {\r\n case InvCycle.Daily:\r\n result.setDate(this.model.From.getDate() + this.model.CycleCount - 1);\r\n break;\r\n case InvCycle.Weekly:\r\n result.setDate(this.model.From.getDate() + this.model.CycleCount * 7 - 1);\r\n break;\r\n case InvCycle.Monthly:\r\n result.setMonth(this.model.From.getMonth() + this.model.CycleCount);\r\n result.setDate(result.getDate() - 1);\r\n break;\r\n case InvCycle.Quarterly:\r\n result.setMonth(this.model.From.getMonth() + this.model.CycleCount * 3);\r\n result.setDate(result.getDate() - 1);\r\n break;\r\n case InvCycle.Annually:\r\n result.setMonth(this.model.From.getMonth() + this.model.CycleCount * 12);\r\n result.setDate(result.getDate() - 1);\r\n break;\r\n }\r\n\r\n this.model.To = result;\r\n }\r\n}\r\n","\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
","
\r\n
\r\n

Charges

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

{{ 'service.contract.invoicing.invoice.option' | translate }}

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnDestroy,\r\n OnInit,\r\n Output,\r\n SimpleChanges\r\n} from \"@angular/core\";\r\nimport { ControlContainer, NgForm, UntypedFormControl } from \"@angular/forms\";\r\nimport { Subscription } from \"rxjs\";\r\nimport {\r\n CustomerService,\r\n DateOnlyService,\r\n FormMesssageService,\r\n IProteanResponse,\r\n ServiceContractStatus,\r\n SettingId,\r\n SettingsService\r\n} from \"servicesight-shared\";\r\nimport { InvCycle } from \"../enums/inv-cycle.enum\";\r\nimport { ServiceContractModel } from \"../models/service-contract.model\";\r\nimport { ServiceContractService } from \"../services/service-contract.service\";\r\n\r\n@Component({\r\n selector: \"app-contract-invoicing\",\r\n templateUrl: \"./contract-invoicing.component.html\",\r\n styleUrls: [\"./contract-invoicing.component.scss\"],\r\n viewProviders: [{ provide: ControlContainer, useExisting: NgForm }]\r\n})\r\nexport class ContractInvoicingComponent implements OnInit, OnChanges, OnDestroy {\r\n @Input() contract: ServiceContractModel;\r\n @Input() isEquipmentEnabled: boolean;\r\n @Input() form: UntypedFormControl;\r\n @Input() formName: string;\r\n @Output() load = new EventEmitter();\r\n\r\n public baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n public currentRate = 1;\r\n public currencySymbol = this.baseCurrencySymbol;\r\n public contractCurrencySymbol: string;\r\n public showCustomerCurrency = false;\r\n public foreignCurrencyCustomer = false;\r\n public invCycleArray: Array;\r\n public showInvoiceDialogue = false;\r\n private customerSubscription: Subscription;\r\n public isPreview: boolean;\r\n public reverseChargeVATEnabled: boolean = false;\r\n public reverseChargeVATDefaultValue: boolean = false;\r\n\r\n public get ContractFixed(): boolean {\r\n return this.contract.Status >= ServiceContractStatus.Terminated || this.contract.Status === ServiceContractStatus.Cancelled;\r\n }\r\n\r\n public get siteCharge(): number {\r\n return this.contract && this.contract.Sites ? this.contract.Sites.reduce((a, b) => a + (b.Charge || 0), 0) : 0;\r\n }\r\n\r\n public get equipmentCharge(): number {\r\n return this.contract && this.contract.ContractEquipmentList ? this.contract.ContractEquipmentList.reduce((a, b) => a + (b.Charge || 0), 0) : 0;\r\n }\r\n\r\n public get totalSum(): number {\r\n return this.contract ? (this.siteCharge + this.equipmentCharge + (this.contract.FlatCharge ? Number(this.contract.FlatCharge) : 0)) : 0;\r\n }\r\n\r\n public get isNew(): boolean {\r\n return !this.contract.ContractId;\r\n }\r\n\r\n public get isEditableFlatCharge(): boolean {\r\n const activeContract = !this.contract.ContractId ||\r\n (this.contract.Status > ServiceContractStatus.Cancelled &&\r\n this.contract.Status <= ServiceContractStatus.Active);\r\n return activeContract && !this.showCustomerCurrency;\r\n }\r\n\r\n public get invoicingDisabled(): boolean {\r\n if (!this.contract || !this.contract.ContractId) {\r\n return true;\r\n }\r\n\r\n if (this.contract.Status < ServiceContractStatus.Active || this.contract.Status === ServiceContractStatus.Completed) {\r\n return true;\r\n }\r\n const equipInvoiced = this.contract.ContractEquipmentList.length > 0 ? this.contract.ContractEquipmentList.every((i) => i.EndDate && i.EndDate < i.InvoiceFrom) : true;\r\n const sitesInvoiced = this.contract.Sites.length > 0 ? this.contract.Sites.every((i) => i.EndDate && i.EndDate < i.InvoiceFrom) : true;\r\n return equipInvoiced && sitesInvoiced;\r\n }\r\n\r\n constructor(\r\n private service: ServiceContractService,\r\n private dateOnlyService: DateOnlyService,\r\n private formMessageService: FormMesssageService,\r\n private settingService: SettingsService,\r\n private customerService: CustomerService) {\r\n this.invCycleArray = this.GetContractInvCycle();\r\n }\r\n\r\n ngOnInit(): void {\r\n if (this.contract.CustomerId) {\r\n this.setReverseChargeVAT(this.contract.CustomerId);\r\n }\r\n this.customerSubscription = this.service.contractCustomerChanged.subscribe((customerId) => {\r\n this.loadCurrency(customerId);\r\n this.setReverseChargeVAT(customerId);\r\n });\r\n this.settingService.getSetting(SettingId.ReverseChargeVat).subscribe((setting) => {\r\n this.reverseChargeVATEnabled = setting.ValueBool;\r\n });\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.contract && changes.contract.currentValue.CustomerId) {\r\n this.loadCurrency(changes.contract.currentValue.CustomerId);\r\n }\r\n\r\n if (changes.contract && changes.contract.currentValue.FlatCharge) {\r\n setTimeout(() => this.form.markAsPristine(), 100);\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.customerSubscription.unsubscribe();\r\n }\r\n\r\n public onDefaultInvoiceFrequencyValueChanged($event: any): void {\r\n if (!$event.target.value) {\r\n this.contract.DefaultInvoiceFrequency = 1;\r\n }\r\n }\r\n\r\n public OnExchangeRateChanged(): void {\r\n if (this.foreignCurrencyCustomer && this.showCustomerCurrency) {\r\n this.currentRate = this.contract.ExchangeRate;\r\n }\r\n }\r\n\r\n public ShowBaseCurrency(): void {\r\n this.showCustomerCurrency = !this.showCustomerCurrency;\r\n if (this.showCustomerCurrency) {\r\n this.currencySymbol = this.contractCurrencySymbol;\r\n this.currentRate = this.contract.ExchangeRate;\r\n } else {\r\n this.currencySymbol = this.baseCurrencySymbol;\r\n this.currentRate = 1;\r\n }\r\n }\r\n\r\n public OnInvCycleChange(e): void {\r\n this.service.ContractInvCycleChanged(e.target.value);\r\n }\r\n\r\n public InvoicePreview(): void {\r\n this.isPreview = true;\r\n this.showInvoicingDialogue();\r\n }\r\n\r\n public InvoiceImmediate(): void {\r\n this.isPreview = false;\r\n this.showInvoicingDialogue();\r\n }\r\n\r\n public OnCloseInvoiceDialogue(noteId: number): void {\r\n if (noteId) {\r\n this.goToInvoice(noteId);\r\n }\r\n this.showInvoiceDialogue = false;\r\n }\r\n\r\n private showInvoicingDialogue(): void {\r\n if (this.form.dirty) {\r\n this.reclaculateDatesOnSave();\r\n this.formMessageService\r\n .RegisterObservable(this.service.Save(this.contract), this.formName)\r\n .subscribe(() => {\r\n this.load.emit();\r\n if (!this.isPreview) {\r\n this.checkOrderNoAndShowDialogue();\r\n } else {\r\n this.showInvoiceDialogue = true;\r\n }\r\n });\r\n } else if (!this.isPreview) {\r\n this.checkOrderNoAndShowDialogue();\r\n } else {\r\n this.showInvoiceDialogue = true;\r\n }\r\n }\r\n\r\n private checkOrderNoAndShowDialogue(): void {\r\n this.formMessageService\r\n .RegisterObservable(this.service.OkToInvoiceContract(this.contract.ContractId), this.formName)\r\n .subscribe(() => {\r\n this.showInvoiceDialogue = true;\r\n });\r\n }\r\n\r\n private loadCurrency(customerId: number): void {\r\n this.service.GetCurrency(customerId).subscribe((currency) => {\r\n this.contractCurrencySymbol = currency.CurrencySymbol;\r\n this.foreignCurrencyCustomer = currency.IsForeignCustomer;\r\n if (!this.contract.ContractId) { // new service contract{\r\n this.contract.ExchangeRate = currency.ExchangeRateSales;\r\n }\r\n\r\n this.form.markAsPristine();\r\n });\r\n }\r\n\r\n private setReverseChargeVAT(customerId: number): void {\r\n if (this.isNew) {\r\n this.customerService.DefaultReverseChargeValue(customerId).subscribe((value) => {\r\n this.contract.ReverseChargeVAT = value.Value;\r\n });\r\n }\r\n }\r\n\r\n private GetContractInvCycle(): Array {\r\n return Object.keys(InvCycle)\r\n .filter((v) => !isNaN(Number(v)))\r\n .map(key => Number(key));\r\n }\r\n\r\n private goToInvoice(noteId: number): void {\r\n if (noteId > 0) {\r\n location.href = `/#/invoices/invoice/${noteId}`;\r\n }\r\n }\r\n\r\n private reclaculateDatesOnSave(): void {\r\n this.contract.ContractEquipmentList.forEach((i) => {\r\n i.StartDate = this.dateOnlyService.RecalculateDateOnSave(i.StartDate);\r\n i.InvoiceFrom = this.dateOnlyService.RecalculateDateOnSave(i.InvoiceFrom);\r\n if (i.EndDate) {\r\n i.EndDate = this.dateOnlyService.RecalculateDateOnSave(i.EndDate);\r\n }\r\n });\r\n }\r\n}\r\n","export class ServiceContractSite {\r\n SiteId: number;\r\n Charge: number;\r\n StartDate: Date;\r\n StartDateUI: Date;\r\n EndDate?: Date;\r\n EndDateUI?: Date;\r\n InvoiceFrom: Date;\r\n InvoiceFromUI: Date;\r\n}\r\n","
\r\n \r\n\r\n \r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n
\r\n
{{ data.value | currency: baseCurrencySymbol }}
\r\n \r\n
\r\n
\r\n\r\n\r\n","import { formatCurrency, formatDate } from \"@angular/common\";\r\nimport {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnDestroy,\r\n OnInit,\r\n Output,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { UntypedFormControl } from \"@angular/forms\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataStore from \"devextreme/data/odata/store\";\r\nimport { Subscription } from \"rxjs\";\r\nimport { ServiceContractStatus } from \"servicesight-shared\";\r\nimport { AddSiteDialogueComponent } from \"src/app/shared/components/add-site-dialogue/add-site-dialogue.component\";\r\nimport { ServiceContractEquipmentModel } from \"../models/service-contract-equipment.model\";\r\nimport { ServiceContractSite } from \"../models/service-contract-site.model\";\r\nimport { ServiceContractModel } from \"../models/service-contract.model\";\r\nimport { InvCyclePipe } from \"../pipes/inv-cycle.pipe\";\r\nimport { ServiceContractService } from \"../services/service-contract.service\";\r\n\r\n@Component({\r\n selector: \"app-contract-sites\",\r\n templateUrl: \"./contract-sites.component.html\",\r\n styleUrls: [\"./contract-sites.component.scss\"],\r\n providers: [InvCyclePipe] // todo: pull it up to the module\r\n})\r\nexport class ContractSitesComponent implements OnInit, OnDestroy {\r\n @Input() contract: ServiceContractModel;\r\n @Input() form: UntypedFormControl;\r\n @Input() sitesDataStore: DataStore;\r\n @Output() sitesChanged: EventEmitter = new EventEmitter();\r\n @ViewChild(\"addSitePopup\", { static: true }) popup: AddSiteDialogueComponent;\r\n @ViewChild(\"grid\") grid: DxDataGridComponent;\r\n\r\n selectedSites: ServiceContractSite[] = [];\r\n SearchText: string = \"\";\r\n filterValue: any = null;\r\n baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n today = new Date().setHours(0, 0, 0, 0);\r\n\r\n public lookup: any;\r\n public customerSubscription: Subscription;\r\n public invCycleSubscription: Subscription;\r\n\r\n /**\r\n * True if there's a customer on the contract\r\n */\r\n get isCustomerSelected() {\r\n return this.contract && this.contract.CustomerId;\r\n }\r\n\r\n public get alreadyAddedSites(): number[] {\r\n return this.contract.Sites.map(site => site.SiteId);\r\n }\r\n\r\n public get ContractFixed(): boolean {\r\n return this.contract.Status >= ServiceContractStatus.Terminated || this.contract.Status === ServiceContractStatus.Cancelled;\r\n }\r\n\r\n constructor(\r\n private serviceContractService: ServiceContractService,\r\n private translate: TranslateService,\r\n private invCyclePipe: InvCyclePipe,\r\n ) {\r\n }\r\n\r\n /**\r\n * onInit hook:\r\n * - Loads data sources\r\n * - Subscribes to Invoice cycle changes\r\n */\r\n ngOnInit() {\r\n this.customerSubscription = this.serviceContractService.contractCustomerChanged.subscribe(() => {\r\n this.contract.Sites = new Array();\r\n this.selectedSites = new Array();\r\n });\r\n\r\n this.invCycleSubscription = this.serviceContractService.contractInvCycleChanged.subscribe(() => {\r\n this.calculateCaption();\r\n });\r\n }\r\n\r\n /**\r\n * OnContentReady in dx-data-grid\r\n * Calculates the invoice caption\r\n */\r\n OnContentReady() {\r\n if (this.contract.InvCycleId) {\r\n this.calculateCaption();\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.customerSubscription.unsubscribe();\r\n this.invCycleSubscription.unsubscribe();\r\n }\r\n\r\n /**\r\n * Removes the selected sites from the contract\r\n */\r\n Remove() {\r\n this.selectedSites.forEach(site => {\r\n const index = this.contract.Sites.findIndex(s => s.SiteId === site.SiteId);\r\n if (index !== -1) {\r\n this.contract.Sites.splice(index, 1);\r\n }\r\n });\r\n this.FormMarkDirty();\r\n }\r\n\r\n /**\r\n * Shows the add site dialog\r\n */\r\n Add() {\r\n this.popup.Show();\r\n }\r\n\r\n /**\r\n * Standard grid search\r\n */\r\n SearchTextChanged() {\r\n this.grid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n /**\r\n * Handles The Filter being changed\r\n * @param $event The filter's value (\"0\", \"1\", or \"2\")\r\n */\r\n FilterChanged($event): void {\r\n const filterValue = $event.currentTarget.value;\r\n if (filterValue === \"0\") {\r\n this.grid.instance.clearFilter();\r\n } else if (filterValue === \"1\") {\r\n this.grid.instance.filter(this.filterActive.bind(this));\r\n } else if (filterValue === \"2\") {\r\n this.grid.instance.filter(this.filterInactive.bind(this));\r\n }\r\n }\r\n\r\n /**\r\n * Callback for Add site dialog\r\n * @param siteIds The sites that were selected in the dialog\r\n */\r\n SitesAdded(siteIds: number[]) {\r\n for (const siteId of siteIds) {\r\n const site = new ServiceContractSite();\r\n site.SiteId = siteId;\r\n\r\n const rowsValues = this.grid.instance.getDataSource().items();\r\n if (!rowsValues.length) {\r\n site.StartDateUI = new Date(this.today);\r\n site.InvoiceFromUI = new Date(this.today);\r\n } else {\r\n this.InitialiseFromLastElement(rowsValues, site);\r\n }\r\n\r\n this.contract.Sites.push(site);\r\n this.sitesChanged.emit();\r\n }\r\n this.FormMarkDirty();\r\n }\r\n\r\n /**\r\n * Marks the outer form as dirty to allow saving\r\n */\r\n FormMarkDirty() {\r\n this.form.markAsDirty();\r\n }\r\n\r\n /**\r\n * Validator for dates in the editor\r\n * @param data The data row\r\n * @return true if valid\r\n */\r\n ValidateEndDate(data): boolean {\r\n if (data.data.EndDateUI && (new Date(data.data.EndDateUI) < new Date(data.data.StartDateUI))) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n * Calculates the caption for the Charge field\r\n */\r\n calculateCaption(): void {\r\n if (this.contract.InvCycleId) {\r\n const chargePeriod = this.invCyclePipe.transform(this.contract.InvCycleId);\r\n const newCaption = this.translate.instant(chargePeriod) + \" \" + this.translate.instant(\"service.contract.equipment.charge.small.letters\");\r\n this.grid.instance.columnOption(\"Charge\", \"caption\", newCaption);\r\n }\r\n }\r\n\r\n /**\r\n * Helper that outputs the date without the total row label\r\n * @param data The totals data row\r\n */\r\n RemoveLabel(data: any) {\r\n return formatDate(data.value, \"shortDate\", JSON.parse(localStorage.getItem(\"ls.UserBrowserLocale\")));\r\n }\r\n\r\n /**\r\n * The currency helper for the totals row\r\n * @param data The totals data row\r\n */\r\n TotalText(data: any) {\r\n return formatCurrency(data.value,\r\n JSON.parse(localStorage.getItem(\"ls.UserBrowserLocale\")),\r\n JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\")));\r\n }\r\n\r\n private InitialiseFromLastElement(rows: ServiceContractSite[], newItem: ServiceContractSite) {\r\n const lastElement = this.getLastElement(rows);\r\n newItem.StartDateUI = lastElement.StartDateUI;\r\n newItem.InvoiceFromUI = lastElement.InvoiceFromUI;\r\n newItem.EndDateUI = lastElement.EndDateUI;\r\n }\r\n\r\n private getLastElement(array: ServiceContractSite[]): ServiceContractSite {\r\n return array[array.length - 1];\r\n }\r\n\r\n /**\r\n * Filters Active Sites only (sites where today is within their start and end date)\r\n * @param item The site\r\n * @return True if the site should be shown\r\n */\r\n private filterActive(item: ServiceContractEquipmentModel): boolean {\r\n const started = new Date(item.StartDateUI) <= new Date(this.today);\r\n const notFinished = !item.EndDateUI || (new Date(item.EndDateUI) >= new Date(this.today));\r\n return started && notFinished;\r\n }\r\n\r\n /**\r\n * Filters inactive Sites only (sites where today is outside of their start and end date)\r\n * @param item The site\r\n * @return True if the site should be shown\r\n */\r\n private filterInactive(item: ServiceContractEquipmentModel): boolean {\r\n const notStarted = new Date(item.StartDateUI) > new Date(this.today);\r\n const finished = item.EndDateUI && (new Date(item.EndDateUI) < new Date(this.today));\r\n return notStarted || finished;\r\n }\r\n\r\n public AccNoSortValue(data: any): string {\r\n return this.lookup.calculateCellValue(data.SiteId);\r\n }\r\n\r\n public SiteSortValue(data: any): string {\r\n return this.lookup.calculateCellValue(data.SiteId);\r\n }\r\n}\r\n","\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n {{description}}\r\n {{ 'service.contract.cancellation.no.description' | translate }}\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { DateOnlyService, FormMesssageService } from \"servicesight-shared\";\r\nimport { CancellationReasonModel } from \"src/app/jobs/models/cancellation-reason\";\r\nimport { JobService } from \"src/app/jobs/services/job.service\";\r\nimport { ServiceContractModel } from \"../models/service-contract.model\";\r\nimport { ServiceContractService } from \"../services/service-contract.service\";\r\n\r\n@Component({\r\n selector: \"app-contract-cancellation-dialogue\",\r\n templateUrl: \"./contract-cancellation-dialogue.component.html\",\r\n styleUrls: [\"./contract-cancellation-dialogue.component.scss\"]\r\n})\r\nexport class ContractCancellationDialogueComponent implements OnInit, OnChanges {\r\n\r\n @Input() contract: ServiceContractModel;\r\n @Input() messagesMap = new Map();\r\n @Output() close = new EventEmitter();\r\n\r\n @ViewChild(\"cancelContractForm\", { static: true }) form: NgForm;\r\n public readonly formName: string = \"cancelContractForm\";\r\n\r\n public description: string;\r\n public cancelDate = new Date();\r\n public cancelReasonId: number;\r\n public reasons: CancellationReasonModel[];\r\n public isLoading = true;\r\n\r\n constructor(\r\n private contractService: ServiceContractService,\r\n private jobService: JobService,\r\n private formMessageService: FormMesssageService,\r\n private dateOnlyService: DateOnlyService) { }\r\n\r\n ngOnInit() {\r\n this.onLoad();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (changes.contract.currentValue.ContractId) {\r\n this.isLoading = false;\r\n }\r\n }\r\n\r\n public Save(): void {\r\n this.contract.CancelDate = this.dateOnlyService.RecalculateDateOnSave(new Date(this.cancelDate.setHours(0, 0, 0, 0)));\r\n this.contract.CancelReasonId = this.cancelReasonId;\r\n this.formMessageService.RegisterObservable(this.contractService.CancelContract(this.contract), this.formName, this.messagesMap)\r\n .subscribe(() => {\r\n this.close.emit(true);\r\n });\r\n }\r\n\r\n public Dismiss(): void {\r\n this.close.emit(false);\r\n }\r\n\r\n public OnReasonChanged(item): void {\r\n if (item && item.value) {\r\n this.description = this.reasons.find(x => x.CancelReasonID === item.value).Description;\r\n }\r\n }\r\n\r\n private onLoad(): void {\r\n this.jobService.GetCancelationReasons()\r\n .subscribe((res) => this.reasons = res);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n

{{ 'service.contract.service.contract' | translate}} {{contract.ContractId}}

\r\n

{{ 'service.contract.new.service.contract' | translate}}

\r\n
\r\n

{{ contract.Status | serviceContractStatus | translate}}

\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport ArrayStore from \"devextreme/data/array_store\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { DateOnlyService, DocumentTypeEnum, EquipmentDataService, FormMesssageService, ServiceContractsService, ServiceContractStatus } from \"servicesight-shared\";\r\nimport { MessageService } from \"src/app/messages/services/message/message.service\";\r\nimport { MessageDocTypeIds } from \"src/app/shared/enums/messages/message-doc-type-ids.enum\";\r\nimport { MessageTypes } from \"src/app/shared/enums/messages/message-types.enum\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { Ng1ReminderService } from \"src/app/shared/services/ng1-reminder.service\";\r\nimport { PreviousRouteService } from \"../../shared/services/previous-route.service\";\r\nimport { InvCycle } from \"../enums/inv-cycle.enum\";\r\nimport { ServiceContractModel } from \"../models/service-contract.model\";\r\nimport { ServiceContractService } from \"../services/service-contract.service\";\r\n\r\n@Component({\r\n selector: \"app-contract\",\r\n templateUrl: \"./contract.component.html\",\r\n styleUrls: [\"./contract.component.scss\"]\r\n})\r\nexport class ContractComponent implements OnInit {\r\n\r\n public readonly docType = DocumentTypeEnum;\r\n public contract = new ServiceContractModel();\r\n public contractid: number;\r\n public isLoading = false;\r\n public isNew = false;\r\n public showCancelDialogue = false;\r\n public messagesMap = new Map();\r\n public equipmentDataSource: DataSource;\r\n public sitesDataStore: ArrayStore;\r\n public sitesDataSource: DataSource;\r\n public noteIdsRelatedToContract: Array = [];\r\n\r\n @ViewChild(\"contractform\", { static: true }) form: NgForm;\r\n public readonly formName: string = \"contractform\";\r\n public hasAccessToEquipment: boolean = false;\r\n public showCreditRaisedEye: boolean = false;\r\n\r\n public HasAccessToPro: boolean = false;\r\n public CanNavigatePrevious: boolean = false;\r\n public CanNavigateNext: boolean = false;\r\n public IsRecordNavigationEnabled: boolean = false;\r\n\r\n constructor(\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private service: ServiceContractService,\r\n private formMessageService: FormMesssageService,\r\n private licenseService: LicenseService,\r\n private dateOnlyService: DateOnlyService,\r\n private messageService: MessageService,\r\n private equipmentService: EquipmentDataService,\r\n private ng1reminderService: Ng1ReminderService,\r\n private serviceContractsService: ServiceContractsService,\r\n private previousRouteService: PreviousRouteService) {\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.loadSitesDataSource();\r\n\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(x => {\r\n this.hasAccessToEquipment = x.EquipmentEnabled;\r\n this.HasAccessToPro = x.ProEnabled;\r\n\r\n if (this.hasAccessToEquipment) {\r\n this.equipmentDataSource = this.equipmentService.GetEquipmentDataSource();\r\n }\r\n });\r\n\r\n this.route.params.subscribe(params => {\r\n const stringId = params.id;\r\n if (isNaN(Number(stringId))) {\r\n this.contractid = 0;\r\n } else {\r\n this.contractid = Number(stringId);\r\n }\r\n\r\n this.IsRecordNavigationEnabled = this.contractid !== 0 && this.previousRouteService.PreviousUrlContains(\"/contracts\");\r\n\r\n this.isNew = params.isNew === \"true\";\r\n this.onLoad();\r\n });\r\n }\r\n\r\n public get IsActive(): boolean {\r\n return this.contract.Status >= ServiceContractStatus.Active;\r\n }\r\n\r\n public get ContractFixed(): boolean {\r\n return this.contract.Status >= ServiceContractStatus.Terminated || this.contract.Status === ServiceContractStatus.Cancelled;\r\n }\r\n\r\n public Cancel(): void {\r\n if (this.contractid) {\r\n this.onLoad();\r\n } else {\r\n this.router.navigate([\"/contracts\", \"list\"]);\r\n }\r\n }\r\n\r\n public Save(): void {\r\n this.isLoading = true;\r\n this.reclaculateDatesOnSave();\r\n this.formMessageService\r\n .RegisterObservable(this.service.Save(this.contract), this.formName, this.messagesMap)\r\n .subscribe(res => {\r\n this.contractid = res;\r\n this.router.navigate([\"/contracts\", \"detail\", res, true]);\r\n this.onLoad();\r\n }, () => this.isLoading = false);\r\n }\r\n\r\n public OnTitleRendered(event): void {\r\n let testId: string = null;\r\n switch (event.itemIndex) {\r\n case 0:\r\n testId = \"contract\";\r\n break;\r\n case 1:\r\n testId = \"sites\";\r\n break;\r\n case 2:\r\n testId = \"equipment\";\r\n break;\r\n case 3:\r\n testId = \"invoicing\";\r\n break;\r\n default:\r\n testId = \"unknown\";\r\n break;\r\n }\r\n event.itemElement.setAttribute(\"data-test-id\", testId);\r\n }\r\n\r\n public ViewReminder(): void {\r\n this.ng1reminderService.CreateContractReminder(this.contract.ContractId, this.contract.CustomerId);\r\n }\r\n\r\n public CreateNewMessage(): void {\r\n this.messageService.SetNewMessageParameters(0, MessageTypes.RefMessage, false, MessageDocTypeIds.ServiceContract, this.contract.ContractId);\r\n this.router.navigate([\"messages/newmessage\"]);\r\n }\r\n\r\n public CancelContract(): void {\r\n this.showCancelDialogue = true;\r\n }\r\n\r\n public StartContract(): void {\r\n this.isLoading = true;\r\n this.formMessageService\r\n .RegisterObservable(this.service.StartContract(this.contract), this.formName, this.messagesMap).subscribe(() => {\r\n this.router.navigate([\"/contracts\", \"detail\", this.contractid, true]);\r\n this.onLoad();\r\n }, () => this.isLoading = false);\r\n }\r\n\r\n public TerminateContract(): void {\r\n this.isLoading = true;\r\n this.formMessageService\r\n .RegisterObservable(this.service.TerminateContract(this.contract), this.formName, this.messagesMap).subscribe(() => {\r\n this.router.navigate([\"/contracts\", \"detail\", this.contractid, true]);\r\n this.onLoad();\r\n }, () => this.isLoading = false);\r\n }\r\n\r\n public OnCancelContractClosed(isConfirmed: boolean): void {\r\n if (isConfirmed) {\r\n this.router.navigate([\"/contracts\", \"detail\", this.contractid, true]);\r\n this.onLoad();\r\n }\r\n this.showCancelDialogue = false;\r\n }\r\n\r\n public ViewContract(): void {\r\n this.router.navigate([\"/contracts\", \"report\", this.contractid]);\r\n }\r\n\r\n public onLoad(): void {\r\n if (this.contractid) {\r\n this.service.GetNoteIdsForContract(this.contractid).subscribe(x => this.noteIdsRelatedToContract = x);\r\n this.isLoading = true;\r\n this.service.Get(this.contractid).subscribe((m) => {\r\n this.contract = m;\r\n this.recalculateDatesOnLoad();\r\n this.form.form.markAsPristine();\r\n this.SetCurrentItem(this.contractid);\r\n this.populateMessagesMap();\r\n this.isLoading = false;\r\n this.contract.InvCycleId = Number(InvCycle[this.contract.InvCycleId]);\r\n }, () => this.isLoading = false);\r\n }\r\n }\r\n\r\n public onExistingRaisedCredits(areItemsExists: boolean) {\r\n this.showCreditRaisedEye = areItemsExists;\r\n }\r\n\r\n private reclaculateDatesOnSave() {\r\n this.contract.ContractEquipmentList.forEach((i) => {\r\n i.StartDate = this.dateOnlyService.RecalculateDateOnSave(i.StartDateUI);\r\n i.InvoiceFrom = this.dateOnlyService.RecalculateDateOnSave(i.InvoiceFromUI);\r\n if (i.EndDateUI) {\r\n i.EndDate = this.dateOnlyService.RecalculateDateOnSave(i.EndDateUI);\r\n } else {\r\n i.EndDate = i.EndDateUI;\r\n }\r\n });\r\n this.contract.Sites.forEach((s) => {\r\n s.StartDate = this.dateOnlyService.RecalculateDateOnSave(s.StartDateUI);\r\n s.InvoiceFrom = this.dateOnlyService.RecalculateDateOnSave(s.InvoiceFromUI);\r\n if (s.EndDateUI) {\r\n s.EndDate = this.dateOnlyService.RecalculateDateOnSave(s.EndDateUI);\r\n } else {\r\n s.EndDate = s.EndDateUI;\r\n }\r\n });\r\n }\r\n\r\n private recalculateDatesOnLoad() {\r\n this.contract.ContractEquipmentList.forEach(i => {\r\n i.StartDateUI = this.dateOnlyService.RecalculateDateOnLoad(i.StartDate);\r\n i.InvoiceFromUI = this.dateOnlyService.RecalculateDateOnLoad(i.InvoiceFrom);\r\n if (i.EndDate) {\r\n i.EndDateUI = this.dateOnlyService.RecalculateDateOnLoad(i.EndDate);\r\n }\r\n });\r\n this.contract.Sites.forEach(i => {\r\n i.StartDateUI = this.dateOnlyService.RecalculateDateOnLoad(i.StartDate);\r\n i.InvoiceFromUI = this.dateOnlyService.RecalculateDateOnLoad(i.InvoiceFrom);\r\n if (i.EndDate) {\r\n i.EndDateUI = this.dateOnlyService.RecalculateDateOnLoad(i.EndDate);\r\n }\r\n });\r\n }\r\n\r\n public populateMessagesMap(): void {\r\n const items = this.contract.ContractEquipmentList;\r\n if (!this.equipmentDataSource) {\r\n this.equipmentDataSource = this.equipmentService.GetEquipmentDataSource();\r\n }\r\n\r\n for (const e of items) {\r\n if (!this.messagesMap.has(e.EquipId.toString())) {\r\n this.equipmentDataSource.store().byKey(e.EquipId).then(equipment => {\r\n if (!this.messagesMap.has(e.EquipId.toString())) {\r\n this.messagesMap.set(e.EquipId.toString(), equipment.EquipNumber);\r\n }\r\n });\r\n }\r\n }\r\n\r\n const sites = this.contract.Sites;\r\n for (const s of sites) {\r\n if (!this.messagesMap.has(\"s\" + s.SiteId)) {\r\n this.sitesDataSource.store().byKey(s.SiteId).then(site => {\r\n if (!this.messagesMap.has(\"s\" + s.SiteId)) {\r\n this.messagesMap.set(\"s\" + s.SiteId, site.Name);\r\n }\r\n });\r\n }\r\n }\r\n }\r\n\r\n private loadSitesDataSource() {\r\n this.service.GetSiteArrayStore().then(store => this.sitesDataStore = store);\r\n this.sitesDataSource = this.service.GetSiteDataSource();\r\n }\r\n\r\n private SetCurrentItem(id: number) {\r\n if (this.IsRecordNavigationEnabled) {\r\n this.serviceContractsService.SetCurrentItem(id).then(() => {\r\n this.CanNavigatePrevious = this.serviceContractsService.IsPreviousAvailable();\r\n this.CanNavigateNext = this.serviceContractsService.IsNextAvailable();\r\n });\r\n }\r\n }\r\n\r\n public NavigateNext(): void {\r\n if (this.CanNavigateNext) {\r\n this.serviceContractsService.GetNextId().then(nextId => {\r\n this.router.navigate([\"contracts\", \"detail\", nextId]);\r\n });\r\n }\r\n }\r\n\r\n public NavigatePrevious(): void {\r\n if (this.CanNavigatePrevious) {\r\n this.serviceContractsService.GetPreviousId().then(previousId => {\r\n this.router.navigate([\"contracts\", \"detail\", previousId]);\r\n });\r\n }\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { ImportServerSummary } from \"src/app/shared/models/import/import-server-summary.model\";\r\nimport { ContractEquipUpload } from \"../models/contract-equip-upload.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class ContractEquipmentUploadService {\r\n\r\n constructor(\r\n @Inject(APP_CONFIG) private config: IAppConfig,\r\n private http: HttpClient) { }\r\n\r\n public GetSample(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceContracts}EquipmentUpload`, { observe: \"response\", responseType: \"blob\" as \"json\" });\r\n }\r\n\r\n public Upload(rows: ContractEquipUpload[]): Observable {\r\n return this.http.post(`${this.config.apiLocations.ServiceContracts}EquipmentUpload`, rows);\r\n }\r\n\r\n public GetRemainingCount(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceContracts}EquipmentUpload/Progress`);\r\n }\r\n\r\n public GetSummary(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceContracts}EquipmentUpload/Summary`);\r\n }\r\n}\r\n","import { AfterViewInit, Component, OnDestroy, ViewChild } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport * as moment from \"moment\";\r\nimport { DateOnlyService, ToasterService, ToastType } from \"servicesight-shared\";\r\nimport { ImporterComponent } from \"src/app/shared/components/importer/importer.component\";\r\nimport { ImportColumnDictionary } from \"src/app/shared/models/import/import-column-dictionary.model\";\r\nimport { ImportMap } from \"src/app/shared/models/import/import-map.model\";\r\nimport { ImportValidationObject } from \"src/app/shared/models/import/import-validation-object.model\";\r\nimport { ImportValidationFunc } from \"src/app/shared/models/import/import-validation.type\";\r\nimport { ContractEquipUpload } from \"../models/contract-equip-upload.model\";\r\nimport { ContractEquipmentUploadService } from \"../services/contract-equipment-upload.service\";\r\n\r\n@Component({\r\n selector: \"app-import-contract-equipment\",\r\n templateUrl: \"./import-contract-equipment.component.html\",\r\n styleUrls: [\"./import-contract-equipment.component.scss\"]\r\n})\r\nexport class ImportContractEquipmentComponent implements AfterViewInit, OnDestroy {\r\n @ViewChild(\"importer\", { static: true }) importer: ImporterComponent;\r\n\r\n private poll: any;\r\n\r\n public noMatch: number = -1;\r\n public isProcessing: boolean = false;\r\n public remainingRows: number = 0;\r\n public contractMap: Map = new Map();\r\n\r\n public defaultMap: ImportColumnDictionary = {\r\n ContractNo: { displayName: \"service.contract.import.equipment.contract-no\", value: this.noMatch, required: true },\r\n EquipNo: { displayName: \"service.contract.import.equipment.equip-no\", value: this.noMatch, required: true },\r\n StartDate: { displayName: \"service.contract.import.equipment.start.date\", value: this.noMatch, required: true },\r\n EndDate: { displayName: \"service.contract.import.equipment.end.date\", value: this.noMatch, required: false },\r\n InvoiceFrom: { displayName: \"service.contract.import.equipment.invoice.from\", value: this.noMatch, required: true },\r\n Charge: { displayName: \"service.contract.import.equipment.charge\", value: this.noMatch, required: false }\r\n };\r\n\r\n public defaultMapper: { [key: string]: string } = {\r\n ContractNo: \"ContractNo\",\r\n contractno: \"ContractNo\",\r\n Contractno: \"ContractNo\",\r\n contractNo: \"ContractNo\",\r\n Contract: \"ContractNo\",\r\n contract: \"ContractNo\",\r\n EquipNo: \"EquipNo\",\r\n equipNo: \"EquipNo\",\r\n Equipno: \"EquipNo\",\r\n equipno: \"EquipNo\",\r\n Equip: \"EquipNo\",\r\n equip: \"EquipNo\",\r\n Equipment: \"EquipNo\",\r\n equipment: \"EquipNo\",\r\n StartDate: \"StartDate\",\r\n startDate: \"StartDate\",\r\n Startdate: \"StartDate\",\r\n startdate: \"StartDate\",\r\n Start: \"StartDate\",\r\n start: \"StartDate\",\r\n EndDate: \"EndDate\",\r\n endDate: \"EndDate\",\r\n Enddate: \"EndDate\",\r\n enddate: \"EndDate\",\r\n End: \"EndDate\",\r\n end: \"EndDate\",\r\n InvoiceFromDate: \"InvoiceFrom\",\r\n InvoicefromDate: \"InvoiceFrom\",\r\n InvoiceFromdate: \"InvoiceFrom\",\r\n Invoicefromdate: \"InvoiceFrom\",\r\n invoiceFromDate: \"InvoiceFrom\",\r\n invoicefromdate: \"InvoiceFrom\",\r\n invoicefromDate: \"InvoiceFrom\",\r\n invoiceFromdate: \"InvoiceFrom\",\r\n InvoiceFrom: \"InvoiceFrom\",\r\n invoiceFrom: \"InvoiceFrom\",\r\n Invoicefrom: \"InvoiceFrom\",\r\n invoicefrom: \"InvoiceFrom\",\r\n Charge: \"Charge\",\r\n charge: \"Charge\"\r\n };\r\n\r\n public preDefinedMaps: Array = [\r\n {\r\n columns: [\r\n \"Contract No\",\r\n \"Equip No\",\r\n \"Start Date\",\r\n \"End Date\",\r\n \"Invoice From Date\",\r\n \"Charge\"\r\n ],\r\n name: \"ServiceSight\",\r\n map: {\r\n ContractNo: { displayName: \"service.contract.import.equipment.contract-no\", value: 0 },\r\n EquipNo: { displayName: \"service.contract.import.equipment.equip-no\", value: 1 },\r\n StartDate: { displayName: \"service.contract.import.equipment.start.date\", value: 2 },\r\n EndDate: { displayName: \"service.contract.import.equipment.end.date\", value: 3 },\r\n InvoiceFrom: { displayName: \"service.contract.import.equipment.invoice.from\", value: 4 },\r\n Charge: { displayName: \"service.contract.import.equipment.charge\", value: 5 }\r\n }\r\n }\r\n ];\r\n\r\n public columnValidations: ImportValidationObject = {\r\n ContractNo: (val) => !isNaN(val),\r\n EquipNo: (val) => val.toString().length <= 50,\r\n StartDate: (val) => this.validDate(val),\r\n EndDate: (val) => !val || this.validDate(val),\r\n InvoiceFrom: (val) => this.validDate(val),\r\n Charge: (val) => !val || !isNaN(val) && Number(val) >= 0,\r\n };\r\n\r\n public converters = {\r\n StartDate: this.parseDate.bind(this),\r\n EndDate: this.parseDate.bind(this),\r\n InvoiceFrom: this.parseDate.bind(this)\r\n };\r\n\r\n constructor(\r\n private translateService: TranslateService,\r\n private contractEquipUploadService: ContractEquipmentUploadService,\r\n private router: Router,\r\n private toasterService: ToasterService,\r\n private dateOnlyService: DateOnlyService) {\r\n this.rowValidator = this.rowValidator.bind(this);\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n moment.locale(JSON.parse(localStorage.getItem(\"ls.UserBrowserLocale\")).toLowerCase());\r\n this.getRemainingCount();\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n if (this.poll) {\r\n clearTimeout(this.poll);\r\n this.poll = null;\r\n }\r\n }\r\n\r\n public rowValidator: ImportValidationFunc = (row: ContractEquipUpload) => {\r\n const errors: string[] = [];\r\n const key = `${row.ContractNo}|${row.EquipNo}`;\r\n const isDuplicateEquipNo = this.contractMap.has(key);\r\n if (!isDuplicateEquipNo) {\r\n this.contractMap.set(key, true);\r\n } else {\r\n errors.push(this.translateService.instant(\"service.contract.import.error.duplicate-euqip-no\", row));\r\n }\r\n\r\n if (row.EndDate && new Date(row.StartDate) > new Date(row.EndDate)) {\r\n errors.push(this.translateService.instant(\"service.contract.import.error.invalid-date\", row));\r\n }\r\n\r\n return {\r\n isValid: errors.length === 0,\r\n errors\r\n };\r\n };\r\n\r\n public reset(): void {\r\n this.contractMap.clear();\r\n }\r\n\r\n public getSample(): void {\r\n this.contractEquipUploadService.GetSample().subscribe(response => {\r\n const contentType = \"text/csv\";\r\n const blob = new Blob([response.body], { type: contentType });\r\n const data = window.URL.createObjectURL(blob);\r\n const link = document.createElement(\"a\");\r\n link.hidden = true;\r\n link.href = data;\r\n link.download = \"servicecontractequipment-sample.csv\";\r\n document.body.appendChild(link);\r\n link.click();\r\n document.body.removeChild(link);\r\n setTimeout(() => {\r\n // For Firefox it is necessary to delay revoking the ObjectURL\r\n window.URL.revokeObjectURL(data);\r\n }, 100);\r\n });\r\n }\r\n\r\n public upload(rows: any[]): void {\r\n this.isProcessing = true;\r\n\r\n this.contractEquipUploadService.Upload(rows).subscribe(() => {\r\n this.getRemainingCount();\r\n }, () => {\r\n this.isProcessing = false;\r\n });\r\n }\r\n\r\n private getRemainingCount(): void {\r\n this.contractEquipUploadService.GetRemainingCount().subscribe(s => {\r\n this.remainingRows = s;\r\n if (s > 0) {\r\n this.isProcessing = true;\r\n this.poll = setTimeout(this.getRemainingCount.bind(this), 3000);\r\n } else {\r\n if (this.isProcessing) {\r\n this.getSummary();\r\n }\r\n\r\n this.isProcessing = false;\r\n if (this.poll) {\r\n clearTimeout(this.poll);\r\n this.poll = null;\r\n }\r\n }\r\n });\r\n }\r\n\r\n private getSummary(): void {\r\n this.contractEquipUploadService.GetSummary().subscribe(res => {\r\n if (res.FailedRows === 0) {\r\n this.toasterService.pop(\"service.contract.import.complete\", ToastType.medium);\r\n this.router.navigate([\"/contract/list\"]);\r\n } else {\r\n this.toasterService.pop(\"service.contract.import.complete-with-errors\", ToastType.dark);\r\n this.importer.uploadError(res.FailedRows, res.Errors);\r\n }\r\n });\r\n }\r\n\r\n private validDate(val: any): boolean {\r\n return moment(val, \"L\").isValid();\r\n }\r\n\r\n private parseDate(val: string | Date) {\r\n // regex test for non empty string\r\n if (typeof val === \"string\") {\r\n return /\\S+/.test(val.toString()) ? this.dateOnlyService.RecalculateDateOnSave(moment(val, \"L\").toDate()) : null;\r\n } else if (val && val.getDate) {\r\n return this.dateOnlyService.ReverseUTC(val);\r\n }\r\n return val;\r\n }\r\n}\r\n","\r\n\r\n\r\n\r\n","
\r\n
\r\n
\r\n

{{ 'service.contract.service.contract' | translate}} {{contractId}}

\r\n
\r\n

{{ contractStatus | serviceContractStatus | translate}}

\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
{{ 'label.email.sendMessage' | translate }}
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { Component, Inject, OnInit, ViewChild } from \"@angular/core\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { IAppConfig, APP_CONFIG, ReportViewerComponent } from \"servicesight-shared\";\r\nimport { Email } from \"../../shared/models/email.model\";\r\nimport { ServiceContractService } from \"../services/service-contract.service\";\r\n\r\n@Component({\r\n selector: \"app-service-contract-preview\",\r\n templateUrl: \"./service-contract-preview.component.html\",\r\n styleUrls: [\"./service-contract-preview.component.scss\"]\r\n})\r\nexport class ServiceContractPreviewComponent implements OnInit {\r\n\r\n @ViewChild(\"report\", { static: true }) report: ReportViewerComponent;\r\n\r\n public contractUrl: string;\r\n public hostUrl: string;\r\n public contractId: number;\r\n public contractStatus: number;\r\n public isPreviewLoaded: boolean;\r\n public showTemplateDialog: boolean = false;\r\n public emailData: Email = new Email();\r\n public showSuccessSendMessage: boolean = false;\r\n public showErrorSendMessage: boolean = false;\r\n\r\n constructor(\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private service: ServiceContractService,\r\n @Inject(APP_CONFIG) appConfig: IAppConfig) {\r\n this.hostUrl = appConfig.apiLocations.ServiceContracts.substr(0, appConfig.apiLocations.ServiceContracts.lastIndexOf(\"/api/\") + 1);\r\n this.contractId = Number(this.route.snapshot.paramMap.get(\"id\"));\r\n }\r\n\r\n ngOnInit() {\r\n this.service.GetStatus(this.contractId).subscribe((res) => this.contractStatus = res);\r\n this.contractUrl = `Contract/${this.contractId}`;\r\n }\r\n\r\n public CallPrint() {\r\n this.report.print();\r\n }\r\n\r\n public CallDownload() {\r\n this.report.download();\r\n }\r\n\r\n public GoBack(): void {\r\n this.router.navigate([`/contracts/detail/${this.contractId}`]);\r\n }\r\n\r\n public OpenEmailDialog(): void {\r\n this.send();\r\n }\r\n\r\n public OpenDialog(): void {\r\n this.service\r\n .GetContractEmailData(this.contractId)\r\n .subscribe(x => this.emailData = x, () => { }, () => {\r\n this.showErrorSendMessage = false;\r\n this.showTemplateDialog = true;\r\n });\r\n }\r\n\r\n public send(): void {\r\n this.service.SendContractEmail(this.emailData).subscribe(() => {\r\n this.showTemplateDialog = false;\r\n this.showSuccessSendMessage = true;\r\n }, () => {\r\n this.showErrorSendMessage = true;\r\n });\r\n }\r\n\r\n public CloseDialog(): void {\r\n this.showTemplateDialog = false;\r\n }\r\n}\r\n","import { NgModule } from \"@angular/core\";\r\nimport { RouterModule, Routes } from \"@angular/router\";\r\nimport { ServiceContractsListComponent } from \"servicesight-shared\";\r\nimport { ContractHeaderUploadComponent } from \"./contract-header-upload/contract-header-upload.component\";\r\nimport { ContractMarketingComponent } from \"./contract-marketing/contract-marketing.component\";\r\nimport { ContractSiteUploadComponent } from \"./contract-site-upload/contract-site-upload.component\";\r\nimport { ContractComponent } from \"./contract/contract.component\";\r\nimport { ImportContractEquipmentComponent } from \"./import-contract-equipment/import-contract-equipment.component\";\r\nimport { ServiceContractPreviewComponent } from \"./service-contract-preview/service-contract-preview.component\";\r\n\r\nconst routes: Routes = [\r\n { path: \"list\", component: ServiceContractsListComponent},\r\n { path: \"marketing\", component: ContractMarketingComponent},\r\n { path: \"new-contract\", component: ContractComponent},\r\n { path: \"detail/:id/:isNew\", component: ContractComponent},\r\n { path: \"detail/:id\", component: ContractComponent},\r\n { path: \"report/:id\", component: ServiceContractPreviewComponent},\r\n { path: \"upload\", component: ContractHeaderUploadComponent},\r\n { path: \"upload/sites\", component: ContractSiteUploadComponent},\r\n { path: \"upload/equipment\", component: ImportContractEquipmentComponent },\r\n { path: \"\", redirectTo: \"list\", pathMatch: \"full\"},\r\n { path: \"**\", redirectTo: \"list\"}\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class ServiceContractsRoutingModule {\r\n public static readonly Routes: Routes = routes;\r\n}\r\n","import { Component, OnInit } from \"@angular/core\";\r\n\r\n@Component({\r\n selector: \"app-empty-component\",\r\n template: \"\"\r\n})\r\nexport class EmptyComponentComponent implements OnInit {\r\n\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n}\r\n","
\r\n
\r\n

\r\n {{ 'label.picking-note' | translate }} \r\n {{ this.jobId }}\r\n

\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
{{ 'label.email.sendMessage' | translate }}
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n","import { Component, Inject, OnInit, ViewChild } from \"@angular/core\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { IAppConfig, APP_CONFIG, ReportViewerComponent, JobTabEnum } from \"servicesight-shared\";\r\nimport { JobService } from \"src/app/jobs/services/job.service\";\r\nimport { Email } from \"src/app/shared/models/email.model\";\r\n\r\n@Component({\r\n selector: \"app-picking-note\",\r\n templateUrl: \"./picking-note.component.html\",\r\n styleUrls: [\"./picking-note.component.scss\"]\r\n})\r\nexport class PickingNoteComponent implements OnInit {\r\n @ViewChild(\"report\", { static: true }) report: ReportViewerComponent;\r\n\r\n public jobId: number;\r\n public pickingNoteUrl: string;\r\n public hostUrl: string;\r\n public showTemplateDialog: boolean = false;\r\n public emailData: Email = new Email();\r\n public showSuccessSendMessage: boolean = false;\r\n public showErrorSendMessage: boolean = false;\r\n\r\n public constructor(\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private jobService: JobService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) {\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.hostUrl = this.appConfig.apiLocations.ServiceSightReports;\r\n\r\n this.route.params.subscribe(params => {\r\n this.jobId = parseInt(params.id, 10);\r\n this.pickingNoteUrl = `pickingnote/${this.jobId}`;\r\n });\r\n }\r\n\r\n public CallPrint(): void {\r\n this.report.print();\r\n }\r\n\r\n public OpenEmailDialog(): void {\r\n this.jobService.SendPrintingNoteEmail(this.emailData).subscribe(() => {\r\n this.showTemplateDialog = false;\r\n this.showSuccessSendMessage = true;\r\n }, () => {\r\n this.showErrorSendMessage = true;\r\n });\r\n }\r\n\r\n public OpenDialog(): void {\r\n this.jobService\r\n .GetPrintingNoteEmailData(this.jobId)\r\n .subscribe(x => this.emailData = x, () => { }, () => {\r\n this.showErrorSendMessage = false;\r\n this.showTemplateDialog = true;\r\n });\r\n }\r\n\r\n public CloseDialog(): void {\r\n this.showTemplateDialog = false;\r\n }\r\n\r\n public BackToJob(): void {\r\n this.router.navigate([`/jobs/job/${this.jobId}/${JobTabEnum.Parts}`]);\r\n }\r\n}\r\n","export enum StockAdjustmentStatus {\r\n Cancelled = 0,\r\n Entry = 100,\r\n Outstanding = 200,\r\n BatchUpdate = 775,\r\n Completed = 800,\r\n Archived = 900\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable } from \"rxjs\";\r\nimport { map } from \"rxjs/operators\";\r\nimport { IAppConfig, APP_CONFIG, PageableDatastoreService } from \"servicesight-shared\";\r\nimport { Email } from \"src/app/shared/models/email.model\";\r\nimport { AuthService } from \"src/app/shared/services/auth/auth.service\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\nimport { StockAdjustment } from \"../models/stock-adjustment.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class StockAdjustmentService extends PageableDatastoreService {\r\n private static readonly odataKey: string = \"AdjustmentNo\";\r\n constructor(\r\n @Inject(APP_CONFIG) protected config: IAppConfig,\r\n @Inject(\"ODataService\") private odataService: ODataService,\r\n private http: HttpClient,\r\n private authService: AuthService\r\n ) {\r\n super(StockAdjustmentService.odataKey);\r\n }\r\n\r\n public GetAdjustment(id: number | string): Observable {\r\n return this.http.get(`${this.config.apiLocations.Stock}StockAdjustment/${id}`);\r\n }\r\n\r\n public SaveAdjustment(model: StockAdjustment): Observable {\r\n if (model.Id) {\r\n return this.http.put(`${this.config.apiLocations.Stock}StockAdjustment`, model);\r\n } else {\r\n return this.http.post(`${this.config.apiLocations.Stock}StockAdjustment`, model);\r\n }\r\n }\r\n\r\n public CancelAdjustment(model: StockAdjustment): Observable {\r\n return this.http.put(`${this.config.apiLocations.Stock}StockAdjustment/Cancel`, model);\r\n }\r\n\r\n public Process(model: StockAdjustment): Observable {\r\n return this.http.put(`${this.config.apiLocations.Stock}StockAdjustment/Process`, model);\r\n }\r\n\r\n public GetStatus(id: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.Stock}StockAdjustment/${id}`).pipe(map((res: any) => res.Status));\r\n }\r\n\r\n public GetStockAdjustmentEmailData(contractId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.Stock}Email/${contractId}`);\r\n }\r\n\r\n public GetStockTakeEmailData(adjustmentId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.Stock}Email/StockTake/${adjustmentId}`);\r\n }\r\n\r\n public SendStockAdjustmentEmail(emailData: Email): Observable {\r\n emailData.SenderEmployeeId = this.authService.EmployeeId;\r\n return this.http.post(this.config.apiLocations.ServiceSight + \"Email/QueueEmail\", emailData);\r\n }\r\n\r\n protected GetDataSourceObject(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.StockOData}StockAdjustmentsOData`,\r\n key: StockAdjustmentService.odataKey,\r\n keyType: \"Int32\",\r\n paging: true,\r\n pageSize: 50\r\n });\r\n }\r\n\r\n public GetStockAdjustmentDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.StockOData}StockAdjustmentsOData`,\r\n key: StockAdjustmentService.odataKey,\r\n keyType: \"Int32\",\r\n paging: true,\r\n pageSize: 50\r\n });\r\n }\r\n\r\n public GetStockAdjustmentReasonsDataStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.config.apiLocations.ServiceSightOData}StockAdjustmentReasonOD`,\r\n key: \"AdjustmentReasonId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { StockAdjustmentStatus } from \"../enums/stock-adjustment-status.enum\";\r\n\r\n@Pipe({\r\n name: \"stockAdjustmentStatus\"\r\n})\r\nexport class StockAdjustmentStatusPipe implements PipeTransform {\r\n\r\n transform(value: any): any {\r\n const status = {\r\n [StockAdjustmentStatus.Outstanding]: \"stock.adjustments.status.pending\",\r\n [StockAdjustmentStatus.Completed]: \"stock.adjustments.status.completed\",\r\n [StockAdjustmentStatus.Cancelled]: \"stock.adjustments.status.cancelled\"\r\n };\r\n return status[value] || \"\";\r\n }\r\n\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { StockAdjustmentStatus } from \"../enums/stock-adjustment-status.enum\";\r\n\r\n@Pipe({\r\n name: \"adjustmentStatusBar\"\r\n})\r\nexport class StockAdjustmentStatusBarPipe implements PipeTransform {\r\n\r\n private readonly status = {\r\n [StockAdjustmentStatus.Outstanding]: \"bgredstatusshort\",\r\n [StockAdjustmentStatus.Completed]: \"bggreenstatuslong\",\r\n [StockAdjustmentStatus.Cancelled]: \"bggraystatus\"\r\n };\r\n\r\n private readonly bgcolors = {\r\n [StockAdjustmentStatus.Outstanding]: \"clrred\",\r\n [StockAdjustmentStatus.Completed]: \"clrgreen\",\r\n [StockAdjustmentStatus.Cancelled]: \"clrred\"\r\n };\r\n\r\n transform(value: any, args?: any): string {\r\n if (value) {\r\n if (args === \"bg\") {\r\n return this.bgcolors[value];\r\n } else if (args === \"bar\") {\r\n return this.status[value];\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n}\r\n","
\r\n

{{ 'stock.stock.adjustments' | translate}}

\r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n\r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n
\r\n
{{ item.text | stockAdjustmentStatus | translate }}
\r\n
\r\n
\r\n
\r\n\r\n \r\n\r\n
\r\n {{ item.value | date: 'shortDate' }}\r\n
\r\n\r\n
\r\n {{ item.value }}\r\n
\r\n\r\n\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { GridKind, GridService } from \"servicesight-shared\";\r\nimport { EmployeeService } from \"src/app/shared/services/employee/employee.service\";\r\nimport { StockPermissionsService } from \"./../services/stock-permissions.service\";\r\nimport { StockAdjustmentStatus } from \"../enums/stock-adjustment-status.enum\";\r\nimport { StockAdjustmentService } from \"../services/stock-adjustment.service\";\r\n\r\n@Component({\r\n selector: \"app-stock-adjustment-list\",\r\n templateUrl: \"./stock-adjustment-list.component.html\",\r\n styleUrls: [\"./stock-adjustment-list.component.scss\"]\r\n})\r\nexport class StockAdjustmentListComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n\r\n public SearchText: string = \"\";\r\n public stockAdjustmentsDataSource: DataSource;\r\n public employeeDataStore: ODataStore;\r\n public adjustmentReasonDataStore: ODataStore;\r\n public hasAddPermission: boolean;\r\n\r\n public filters: any = {\r\n 1: [\"Status\", \"=\", StockAdjustmentStatus.Outstanding],\r\n 2: [\"Status\", \"=\", StockAdjustmentStatus.Completed],\r\n 3: [\"Status\", \"=\", StockAdjustmentStatus.Cancelled]\r\n };\r\n\r\n constructor(\r\n private gridService: GridService,\r\n private employeeService: EmployeeService,\r\n private stockAdjustmentsService: StockAdjustmentService,\r\n private permissionService: StockPermissionsService,\r\n private router: Router\r\n ) { }\r\n\r\n ngOnInit() {\r\n this.permissionService.Reload();\r\n this.permissionService.HasAddStockAdjustmentPermission.subscribe(x => this.hasAddPermission = x);\r\n this.gridService.GetLayout(GridKind.Stock).subscribe(value => {\r\n if (value) {\r\n this.dataGrid.instance.state(value);\r\n }\r\n this.GetDataSource();\r\n }, () => this.GetDataSource());\r\n }\r\n\r\n public SaveLayout() {\r\n const state = this.dataGrid.instance.state();\r\n this.gridService.SaveLayout(state, GridKind.Stock);\r\n }\r\n\r\n public ResetLayout() {\r\n this.gridService.ResetLayout(GridKind.Stock);\r\n this.dataGrid.instance.state(null);\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public FilterChanged($event): void {\r\n const filterValue = $event.currentTarget.value;\r\n if (filterValue === \"0\") {\r\n this.dataGrid.instance.clearFilter();\r\n } else {\r\n this.dataGrid.instance.filter(this.filters[filterValue]);\r\n }\r\n }\r\n\r\n public viewDetails(event) {\r\n this.router.navigate([\"/stock/adjustment\", event.data.AdjustmentNo]);\r\n }\r\n\r\n private GetDataSource() {\r\n this.stockAdjustmentsDataSource = this.stockAdjustmentsService.GetDataSource(true);\r\n this.employeeDataStore = this.employeeService.GetEmployeeDataStore();\r\n this.adjustmentReasonDataStore = this.stockAdjustmentsService.GetStockAdjustmentReasonsDataStore();\r\n }\r\n\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { ODataService } from \"../../shared/services/odata/odata.service\";\r\nimport { AdjustmentReasonModel } from \"../models/adjustment-reason\";\r\n\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class AdjustmentReasonService {\r\n private readonly serviceSightODataBaseUrl: string;\r\n private readonly serviceSightBaseUrl: string;\r\n\r\n constructor(\r\n private odataService: ODataService,\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) appConfig: IAppConfig) {\r\n this.serviceSightODataBaseUrl = appConfig.apiLocations.ServiceSightOData;\r\n this.serviceSightBaseUrl = appConfig.apiLocations.ServiceSight;\r\n }\r\n\r\n public ODataAdjustmentReasons(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.serviceSightODataBaseUrl}StockAdjustmentReasonOD`,\r\n key: \"AdjustmentReasonId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public AdjustmentReasonsDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.serviceSightODataBaseUrl}StockAdjustmentReasonOD`,\r\n key: \"AdjustmentReasonId\",\r\n keyType: \"Int32\",\r\n pageSize: 50,\r\n paging: true\r\n });\r\n }\r\n\r\n public Get(adjustmentReasonId: number): Observable {\r\n return this.http.get(`${this.serviceSightBaseUrl}StockAdjustmentReason/GetAdjustmentReason?adjustmentReasonId=${adjustmentReasonId}`);\r\n }\r\n\r\n public Update(adjustmentReason: AdjustmentReasonModel): Observable {\r\n return this.http.put(`${this.serviceSightBaseUrl}StockAdjustmentReason/UpdateAdjustmentReason`, adjustmentReason);\r\n }\r\n\r\n public Create(adjustmentReason: AdjustmentReasonModel): Observable {\r\n return this.http.post(`${this.serviceSightBaseUrl}StockAdjustmentReason/CreateAdjustmentReason`, adjustmentReason);\r\n }\r\n\r\n public Delete(adjustmentReasonId: number): Observable {\r\n return this.http.delete(`${this.serviceSightBaseUrl}StockAdjustmentReason/DeleteAdjustmentReason?adjustmentReasonId=${adjustmentReasonId}`);\r\n }\r\n\r\n public GetDefaultAccount(): Observable {\r\n return this.http.get(`${this.serviceSightBaseUrl}StockAdjustmentReason/GetDefaultAccount`);\r\n }\r\n}\r\n","export enum StockAdjustmentSerialNoStatus {\r\n Deleted = 100,\r\n Added = 200\r\n}\r\n","import { Component, EventEmitter, OnInit, Output, ViewChild } from \"@angular/core\";\r\nimport { DxSelectBoxComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { UICustomisation, UserReferenceService, UserRefType } from \"servicesight-shared\";\r\nimport { StockManufacturerService } from \"../../settings/services/stock-manufacturer.service\";\r\nimport { StockTypesService } from \"../../settings/services/stock-types.service\";\r\nimport { StockTypeLinkModel } from \"../../shared/models/stock-type-links.model\";\r\nimport { StockAdjustmentAutoFillOptionsModel } from \"../models/stock-adjustment-auto-fill-options.model\";\r\nimport { StockService } from \"../services/stock.service\";\r\n\r\n@Component({\r\n selector: \"app-stock-adjustment-autofill-options\",\r\n templateUrl: \"./stock-adjustment-autofill-options.component.html\",\r\n styleUrls: [\"./stock-adjustment-autofill-options.component.scss\"]\r\n})\r\nexport class StockAdjustmentAutofillOptionsComponent implements OnInit {\r\n\r\n @Output()\r\n public FillRequested: EventEmitter = new EventEmitter();\r\n\r\n @ViewChild(\"binLocationsFrom\")\r\n public BinLocationsFromElement: DxSelectBoxComponent;\r\n\r\n @ViewChild(\"binLocationsTo\")\r\n public BinLocationsToElement: DxSelectBoxComponent;\r\n\r\n public StockTypesDataSource: DataSource;\r\n public Options: StockAdjustmentAutoFillOptionsModel = {\r\n BinLocationFrom: null,\r\n BinLocationTo: null,\r\n ManufacturerId: null,\r\n StockTypeId: null,\r\n UserRef1Id: null,\r\n UserRef2Id: null,\r\n IncludeBlankBinLocation: false,\r\n StoreId: 0\r\n };\r\n public ManufacturerDataSource: DataSource;\r\n public UserRef1DataSource: DataSource;\r\n public UserRef2DataSource: DataSource;\r\n public UserRef1Label: string;\r\n public UserRef2Label: string;\r\n public BinLocationsFromDataSource: DataSource;\r\n public BinLocationsToDataSource: DataSource;\r\n public ShowDialog: boolean = false;\r\n\r\n private stockTypeLinks: StockTypeLinkModel[];\r\n\r\n constructor(\r\n private stockTypesService: StockTypesService,\r\n private stockManufacturerService: StockManufacturerService,\r\n private userRefsService: UserReferenceService,\r\n private stockService: StockService\r\n ) { }\r\n\r\n public ngOnInit(): void {\r\n this.StockTypesDataSource = this.stockTypesService.GetDataSource();\r\n\r\n this.stockTypesService.GetLinks().subscribe(d => {\r\n this.stockTypeLinks = d;\r\n });\r\n\r\n this.ManufacturerDataSource = this.stockManufacturerService.StockManufacturerDataSource();\r\n\r\n this.UserRef1Label = this.userRefsService.getLabel(UICustomisation.STOCK_REF1);\r\n this.UserRef2Label = this.userRefsService.getLabel(UICustomisation.STOCK_REF2);\r\n\r\n this.UserRef1DataSource = this.userRefsService.getListDataSource(UserRefType.STOCK_1, false);\r\n this.UserRef2DataSource = this.userRefsService.getListDataSource(UserRefType.STOCK_2, false);\r\n\r\n this.stockService.GetBinLocations().subscribe(d => {\r\n const locations = d.map(i => ({ key: i, value: i }));\r\n this.BinLocationsFromDataSource = new DataSource(locations);\r\n this.BinLocationsToDataSource = new DataSource(locations);\r\n });\r\n }\r\n\r\n public Show(): void {\r\n this.Options = {\r\n BinLocationFrom: null,\r\n BinLocationTo: null,\r\n ManufacturerId: null,\r\n StockTypeId: null,\r\n UserRef1Id: null,\r\n UserRef2Id: null,\r\n IncludeBlankBinLocation: false,\r\n StoreId: 0\r\n };\r\n this.ShowDialog = true;\r\n }\r\n\r\n public Cancel(): void {\r\n this.ShowDialog = false;\r\n }\r\n\r\n public Fill(): void {\r\n this.FillRequested.emit(this.Options);\r\n this.ShowDialog = false;\r\n }\r\n\r\n public HandleSelectedStockTypeChanged(): void {\r\n this.Options.ManufacturerId = null;\r\n this.Options.BinLocationFrom = null;\r\n this.Options.BinLocationTo = null;\r\n\r\n this.FilterManufacturers();\r\n this.FilterBinLocationFrom();\r\n this.FilterBinLocationTo();\r\n }\r\n\r\n public HandleSelectedManufacturerChanged(): void {\r\n this.Options.BinLocationFrom = null;\r\n this.Options.BinLocationTo = null;\r\n\r\n this.FilterBinLocationFrom();\r\n this.FilterBinLocationTo();\r\n }\r\n\r\n public HandleSelectedBinLocationFromChanged(): void {\r\n this.Options.BinLocationTo = null;\r\n\r\n this.FilterBinLocationTo();\r\n }\r\n\r\n private FilterManufacturers() {\r\n const matches = this.stockTypeLinks\r\n .filter(l => l.StockTypeId === this.Options.StockTypeId && l.ManufacturerId)\r\n .map(l => l.ManufacturerId);\r\n this.ManufacturerDataSource.filter(i => matches.indexOf(i.ManufacturerId) >= 0);\r\n this.ManufacturerDataSource.load();\r\n }\r\n\r\n private FilterBinLocationFrom() {\r\n const matches = this.stockTypeLinks\r\n .filter(this.BinLocationPredicate)\r\n .map(l => l.BinLocation);\r\n this.BinLocationsFromDataSource?.filter(i => matches.indexOf(i.key) !== -1);\r\n this.BinLocationsFromDataSource?.load();\r\n }\r\n\r\n private FilterBinLocationTo() {\r\n const matches = this.stockTypeLinks\r\n .filter(this.BinLocationPredicate)\r\n .map(l => l.BinLocation);\r\n this.BinLocationsToDataSource?.filter(i => matches.indexOf(i.key) !== -1);\r\n this.BinLocationsToDataSource?.load();\r\n }\r\n\r\n private BinLocationPredicate = (l: StockTypeLinkModel): boolean => {\r\n return (!this.Options.StockTypeId || l.StockTypeId === this.Options.StockTypeId)\r\n && (!this.Options.ManufacturerId || l.ManufacturerId === this.Options.ManufacturerId)\r\n && l.BinLocation !== null;\r\n };\r\n}\r\n","\r\n\r\n
\r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { StockAdjustmentSerialNoStatus } from \"../enums/stock-adjustment-serialno-status.enum\";\r\n\r\n@Pipe({\r\n name: \"stockAdjustmentSerialNoStatus\"\r\n})\r\nexport class StockAdjustmentSerialNoStatusPipe implements PipeTransform {\r\n\r\n transform(value: any): any {\r\n const data = {\r\n [0]: \"stock.adjustment.serialno.status.instock\",\r\n [StockAdjustmentSerialNoStatus.Added]: \"stock.adjustment.serialno.status.added\",\r\n [StockAdjustmentSerialNoStatus.Deleted]: \"stock.adjustment.serialno.status.deleted\",\r\n };\r\n return data[value];\r\n }\r\n\r\n}\r\n","\r\n
\r\n
\r\n

{{ 'stock.adjustment.serialno.adjustment' | translate }}

\r\n

{{ adjustmentNumber }}

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

{{ 'stock.adjustment.serialno.outstanding' | translate }}

\r\n

{{ outstandingNo }}

\r\n
\r\n
\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n {{ data.value | stockAdjustmentSerialNoStatus | translate }}\r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n\r\n","import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport { StockAdjustmentSerialNoStatus } from \"../enums/stock-adjustment-serialno-status.enum\";\r\nimport { StockSerialNoAdjustment } from \"../models/stock-serialno-adjustment.model\";\r\nimport { StockSerailItemsService } from \"../services/stock-serail-items.service\";\r\n\r\n@Component({\r\n selector: \"app-stock-adjustment-serial-no\",\r\n templateUrl: \"./stock-adjustment-serail-no.component.html\",\r\n styleUrls: [\"./stock-adjustment-serail-no.component.scss\"]\r\n})\r\nexport class StockAdjustmentSerailNoComponent implements OnInit {\r\n\r\n @ViewChild(\"grid\", { static: true }) public grid: DxDataGridComponent;\r\n @Input() public serialNos: StockSerialNoAdjustment[];\r\n @Input() public adjustmentNumber: number;\r\n @Input() public storesEnabled: boolean = false;\r\n @Output() public update = new EventEmitter();\r\n\r\n public serialItems: StockSerialNoAdjustment[];\r\n public showDialog: boolean;\r\n public formDirty: boolean = false;\r\n public isAdding: boolean = false;\r\n public originalSerialNos: StockSerialNoAdjustment[];\r\n\r\n public get outstandingNo(): number {\r\n return this.serialNos ? this.adjustmentNumber - (this.addedCount - this.removedCount) : 0;\r\n }\r\n\r\n private get removedCount(): number {\r\n return this.serialNos.filter(s => s.Status === StockAdjustmentSerialNoStatus.Deleted).length;\r\n }\r\n\r\n private get addedCount(): number {\r\n return this.serialNos.filter(s => s.Status === StockAdjustmentSerialNoStatus.Added).length;\r\n }\r\n\r\n constructor(\r\n private stockSerailItemsService: StockSerailItemsService,\r\n private translateService: TranslateService) { }\r\n\r\n ngOnInit() {\r\n this.validateSerialNumber = this.validateSerialNumber.bind(this);\r\n }\r\n\r\n public openDialog(partId: number): void {\r\n this.stockSerailItemsService.GetAllPartSerialItems(partId).subscribe(items => {\r\n this.serialItems = items.map(x => ({\r\n SerialId: x.SerialId,\r\n SerialNo: x.SerialNo,\r\n Allocated: x.Allocated\r\n } as StockSerialNoAdjustment));\r\n this.originalSerialNos = this.serialNos.slice(); // Make a copy of the array to revert to\r\n });\r\n this.showDialog = true;\r\n this.formDirty = false;\r\n this.isAdding = false;\r\n }\r\n\r\n public save(): void {\r\n this.grid.instance.saveEditData().then(() => {\r\n this.update.emit(this.serialNos);\r\n this.showDialog = false;\r\n });\r\n }\r\n\r\n public cancel(): void {\r\n this.showDialog = false;\r\n // clear and push the original array back onto the same array reference\r\n this.serialNos.length = 0;\r\n this.serialNos.push(...this.originalSerialNos);\r\n }\r\n\r\n public isAllocated(serialId: number): boolean {\r\n if (!this.serialItems) {\r\n return false;\r\n }\r\n const item = this.serialItems.find(s => s.SerialId === serialId);\r\n return item && item.Allocated;\r\n }\r\n\r\n public startingAdd(): void {\r\n this.isAdding = true;\r\n }\r\n\r\n public validateSerialNumber(e): boolean {\r\n return this.storesEnabled\r\n ? !this.serialItems.concat(this.serialNos).some(s => s.SerialNo === e.value)\r\n : !this.serialNos.some(s => s.SerialNo === e.value);\r\n }\r\n\r\n public newSerialNo(data: StockSerialNoAdjustment): void {\r\n const idx = this.serialNos.indexOf(data);\r\n this.serialNos[idx].Status = StockAdjustmentSerialNoStatus.Added;\r\n this.serialNos[idx].SerialId = this.serialNos.length * -1;\r\n this.formDirty = true;\r\n this.isAdding = false;\r\n }\r\n\r\n public removeSerialNo(e: any): boolean {\r\n if (e.data.Status !== StockAdjustmentSerialNoStatus.Added) {\r\n const idx = this.serialNos.indexOf(e.data);\r\n this.serialNos[idx].Status = StockAdjustmentSerialNoStatus.Deleted;\r\n this.grid.instance.refresh();\r\n this.formDirty = true;\r\n e.cancel = true;\r\n return false;\r\n } else if (this.isAllocated(e.data.SerialId)) {\r\n e.cancel = true;\r\n return false;\r\n } else {\r\n this.formDirty = true;\r\n }\r\n }\r\n\r\n public onToolbarPreparing(e: any): void {\r\n const item = e.toolbarOptions.items.find(i => i.name === \"addRowButton\");\r\n item.options.icon = null;\r\n item.options.text = this.translateService.instant(\"stock.adjustment.serialno.add\");\r\n item.showText = \"always\";\r\n }\r\n}\r\n","\r\n
\r\n
\r\n

{{ 'stock.adjustment.serialno.adjustment' | translate }}

\r\n

{{ adjustmentNumber }}

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

{{ 'stock.adjustment.serialno.outstanding' | translate }}

\r\n

{{ outstandingNo }}

\r\n
\r\n
\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n Output,\r\n Renderer2,\r\n SimpleChanges,\r\n ViewChild,\r\n ViewEncapsulation\r\n} from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport { StockAdjustmentSerialNoStatus } from \"../enums/stock-adjustment-serialno-status.enum\";\r\nimport { StockSerialNoAdjustment } from \"../models/stock-serialno-adjustment.model\";\r\nimport { StockSerailItemsService } from \"../services/stock-serail-items.service\";\r\n\r\n@Component({\r\n selector: \"app-stock-transfer-serial-number-dialogue\",\r\n templateUrl: \"./stock-transfer-serial-number-dialogue.component.html\",\r\n styleUrls: [\"./stock-transfer-serial-number-dialogue.component.scss\"],\r\n encapsulation: ViewEncapsulation.None\r\n})\r\nexport class StockTransferSerialNumberDialogueComponent implements OnChanges {\r\n\r\n @ViewChild(\"grid\", { static: true }) public grid: DxDataGridComponent;\r\n @Input() public serialNoAdjustments: StockSerialNoAdjustment[];\r\n @Input() public adjustmentNumber: number;\r\n @Output() public update = new EventEmitter();\r\n\r\n public serialItems: StockSerialNoAdjustment[];\r\n public showDialog: boolean;\r\n public formDirty: boolean = false;\r\n public selectedSerialIds: number[] = [];\r\n\r\n private allocatedSerialNumbers: number[] = [];\r\n\r\n constructor(\r\n private stockSerailItemsService: StockSerailItemsService,\r\n private renderer: Renderer2) { }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.serialNoAdjustments && changes.serialNoAdjustments.currentValue) {\r\n this.selectedSerialIds = this.serialNoAdjustments.map(serialNumber => serialNumber.SerialId);\r\n }\r\n }\r\n\r\n public openDialog(partId: number, storeId: number): void {\r\n this.stockSerailItemsService.GetPartSerailItems(partId, storeId).subscribe(items => {\r\n this.serialItems = items;\r\n\r\n this.allocatedSerialNumbers = this.serialItems\r\n .filter(serialNumber => serialNumber.Allocated)\r\n .map(serialNumber => serialNumber.SerialId);\r\n });\r\n this.showDialog = true;\r\n this.formDirty = false;\r\n }\r\n\r\n public save(): void {\r\n this.serialNoAdjustments = [];\r\n for (const id of this.selectedSerialIds) {\r\n const serialItem = this.serialItems.find(i => i.SerialId === id);\r\n this.serialNoAdjustments.push(\r\n {\r\n SerialId: serialItem.SerialId,\r\n SerialNo: serialItem.SerialNo,\r\n Status: StockAdjustmentSerialNoStatus.Deleted,\r\n Allocated: false\r\n });\r\n }\r\n\r\n this.update.emit(this.serialNoAdjustments);\r\n this.showDialog = false;\r\n }\r\n\r\n public cancel(): void {\r\n this.showDialog = false;\r\n }\r\n\r\n public isAllocated(serialId: number): boolean {\r\n if (!this.serialItems) {\r\n return false;\r\n }\r\n const item = this.serialItems.find(s => s.SerialId === serialId);\r\n return item && item.Allocated;\r\n }\r\n\r\n public get correctNumberAllocated(): boolean {\r\n return this.selectedSerialIds.length === this.adjustmentNumber;\r\n }\r\n\r\n public get outstandingNo(): number {\r\n return this.serialNoAdjustments ? this.adjustmentNumber - this.selectedSerialIds.length : 0;\r\n }\r\n\r\n public onSelectionChanged(selection: any): void {\r\n this.selectedSerialIds = selection.selectedRowKeys;\r\n selection.component.deselectRows(this.allocatedSerialNumbers);\r\n this.formDirty = true;\r\n }\r\n\r\n public onRowPrepared(row: any): void {\r\n if (row.rowType === \"data\") {\r\n if (row.data.Allocated) {\r\n this.renderer.addClass(row.rowElement, \"stock-transfer-serial-number-dialogue-row-disabled\");\r\n }\r\n }\r\n }\r\n}\r\n","import { Directive, Input } from \"@angular/core\";\r\nimport { UntypedFormGroup, NG_VALIDATORS, ValidationErrors, Validator } from \"@angular/forms\";\r\n\r\n@Directive({\r\n selector: \"[appStoresDiffer]\",\r\n providers: [{ provide: NG_VALIDATORS, useExisting: StoresDifferDirective, multi: true }]\r\n})\r\nexport class StoresDifferDirective implements Validator {\r\n @Input(\"appStoresDiffer\") appStores: string[] = [];\r\n\r\n public validate(formGroup: UntypedFormGroup): ValidationErrors {\r\n return this.StoresDiffer(this.appStores[0], this.appStores[1])(formGroup);\r\n }\r\n\r\n private StoresDiffer(store1ControlName: string, store2ControlName: string) {\r\n return (formGroup: UntypedFormGroup) => {\r\n const store1Control = formGroup.controls[store1ControlName];\r\n const store2Control = formGroup.controls[store2ControlName];\r\n\r\n if (!store1Control || !store2Control) {\r\n return null;\r\n }\r\n\r\n if (store2Control.errors && !store2Control.errors.mustMatch) {\r\n return null;\r\n }\r\n\r\n if (store1Control.value === store2Control.value) {\r\n store2Control.setErrors({ sameStores: true });\r\n } else {\r\n store2Control.setErrors(null);\r\n }\r\n };\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n

\r\n {{ 'stock.adjustment.title' | translate }}  \r\n {{ adjustment.Id }}\r\n {{ 'stock.adjustment.title.new' | translate }}\r\n

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

\r\n {{ adjustment.Status | stockAdjustmentStatus | translate }}\r\n

\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n
0\" class=\"fntbold\">\r\n {{ data.value }}\r\n
\r\n
\r\n\r\n
\r\n
0\" class=\"fntbold\">\r\n {{ data.value | currency : currencySymbol : 'symbol' : '1.2-2'}}\r\n
\r\n
\r\n\r\n
\r\n \r\n {{ 'stock.adjustment.part-serailno' | translate }}\r\n \r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n \r\n\r\n \r\n
\r\n 0\">\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{'accordion.stock-adjustment.processed-on' | translate }}\r\n {{ adjustment.ProcessedOn | date:'shortDate' }}
{{'accordion.stock-adjustment.processed-by' | translate }}{{ adjustment.ProcessedBy }}
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import { Component, HostListener, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable, Subject } from \"rxjs\";\r\nimport {\r\n ComponentCanDeactivate,\r\n DocumentTypeEnum,\r\n FormMesssageService,\r\n Module,\r\n SettingData,\r\n SettingId,\r\n SettingsService\r\n} from \"servicesight-shared\";\r\nimport { MessageService } from \"src/app/messages/services/message/message.service\";\r\nimport { AdjustmentReasonService } from \"src/app/settings/services/adjustment-reason.service\";\r\nimport { AddPartDialogueComponent } from \"src/app/shared/components/add-part-dialogue/add-part-dialogue.component\";\r\nimport { ConfirmationMessageComponent } from \"src/app/shared/components/confirmation-message/confirmation-message.component\";\r\nimport { MessageDocTypeIds } from \"src/app/shared/enums/messages/message-doc-type-ids.enum\";\r\nimport { MessageTypes } from \"src/app/shared/enums/messages/message-types.enum\";\r\nimport { Ng1ReminderService } from \"src/app/shared/services/ng1-reminder.service\";\r\nimport { StockPermissionsService } from \"./../services/stock-permissions.service\";\r\nimport { LicenseService } from \"../../shared/services/licence/license.service\";\r\nimport { PreviousRouteService } from \"../../shared/services/previous-route.service\";\r\nimport { StockAdjustmentSerialNoStatus } from \"../enums/stock-adjustment-serialno-status.enum\";\r\nimport { StockAdjustmentStatus } from \"../enums/stock-adjustment-status.enum\";\r\nimport { StockAdjustmentAutoFillOptionsModel } from \"../models/stock-adjustment-auto-fill-options.model\";\r\nimport { StockAdjustment } from \"../models/stock-adjustment.model\";\r\nimport { StockPartAdjustment } from \"../models/stock-part-adjustment.model\";\r\nimport { StockSerialNoAdjustment } from \"../models/stock-serialno-adjustment.model\";\r\nimport { StockAdjustmentService } from \"../services/stock-adjustment.service\";\r\nimport { StockSerailItemsService } from \"../services/stock-serail-items.service\";\r\nimport { StockService } from \"../services/stock.service\";\r\nimport { StockAdjustmentAutofillOptionsComponent } from \"../stock-adjustment-autofill-options/stock-adjustment-autofill-options.component\";\r\nimport { StockAdjustmentSerailNoComponent } from \"../stock-adjustment-serail-no/stock-adjustment-serail-no.component\";\r\nimport { StockTransferSerialNumberDialogueComponent } from \"../stock-transfer-serial-number-dialogue/stock-transfer-serial-number-dialogue.component\";\r\n\r\n@Component({\r\n selector: \"app-stock-adjustment\",\r\n templateUrl: \"./stock-adjustment.component.html\",\r\n styleUrls: [\"./stock-adjustment.component.scss\"]\r\n})\r\nexport class StockAdjustmentComponent implements OnInit, ComponentCanDeactivate {\r\n\r\n @ViewChild(\"stockAdjustmentForm\", { static: true }) form: NgForm;\r\n @ViewChild(\"addPart\", { static: true }) partsPopup: AddPartDialogueComponent;\r\n @ViewChild(\"serialNoPopup\", { static: true }) serialNoPopup: StockAdjustmentSerailNoComponent;\r\n @ViewChild(\"autoFillOptionsPopup\", { static: true }) autoFillOptionsPopup: StockAdjustmentAutofillOptionsComponent;\r\n @ViewChild(\"transferSerialNoPopup\", { static: true }) transferSerialNoPopup: StockTransferSerialNumberDialogueComponent;\r\n @ViewChild(\"ChangeStoreMessage\", { static: true }) changeStoreMessage: ConfirmationMessageComponent;\r\n\r\n public formName: string = \"stockAdjustmentForm\";\r\n public adjustment: StockAdjustment = {\r\n ReasonId: null,\r\n Notes: null,\r\n Status: 200,\r\n SrcStoreId: 1,\r\n PartAdjustments: []\r\n };\r\n\r\n public stockStorePartsDataSource: ODataStore;\r\n public partsDataSource: DataSource;\r\n public reasonDataSource: DataSource;\r\n public storeDataSource: DataSource;\r\n public isLoading: boolean = false;\r\n public isNew: boolean = false;\r\n public selectedIds: number[] = [];\r\n public showSerialNo: boolean = false;\r\n public selectedPartAdjustment: StockPartAdjustment;\r\n public selectedSerialNos: StockSerialNoAdjustment[];\r\n public selectedAdjustmentNo: number;\r\n public showCancelWarning: boolean = false;\r\n public id: number;\r\n public hasProcessPermission: boolean;\r\n public currencySymbol: string;\r\n public hasProModule: boolean = false;\r\n public IsCostOnlyValueSelected: boolean = false;\r\n public IsStockTakeSelected: boolean;\r\n public IsTransferSelected: boolean = false;\r\n public CanNavigatePrevious: boolean = false;\r\n public CanNavigateNext: boolean = false;\r\n public IsRecordNavigationEnabled: boolean = false;\r\n public StoresEnabled: boolean = false;\r\n public showReasonChangeMessage: boolean = false;\r\n public groupByBinLocation: boolean = false;\r\n public docType = DocumentTypeEnum;\r\n public saveEnabled: boolean = true;\r\n\r\n private IsNew: boolean = false;\r\n private costOnlyValueReason: any;\r\n private stockTakeReason: any;\r\n private transferReason: any;\r\n private previousStoreId: number = 1;\r\n private previousReasonId: number;\r\n private orderedPartAdjustmentsIds: number[] = [];\r\n\r\n public get alreadyAddedParts(): number[] {\r\n return this.adjustment.PartAdjustments.map(i => i.StockHeaderId);\r\n }\r\n\r\n public get adjustmentFinished(): boolean {\r\n if (!this.adjustment) {\r\n return false;\r\n }\r\n return this.adjustment.Status === StockAdjustmentStatus.Cancelled || this.adjustment.Status === StockAdjustmentStatus.Completed;\r\n }\r\n\r\n public get newAdjsutment(): boolean {\r\n return !this.adjustment || !this.adjustment.Id;\r\n }\r\n\r\n public get isAdjustmentCancelled(): boolean {\r\n return this.adjustment.Status === StockAdjustmentStatus.Cancelled;\r\n }\r\n\r\n public get serialNumbersOutstanding(): boolean {\r\n if (!this.adjustment) {\r\n return false;\r\n }\r\n return this.adjustment.PartAdjustments.some(i => this.hasOutstandingSerialNo(i) && i.SerialNumbered);\r\n }\r\n\r\n public get TotalRowClass(): string {\r\n const val = this.TotalText;\r\n return val < 0 ? \"red\" : (val > 0 ? \"green\" : null);\r\n }\r\n\r\n public get TotalCostClass(): string {\r\n const val = Number(this.TotalCostText.substr(2));\r\n return val < 0 ? \"red\" : (val > 0 ? \"green\" : null);\r\n }\r\n\r\n public get readonly(): boolean {\r\n return this.adjustment.Status !== StockAdjustmentStatus.Outstanding;\r\n }\r\n\r\n public get noParts(): boolean {\r\n return !this.adjustment || !this.adjustment.PartAdjustments || this.adjustment.PartAdjustments.length === 0;\r\n }\r\n\r\n constructor(\r\n private stockService: StockService,\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private stockAdjustmentService: StockAdjustmentService,\r\n private formMessageService: FormMesssageService,\r\n private adjustmentReasonService: AdjustmentReasonService,\r\n private stockSerailItemsService: StockSerailItemsService,\r\n private messageService: MessageService,\r\n private permissionService: StockPermissionsService,\r\n private licenseService: LicenseService,\r\n private ng1reminderService: Ng1ReminderService,\r\n private previousRouteService: PreviousRouteService,\r\n private settingsService: SettingsService,\r\n private translateService: TranslateService\r\n ) {\r\n this.currencySymbol = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n\r\n this.licenseService.GetCompanyHasAccessToModule(Module.Pro).subscribe(r => {\r\n this.hasProModule = r;\r\n });\r\n this.customizeQtyToMoveTotal = this.customizeQtyToMoveTotal.bind(this);\r\n this.onValueChanged = this.onValueChanged.bind(this);\r\n }\r\n\r\n @HostListener(\"window:beforeunload\")\r\n public canDeactivate(): Observable | boolean {\r\n return !this.form.form.dirty;\r\n }\r\n\r\n onValueChanged() {\r\n if (this.IsStockTakeSelected && this.groupByBinLocation) {\r\n this.adjustment.PartAdjustments.sort((a, b) => (a.PartNo.toLocaleLowerCase() > b.PartNo.toLocaleLowerCase() ? 1 : -1));\r\n } else {\r\n this.adjustment.PartAdjustments.sort((a, b) =>\r\n this.orderedPartAdjustmentsIds.indexOf(a.StockHeaderId) - this.orderedPartAdjustmentsIds.indexOf(b.StockHeaderId));\r\n }\r\n }\r\n\r\n ngOnInit() {\r\n this.permissionService.Reload();\r\n this.permissionService.HasProcessStockAdjustmentPermission.subscribe(x => this.hasProcessPermission = x);\r\n this.stockStorePartsDataSource = this.stockService.GetStockStorePartsStore();\r\n this.partsDataSource = this.stockService.GetStockParts();\r\n this.reasonDataSource = this.adjustmentReasonService.AdjustmentReasonsDataSource();\r\n\r\n this.settingsService.getSetting(SettingId.UseAdditionalStores).subscribe((setting: SettingData) => {\r\n this.StoresEnabled = setting.ValueBool;\r\n if (!this.StoresEnabled) {\r\n this.reasonDataSource.filter([\"Name\", \"<>\", \"Transfer\"]);\r\n this.reasonDataSource.load();\r\n }\r\n });\r\n\r\n this.storeDataSource = this.stockService.GetStores();\r\n\r\n this.route.params.subscribe(params => {\r\n if (params.id && params.id > 0) {\r\n this.IsNew = false;\r\n this.id = params.id;\r\n this.reasonDataSource.load().then(() => {\r\n this.load(params.id);\r\n });\r\n } else {\r\n this.IsNew = true;\r\n }\r\n\r\n this.IsRecordNavigationEnabled = !this.IsNew && this.previousRouteService.PreviousUrlContains(\"/stock/adjustment\");\r\n });\r\n\r\n }\r\n\r\n public remove(): void {\r\n for (const id of this.selectedIds) {\r\n const idx = this.adjustment.PartAdjustments.findIndex(p => p.StockHeaderId === id);\r\n const element = this.orderedPartAdjustmentsIds.indexOf(id);\r\n this.adjustment.PartAdjustments.splice(idx, 1);\r\n this.orderedPartAdjustmentsIds.splice(element, 1);\r\n }\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public openAddPart(): void {\r\n this.partsPopup.Show(this.adjustment.SrcStoreId);\r\n }\r\n\r\n public OnPartIdsAdded(ids: number[]): void {\r\n for (const id of ids) {\r\n const existing = this.adjustment.PartAdjustments.find(p => p.StockHeaderId === id);\r\n if (existing) {\r\n continue;\r\n }\r\n\r\n this.stockStorePartsDataSource.byKey({ StockHeaderId: id, StoreId: this.adjustment.SrcStoreId }).then(async (partData) => {\r\n this.adjustment.PartAdjustments.push({\r\n StockHeaderId: id,\r\n PartNo: partData.PartNo,\r\n Description: partData.Description,\r\n BinLocation: partData.BinLocation,\r\n NewBalance: partData.InStock,\r\n InStock: partData.InStock,\r\n SerialNumbered: partData.SerialNumbered,\r\n UnitValue: await this.calculateUnitValue(partData),\r\n Quantity: 0,\r\n hasCalculatedUnitValue: true,\r\n SerialNoAdjustments: []\r\n });\r\n this.orderedPartAdjustmentsIds.push(id);\r\n\r\n //if this is not a transfer then the existing serial number list for the part can be modified so needs retrieving\r\n if (!this.IsTransferSelected && partData.SerialNumbered) {\r\n this.stockSerailItemsService.GetPartSerailItems(id, this.adjustment.SrcStoreId)\r\n .subscribe(sn => {\r\n const idx = this.adjustment.PartAdjustments.findIndex(p => p.StockHeaderId === id);\r\n this.adjustment.PartAdjustments[idx].SerialNoAdjustments = sn;\r\n });\r\n }\r\n\r\n this.stockService.GetStockPart(id).subscribe(d => {\r\n if (d.UnitValue) {\r\n const partAdjustment = this.adjustment.PartAdjustments.find(p => p.StockHeaderId === id);\r\n partAdjustment.UnitValue = d.UnitValue;\r\n partAdjustment.hasCalculatedUnitValue = false;\r\n }\r\n });\r\n });\r\n }\r\n\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public view(): void {\r\n this.router.navigate([\"/stock\", \"report\", this.adjustment.Id]);\r\n }\r\n\r\n public newReminder(): void {\r\n this.ng1reminderService.CreateStockAdjustmentReminder(this.adjustment.Id);\r\n }\r\n\r\n public newMessage(): void {\r\n this.messageService.SetNewMessageParameters(0, MessageTypes.RefMessage, false, MessageDocTypeIds.StockAdjustment, this.adjustment.Id);\r\n this.router.navigate([\"messages/newmessage\"]);\r\n }\r\n\r\n public onConfirmCancel(isConfirmed: boolean): void {\r\n if (isConfirmed) {\r\n this.isLoading = true;\r\n this.formMessageService\r\n .RegisterObservable(this.stockAdjustmentService.CancelAdjustment(this.adjustment), this.formName)\r\n .subscribe(id => {\r\n this.load(id);\r\n this.isLoading = false;\r\n this.showCancelWarning = false;\r\n }, () => this.isLoading = false);\r\n } else {\r\n this.showCancelWarning = false;\r\n }\r\n }\r\n\r\n public cancelAdjustment(): void {\r\n this.showCancelWarning = true;\r\n }\r\n\r\n public process(): void {\r\n this.isLoading = true;\r\n this.resetPartsWithCalculatedUnitValue();\r\n this.formMessageService\r\n .RegisterObservable(this.stockAdjustmentService.Process(this.adjustment), this.formName)\r\n .subscribe(id => {\r\n this.load(id);\r\n this.isLoading = false;\r\n }, () => this.isLoading = false);\r\n }\r\n\r\n public cancel(): void {\r\n if (this.adjustment.Id) {\r\n this.load(this.adjustment.Id);\r\n this.form.form.markAsPristine();\r\n } else {\r\n this.router.navigate([\"/stock/adjustment-list\"]);\r\n }\r\n }\r\n\r\n public Save(): void {\r\n if (!this.saveEnabled){\r\n return;\r\n }\r\n this.saveEnabled = false;\r\n this.SaveForm()\r\n .subscribe(id => {\r\n this.saveEnabled = true;\r\n if (!this.adjustment.Id) {\r\n this.router.navigate([\"/stock\", \"adjustment\", id, true]);\r\n } else {\r\n this.load(id);\r\n }\r\n }, () => {\r\n this.saveEnabled = true;\r\n });\r\n }\r\n\r\n private SaveForm(): Subject {\r\n this.resetPartsWithCalculatedUnitValue();\r\n\r\n return this.formMessageService\r\n .RegisterObservable(this.stockAdjustmentService.SaveAdjustment(this.adjustment), this.formName);\r\n }\r\n\r\n public openSerialNo(row: StockPartAdjustment): void {\r\n this.selectedPartAdjustment = row;\r\n this.selectedSerialNos = row.SerialNoAdjustments || [];\r\n this.selectedAdjustmentNo = row.NewBalance - row.InStock;\r\n if (this.IsTransferSelected) {\r\n this.transferSerialNoPopup.openDialog(row.StockHeaderId, this.adjustment.SrcStoreId);\r\n } else {\r\n this.serialNoPopup.openDialog(row.StockHeaderId);\r\n }\r\n }\r\n\r\n public updateSerialNos(nos: StockSerialNoAdjustment[]): void {\r\n this.selectedPartAdjustment.SerialNoAdjustments = nos;\r\n this.Save();\r\n }\r\n\r\n public calculateDifference(rowData: any): number {\r\n const result = rowData.NewBalance - rowData.InStock;\r\n return isNaN(result) ? null : result;\r\n }\r\n\r\n public calculateTotalCost = (rowData: any): number => {\r\n const unitValue = isNaN(rowData.UnitValue) ? 0 : rowData.UnitValue;\r\n\r\n if (this.IsCostOnlyValueSelected) {\r\n const inStock = isNaN(rowData.InStock) ? 0 : rowData.InStock;\r\n return inStock * unitValue;\r\n }\r\n\r\n let difference = rowData.NewBalance - rowData.InStock;\r\n if (isNaN(difference)) {\r\n difference = 0;\r\n }\r\n\r\n return difference * unitValue;\r\n };\r\n\r\n public get TotalText(): number {\r\n let val = 0;\r\n this.adjustment.PartAdjustments.forEach(part => val += part.NewBalance - part.InStock);\r\n return val;\r\n }\r\n\r\n public get TotalCostText(): string {\r\n let val = 0;\r\n this.adjustment.PartAdjustments.forEach(part => val += this.calculateTotalCost(part));\r\n return `${this.currencySymbol} ${val.toFixed(2)}`;\r\n }\r\n\r\n public hasOutstandingSerialNo(row: StockPartAdjustment): boolean {\r\n if (this.IsTransferSelected) {\r\n return row.Quantity !== row.SerialNoAdjustments.length;\r\n } else {\r\n const diff = row.NewBalance - row.InStock;\r\n if (row.SerialNoAdjustments) {\r\n const removed = row.SerialNoAdjustments.filter(s => s.Status === StockAdjustmentSerialNoStatus.Deleted).length;\r\n const added = row.SerialNoAdjustments.filter(s => s.Status === StockAdjustmentSerialNoStatus.Added).length;\r\n return diff !== (added - removed);\r\n } else {\r\n return diff !== 0;\r\n }\r\n }\r\n }\r\n\r\n public handleUnitValueChanged(part: StockPartAdjustment) {\r\n part.hasCalculatedUnitValue = false;\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public async handleSelectedReasonChanged(event: any): Promise {\r\n let allowReasonChange: boolean = true;\r\n\r\n if (event.event) {\r\n const reasonId = event.value;\r\n const previousReasonId = event.previousValue;\r\n\r\n if (this.adjustment && this.adjustment.PartAdjustments.length > 0) {\r\n if (previousReasonId === this.getTransferReasonId() || reasonId === this.getTransferReasonId()) {\r\n allowReasonChange = false;\r\n }\r\n }\r\n\r\n if (allowReasonChange) {\r\n this.IsCostOnlyValueSelected = reasonId === this.getCostOnlyValueReasonId();\r\n this.IsStockTakeSelected = reasonId === this.getStockTakeReasonId();\r\n this.IsTransferSelected = reasonId === this.getTransferReasonId();\r\n if(!this.IsTransferSelected) {\r\n this.adjustment.DestStoreId = null;\r\n }\r\n } else {\r\n this.showReasonChangeMessage = true;\r\n this.previousReasonId = previousReasonId;\r\n }\r\n\r\n for (const part of this.adjustment.PartAdjustments) {\r\n if(part.hasCalculatedUnitValue) {\r\n part.UnitValue = await this.calculateUnitValue({ InStock: part.InStock, StockHeaderId: part.StockHeaderId});\r\n }\r\n }\r\n }\r\n }\r\n\r\n public handleSelectedStoreChanged(event: any): void {\r\n if (event.event) {\r\n if (this.adjustment && this.adjustment.PartAdjustments.length > 0) {\r\n this.previousStoreId = event.previousValue;\r\n this.changeStoreMessage.show();\r\n }\r\n }\r\n }\r\n\r\n public OnRowPrepared(row: any): void {\r\n if (row.rowType === \"data\" && row.data.UnitValue === 0 && this.hasProModule) {\r\n row.rowElement.className = `${row.rowElement.className} warning`;\r\n }\r\n }\r\n\r\n private load = (id: string | number): void => {\r\n this.stockAdjustmentService.GetAdjustment(id).subscribe(async a => {\r\n this.adjustment = a;\r\n this.orderedPartAdjustmentsIds = this.adjustment.PartAdjustments.map(i => i.StockHeaderId);\r\n this.IsCostOnlyValueSelected = a.ReasonId === this.getCostOnlyValueReasonId();\r\n this.IsStockTakeSelected = a.ReasonId === this.getStockTakeReasonId();\r\n this.IsTransferSelected = a.ReasonId === this.getTransferReasonId();\r\n if(!this.IsTransferSelected) {\r\n this.adjustment.DestStoreId = null;\r\n }\r\n this.SetCurrentItem(a.Id);\r\n for (const part of this.adjustment.PartAdjustments) {\r\n const partData = await this.stockStorePartsDataSource.byKey({ StockHeaderId: part.StockHeaderId, StoreId: this.adjustment.SrcStoreId });\r\n if (a.Status === StockAdjustmentStatus.Completed) {\r\n part.InStock = part.NewBalance - part.Quantity;\r\n } else {\r\n part.InStock = partData.InStock;\r\n }\r\n if (!part.UnitValue && part.NewBalance < part.InStock) {\r\n if (partData.UnitValue) {\r\n part.UnitValue = partData.UnitValue;\r\n } else {\r\n part.UnitValue = await this.calculateUnitValue(partData);\r\n part.hasCalculatedUnitValue = true;\r\n }\r\n }\r\n }\r\n });\r\n };\r\n\r\n private async calculateUnitValue(partData: any): Promise {\r\n if (partData.InStock === 0 && this.IsStockTakeSelected) {\r\n return await this.stockService.GetPastCost(partData.StockHeaderId).toPromise();\r\n } else if (partData.InStock === 0) {\r\n return 0;\r\n }\r\n\r\n const unitValue = partData.CostBalance / partData.InStock;\r\n return isNaN(unitValue) ? 0 : unitValue;\r\n }\r\n\r\n private getCostOnlyValueReasonId(): number {\r\n if (!this.costOnlyValueReason) {\r\n this.costOnlyValueReason = this.reasonDataSource.items().find(v => v.Name.toLowerCase() === \"cost value only\");\r\n }\r\n\r\n if (this.costOnlyValueReason) {\r\n return this.costOnlyValueReason.AdjustmentReasonId;\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n private getStockTakeReasonId(): number {\r\n if (!this.stockTakeReason) {\r\n this.stockTakeReason = this.reasonDataSource.items().find(v => v.Name.toLowerCase() === \"stock take\");\r\n }\r\n\r\n if (this.stockTakeReason) {\r\n return this.stockTakeReason.AdjustmentReasonId;\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n private getTransferReasonId(): number {\r\n if (!this.transferReason) {\r\n this.transferReason = this.reasonDataSource.items().find(v => v.Name.toLowerCase() === \"transfer\");\r\n }\r\n\r\n if (this.transferReason) {\r\n return this.transferReason.AdjustmentReasonId;\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n private resetPartsWithCalculatedUnitValue() {\r\n for (const part of this.adjustment.PartAdjustments) {\r\n if (part.hasCalculatedUnitValue) {\r\n part.UnitValue = 0.00;\r\n }\r\n }\r\n }\r\n\r\n private SetCurrentItem(id: number) {\r\n if (this.IsRecordNavigationEnabled) {\r\n this.stockAdjustmentService.SetCurrentItem(id).then(() => {\r\n this.CanNavigatePrevious = this.stockAdjustmentService.IsPreviousAvailable();\r\n this.CanNavigateNext = this.stockAdjustmentService.IsNextAvailable();\r\n });\r\n }\r\n }\r\n\r\n public NavigateNext(): void {\r\n if (this.CanNavigateNext) {\r\n this.stockAdjustmentService.GetNextId().then(nextId => {\r\n this.router.navigate([\"stock\", \"adjustment\", nextId]);\r\n });\r\n }\r\n }\r\n\r\n public NavigatePrevious(): void {\r\n if (this.CanNavigatePrevious) {\r\n this.stockAdjustmentService.GetPreviousId().then(previousId => {\r\n this.router.navigate([\"stock\", \"adjustment\", previousId]);\r\n });\r\n }\r\n }\r\n\r\n public AutoFillParts(): void {\r\n this.autoFillOptionsPopup.Show();\r\n }\r\n\r\n public OpenCountSheet(): void {\r\n if (this.form.form.dirty && !this.adjustmentFinished) {\r\n this.SaveForm()\r\n .subscribe(id => {\r\n this.router.navigate([\"stock\", \"adjustment\", id, \"take\", \"report\"]);\r\n });\r\n } else {\r\n this.router.navigate([\"stock\", \"adjustment\", this.adjustment.Id, \"take\", \"report\"]);\r\n }\r\n }\r\n\r\n public HandleFillRequested(options: StockAdjustmentAutoFillOptionsModel): void {\r\n options.StoreId = this.adjustment.SrcStoreId;\r\n this.stockService.GetPartIdsForAutoFill(options).subscribe(ids => this.OnPartIdsAdded(ids));\r\n }\r\n\r\n public customizeQtyToMoveTotal(): string {\r\n let value = 0;\r\n if (this.adjustment.PartAdjustments) {\r\n this.adjustment.PartAdjustments.forEach(item => {\r\n value += item.Quantity || 0;\r\n });\r\n }\r\n\r\n return this.translateService.instant(\"stock.adjustment.qty-to-move-total\", { val: value });\r\n }\r\n\r\n public handleQtyToMoveValueChanged(e: any, rowData: any) {\r\n if (e.event) {\r\n //the current store instock has the value added even though its going to be decreased, this is due to how the back end\r\n //processes the data along with otherwise storing the value and reloading shows a negative\r\n const row = this.adjustment.PartAdjustments.find(p => p.StockHeaderId === rowData.StockHeaderId);\r\n let newBalance = row.InStock + e.value;\r\n newBalance = isNaN(newBalance) ? 0 : newBalance;\r\n if (row.NewBalance !== newBalance) {\r\n row.NewBalance = newBalance;\r\n }\r\n }\r\n }\r\n\r\n public ResetParts(): void {\r\n for (const part of this.adjustment.PartAdjustments) {\r\n if (this.IsTransferSelected) {\r\n part.NewBalance = 0;\r\n part.Quantity = 0;\r\n part.SerialNoAdjustments = [];\r\n }\r\n this.stockStorePartsDataSource.byKey({ StockHeaderId: part.StockHeaderId, StoreId: this.adjustment.SrcStoreId }).then(async (partData) => {\r\n if (partData) {\r\n part.InStock = partData.InStock;\r\n part.NewBalance = partData.InStock;\r\n part.UnitValue = await this.calculateUnitValue(part);\r\n\r\n //Serial shouldnt be pre loaded for transfer as the user selects which to move\r\n if (partData.SerialNumbered && !this.IsTransferSelected) {\r\n this.stockSerailItemsService.GetPartSerailItems(part.StockHeaderId, this.adjustment.SrcStoreId).subscribe(sn => { part.SerialNoAdjustments = sn; });\r\n }\r\n } else {\r\n part.InStock = 0;\r\n part.UnitValue = 0;\r\n }\r\n });\r\n }\r\n }\r\n\r\n public ResetStore(): void {\r\n this.adjustment.SrcStoreId = this.previousStoreId;\r\n }\r\n\r\n public ResetReason(): void {\r\n this.adjustment.ReasonId = this.previousReasonId;\r\n\r\n this.IsCostOnlyValueSelected = this.adjustment.ReasonId === this.getCostOnlyValueReasonId();\r\n this.IsStockTakeSelected = this.adjustment.ReasonId === this.getStockTakeReasonId();\r\n this.IsTransferSelected = this.adjustment.ReasonId === this.getTransferReasonId();\r\n if(!this.IsTransferSelected) {\r\n this.adjustment.DestStoreId = null;\r\n }\r\n }\r\n\r\n public disableAddParts(): boolean {\r\n return !this.adjustment.ReasonId ||\r\n (this.IsTransferSelected &&\r\n (\r\n !this.adjustment.SrcStoreId || !this.adjustment.DestStoreId\r\n ) ||\r\n (\r\n this.adjustment.SrcStoreId === this.adjustment.DestStoreId\r\n )\r\n );\r\n }\r\n}\r\n","{{ 'accordion.preferred.supplier.not.selected' | translate }}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ 'accordion.preferred.supplier.name' | translate }}\r\n \r\n {{preferredSupplier.Name}}\r\n \r\n
{{ 'accordion.preferred.supplier.on.hold' | translate }}{{ preferredSupplier.OnHold | boolToString | translate}}
{{ 'accordion.preferred.supplier.part.no' | translate }}{{ preferredSupplier.PartNo }}
{{ 'accordion.preferred.supplier.buying.price' | translate }}{{ preferredSupplier.BuyingPrice | currency: preferredSupplier.CurrencySymbol}}
{{ 'accordion.preferred.supplier.lead.time' | translate }}\r\n \r\n {{ \"stock.suppliers.lead.time.days\" | translate: { value: preferredSupplier.LeadTime } }}\r\n \r\n
{{ 'accordion.preferred.supplier.min.order.qty' | translate }}{{ preferredSupplier.MinOrderQty }}
","import { Component, Input, OnChanges } from \"@angular/core\";\r\nimport { StockSupplierModel } from \"./../../../../stock/models/stock-supplier.model\";\r\n\r\n@Component({\r\n selector: \"app-preferred-supplier-accordion-item\",\r\n templateUrl: \"./preferred-supplier-accordion-item.component.html\",\r\n styleUrls: [\"./preferred-supplier-accordion-item.component.scss\"]\r\n})\r\nexport class PreferredSupplierAccordionItemComponent implements OnChanges {\r\n\r\n @Input() suppliers: StockSupplierModel[] = [];\r\n\r\n public preferredSupplier: StockSupplierModel = null;\r\n\r\n public ngOnChanges(): void {\r\n if (this.suppliers) {\r\n this.preferredSupplier = this.suppliers.find(x => x.Preferred === true && !x.OnHold);\r\n }\r\n }\r\n}\r\n","{{ 'accordion.purchases.no.open.purchase.orders' | translate }}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{\"accordion.purchases.order.no\" | translate}}\r\n \r\n {{purchase.PurchaseId}}\r\n {{purchase.QtyOutstanding}}{{purchase.Status | purchaseOrderStatus | translate}}
\r\n","import { StockPurchaseModel } from \"./../models/stock-purchase.model\";\r\nimport { Component, Input, OnChanges } from \"@angular/core\";\r\nimport { AccordionDataService } from \"../accordion-data.service\";\r\n\r\n@Component({\r\n selector: \"app-stock-purchases-accordion-item\",\r\n templateUrl: \"./stock-purchases-accordion-item.component.html\",\r\n styleUrls: [\"./stock-purchases-accordion-item.component.scss\"]\r\n})\r\nexport class StockPurchasesAccordionItemComponent implements OnChanges {\r\n @Input() stockHeaderId: number;\r\n public purchases: StockPurchaseModel[] = [];\r\n\r\n constructor(\r\n private dataService: AccordionDataService) { }\r\n\r\n public ngOnChanges(): void {\r\n if (this.stockHeaderId) {\r\n this.dataService.GetStockPurchases(this.stockHeaderId).subscribe(result => {\r\n this.purchases = result;\r\n });\r\n }\r\n }\r\n}\r\n","{{'accordion.partNotProvided' | translate}}\r\n{{ 'accordion.noCurrentDemands' | translate }}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ 'accordion.demand.job-no' | translate }}\r\n \r\n {{item.JobId}}\r\n \r\n \r\n {{item.Demand}}\r\n
{{ 'accordion.demand.sales.order.no' | translate }}\r\n \r\n {{item.SalesOrderNumber}}\r\n \r\n \r\n {{item.Demand}}\r\n
\r\n","import { Component, Input, OnInit } from \"@angular/core\";\r\nimport { AccordionDataService } from \"../accordion-data.service\";\r\nimport { JobPartsModel } from \"../../../models/job-parts.model\";\r\nimport { SalesOrderPartsModel } from \"../../../models/sales-order-part.model\";\r\nimport { combineLatest } from \"rxjs\";\r\n\r\n@Component({\r\n selector: \"app-demand-accordion-item\",\r\n templateUrl: \"./demand-accordion-item.component.html\",\r\n styleUrls: [\"./demand-accordion-item.component.scss\"]\r\n})\r\nexport class DemandAccordionItemComponent implements OnInit {\r\n @Input() PartId: number;\r\n public jobParts: JobPartsModel[] = [];\r\n public salesOrderParts: SalesOrderPartsModel[] = [];\r\n public isEmptyTab: boolean = true;\r\n\r\n constructor(private dataService: AccordionDataService) { }\r\n\r\n ngOnInit(): void {\r\n if (!this.PartId) {\r\n return;\r\n }\r\n const jobs$ = this.dataService.getJobsByPartId(this.PartId);\r\n const sales$ = this.dataService.getSalesOrdersByPartId(this.PartId);\r\n combineLatest([jobs$, sales$])\r\n .subscribe(([jobs, sales]) => {\r\n this.jobParts = jobs.filter(i => i.Demand > 0);\r\n this.salesOrderParts = sales.filter(i => i.Demand > 0);\r\n this.isEmptyTab = this.jobParts.length === 0 && this.salesOrderParts.length === 0;\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n

{{ part.InStock }}

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

{{ part.Demand }}

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

{{ part.Available }}

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

{{ hasPurchaseOrders ? part.OnPO : 0 }}

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

{{'stock.detail.references' | translate }}

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

{{\"stock.part.manufacturer.label\" | translate }}

\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n","import { Component, Input, OnInit } from \"@angular/core\";\r\nimport { ControlContainer, NgForm } from \"@angular/forms\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { SettingId, SettingsService, UICustomisation, UserRefType, UserReferenceService } from \"servicesight-shared\";\r\nimport { StockManufacturerService } from \"../../settings/services/stock-manufacturer.service\";\r\nimport { LicenseService } from \"../../shared/services/licence/license.service\";\r\nimport { StockPart } from \"../models/stock-part.model\";\r\n\r\n@Component({\r\n selector: \"app-stock-general\",\r\n templateUrl: \"./stock-general.component.html\",\r\n styleUrls: [\"./stock-general.component.scss\"],\r\n viewProviders: [ { provide: ControlContainer, useExisting: NgForm } ]\r\n})\r\nexport class StockGeneralComponent implements OnInit {\r\n\r\n @Input() public part: StockPart;\r\n\r\n public userRef1Label: string;\r\n public userRef2Label: string;\r\n public userRef3Label: string;\r\n public userRef1DataSource: DataSource;\r\n public userRef2DataSource: DataSource;\r\n public ManufacturerDataSource: DataSource;\r\n\r\n public currencyFormat;\r\n public currencyCode: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencyCode\"));\r\n public currencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n public hasProModule: boolean;\r\n public hasPurchaseOrders: boolean;\r\n public additionalStoresEnabled: boolean = false;\r\n\r\n constructor(\r\n private userRefsService: UserReferenceService,\r\n private stockManufacturerService: StockManufacturerService,\r\n private settingsService: SettingsService,\r\n licenseService: LicenseService\r\n ) {\r\n licenseService.GetCompanyHasAccessToModules().subscribe(r => {\r\n this.hasProModule = r.ProEnabled;\r\n this.hasPurchaseOrders = r.PurchaseOrdersEnabled;\r\n });\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.ManufacturerDataSource = this.stockManufacturerService.StockManufacturerDataSource();\r\n\r\n this.userRef1Label = this.userRefsService.getLabel(UICustomisation.STOCK_REF1);\r\n this.userRef2Label = this.userRefsService.getLabel(UICustomisation.STOCK_REF2);\r\n this.userRef3Label = this.userRefsService.getLabel(UICustomisation.STOCK_REF3);\r\n\r\n this.userRef1DataSource = this.userRefsService.getListDataSource(UserRefType.STOCK_1);\r\n this.userRef2DataSource = this.userRefsService.getListDataSource(UserRefType.STOCK_2);\r\n\r\n this.currencyFormat = { type: \"currency\", precision: 2, currency: this.currencyCode };\r\n\r\n this.settingsService.getSetting(SettingId.UseAdditionalStores).subscribe(res => {\r\n this.additionalStoresEnabled = res.ValueBool;\r\n });\r\n }\r\n}\r\n","import { Component, Input } from \"@angular/core\";\r\nimport { StoreType } from \"servicesight-shared\";\r\n\r\n@Component({\r\n templateUrl: \"./store-icon.component.html\",\r\n styleUrls: [\"./store-icon.component.scss\"],\r\n selector: \"app-store-icon\"\r\n})\r\nexport class StoreIconComponent\r\n{\r\n @Input() public StoreType: number = 2;\r\n\r\n @Input() public StoreId: number = 0;\r\n\r\n private MainStoreId: number = 1;\r\n\r\n public get StoreClasses() {\r\n return {\r\n \"main-store\": this.StoreId === this.MainStoreId,\r\n \"normal-store\": this.StoreId !== this.MainStoreId,\r\n \"fa-inventory\": this.StoreType === StoreType.Store,\r\n \"fa-truck\": this.StoreType === StoreType.Van,\r\n \"fa-pallet\": this.StoreType === StoreType.Consignment\r\n };\r\n }\r\n}\r\n","","
\r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n {{ data.value | currency: currencySymbol }}\r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n","import { formatCurrency } from \"@angular/common\";\r\nimport {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnInit,\r\n Output,\r\n ViewChild,\r\n ViewEncapsulation\r\n} from \"@angular/core\";\r\nimport { ControlContainer, NgForm } from \"@angular/forms\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport { StoreModel, StoreService } from \"servicesight-shared\";\r\nimport { IStoreLevelLine } from \"../../models/istore-level-line.model\";\r\n\r\n@Component({\r\n selector: \"app-stock-levels\",\r\n templateUrl: \"./stock-levels.component.html\",\r\n styleUrls: [\"./stock-levels.component.scss\"],\r\n viewProviders: [ { provide: ControlContainer, useExisting: NgForm } ],\r\n encapsulation: ViewEncapsulation.None\r\n})\r\nexport class StockLevelsComponent implements OnInit {\r\n\r\n @Input() public form: NgForm;\r\n @Input() public storeLines: IStoreLevelLine[];\r\n @Input() public showSerialNumberButton: boolean;\r\n @Input() public showBinLocation: boolean = true;\r\n @Output() openSerialNos: EventEmitter = new EventEmitter();\r\n\r\n @ViewChild(\"grid\", { static: true }) private grid: DxDataGridComponent;\r\n\r\n public currencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n public locale: string = JSON.parse(localStorage.getItem(\"ls.UserBrowserLocale\"));\r\n public stores: StoreModel[] = [];\r\n public storeLookup: { [storeId: number]: StoreModel } = { };\r\n\r\n constructor(private storeService: StoreService) {\r\n this.TotalCostFormatter = this.TotalCostFormatter.bind(this);\r\n this.SortStoreName = this.SortStoreName.bind(this);\r\n this.SortType = this.SortType.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.storeService.GetStores().subscribe(stores => {\r\n this.stores = stores;\r\n\r\n this.storeLookup = this.stores.reduce((lookup, value) => {\r\n lookup[value.StoreId] = value;\r\n return lookup;\r\n }, { });\r\n });\r\n }\r\n\r\n public OnSelectSerialNumbers(storeId: number): void {\r\n this.openSerialNos.emit(storeId);\r\n }\r\n\r\n public OnCellPrepared(data: any): any {\r\n if (data.rowType === \"data\" && data.column.caption !== \"Type\") {\r\n // don't highlight the row if main and max are 0\r\n if ((data.data.Min !== 0 || data.data.Max !== 0) && (data.data.InStock < data.data.Min || data.data.InStock > data.data.Max)) {\r\n data.cellElement.className += \" stock-general-stores out-of-range\";\r\n } else {\r\n data.cellElement.className = data.cellElement.className.replace(\"stock-general-stores out-of-range\", \"\");\r\n }\r\n }\r\n }\r\n\r\n public OnSaved() {\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public StoreType(storeId: number): number {\r\n const store: StoreModel = this.storeLookup[storeId];\r\n return store ? store.StoreType : 0;\r\n }\r\n\r\n public SortStoreName(rowData: any): string {\r\n const mainStoreId = 1;\r\n if (rowData.StoreId === mainStoreId) {\r\n const columnOptions = this.grid.instance.columnOption(0);\r\n const sortOrder: string = (columnOptions && columnOptions.sortOrder) ? columnOptions.sortOrder : \"asc\";\r\n\r\n return sortOrder === \"asc\" ? \"!\" : \"|\";\r\n } else {\r\n const store = this.storeLookup[rowData.StoreId];\r\n return store ? store.StoreName : \"|\";\r\n }\r\n }\r\n\r\n // provides the sort value for the min column\r\n // these are numbers but are treated as strings if they are edited messing up the sort order\r\n public SortMinColumn(rowData: any): number {\r\n return parseInt(rowData.Min, 10);\r\n }\r\n\r\n // provides the sort value for the min column\r\n // these are numbers but are treated as strings if they are edited messing up the sort order\r\n public SortMaxColumn(rowData: any): number {\r\n return parseInt(rowData.Max, 10);\r\n }\r\n\r\n public SortType(rowData: any): number {\r\n const store = this.storeLookup[rowData.StoreId];\r\n return store ? store.StoreType : 0;\r\n }\r\n\r\n public MinLessThanMax(data: any): boolean {\r\n const value = parseInt(data.value, 10);\r\n const max = parseInt(data.data.Max, 10);\r\n // don't throw this error if values entered are not numbers\r\n // don't throw this error if min and max are both zero\r\n return isNaN(value) || isNaN(max) || value <= max || value === 0 || max === 0;\r\n }\r\n\r\n public MaxGreaterThanMin(data: any): boolean {\r\n const value = parseInt(data.value, 10);\r\n const min = parseInt(data.data.Min, 10);\r\n // don't throw this error if values entered are not numbers\r\n return isNaN(value) || isNaN(min) || value >= min || value === 0 || min === 0;\r\n }\r\n\r\n public TotalCostFormatter(data: any): string {\r\n return formatCurrency(data.value,\r\n this.locale,\r\n this.currencySymbol);\r\n }\r\n\r\n public FilterStoreLines(storeIds: number[]): void {\r\n if (storeIds.length > 0) {\r\n const filter = [];\r\n storeIds.forEach(storeId => {\r\n filter.push([\"StoreId\", \"=\", storeId]);\r\n filter.push(\"or\");\r\n });\r\n filter.pop();\r\n this.grid.instance.filter(filter);\r\n } else {\r\n this.grid.instance.clearFilter();\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild,\r\n ViewEncapsulation\r\n} from \"@angular/core\";\r\nimport { ControlContainer, NgForm } from \"@angular/forms\";\r\nimport { SettingData, SettingId, SettingsService } from \"servicesight-shared\";\r\nimport { StockPart } from \"../models/stock-part.model\";\r\nimport { StockService } from \"../services/stock.service\";\r\nimport { StockLevelsComponent } from \"src/app/shared/components/stock-levels/stock-levels.component\";\r\n\r\n@Component({\r\n selector: \"app-stock-general-stores\",\r\n templateUrl: \"./stock-general-stores.component.html\",\r\n styleUrls: [\"./stock-general-stores.component.scss\"],\r\n viewProviders: [ { provide: ControlContainer, useExisting: NgForm } ],\r\n encapsulation: ViewEncapsulation.None\r\n})\r\nexport class StockGeneralStoresComponent implements OnInit, OnChanges {\r\n\r\n @Input() public part: StockPart;\r\n\r\n @Input() public form: NgForm;\r\n @Output() openSerialNos: EventEmitter = new EventEmitter();\r\n\r\n @ViewChild(\"stockLevels\", { static: true }) private stockLevels: StockLevelsComponent;\r\n\r\n public currencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n\r\n public ShowActiveStores: boolean = true;\r\n public StoresEnabled: boolean = false;\r\n public activeStoreIds: number[] = [];\r\n\r\n constructor(private stockService: StockService,\r\n private settingsService: SettingsService) {\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.settingsService.getSetting(SettingId.UseAdditionalStores).subscribe((setting: SettingData) => {\r\n this.StoresEnabled = setting.ValueBool;\r\n if (!this.StoresEnabled) {\r\n this.ShowActiveStores = false;\r\n }\r\n });\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.part && Number(changes.part.currentValue.Id) > 0) {\r\n this.stockService.GetActiveStoreIds(this.part.Id).subscribe(activeStoreIds => {\r\n this.activeStoreIds = activeStoreIds;\r\n this.FilterStoreLines(true);\r\n });\r\n }\r\n }\r\n\r\n public OnSaved() {\r\n this.MarkAsDirty();\r\n }\r\n\r\n public HandleCurrentSwitchChanged(e: any): void {\r\n this.FilterStoreLines(e.value);\r\n }\r\n\r\n public OpenSerialNos(storeId: number): void {\r\n this.openSerialNos.emit(storeId);\r\n }\r\n\r\n private MarkAsDirty(): void {\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n private FilterStoreLines(showCurrentStores: boolean): void {\r\n if (showCurrentStores) {\r\n this.stockLevels.FilterStoreLines(this.activeStoreIds);\r\n } else {\r\n this.stockLevels.FilterStoreLines([]);\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n
\r\n \r\n {{'stock.history.job' | translate}} {{item.data.ElementId}} {{item.data.Date | date: \"short\"}},\r\n {{item.data.ItemType}} at {{item.data.ItemText}} - {{item.data.Status | jobStatus | translate}}\r\n \r\n \r\n {{'stock.history.message' | translate}} {{item.data.Date | date: \"short\"}}\r\n \r\n \r\n {{'stock.history.reminder' | translate}} {{item.data.ElementId}} {{item.data.Date | date: \"short\"}}, {{item.data.ItemType}} {{item.data.Contact ? '- '+item.data.Contact : ''}} {{item.data.ItemText ? '- '+item.data.ItemText : ''}} - {{item.data.Status | taskStatus | translate}}\r\n \r\n \r\n {{'stock.history.adjustment' | translate}} {{item.data.ElementId}} {{item.data.Date | date: \"short\"}}, {{item.data.ItemType}}\r\n \r\n \r\n {{'stock.history.purchase.orders' | translate}} {{item.data.ElementId}} {{item.data.Date | date: \"shortDate\"}} from {{item.data.ItemText}} - {{item.data.Status | purchaseOrderStatus | translate}}\r\n \r\n \r\n {{'stock.history.goods.received.note' | translate}} {{item.data.ElementId}} {{item.data.Date | date: \"shortDate\"}} from {{item.data.ItemText}} - {{item.data.Status | goodsReceivedStatus | translate}}\r\n \r\n \r\n {{'stock.history.returns-note' | translate}} {{item.data.ElementId}} {{item.data.Date | date: \"shortDate\"}} {{\"stock.history.from-grn\" | translate}} {{item.data.AdviceNoteId}} {{\"label.to.lower\" | translate}} {{item.data.ItemText}} - {{item.data.Status | returnsNoteStatus | translate}}\r\n \r\n \r\n {{'stock.history.sales.order' | translate}} {{item.data.ElementId}} {{item.data.Date | date: \"shortDate\"}} for {{item.data.ItemText}} - {{item.data.Status | salesOrderStatus | translate}}\r\n \r\n \r\n {{'stock.history.despatch.note' | translate}} {{item.data.ElementId}} {{item.data.Date | date: \"shortDate\"}} to {{item.data.ItemText}} - {{item.data.Status | despatchNoteStatus | translate}}\r\n \r\n \r\n {{'stock.history.credit' | translate}} {{item.data.ElementId}} {{item.data.Date | date: \"short\"}} against Invoice {{item.data.ItemText}}\r\n \r\n

\r\n {{item.data.Description}}\r\n

\r\n
\r\n\r\n
","import { Component, Input, OnChanges, OnInit, ViewChild } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { DocumentTypeEnum, SettingData, SettingId, SettingsService } from \"servicesight-shared\";\r\nimport { LicenseService } from \"./../../shared/services/licence/license.service\";\r\nimport { StockService } from \"../services/stock.service\";\r\nimport { StoreService } from \"../../settings/services/store.service\";\r\n\r\n@Component({\r\n selector: \"app-stock-history\",\r\n templateUrl: \"./stock-history.component.html\",\r\n styleUrls: [\"./stock-history.component.scss\"]\r\n})\r\nexport class StockHistoryComponent implements OnInit, OnChanges {\r\n\r\n @Input() partId: number;\r\n @ViewChild(\"historyDataGrid\") private dataGrid: DxDataGridComponent;\r\n\r\n public searchText: string = \"\";\r\n public historyDataSource: DataSource;\r\n public historyType = DocumentTypeEnum;\r\n public historyFilterTypes: DataSource;\r\n public StoreListDataSource: DataSource;\r\n public UseAdditionalStores: boolean = false;\r\n private readonly filterTypes = [\r\n {\r\n ID: DocumentTypeEnum.Job,\r\n name: this.translate.instant(\"stock.history.type.jobs\")\r\n },\r\n {\r\n ID: DocumentTypeEnum.Stock,\r\n name: this.translate.instant(\"stock.history.type.adjustments\")\r\n },\r\n {\r\n ID: DocumentTypeEnum.Message,\r\n name: this.translate.instant(\"stock.history.type.messages\")\r\n },\r\n {\r\n ID: DocumentTypeEnum.Reminder,\r\n name: this.translate.instant(\"stock.history.type.reminders\")\r\n }];\r\n\r\n constructor(\r\n private stockService: StockService,\r\n private translate: TranslateService,\r\n private licenseService: LicenseService,\r\n private storeService: StoreService,\r\n private settingsService: SettingsService) { }\r\n\r\n ngOnInit() {\r\n this.historyFilterTypes = new DataSource(this.filterTypes);\r\n\r\n this.getSettingsData();\r\n\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(x => {\r\n if (x.PurchaseOrdersEnabled) {\r\n this.filterTypes.push({\r\n ID: DocumentTypeEnum.PurchaseOrder,\r\n name: this.translate.instant(\"stock.history.type.purchase-orders\")\r\n });\r\n this.filterTypes.push({\r\n ID: DocumentTypeEnum.AdviceNote,\r\n name: this.translate.instant(\"stock.history.type.goods-received-notes\")\r\n });\r\n }\r\n if (x.ProEnabled && x.PurchaseOrdersEnabled) {\r\n this.filterTypes.push({\r\n ID: DocumentTypeEnum.ReturnsNote,\r\n name: this.translate.instant(\"stock.history.type.returns-notes\")\r\n });\r\n }\r\n if (x.SalesOrderEnabled) {\r\n this.filterTypes.push({\r\n ID: DocumentTypeEnum.SalesOrder,\r\n name: this.translate.instant(\"stock.history.type.sales-orders\")\r\n });\r\n this.filterTypes.push({\r\n ID: DocumentTypeEnum.DespatchNote,\r\n name: this.translate.instant(\"stock.history.type.despatch-notes\")\r\n });\r\n }\r\n if (x.ProEnabled) {\r\n this.filterTypes.push({\r\n ID: DocumentTypeEnum.Credit,\r\n name: this.translate.instant(\"stock.history.type.credit-notes\")\r\n });\r\n }\r\n });\r\n\r\n this.StoreListDataSource = this.storeService.GetDataSource();\r\n this.StoreListDataSource.sort(($event) => {\r\n if ($event.StoreId === 1) {\r\n return \"!\";\r\n } else {\r\n return $event.StoreName;\r\n }\r\n });\r\n }\r\n\r\n ngOnChanges() {\r\n if (!this.historyDataSource && this.partId > 0) {\r\n this.historyDataSource = this.stockService.GetStockHistory(this.partId);\r\n }\r\n }\r\n\r\n public SearchByText() {\r\n this.dataGrid.instance.searchByText(encodeURI(this.searchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public FilterChanged(selectedFilters) {\r\n if (selectedFilters.length === 0) {\r\n this.dataGrid.instance.clearFilter();\r\n } else {\r\n const filter = [];\r\n selectedFilters.forEach(key => {\r\n filter.push([\"Type\", \"=\", key]);\r\n filter.push(\"or\");\r\n });\r\n filter.pop();\r\n this.dataGrid.instance.filter(filter);\r\n }\r\n this.SearchByText();\r\n }\r\n\r\n public StoreFilterChanged(selectedFilters) {\r\n if (selectedFilters.length === 0) {\r\n this.dataGrid.instance.clearFilter();\r\n } else {\r\n const filter = [];\r\n selectedFilters.forEach(key => {\r\n filter.push([\"StoreId\", \"=\", key], \"or\", [\"DestStoreId\", \"=\", key]);\r\n filter.push(\"or\");\r\n });\r\n filter.push([\"StoreId\", \"=\", null]);\r\n this.dataGrid.instance.filter(filter);\r\n }\r\n this.SearchByText();\r\n }\r\n\r\n private getSettingsData() {\r\n this.settingsService.getSetting(SettingId.UseAdditionalStores).subscribe((settingData: SettingData) => {\r\n this.UseAdditionalStores = settingData.ValueBool;\r\n });\r\n }\r\n}\r\n","import { Component, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\r\nimport { DocumentTypeEnum } from \"servicesight-shared\";\r\nimport { NgForm } from \"@angular/forms\";\r\n\r\n@Component({\r\n selector: \"app-stock-files\",\r\n templateUrl: \"./stock-files.component.html\",\r\n styleUrls: [\"./stock-files.component.scss\"]\r\n})\r\nexport class StockFilesComponent implements OnInit {\r\n\r\n public docType = DocumentTypeEnum;\r\n @Input() partId: number;\r\n @Input() parentForm: NgForm;\r\n @Output() primaryImageChanged: EventEmitter = new EventEmitter();\r\n\r\n public constructor() { }\r\n\r\n public ngOnInit() { }\r\n\r\n public Load() { }\r\n}\r\n","\r\n\r\n","
\r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n {{ 'stock.serial.nos.job' | translate }} {{data.data.JobId}}\r\n \r\n \r\n {{ 'salesorder.detail.despatch' | translate }} {{data.data.DespatchId}}\r\n \r\n
\r\n\r\n
\r\n \r\n {{ 'stock.serial.nos.allocated' | translate }}\r\n \r\n \r\n {{ 'stock.serial.nos.available' | translate }}\r\n \r\n
\r\n \r\n
\r\n","import { AfterViewInit, Component, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { SettingId, SettingsService } from \"servicesight-shared\";\r\nimport { StoreService } from \"src/app/settings/services/store.service\";\r\nimport { StoreTypesEnum } from \"src/app/shared/enums/store-types.enum\";\r\nimport { StockSerialItemModel } from \"../models/stock-serial-item.model\";\r\nimport { StockService } from \"../services/stock.service\";\r\n\r\n@Component({\r\n selector: \"app-stock-serial-nos\",\r\n templateUrl: \"./stock-serial-nos.component.html\",\r\n styleUrls: [\"./stock-serial-nos.component.scss\"]\r\n})\r\nexport class StockSerialNosComponent implements OnInit, OnChanges, AfterViewInit {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n @Input() public id: number;\r\n @Input() public serialNumberStoreFilter: number = null;\r\n\r\n private initFilter: number = null;\r\n\r\n public PriceListSource: Array = [];\r\n public StockStoreDataStore: ODataStore;\r\n public additionalStoresEnabled = false;\r\n\r\n constructor(\r\n private stockService: StockService,\r\n private storeService: StoreService,\r\n private settingsService: SettingsService,\r\n private translate: TranslateService,\r\n ) {\r\n this.CalculateAllocatedTo = this.CalculateAllocatedTo.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n if (this.id > 0) {\r\n this.stockService.GetStockSerialItems(this.id).subscribe(result => {\r\n this.PriceListSource = result;\r\n });\r\n }\r\n\r\n this.StockStoreDataStore = this.storeService.GetDataStore();\r\n this.settingsService.getSetting(SettingId.UseAdditionalStores).subscribe(res => {\r\n this.additionalStoresEnabled = res.ValueBool;\r\n });\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n const filter = this.initFilter || this.serialNumberStoreFilter;\r\n if (filter) {\r\n this.SetStoreFilter(filter);\r\n }\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.serialNumberStoreFilter && changes.serialNumberStoreFilter.currentValue) {\r\n this.SetStoreFilter(changes.serialNumberStoreFilter.currentValue);\r\n }\r\n }\r\n\r\n public goToJob(jobId: number): void {\r\n location.href = `/#/jobs/job/${jobId}`;\r\n }\r\n\r\n public goToDespatch(despatchId: number): void {\r\n location.href = `/#/despatch-notes/detail/${despatchId}`;\r\n }\r\n\r\n public SortStoreNameColumn(rowData: StockSerialItemModel): any {\r\n const column = this as any;\r\n if (rowData.StoreId === StoreTypesEnum.MainStore) {\r\n return column.sortOrder === \"asc\" ? \"aaa\" : \"zzz\";\r\n } else {\r\n const value = column.calculateCellValue(rowData);\r\n return column.lookup.calculateCellValue(value);\r\n }\r\n }\r\n\r\n public CalculateAllocatedTo(rowData: StockSerialItemModel): string {\r\n if (rowData.Allocated && rowData.JobId) {\r\n return `${this.translate.instant(\"stock.serial.nos.job\")} ${rowData.JobId}`;\r\n } else if (rowData.Allocated && rowData.DespatchId) {\r\n return `${this.translate.instant(\"salesorder.detail.despatch\")} ${rowData.DespatchId}`;\r\n } else {\r\n return \"\";\r\n }\r\n }\r\n\r\n public SetStoreFilter(storeId: number): void {\r\n if (this.dataGrid && this.dataGrid.instance) {\r\n this.initFilter = null;\r\n this.dataGrid.instance.columnOption(\"StoreId\", \"filterValue\", storeId);\r\n } else {\r\n this.initFilter = storeId;\r\n }\r\n }\r\n}\r\n","import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { UICustomisation, UserRefType, UserReferenceService } from \"servicesight-shared\";\r\nimport { SupplierStatus } from \"src/app/shared/pipes/enums/supplier-status.enum\";\r\nimport { StockSupplierModel } from \"../../../stock/models/stock-supplier.model\";\r\nimport { StockSupplierService } from \"../../../stock/services/stock-supplier.service\";\r\n\r\n@Component({\r\n selector: \"app-stock-suppliers-add\",\r\n templateUrl: \"./stock-suppliers-add.component.html\",\r\n styleUrls: [\"./stock-suppliers-add.component.scss\"]\r\n})\r\nexport class StockSuppliersAddComponent implements OnInit {\r\n @Input() stockSuppliers: StockSupplierModel[] = [];\r\n @Input() stockHeaderId: number;\r\n @Output() selectedSuppliers: EventEmitter = new EventEmitter();\r\n @ViewChild(\"grid\") private grid: DxDataGridComponent;\r\n public suppliers: DataSource;\r\n public userReference1DataStore: ODataStore;\r\n public userReference2DataStore: ODataStore;\r\n public searchText: string = \"\";\r\n public showDialog: boolean = false;\r\n public BoundFilterByAddress = this.FilterByAddress.bind(this);\r\n public BoundGetAddress = this.GetAddress.bind(this);\r\n public userRef1Label: string;\r\n public userRef2Label: string;\r\n\r\n constructor(\r\n private stockSupplierService: StockSupplierService,\r\n private userRefsService: UserReferenceService) { }\r\n\r\n ngOnInit(): void {\r\n this.userRef1Label = this.userRefsService.getLabel(UICustomisation.SUPPLIER_REF1);\r\n this.userRef2Label = this.userRefsService.getLabel(UICustomisation.SUPPLIER_REF2);\r\n }\r\n\r\n public Show(): void {\r\n this.grid.instance.deselectAll();\r\n this.GetDataSources();\r\n this.showDialog = true;\r\n }\r\n\r\n public HideDialog(): void {\r\n this.showDialog = false;\r\n }\r\n\r\n public searchTextChanged(): void {\r\n this.grid.instance.searchByText(encodeURI(this.searchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public calculateCellValue(item): boolean {\r\n return item.Status === SupplierStatus.OnHold;\r\n }\r\n\r\n public GetAddress(item): string {\r\n return item.Address.join(\", \");\r\n }\r\n\r\n public FilterByAddress(filterValue): any {\r\n return [this.BoundGetAddress, \"contains\", filterValue];\r\n }\r\n\r\n public AddSupliers(): void {\r\n const stockSuppliers = this.grid.instance.getSelectedRowsData().map(x => {\r\n return {\r\n StockHeaderId: this.stockHeaderId,\r\n SupplierId: x.SupplierId,\r\n Name: x.Name,\r\n Preferred: false,\r\n BuyingPrice: 0,\r\n SupplierRrp: 0,\r\n UseBaseCurrency: !x.IsForeignCustomer,\r\n ExchangeRate: x.ExchangeRate,\r\n CurrencySymbol: x.CurrencySymbol,\r\n OnHold: x.Status === SupplierStatus.OnHold\r\n } as StockSupplierModel;\r\n });\r\n this.selectedSuppliers.emit(stockSuppliers);\r\n this.HideDialog();\r\n }\r\n\r\n private GetDataSources(): void {\r\n this.suppliers = this.stockSupplierService.GetStockSupplierDataSource();\r\n this.userReference1DataStore = this.userRefsService.getListDataStore(UserRefType.SUPPLIER_1);\r\n this.userReference2DataStore = this.userRefsService.getListDataStore(UserRefType.SUPPLIER_2);\r\n\r\n const filter = [];\r\n filter.push([\"Status\", \"<>\", SupplierStatus.Closed]);\r\n filter.push(\"and\");\r\n if (this.stockSuppliers) {\r\n this.stockSuppliers.forEach(x => {\r\n filter.push([\"SupplierId\", \"<>\", x.SupplierId]);\r\n filter.push(\"and\");\r\n });\r\n }\r\n filter.pop();\r\n this.suppliers.filter(filter);\r\n }\r\n}\r\n","\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
","
\r\n \r\n \r\n
\r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n {{ \"stock.suppliers.lead.time.days\" | translate: { value: data.value } }}\r\n
\r\n
\r\n {{data.value | currency: data.data.UseBaseCurrency ? baseCurrencySymbol : data.data.CurrencySymbol}}\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n\r\n","import { Component, Input, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport { StockSupplierModel } from \"./../models/stock-supplier.model\";\r\nimport { StockSuppliersAddComponent } from \"../../shared/components/stock-suppliers-add/stock-suppliers-add.component\";\r\n\r\n@Component({\r\n selector: \"app-stock-suppliers\",\r\n templateUrl: \"./stock-suppliers.component.html\",\r\n styleUrls: [\"./stock-suppliers.component.scss\"]\r\n})\r\nexport class StockSuppliersComponent {\r\n @ViewChild(\"grid\") private grid: DxDataGridComponent;\r\n @ViewChild(\"addSuppliersComponent\") addSuppliersComponent: StockSuppliersAddComponent;\r\n @Input() form: NgForm;\r\n @Input() stockHeaderId: number;\r\n @Input() suppliers: StockSupplierModel[] = [];\r\n public baseCurrencySymbol = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n\r\n public OnRowUpdated(event): void {\r\n if (event.data.Preferred) {\r\n this.suppliers.forEach(x => {\r\n if (x.SupplierId !== event.data.SupplierId) {\r\n x.Preferred = false;\r\n }\r\n });\r\n }\r\n this.grid.instance.refresh();\r\n this.grid.instance.columnOption(\"Preferred\", \"sortOrder\", \"desc\");\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public OnEditorPreparing(e): void {\r\n if (e.dataField === \"Preferred\" && e.row.data.OnHold) {\r\n e.row.data.Preferred = false;\r\n e.editorOptions.readOnly = true;\r\n e.editorOptions.focusStateEnabled = false;\r\n e.editorOptions.hoverStateEnabled = false;\r\n }\r\n\r\n if (e.dataField === \"BuyingPrice\" || e.dataField === \"SupplierRrp\") {\r\n const allowEditing = e.row.data.UseBaseCurrency && e.row.data.CurrencySymbol !== this.baseCurrencySymbol;\r\n e.editorOptions.disabled = allowEditing;\r\n }\r\n }\r\n\r\n public RemoveSupplier(): void {\r\n const selectedRows = this.grid.selectedRowKeys;\r\n selectedRows.forEach(x => {\r\n this.suppliers.splice(this.suppliers.findIndex(y => y.SupplierId === x), 1);\r\n });\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public ToggleCurrency(supplierId: number): void {\r\n const supplier = this.suppliers.find(x => x.SupplierId === supplierId);\r\n supplier.UseBaseCurrency = !supplier.UseBaseCurrency;\r\n }\r\n\r\n public AddSupplier(): void {\r\n this.addSuppliersComponent.Show();\r\n }\r\n\r\n public OnSuppliersSelected(selectedSuppliers: StockSupplierModel[]): void {\r\n selectedSuppliers.forEach(x => {\r\n if (this.suppliers.length === 0) {\r\n x.Preferred = true;\r\n }\r\n this.suppliers.push(x);\r\n });\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public CalculateBuyingPrice(rowData): number {\r\n if (rowData.CurrencySymbol !== this.baseCurrencySymbol && rowData.UseBaseCurrency) {\r\n return rowData.BuyingPrice / rowData.ExchangeRate;\r\n } else {\r\n return rowData.BuyingPrice;\r\n }\r\n }\r\n\r\n public CalculateRRP(rowData): number {\r\n if (rowData.CurrencySymbol !== this.baseCurrencySymbol && rowData.UseBaseCurrency) {\r\n return rowData.SupplierRrp / rowData.ExchangeRate;\r\n } else {\r\n return rowData.SupplierRrp;\r\n }\r\n }\r\n}\r\n","
\r\n \r\n \r\n \r\n
\r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n -\r\n
\r\n \r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import { Component, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { FormMesssageService, Module, ModuleService } from \"servicesight-shared\";\r\nimport { AddPartDialogueComponent } from \"src/app/shared/components/add-part-dialogue/add-part-dialogue.component\";\r\nimport { StoreTypesEnum } from \"src/app/shared/enums/store-types.enum\";\r\nimport { StockEquivalence } from \"../models/stock-equivalence.model\";\r\nimport { StockService } from \"../services/stock.service\";\r\n\r\n@Component({\r\n selector: \"app-stock-equivalences\",\r\n templateUrl: \"./stock-equivalences.component.html\",\r\n styleUrls: [\"./stock-equivalences.component.scss\"]\r\n})\r\nexport class StockEquivalencesComponent implements OnInit, OnChanges {\r\n @ViewChild(\"grid\") private grid: DxDataGridComponent;\r\n @ViewChild(\"addPart\", { static: true }) partsPopup: AddPartDialogueComponent;\r\n @Input() form: NgForm;\r\n @Input() equivalences: StockEquivalence[] = [];\r\n @Input() partId: number;\r\n @Input() partNo: string;\r\n @Input() formName: string;\r\n\r\n public partsDataSource: DataSource;\r\n public stockStorePartsDataSource: ODataStore;\r\n public showAddPartsDialog: boolean = false;\r\n public currentPartId: number[] = [];\r\n public IsProEnabled: boolean;\r\n public IsRecurringJobsEnabled: boolean;\r\n public isSuperseded: boolean = false;\r\n public supersededById: number;\r\n public showReplaceMessage: boolean = false;\r\n public selectedPartIds: number[] = [];\r\n private replacementPartNo: string;\r\n\r\n public get alreadyAddedParts(): number[] {\r\n return this.equivalences.map(i => i.StockHeaderId);\r\n }\r\n\r\n constructor(\r\n private stockService: StockService,\r\n private moduleService: ModuleService,\r\n private translateService: TranslateService,\r\n private formMesssageService: FormMesssageService) {}\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.equivalences) {\r\n this.partsDataSource = this.stockService.GetStockParts();\r\n this.supersededById = this.equivalences.find(x => x.SupercededBy)?.StockHeaderId;\r\n this.isSuperseded = !!this.supersededById;\r\n }\r\n\r\n if (changes.partId) {\r\n this.hideCurrentPartFromDialogue();\r\n }\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.stockStorePartsDataSource = this.stockService.GetStockStorePartsStore();\r\n\r\n this.moduleService.GetEnabledModules().subscribe(modules => {\r\n this.IsProEnabled = modules.includes(Module.Pro);\r\n this.IsRecurringJobsEnabled = modules.includes(Module.RecurringJobs);\r\n });\r\n }\r\n\r\n public Remove(): void {\r\n const selectedRows = this.grid.selectedRowKeys;\r\n selectedRows.forEach(x => {\r\n this.equivalences.splice(this.equivalences.findIndex(y => y.StockHeaderId === x), 1);\r\n });\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public OpenAddPartsDialog(): void {\r\n this.partsPopup.Show();\r\n }\r\n\r\n public OnRowUpdated(event): void {\r\n if (event.data.SupercededBy) {\r\n this.equivalences.forEach(x => {\r\n if (x.StockHeaderId !== event.data.StockHeaderId) {\r\n x.SupercededBy = false;\r\n }\r\n });\r\n }\r\n this.grid.instance.refresh();\r\n this.grid.instance.columnOption(\"SupercededById\", \"sortOrder\", \"desc\");\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public OnPartAdded(ids: number[]): void {\r\n for (const id of ids) {\r\n const existing = this.equivalences.find(p => p.StockHeaderId === id);\r\n if (existing || id === this.partId) {\r\n continue;\r\n }\r\n this.stockStorePartsDataSource.byKey({ StockHeaderId: id, StoreId: StoreTypesEnum.MainStore }).then(async (partData) => {\r\n this.equivalences.push({\r\n StockHeaderId: id,\r\n PartNo: partData.PartNo,\r\n ManufacturerId: partData.ManfId,\r\n Manufacturer: partData.ManufacturerName,\r\n ManufacturerPartNo: partData.ManufacturerId,\r\n InStock: partData.InStock > 0,\r\n Obsolete: partData.Obsolete,\r\n SupercededBy: false\r\n });\r\n });\r\n\r\n this.form.form.markAsDirty();\r\n }\r\n }\r\n\r\n public UpdateServiceParts(): void {\r\n this.stockService.GetReplacementPart(this.partId).subscribe(replacementPart => {\r\n if (replacementPart) {\r\n this.replacementPartNo = replacementPart.PartNo;\r\n this.showReplaceMessage = true;\r\n }\r\n });\r\n }\r\n\r\n public showEditButton(e: any): boolean {\r\n return !(e.row.data.Obsolete || e.row.isEditing);\r\n }\r\n\r\n public ConfirmUpdateServiceParts(confirm: boolean): void {\r\n if (confirm) {\r\n this.formMesssageService.RegisterObservable(this.stockService.UpdateServiceParts(this.partId), this.formName).subscribe();\r\n }\r\n this.showReplaceMessage = false;\r\n }\r\n\r\n public get ReplaceMessage(): string {\r\n return this.translateService.instant(\"stock.equivalences.replace.message\", { Replacement: this.replacementPartNo, Original: this.partNo });\r\n }\r\n\r\n private hideCurrentPartFromDialogue(): void {\r\n this.currentPartId = [];\r\n this.currentPartId.push(this.partId);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n {{ 'stock.detail.part-no' | translate }}  \r\n \r\n

\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n\r\n \r\n
\r\n \"\"\r\n

\r\n {{ 'messages.accordion.no-image' | translate }}\r\n

\r\n
\r\n
\r\n\r\n \r\n
\r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n","import { Component, HostListener, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { DomSanitizer, SafeUrl } from \"@angular/platform-browser\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { DxAccordionComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { Observable } from \"rxjs\";\r\nimport { ComponentCanDeactivate, DocumentTypeEnum, FormMesssageService, Module, SettingId, SettingsService } from \"servicesight-shared\";\r\nimport { MessageService } from \"src/app/messages/services/message/message.service\";\r\nimport { StockTypesService } from \"src/app/settings/services/stock-types.service\";\r\nimport { MessageDocTypeIds } from \"src/app/shared/enums/messages/message-doc-type-ids.enum\";\r\nimport { MessageTypes } from \"src/app/shared/enums/messages/message-types.enum\";\r\nimport { Ng1ReminderService } from \"src/app/shared/services/ng1-reminder.service\";\r\nimport { LicenseService } from \"./../../shared/services/licence/license.service\";\r\nimport { PreviousRouteService } from \"../../shared/services/previous-route.service\";\r\nimport { StockPart } from \"../models/stock-part.model\";\r\nimport { PrimaryImageService } from \"../services/primary-image.service\";\r\nimport { StockService } from \"../services/stock.service\";\r\n\r\n@Component({\r\n selector: \"app-stock-detail\",\r\n templateUrl: \"./stock-detail.component.html\",\r\n styleUrls: [\"./stock-detail.component.scss\"]\r\n})\r\nexport class StockDetailComponent implements OnInit, ComponentCanDeactivate {\r\n\r\n @ViewChild(\"stockForm\", { static: true }) form: NgForm;\r\n @ViewChild(\"stockDetailAccordion\", { static: true }) stockDetailAccordion: DxAccordionComponent;\r\n\r\n public docType = DocumentTypeEnum;\r\n public serialNumberStoreFilter: number = null;\r\n\r\n public id: number;\r\n public part: StockPart = {\r\n PartNo: \"\",\r\n Available: 0,\r\n Id: 0,\r\n InStock: 0,\r\n StockTypeId: null,\r\n SellingPrice: 0,\r\n UseSerialNo: false,\r\n CanSerialNoStateBeChanged: true,\r\n Obsolete: false,\r\n BinLocation: \"\",\r\n Demand: 0,\r\n OnPO: 0,\r\n Description: \"\",\r\n UserRef1Id: 0,\r\n UserRef2Id: 0,\r\n UserRef3: \"\",\r\n UserRef4: \"\",\r\n Notes: \"\",\r\n Valuation: 0,\r\n UnitValue: 0,\r\n Suppliers: [],\r\n StoreLines: [],\r\n Equivalences: []\r\n };\r\n public formName: string = \"stockForm\";\r\n public isLoading: boolean = true;\r\n public isNew: boolean = false;\r\n public primaryImage: SafeUrl;\r\n public stockTypesDataSource: DataSource;\r\n public secondaryActionsDisabled: boolean = false;\r\n public selectedIndex: number = 0;\r\n public purchaseOrdersEnabled: boolean = false;\r\n\r\n public additionalStoresEnabled: boolean = false;\r\n public generalTabVisible: boolean = false;\r\n\r\n public HasAccessToPro: boolean = false;\r\n public CanNavigatePrevious: boolean = false;\r\n public CanNavigateNext: boolean = false;\r\n public IsRecordNavigationEnabled: boolean = false;\r\n\r\n public SaveEnabled: boolean = true;\r\n\r\n private serialNosTabIndex: number = 2;\r\n\r\n constructor(\r\n private stockService: StockService,\r\n private stockTypesService: StockTypesService,\r\n private formMessageService: FormMesssageService,\r\n private messageService: MessageService,\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private ng1reminderService: Ng1ReminderService,\r\n private primaryImageService: PrimaryImageService,\r\n private sanitizer: DomSanitizer,\r\n private licenseService: LicenseService,\r\n private previousRouteService: PreviousRouteService,\r\n private settingsService: SettingsService\r\n ) {\r\n\r\n }\r\n\r\n @HostListener(\"window:beforeunload\")\r\n public canDeactivate(): Observable | boolean {\r\n return !this.form.form.dirty;\r\n }\r\n\r\n ngOnInit() {\r\n this.stockTypesDataSource = this.stockTypesService.GetDataSource();\r\n this.stockTypesDataSource.load();\r\n\r\n this.licenseService.GetCompanyHasAccessToModule(Module.PurchaseOrders).subscribe(enabled => this.purchaseOrdersEnabled = enabled);\r\n this.licenseService.GetCompanyHasAccessToModule(Module.Pro).subscribe(x => this.HasAccessToPro = x);\r\n\r\n this.route.params.subscribe(params => {\r\n const stringId = params.id;\r\n const numericId = Number(stringId);\r\n this.isNew = isNaN(numericId) || numericId === 0;\r\n this.secondaryActionsDisabled = this.isNew;\r\n\r\n this.IsRecordNavigationEnabled = !this.secondaryActionsDisabled && this.previousRouteService.PreviousUrlContains(\"/stock\");\r\n\r\n const tab = params.tab;\r\n\r\n if (this.isNew) {\r\n this.id = 0;\r\n this.isLoading = true;\r\n this.GetNewStockPart();\r\n } else {\r\n this.id = numericId;\r\n this.Load();\r\n }\r\n\r\n if (tab === \"serialno\") {\r\n this.selectedIndex = this.serialNosTabIndex;\r\n }\r\n });\r\n\r\n this.settingsService.getSetting(SettingId.UseAdditionalStores).subscribe(res => {\r\n this.additionalStoresEnabled = res.ValueBool;\r\n this.generalTabVisible = true;\r\n\r\n if (this.selectedIndex === 0 && !this.additionalStoresEnabled) {\r\n this.selectedIndex = 1;\r\n }\r\n });\r\n }\r\n\r\n public GetNewStockPart(): void {\r\n this.stockService.GetNewStockPart().subscribe(p => {\r\n this.part = p;\r\n this.isLoading = false;\r\n });\r\n }\r\n\r\n public Save(): void {\r\n this.SaveEnabled = false;\r\n this.formMessageService\r\n .RegisterObservable(this.stockService.SaveStockPart(this.part), this.formName)\r\n .subscribe(id => {\r\n this.SaveEnabled = true;\r\n if (!this.part.Id) {\r\n this.router.navigate([\"stock/detail\", id]);\r\n } else {\r\n this.Load();\r\n }\r\n }, () => {\r\n this.SaveEnabled = true;\r\n });\r\n }\r\n\r\n public Discard(): void {\r\n if (this.id) {\r\n this.Load();\r\n this.form.form.markAsPristine();\r\n } else {\r\n this.router.navigate([\"stock/list\"]);\r\n }\r\n }\r\n\r\n public NewReminder(): void {\r\n this.ng1reminderService.CreateStockPartReminder(this.id, this.part.PartNo);\r\n }\r\n\r\n public NewMessage(): void {\r\n this.messageService.SetNewMessageParameters(0, MessageTypes.RefMessage, false, MessageDocTypeIds.Stock, this.part.Id);\r\n this.router.navigate([\"messages/newmessage\"]);\r\n }\r\n\r\n public PrimaryImageChanged(): void {\r\n this.Save();\r\n }\r\n\r\n private Load(): void {\r\n this.isLoading = true;\r\n this.stockService.GetStockPart(this.id).subscribe(part => {\r\n this.part = part;\r\n this.SetCurrentItem(this.id);\r\n this.isLoading = false;\r\n this.form.form.markAsPristine();\r\n this.form.form.markAsUntouched();\r\n });\r\n\r\n this.primaryImageService.primaryImage.subscribe(image => {\r\n if (image) {\r\n const trustedImage = this.sanitizer.bypassSecurityTrustUrl(image.toString());\r\n this.primaryImage = trustedImage;\r\n this.stockDetailAccordion.instance.expandItem(0);\r\n } else {\r\n this.primaryImage = null;\r\n this.stockDetailAccordion.instance.collapseItem(0);\r\n this.stockDetailAccordion.instance.expandItem(1);\r\n }\r\n });\r\n\r\n if (this.id) {\r\n this.primaryImageService.GetStockPrimaryImage(this.id);\r\n }\r\n }\r\n\r\n private SetCurrentItem(id: number) {\r\n if (this.IsRecordNavigationEnabled) {\r\n this.stockService.SetCurrentItem(id).then(() => {\r\n this.CanNavigatePrevious = this.stockService.IsPreviousAvailable();\r\n this.CanNavigateNext = this.stockService.IsNextAvailable();\r\n });\r\n }\r\n }\r\n\r\n public NavigateNext(): void {\r\n if (this.CanNavigateNext) {\r\n this.stockService.GetNextId().then(nextId => {\r\n this.router.navigate([\"stock\", \"detail\", nextId]);\r\n });\r\n }\r\n }\r\n\r\n public NavigatePrevious(): void {\r\n if (this.CanNavigatePrevious) {\r\n this.stockService.GetPreviousId().then(previousId => {\r\n this.router.navigate([\"stock\", \"detail\", previousId]);\r\n });\r\n }\r\n }\r\n\r\n public SwitchChanged(e): void {\r\n if (!this.isLoading && e.event) {\r\n this.form.form.markAsDirty();\r\n }\r\n }\r\n\r\n public OpenSerialNos(storeId: number): void {\r\n this.serialNumberStoreFilter = storeId;\r\n this.selectedIndex = this.serialNosTabIndex;\r\n }\r\n}\r\n","\r\n
    \r\n
  • {{ 'stock.marketing.feature-1' | translate }}
  • \r\n
  • {{ 'stock.marketing.feature-2' | translate }}
  • \r\n
  • {{ 'stock.marketing.feature-3' | translate }}
  • \r\n
  • {{ 'stock.marketing.feature-4' | translate }}
  • \r\n
  • {{ 'stock.marketing.feature-5' | translate }}
  • \r\n
  • {{ 'stock.marketing.feature-6' | translate }}
  • \r\n
\r\n
\r\n

{{ 'stock.marketing.price-1' | translate: { price1: price1, price2: price2 } }}

\r\n

{{ 'stock.marketing.price-2' | translate: { price2: price2, price3: price3 } }}

\r\n
\r\n\r\n","import { Component, OnInit } from \"@angular/core\";\r\nimport { Module } from \"servicesight-shared\";\r\nimport { LicenseService } from \"../../shared/services/licence/license.service\";\r\n\r\nconst Ireland: number = 100;\r\nconst USA: number = 224;\r\n\r\n@Component({\r\n selector: \"app-stock-marketing\",\r\n templateUrl: \"./stock-marketing.component.html\",\r\n styleUrls: [\"../../../assets/css/marketing.component.scss\"]\r\n})\r\nexport class StockMarketingComponent implements OnInit {\r\n\r\n public ready: boolean = false;\r\n public videoId: string;\r\n public price1: string = \"£10\";\r\n public price2: string = \"£15\";\r\n public price3: string = \"£30\";\r\n public type: Module = Module.Stock;\r\n\r\n constructor(private licenseService: LicenseService) { }\r\n\r\n public ngOnInit(): void {\r\n this.licenseService.GetCompanyCountryId().then(countryId => {\r\n if (countryId === USA) {\r\n this.videoId = \"Sw8dQPuSyus\";\r\n } else if (countryId === Ireland) {\r\n this.videoId = \"PRCO04JUr6c\";\r\n this.price1 = \"€10\";\r\n this.price2 = \"€15\";\r\n this.price3 = \"€30\";\r\n } else {\r\n this.videoId = \"8dhhNADN8v8\";\r\n }\r\n\r\n this.ready = true;\r\n });\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable, forkJoin, mergeMap } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { ImportServerSummary } from \"src/app/shared/models/import/import-server-summary.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class StockPartUploadService {\r\n\r\n constructor(\r\n @Inject(APP_CONFIG) private config: IAppConfig,\r\n private http: HttpClient\r\n ) { }\r\n\r\n public GetSample(): Observable {\r\n return this.http.get(`${this.config.apiLocations.Stock}StockPartUpload`, { observe: \"response\", responseType: \"blob\" as \"json\" });\r\n }\r\n\r\n public GetRemainingCount(): Observable {\r\n return this.http.get(`${this.config.apiLocations.Stock}StockPartUpload/Progress`);\r\n }\r\n\r\n public GetSummary(): Observable {\r\n return this.http.get(`${this.config.apiLocations.Stock}StockPartUpload/Summary`);\r\n }\r\n\r\n public Upload(rows: any[]): Observable {\r\n return this.http.delete(`${this.config.apiLocations.Stock}StockPartUpload`).pipe(mergeMap(_ => {\r\n const pageSize = 5000;\r\n const obs: Observable[] = [];\r\n for (let i = 0; i < rows.length; i += pageSize) {\r\n const chunk = rows.slice(i, i + pageSize);\r\n obs.push(this.http.post(`${this.config.apiLocations.Stock}StockPartUpload`, chunk));\r\n }\r\n return forkJoin(obs);\r\n }));\r\n }\r\n}\r\n","import { Component, OnDestroy, OnInit, ViewChild } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { SettingData, SettingId, SettingsService, ToasterService, ToastType, UICustomisation, UserReferenceService } from \"servicesight-shared\";\r\nimport { ImporterComponent } from \"src/app/shared/components/importer/importer.component\";\r\nimport { ImportColumnDictionary } from \"src/app/shared/models/import/import-column-dictionary.model\";\r\nimport { ImportMap } from \"src/app/shared/models/import/import-map.model\";\r\nimport { ImportValidationObject } from \"src/app/shared/models/import/import-validation-object.model\";\r\nimport { ImportValidationFunc } from \"src/app/shared/models/import/import-validation.type\";\r\nimport { StockPartUploadService } from \"../services/stock-part-upload.service\";\r\n\r\n@Component({\r\n selector: \"app-stock-part-upload\",\r\n templateUrl: \"./stock-part-upload.component.html\",\r\n styleUrls: [\"./stock-part-upload.component.scss\"]\r\n})\r\nexport class StockPartUploadComponent implements OnInit, OnDestroy {\r\n private poll: any;\r\n\r\n @ViewChild(\"importer\", { static: true }) importer: ImporterComponent;\r\n\r\n public noMatch: number = -1;\r\n public isProcessing: boolean = false;\r\n public remainingRows: number = 0;\r\n public partNoMap: Map = new Map();\r\n\r\n public defaultMap: ImportColumnDictionary = {\r\n PartNo: { displayName: \"stock.detail.part-no\", value: this.noMatch, required: true },\r\n Description: { displayName: \"stock.detail.description\", value: this.noMatch, required: true },\r\n StockType: { displayName: \"stock.detail.stock-type\", value: this.noMatch, required: true },\r\n Quantity: { displayName: \"stock.detail.in-stock\", value: this.noMatch },\r\n Valuation: { displayName: \"stock.detail.valuation\", value: this.noMatch, required: true },\r\n SellingPrice: { displayName: \"stock.detail.selling-price\", value: this.noMatch },\r\n BinLocation: { displayName: \"stock.detail.bin-location\", value: this.noMatch },\r\n UserRef1: { displayName: \"stock.detail.userref1\", value: this.noMatch },\r\n UserRef2: { displayName: \"stock.detail.userref2\", value: this.noMatch },\r\n UserRef3: { displayName: \"stock.detail.userref3\", value: this.noMatch },\r\n Notes: { displayName: \"stock.detail.notes\", value: this.noMatch },\r\n Min: { displayName: \"stock.detail.min\", value: this.noMatch },\r\n Max: { displayName: \"stock.detail.max\", value: this.noMatch },\r\n Manufacturer: { displayName: \"stock.detail.manufacturer\", value: this.noMatch },\r\n ManufacturersPartNo: { displayName: \"stock.detail.manufacturer-part-no\", value: this.noMatch }\r\n };\r\n\r\n public defaultMaps: { [key: string]: string } = {\r\n PartNo: \"PartNo\",\r\n partno: \"PartNo\",\r\n PN: \"PartNo\",\r\n pn: \"PartNo\",\r\n Part: \"PartNo\",\r\n part: \"PartNo\",\r\n Description: \"Description\",\r\n description: \"Description\",\r\n Desc: \"Description\",\r\n desc: \"Description\",\r\n StockType: \"StockType\",\r\n stocktype: \"StockType\",\r\n Stock: \"StockType\",\r\n stock: \"StockType\",\r\n Type: \"StockType\",\r\n type: \"StockType\",\r\n InventoryType: \"StockType\",\r\n inventorytype: \"StockType\",\r\n Quantity: \"Quantity\",\r\n quantity: \"Quantity\",\r\n Qty: \"Quantity\",\r\n qty: \"Quantity\",\r\n QtyInStock: \"Quantity\",\r\n qtyinstock: \"Quantity\",\r\n InStock: \"Quantity\",\r\n instock: \"Quantity\",\r\n QtyOnHand: \"Quantity\",\r\n qtyonhand: \"Quantity\",\r\n OnHand: \"Quantity\",\r\n onhand: \"Quantity\",\r\n Valuation: \"Valuation\",\r\n valuation: \"Valuation\",\r\n SellingPrice: \"SellingPrice\",\r\n sellingprice: \"SellingPrice\",\r\n Selling: \"SellingPrice\",\r\n selling: \"SellingPrice\",\r\n Price: \"SellingPrice\",\r\n price: \"SellingPrice\",\r\n BinLocation: \"BinLocation\",\r\n binlocation: \"BinLocation\",\r\n Bin: \"BinLocation\",\r\n bin: \"BinLocation\",\r\n Location: \"BinLocation\",\r\n location: \"BinLocation\",\r\n Notes: \"Notes\",\r\n notes: \"Notes\",\r\n Min: \"Min\",\r\n min: \"Min\",\r\n Max: \"Max\",\r\n max: \"Max\",\r\n Manufacturer: \"Manufacturer\",\r\n manufacturer: \"Manufacturer\",\r\n ManufacturersPartNo: \"ManufacturersPartNo\",\r\n manufacturerspartno: \"ManufacturersPartNo\",\r\n ManufacturersNo: \"ManufacturersPartNo\",\r\n manufacturersno: \"ManufacturersPartNo\"\r\n };\r\n\r\n public preDefinedMaps: Array = [\r\n {\r\n columns: [\"Part No\", \"Description\", \"Stock Type\", \"Qty In Stock\", \"Valuation\", \"Selling Price\",\r\n \"Bin Location\", \"UserRef1\", \"UserRef2\", \"UserRef3\", \"Notes\", \"Min\", \"Max\", \"Manufacturer\", \"Manufacturers Part No\"],\r\n name: \"ServiceSight\",\r\n map: {\r\n PartNo: { displayName: \"stock.detail.part-no\", value: 0 },\r\n Description: { displayName: \"stock.detail.description\", value: 1 },\r\n StockType: { displayName: \"stock.detail.stock-type\", value: 2 },\r\n Quantity: { displayName: \"stock.detail.in-stock\", value: 3 },\r\n Valuation: { displayName: \"stock.detail.valuation\", value: 4 },\r\n SellingPrice: { displayName: \"stock.detail.selling-price\", value: 5 },\r\n BinLocation: { displayName: \"stock.detail.bin-location\", value: 6 },\r\n UserRef1: { displayName: \"stock.detail.userref1\", value: 7 },\r\n UserRef2: { displayName: \"stock.detail.userref2\", value: 8 },\r\n UserRef3: { displayName: \"stock.detail.userref3\", value: 9 },\r\n Notes: { displayName: \"stock.detail.notes\", value: 10 },\r\n Min: { displayName: \"stock.detail.min\", value: 11 },\r\n Max: { displayName: \"stock.detail.max\", value: 12 },\r\n Manufacturer: { displayName: \"stock.detail.manufacturer\", value: 13 },\r\n ManufacturersPartNo: { displayName: \"stock.detail.manufacturer-part-no\", value: 14 }\r\n }\r\n }\r\n ];\r\n\r\n public columnValidations: ImportValidationObject = {\r\n PartNo: (val) => val.toString().length <= 50,\r\n Description: (val) => val.toString().length <= 255,\r\n StockType: (val) => val.toString().length <= 50,\r\n Quantity: (val) => !val || Number.isInteger(Number(val)),\r\n Valuation: (val) => !val || !isNaN(val) && (!val || Number(val) >= 0),\r\n SellingPrice: (val) => !val || !isNaN(val) && (!val || Number(val) >= 0),\r\n BinLocation: (val) => !val || val.toString().length <= 15,\r\n UserRef1: (val) => !val || val.toString().length <= 50,\r\n UserRef2: (val) => !val || val.toString().length <= 50,\r\n UserRef3: (val) => !val || val.toString().length <= 50,\r\n Notes: () => true,\r\n Min: (val) => !val || Number.isInteger(Number(val)),\r\n Max: (val) => !val || Number.isInteger(Number(val)),\r\n Manufacturer: (val) => !val || val.toString().length <= 50,\r\n ManufacturersPartNo: (val) => !val || val.toString().length <= 50\r\n };\r\n\r\n public rowValidator: ImportValidationFunc = (row) => {\r\n const errors: string[] = [];\r\n const key = `${row.PartNo}`;\r\n const isDuplicatePartNo = this.partNoMap.has(key);\r\n\r\n if (!isDuplicatePartNo) {\r\n this.partNoMap.set(key, true);\r\n } else {\r\n errors.push(this.translateService.instant(\"stockpart.import.error.duplicate\", row));\r\n }\r\n\r\n const min = Number(row.Min);\r\n const max = Number(row.Max);\r\n const minMaxInvalid = min && max && min > max;\r\n if (minMaxInvalid) {\r\n errors.push(this.translateService.instant(\"stockpart.import.error.min-value\", row));\r\n }\r\n\r\n const isManufacturerInvalid = row.ManufacturersPartNo && !row.Manufacturer;\r\n if (isManufacturerInvalid) {\r\n errors.push(this.translateService.instant(\"stockpart.import.error.manufacturer\", row));\r\n }\r\n\r\n return {\r\n isValid: !isDuplicatePartNo && !minMaxInvalid && !isManufacturerInvalid,\r\n errors\r\n };\r\n };\r\n\r\n constructor(\r\n private router: Router,\r\n private stockPartUploadService: StockPartUploadService,\r\n private toasterService: ToasterService,\r\n private translateService: TranslateService,\r\n private userRefsService: UserReferenceService,\r\n private settingsService: SettingsService\r\n ) {\r\n this.rowValidator = this.rowValidator.bind(this);\r\n\r\n const userRef1Label = this.userRefsService.getLabel(UICustomisation.STOCK_REF1);\r\n const userRef2Label = this.userRefsService.getLabel(UICustomisation.STOCK_REF2);\r\n const userRef3Label = this.userRefsService.getLabel(UICustomisation.STOCK_REF3);\r\n this.translateService.set(\"stock.detail.userref1\", userRef1Label);\r\n this.defaultMaps[userRef1Label] = \"stock.detail.userref1\";\r\n this.translateService.set(\"stock.detail.userref2\", userRef2Label);\r\n this.defaultMaps[userRef2Label] = \"stock.detail.userref2\";\r\n this.translateService.set(\"stock.detail.userref3\", userRef3Label);\r\n this.defaultMaps[userRef3Label] = \"stock.detail.userref3\";\r\n }\r\n\r\n ngOnInit() {\r\n this.getRemainingCount();\r\n\r\n this.settingsService.getSetting(SettingId.UseAdditionalStores).subscribe((setting: SettingData) => {\r\n if (setting.ValueBool) {\r\n this.changeToMapsWithStore();\r\n }\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {\r\n if (this.poll) {\r\n clearTimeout(this.poll);\r\n this.poll = null;\r\n }\r\n }\r\n\r\n reset(): void {\r\n this.partNoMap.clear();\r\n }\r\n\r\n getSample(): void {\r\n this.stockPartUploadService.GetSample().subscribe(response => {\r\n const contentType = \"text/csv\";\r\n const blob = new Blob([response.body], { type: contentType });\r\n const data = window.URL.createObjectURL(blob);\r\n const link = document.createElement(\"a\");\r\n link.hidden = true;\r\n link.href = data;\r\n link.download = \"stock-sample.csv\";\r\n document.body.appendChild(link);\r\n link.click();\r\n document.body.removeChild(link);\r\n setTimeout(() => {\r\n // For Firefox it is necessary to delay revoking the ObjectURL\r\n window.URL.revokeObjectURL(data);\r\n }, 100);\r\n });\r\n }\r\n\r\n upload(rows: any[]): void {\r\n this.stockPartUploadService.Upload(rows).subscribe(() => {\r\n this.isProcessing = true;\r\n this.getRemainingCount();\r\n });\r\n }\r\n\r\n getRemainingCount(): void {\r\n this.stockPartUploadService.GetRemainingCount().subscribe(s => {\r\n this.remainingRows = s;\r\n if (s > 0) {\r\n this.isProcessing = true;\r\n this.poll = setTimeout(this.getRemainingCount.bind(this), 3000);\r\n } else {\r\n if (this.isProcessing) {\r\n this.getSummary();\r\n }\r\n\r\n this.isProcessing = false;\r\n if (this.poll) {\r\n clearTimeout(this.poll);\r\n this.poll = null;\r\n }\r\n }\r\n });\r\n }\r\n\r\n private getSummary(): void {\r\n this.stockPartUploadService.GetSummary().subscribe(res => {\r\n if (res.FailedRows === 0) {\r\n this.toasterService.pop(\"stockpart.import.complete\", ToastType.medium);\r\n this.router.navigate([\"/stock/list\"]);\r\n } else {\r\n this.toasterService.pop(\"stockpart.import.completewitherrors\", ToastType.dark);\r\n res.Errors = res.Errors.map(row => {\r\n row.Errors = row.Errors.map(e => this.translateService.instant(e));\r\n return row;\r\n });\r\n this.importer.uploadError(res.FailedRows, res.Errors);\r\n }\r\n });\r\n }\r\n\r\n private changeToMapsWithStore(): void {\r\n this.defaultMap = {\r\n PartNo: { displayName: \"stock.detail.part-no\", value: this.noMatch, required: true },\r\n Description: { displayName: \"stock.detail.description\", value: this.noMatch, required: true },\r\n StockType: { displayName: \"stock.detail.stock-type\", value: this.noMatch, required: true },\r\n Store: { displayName: \"stock.detail.store\", value: this.noMatch, required: true },\r\n Quantity: { displayName: \"stock.detail.in-stock\", value: this.noMatch },\r\n Valuation: { displayName: \"stock.detail.valuation\", value: this.noMatch, required: true },\r\n SellingPrice: { displayName: \"stock.detail.selling-price\", value: this.noMatch },\r\n BinLocation: { displayName: \"stock.detail.bin-location\", value: this.noMatch },\r\n UserRef1: { displayName: \"stock.detail.userref1\", value: this.noMatch },\r\n UserRef2: { displayName: \"stock.detail.userref2\", value: this.noMatch },\r\n UserRef3: { displayName: \"stock.detail.userref3\", value: this.noMatch },\r\n Notes: { displayName: \"stock.detail.notes\", value: this.noMatch },\r\n Min: { displayName: \"stock.detail.min\", value: this.noMatch },\r\n Max: { displayName: \"stock.detail.max\", value: this.noMatch },\r\n Manufacturer: { displayName: \"stock.detail.manufacturer\", value: this.noMatch },\r\n ManufacturersPartNo: { displayName: \"stock.detail.manufacturer-part-no\", value: this.noMatch }\r\n };\r\n\r\n this.preDefinedMaps = [{\r\n columns: [\r\n \"Part No\",\r\n \"Description\",\r\n \"Stock Type\",\r\n \"Store\",\r\n \"Qty In Stock\",\r\n \"Valuation\",\r\n \"Selling Price\",\r\n \"Bin Location\",\r\n \"UserRef1\",\r\n \"UserRef2\",\r\n \"UserRef3\",\r\n \"Notes\",\r\n \"Min\",\r\n \"Max\",\r\n \"Manufacturer\",\r\n \"Manufacturers Part No\"],\r\n name: \"ServiceSight\",\r\n map: {\r\n PartNo: { displayName: \"stock.detail.part-no\", value: 0, required: true },\r\n Description: { displayName: \"stock.detail.description\", value: 1, required: true },\r\n StockType: { displayName: \"stock.detail.stock-type\", value: 2, required: true },\r\n Store: { displayName: \"stock.detail.store\", value: 3, required: true },\r\n Quantity: { displayName: \"stock.detail.in-stock\", value: 4 },\r\n Valuation: { displayName: \"stock.detail.valuation\", value: 5, required: true },\r\n SellingPrice: { displayName: \"stock.detail.selling-price\", value: 6 },\r\n BinLocation: { displayName: \"stock.detail.bin-location\", value: 7 },\r\n UserRef1: { displayName: \"stock.detail.userref1\", value: 8 },\r\n UserRef2: { displayName: \"stock.detail.userref2\", value: 9 },\r\n UserRef3: { displayName: \"stock.detail.userref3\", value: 10 },\r\n Notes: { displayName: \"stock.detail.notes\", value: 11 },\r\n Min: { displayName: \"stock.detail.min\", value: 12 },\r\n Max: { displayName: \"stock.detail.max\", value: 13 },\r\n Manufacturer: { displayName: \"stock.detail.manufacturer\", value: 14 },\r\n ManufacturersPartNo: { displayName: \"stock.detail.manufacturer-part-no\", value: 15 }\r\n }\r\n }, {\r\n columns: [\r\n \"Part No\",\r\n \"Description\",\r\n \"Inventory Type\",\r\n \"Warehouse\",\r\n \"Qty On Hand\",\r\n \"Valuation\",\r\n \"Selling Price\",\r\n \"Bin Location\",\r\n \"UserRef1\",\r\n \"UserRef2\",\r\n \"UserRef3\",\r\n \"Notes\",\r\n \"Min\",\r\n \"Max\",\r\n \"Manufacturer\",\r\n \"Manufacturers Part No\"],\r\n name: \"ServiceSight US\",\r\n map: {\r\n PartNo: { displayName: \"stock.detail.part-no\", value: 0, required: true },\r\n Description: { displayName: \"stock.detail.description\", value: 1, required: true },\r\n StockType: { displayName: \"stock.detail.stock-type\", value: 2, required: true },\r\n Store: { displayName: \"stock.detail.store\", value: 3, required: true },\r\n Quantity: { displayName: \"stock.detail.in-stock\", value: 4 },\r\n Valuation: { displayName: \"stock.detail.valuation\", value: 5, required: true },\r\n SellingPrice: { displayName: \"stock.detail.selling-price\", value: 6 },\r\n BinLocation: { displayName: \"stock.detail.bin-location\", value: 7 },\r\n UserRef1: { displayName: \"stock.detail.userref1\", value: 8 },\r\n UserRef2: { displayName: \"stock.detail.userref2\", value: 9 },\r\n UserRef3: { displayName: \"stock.detail.userref3\", value: 10 },\r\n Notes: { displayName: \"stock.detail.notes\", value: 11 },\r\n Min: { displayName: \"stock.detail.min\", value: 12 },\r\n Max: { displayName: \"stock.detail.max\", value: 13 },\r\n Manufacturer: { displayName: \"stock.detail.manufacturer\", value: 14 },\r\n ManufacturersPartNo: { displayName: \"stock.detail.manufacturer-part-no\", value: 15 }\r\n }\r\n }];\r\n\r\n this.columnValidations.Store = (val) => val && val.toString().length <= 50;\r\n\r\n this.defaultMaps.Store = \"Store\";\r\n this.defaultMaps.store = \"Store\";\r\n this.defaultMaps.Warehouse = \"Store\";\r\n this.defaultMaps.warehouse = \"Store\";\r\n }\r\n}\r\n","\r\n\r\n","
\r\n
\r\n
\r\n

{{ 'stock.adjustment.title' | translate}} {{adjustmentId}}

\r\n
\r\n

{{ adjustmentStatus | stockAdjustmentStatus | translate}}

\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
{{ 'label.email.sendMessage' | translate }}
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { Component, Inject, OnInit, ViewChild } from \"@angular/core\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { IAppConfig, APP_CONFIG, ReportViewerComponent } from \"servicesight-shared\";\r\nimport { QueuedEmailType } from \"src/app/shared/enums/queued-email-type.enum\";\r\nimport { Email } from \"../../shared/models/email.model\";\r\nimport { StockAdjustmentService } from \"../services/stock-adjustment.service\";\r\n\r\n\r\n@Component({\r\n selector: \"app-stock-preview\",\r\n templateUrl: \"./stock-preview.component.html\",\r\n styleUrls: [\"./stock-preview.component.scss\"]\r\n})\r\nexport class StockPreviewComponent implements OnInit {\r\n\r\n @ViewChild(\"report\", { static: true }) report: ReportViewerComponent;\r\n\r\n public adjustmentUrl: string;\r\n public hostUrl: string;\r\n public adjustmentId: number;\r\n public adjustmentStatus: number;\r\n public isPreviewLoaded: boolean;\r\n public showTemplateDialog: boolean = false;\r\n public emailData: Email = new Email();\r\n public showSuccessSendMessage: boolean = false;\r\n public showErrorSendMessage: boolean = false;\r\n\r\n constructor(\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private service: StockAdjustmentService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) {\r\n this.adjustmentId = Number(this.route.snapshot.paramMap.get(\"id\"));\r\n this.adjustmentUrl = `stock/${this.adjustmentId}`;\r\n }\r\n\r\n ngOnInit() {\r\n this.service.GetStatus(this.adjustmentId).subscribe((res) => this.adjustmentStatus = res);\r\n this.hostUrl = this.appConfig.apiLocations.Stock.substr(0, this.appConfig.apiLocations.Stock.lastIndexOf(\"/api/\") + 1);\r\n }\r\n\r\n public CallPrint() {\r\n this.report.print();\r\n }\r\n\r\n public CallDownload() {\r\n this.report.download();\r\n }\r\n\r\n public GoBack(): void {\r\n this.router.navigate([`/stock/adjustment/${this.adjustmentId}`]);\r\n }\r\n\r\n public OpenEmailDialog(): void {\r\n this.send();\r\n }\r\n\r\n public OpenDialog(): void {\r\n this.service\r\n .GetStockAdjustmentEmailData(this.adjustmentId)\r\n .subscribe(x => this.emailData = x, () => { }, () => {\r\n this.showErrorSendMessage = false;\r\n this.showTemplateDialog = true;\r\n });\r\n }\r\n\r\n public send(): void {\r\n this.emailData.EmailType = QueuedEmailType.StockPreview;\r\n this.service.SendStockAdjustmentEmail(this.emailData).subscribe(() => {\r\n this.showTemplateDialog = false;\r\n this.showSuccessSendMessage = true;\r\n }, () => {\r\n this.showErrorSendMessage = true;\r\n });\r\n }\r\n\r\n public CloseDialog(): void {\r\n this.showTemplateDialog = false;\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { ImportServerSummary } from \"src/app/shared/models/import/import-server-summary.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class StockSupplierPricesUploadService {\r\n\r\n constructor(\r\n @Inject(APP_CONFIG) private config: IAppConfig,\r\n private http: HttpClient\r\n ) { }\r\n\r\n public GetSample(): Observable {\r\n return this.http.get(`${this.config.apiLocations.Stock}StockSupplierPricesUpload`, { observe: \"response\", responseType: \"blob\" as \"json\" });\r\n }\r\n\r\n public GetRemainingCount(): Observable {\r\n return this.http.get(`${this.config.apiLocations.Stock}StockSupplierPricesUpload/Progress`);\r\n }\r\n\r\n public GetSummary(): Observable {\r\n return this.http.get(`${this.config.apiLocations.Stock}StockSupplierPricesUpload/Summary`);\r\n }\r\n\r\n public Upload(rows: any[]): Observable {\r\n return this.http.post(`${this.config.apiLocations.Stock}StockSupplierPricesUpload`, rows);\r\n }\r\n}\r\n","import { Component, OnDestroy, OnInit, ViewChild } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { AccountingService, ToasterService, ToastType } from \"servicesight-shared\";\r\nimport { ImporterComponent } from \"src/app/shared/components/importer/importer.component\";\r\nimport { ImportColumnDictionary } from \"src/app/shared/models/import/import-column-dictionary.model\";\r\nimport { ImportMap } from \"src/app/shared/models/import/import-map.model\";\r\nimport { ImportValidationObject } from \"src/app/shared/models/import/import-validation-object.model\";\r\nimport { ImportValidationFunc } from \"src/app/shared/models/import/import-validation.type\";\r\nimport { StockSupplierPriceUpload } from \"../models/stock-supplier-price-upload.model\";\r\nimport { StockSupplierPricesUploadService } from \"../services/stock-supplier-prices-upload.service\";\r\n\r\n@Component({\r\n selector: \"app-stock-supplier-prices-upload\",\r\n templateUrl: \"./stock-supplier-prices-upload.component.html\",\r\n styleUrls: [\"./stock-supplier-prices-upload.component.scss\"]\r\n})\r\nexport class StockSupplierPricesUploadComponent implements OnInit, OnDestroy {\r\n private poll: any;\r\n\r\n @ViewChild(\"importer\", { static: true }) importer: ImporterComponent;\r\n\r\n public noMatch: number = -1;\r\n public isProcessing: boolean = false;\r\n public remainingRows: number = 0;\r\n public stockSupplierPricesMap: Map = new Map();\r\n\r\n public defaultMap: ImportColumnDictionary = {\r\n PartNo: { displayName: \"stock.supplier.prices.partNo\", value: this.noMatch, required: true },\r\n SupplierAccNo: { displayName: \"stock.supplier.prices.supplierAccNo\", value: this.noMatch, required: true },\r\n SupplierPartNo: { displayName: \"stock.supplier.prices.supplierPartNo\", value: this.noMatch},\r\n SupplierRrp: { displayName: \"stock.supplier.prices.rrp\", value: this.noMatch},\r\n BuyingPrice: { displayName: \"stock.supplier.prices.buyingPrice\", value: this.noMatch },\r\n LeadTime: { displayName: \"stock.supplier.prices.leadTime\", value: this.noMatch },\r\n MinOrderQty: { displayName: \"stock.supplier.prices.minOrderQty\", value: this.noMatch },\r\n Preferred: { displayName: \"stock.supplier.prices.preferred\", value: this.noMatch, required: true }\r\n };\r\n\r\n public defaultMaps: { [key: string]: string } = {\r\n PartNo: \"PartNo\",\r\n partNo: \"PartNo\",\r\n partno: \"PartNo\",\r\n SupplierAccNo: \"SupplierAccNo\",\r\n supplierAccNo: \"SupplierAccNo\",\r\n supplieraccno: \"SupplierAccNo\",\r\n VendorAccNo: \"SupplierAccNo\",\r\n vendorAccNo: \"SupplierAccNo\",\r\n vendoraccno: \"SupplierAccNo\",\r\n SupplierPartNo: \"SupplierPartNo\",\r\n supplierPartNo: \"SupplierPartNo\",\r\n supplierpartno: \"SupplierPartNo\",\r\n VendorPartNo: \"SupplierPartNo\",\r\n vendorPartNo: \"SupplierPartNo\",\r\n vendorpartno: \"SupplierPartNo\",\r\n SupplierRRP: \"SupplierRrp\",\r\n supplierRRP: \"SupplierRrp\",\r\n supplierrrp: \"SupplierRrp\",\r\n VendorRRP: \"SupplierRrp\",\r\n vendorRRP: \"SupplierRrp\",\r\n vendorrrp: \"SupplierRrp\",\r\n RRP: \"SupplierRrp\",\r\n rrp: \"SupplierRrp\",\r\n BuyingPrice: \"BuyingPrice\",\r\n buyingPrice: \"BuyingPrice\",\r\n buyingprice: \"BuyingPrice\",\r\n LeadTime: \"LeadTime\",\r\n leadTime: \"LeadTime\",\r\n leadtime: \"LeadTime\",\r\n MinOrderQty: \"MinOrderQty\",\r\n minOrderQty: \"MinOrderQty\",\r\n minorderqty: \"MinOrderQty\",\r\n Preferred: \"Preferred\",\r\n preferred: \"Preferred\"\r\n };\r\n\r\n public preDefinedMaps: Array = [\r\n {\r\n columns: [\"Part No\", \"Supplier Acc No\", \"Supplier Part No\", \"RRP\", \"Buying Price\", \"Lead Time\", \"Min Order Qty\", \"Preferred\"],\r\n name: \"ServiceSight UK\",\r\n map: {\r\n PartNo: { displayName: \"stock.supplier.prices.partNo\", value: 0 },\r\n SupplierAccNo: { displayName: \"stock.supplier.prices.supplierAccNo\", value: 1 },\r\n SupplierPartNo: { displayName: \"stock.supplier.prices.supplierPartNo\", value: 2 },\r\n SupplierRrp: { displayName: \"stock.supplier.prices.rrp\", value: 3 },\r\n BuyingPrice: { displayName: \"stock.supplier.prices.buyingPrice\", value: 4 },\r\n LeadTime: { displayName: \"stock.supplier.prices.leadTime\", value: 5 },\r\n MinOrderQty: { displayName: \"stock.supplier.prices.minOrderQty\", value: 6 },\r\n Preferred: { displayName: \"stock.supplier.prices.preferred\", value: 7 }\r\n }\r\n },\r\n {\r\n columns: [\"Part No\", \"Vendor Acc No\", \"Vendor Part No\", \"RRP\", \"Buying Price\", \"Lead Time\", \"Min Order Qty\", \"Preferred\"],\r\n name: \"ServiceSight US\",\r\n map: {\r\n PartNo: { displayName: \"stock.supplier.prices.partNo\", value: 0 },\r\n SupplierAccNo: { displayName: \"stock.supplier.prices.supplierAccNo\", value: 1 },\r\n SupplierPartNo: { displayName: \"stock.supplier.prices.supplierPartNo\", value: 2 },\r\n SupplierRrp: { displayName: \"stock.supplier.prices.rrp\", value: 3 },\r\n BuyingPrice: { displayName: \"stock.supplier.prices.buyingPrice\", value: 4 },\r\n LeadTime: { displayName: \"stock.supplier.prices.leadTime\", value: 5 },\r\n MinOrderQty: { displayName: \"stock.supplier.prices.minOrderQty\", value: 6 },\r\n Preferred: { displayName: \"stock.supplier.prices.preferred\", value: 7 }\r\n }\r\n }\r\n ];\r\n\r\n public columnValidations: ImportValidationObject = {\r\n PartNo: (val) => val && val.toString().length <= 50,\r\n SupplierAccNo: (val) => val && val.toString().length <= 52,\r\n SupplierPartNo: (val) => !val || val.toString().length <= 50,\r\n SupplierRrp: (val) => !val || !isNaN(val),\r\n BuyingPrice: (val) => !val || !isNaN(val),\r\n LeadTime: (val) => !val || !isNaN(val),\r\n MinOrderQty: (val) => !val || !isNaN(val),\r\n Preferred: (val) => val && (val.toString().trim().toUpperCase() === \"Y\" || val.toString().trim().toUpperCase() === \"N\")\r\n };\r\n\r\n private isUScompany: boolean = false;\r\n\r\n public rowValidator: ImportValidationFunc = (row: StockSupplierPriceUpload) => {\r\n const errors: string[] = [];\r\n const key = `${row.PartNo}.${row.SupplierAccNo}`;\r\n const isDuplicate = this.stockSupplierPricesMap.has(key);\r\n\r\n if (!isDuplicate) {\r\n this.stockSupplierPricesMap.set(key, true);\r\n } else {\r\n errors.push(this.translateService.instant(\"stock.supplier.prices.duplicate\", row));\r\n }\r\n\r\n return {\r\n isValid: errors.length === 0,\r\n errors\r\n };\r\n };\r\n\r\n constructor(\r\n private router: Router,\r\n private stockSupplierPricesUploadService: StockSupplierPricesUploadService,\r\n private accountsLinkService: AccountingService,\r\n private translateService: TranslateService,\r\n private toasterService: ToasterService) { }\r\n\r\n public ngOnInit(): void {\r\n this.accountsLinkService.GetAccountsInfo().subscribe(result => {\r\n this.isUScompany = result.IsUsaTaxSystem;\r\n });\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n if (this.poll) {\r\n clearTimeout(this.poll);\r\n this.poll = null;\r\n }\r\n }\r\n\r\n public reset(): void {\r\n this.stockSupplierPricesMap.clear();\r\n }\r\n\r\n public getSample(): void {\r\n this.stockSupplierPricesUploadService.GetSample().subscribe(response => {\r\n const fileName = this.isUScompany ? \"inventoryvendorprices-sample.csv\" : \"stocksupplierprices-sample.csv\";\r\n const contentType = \"text/csv\";\r\n const blob = new Blob([response.body], { type: contentType });\r\n const data = window.URL.createObjectURL(blob);\r\n const link = document.createElement(\"a\");\r\n link.hidden = true;\r\n link.href = data;\r\n link.download = fileName;\r\n document.body.appendChild(link);\r\n link.click();\r\n document.body.removeChild(link);\r\n setTimeout(() => {\r\n // For Firefox it is necessary to delay revoking the ObjectURL\r\n window.URL.revokeObjectURL(data);\r\n }, 100);\r\n });\r\n }\r\n\r\n public upload(rows: StockSupplierPriceUpload[]): void {\r\n this.isProcessing = true;\r\n\r\n this.stockSupplierPricesUploadService.Upload(rows).subscribe(() => {\r\n this.getRemainingCount();\r\n }, () => {\r\n this.isProcessing = false;\r\n });\r\n }\r\n\r\n public getRemainingCount(): void {\r\n this.stockSupplierPricesUploadService.GetRemainingCount().subscribe(s => {\r\n this.remainingRows = s;\r\n if (s > 0) {\r\n this.isProcessing = true;\r\n this.poll = setTimeout(this.getRemainingCount.bind(this), 3000);\r\n } else {\r\n if (this.isProcessing) {\r\n this.getSummary();\r\n }\r\n\r\n this.isProcessing = false;\r\n if (this.poll) {\r\n clearTimeout(this.poll);\r\n this.poll = null;\r\n }\r\n }\r\n });\r\n }\r\n\r\n private getSummary(): void {\r\n this.stockSupplierPricesUploadService.GetSummary().subscribe(res => {\r\n if (res.FailedRows === 0) {\r\n this.toasterService.pop(\"stock.supplier.prices.upload.complete\", ToastType.medium);\r\n this.router.navigate([\"/stock/list\"]);\r\n } else {\r\n this.toasterService.pop(\"stock.supplier.prices.upload.completewitherrors\", ToastType.dark);\r\n res.Errors = res.Errors.map(row => {\r\n row.Errors = row.Errors.map(e => this.translateService.instant(e));\r\n return row;\r\n });\r\n this.importer.uploadError(res.FailedRows, res.Errors);\r\n }\r\n });\r\n }\r\n}\r\n","\r\n\r\n","
\r\n
\r\n
\r\n

\r\n {{ 'stock-take.report.title' | translate }}\r\n {{ adjustmentId }}\r\n

\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
{{ 'label.email.sendMessage' | translate }}
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n","import { Component, Inject, OnInit, ViewChild } from \"@angular/core\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { IAppConfig, APP_CONFIG, ReportViewerComponent } from \"servicesight-shared\";\r\nimport { QueuedEmailType } from \"src/app/shared/enums/queued-email-type.enum\";\r\nimport { Email } from \"../../shared/models/email.model\";\r\nimport { StockAdjustmentService } from \"../services/stock-adjustment.service\";\r\n\r\n@Component({\r\n selector: \"app-stock-take-preview\",\r\n templateUrl: \"./stock-take-preview.component.html\",\r\n styleUrls: [\"./stock-take-preview.component.scss\"]\r\n})\r\nexport class StockTakePreviewComponent implements OnInit {\r\n @ViewChild(\"report\", { static: true }) report: ReportViewerComponent;\r\n\r\n public adjustmentUrl: string;\r\n public hostUrl: string;\r\n public adjustmentId: number;\r\n public isPreviewLoaded: boolean;\r\n public showTemplateDialog: boolean = false;\r\n public emailData: Email = new Email();\r\n public showSuccessSendMessage: boolean = false;\r\n public showErrorSendMessage: boolean = false;\r\n\r\n constructor(\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private service: StockAdjustmentService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig\r\n ) { }\r\n\r\n\r\n ngOnInit() {\r\n this.hostUrl = this.appConfig.apiLocations.Stock.substr(0, this.appConfig.apiLocations.Stock.lastIndexOf(\"/api/\") + 1);\r\n\r\n this.route.params.subscribe(params => {\r\n this.adjustmentId = parseInt(params.id, 10);\r\n this.adjustmentUrl = `stock-take/${this.adjustmentId}`;\r\n });\r\n }\r\n\r\n public CallPrint(): void {\r\n this.report.print();\r\n }\r\n\r\n public CallDownload(): void {\r\n this.report.download();\r\n }\r\n\r\n public GoBack(): void {\r\n this.router.navigate([`/stock/adjustment/${this.adjustmentId}`]);\r\n }\r\n\r\n public OpenEmailDialog(): void {\r\n this.send();\r\n }\r\n\r\n public OpenDialog(): void {\r\n this.service\r\n .GetStockTakeEmailData(this.adjustmentId)\r\n .subscribe(x => this.emailData = x, () => { }, () => {\r\n this.showErrorSendMessage = false;\r\n this.showTemplateDialog = true;\r\n });\r\n }\r\n\r\n public send(): void {\r\n this.emailData.EmailType = QueuedEmailType.StockTake;\r\n this.service.SendStockAdjustmentEmail(this.emailData).subscribe(() => {\r\n this.showTemplateDialog = false;\r\n this.showSuccessSendMessage = true;\r\n }, () => {\r\n this.showErrorSendMessage = true;\r\n });\r\n }\r\n\r\n public CloseDialog(): void {\r\n this.showTemplateDialog = false;\r\n }\r\n}\r\n","import { NgModule } from \"@angular/core\";\r\nimport { RouterModule, Routes } from \"@angular/router\";\r\nimport { CanDeactivateGuard } from \"servicesight-shared\";\r\nimport { PickingNoteComponent } from \"./picking-note/picking-note.component\";\r\nimport { StockAdjustmentListComponent } from \"./stock-adjustment-list/stock-adjustment-list.component\";\r\nimport { StockAdjustmentComponent } from \"./stock-adjustment/stock-adjustment.component\";\r\nimport { StockDetailComponent } from \"./stock-detail/stock-detail.component\";\r\nimport { StockMarketingComponent } from \"./stock-marketing/stock-marketing.component\";\r\nimport { StockPartUploadComponent } from \"./stock-part-upload/stock-part-upload.component\";\r\nimport { StockPreviewComponent } from \"./stock-preview/stock-preview.component\";\r\nimport { StockSupplierPricesUploadComponent } from \"./stock-supplier-prices-upload/stock-supplier-prices-upload.component\";\r\nimport { StockTakePreviewComponent } from \"./stock-take-preview/stock-take-preview.component\";\r\nimport { StockListComponent } from \"../shared/components/stock-list/stock-list.component\";\r\nimport { ReorderingComponent } from \"../shared/components/reordering/reordering.component\";\r\n\r\nconst routes: Routes = [\r\n { path: \"list\", component: StockListComponent },\r\n { path: \"marketing\", component: StockMarketingComponent },\r\n { path: \"upload/records\", component: StockPartUploadComponent },\r\n { path: \"upload/supplierPrices\", component: StockSupplierPricesUploadComponent },\r\n { path: \"detail/:id\", component: StockDetailComponent, canDeactivate: [ CanDeactivateGuard ] },\r\n { path: \"detail/:id/:isNew\", component: StockDetailComponent, canDeactivate: [ CanDeactivateGuard ] },\r\n { path: \"detail/:id/:isNew/:tab\", component: StockDetailComponent, canDeactivate: [ CanDeactivateGuard ] },\r\n { path: \"adjustment-list\", component: StockAdjustmentListComponent },\r\n { path: \"adjustment/:id\", component: StockAdjustmentComponent, canDeactivate: [ CanDeactivateGuard ] },\r\n { path: \"adjustment/:id/:isNew\", component: StockAdjustmentComponent, canDeactivate: [ CanDeactivateGuard ] },\r\n { path: \"adjustment/:id/take/report\", component: StockTakePreviewComponent },\r\n { path: \"report/:id\", component: StockPreviewComponent },\r\n { path: \"picking-note/:id\", component: PickingNoteComponent },\r\n { path: \"reordering\", component: ReorderingComponent },\r\n { path: \"\", redirectTo: \"list\", pathMatch: \"full\" },\r\n { path: \"**\", redirectTo: \"list\" }\r\n];\r\n\r\n@NgModule({\r\n imports: [ RouterModule.forChild(routes) ],\r\n exports: [ RouterModule ]\r\n})\r\nexport class StockRoutingModule {\r\n public static readonly Routes: Routes = routes;\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { SupplierStatus } from \"./enums/supplier-status.enum\";\r\n\r\n@Pipe({\r\n name: \"supplierStatus\"\r\n})\r\nexport class SupplierStatusPipe implements PipeTransform {\r\n\r\n private readonly statusMapping = {\r\n [SupplierStatus.Active]: \"suppliers.status.active\",\r\n [SupplierStatus.OnHold]: \"suppliers.status.on-hold\",\r\n [SupplierStatus.Closed]: \"suppliers.status.closed\"\r\n };\r\n\r\n private readonly stringValueMapping = {\r\n Active: SupplierStatus.Active,\r\n OnHold: SupplierStatus.OnHold,\r\n Closed: SupplierStatus.Closed\r\n };\r\n\r\n transform(value: number | string | SupplierStatus): string {\r\n let safeValue = Number(value);\r\n if (isNaN(safeValue)) {\r\n safeValue = this.stringValueMapping[value];\r\n }\r\n\r\n return this.statusMapping[safeValue];\r\n }\r\n\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { SupplierStatus } from \"./enums/supplier-status.enum\";\r\n\r\n@Pipe({\r\n name: \"supplierStatusBar\"\r\n})\r\nexport class SupplierStatusBarPipe implements PipeTransform {\r\n\r\n private readonly status = {\r\n [SupplierStatus.Active]: \"bggreenstatuslong\",\r\n [SupplierStatus.OnHold]: \"bgyellowstatuslong\",\r\n [SupplierStatus.Closed]: \"bgredstatuslong\"\r\n };\r\n\r\n private readonly bgcolors = {\r\n [SupplierStatus.Active]: \"clrgreen\",\r\n [SupplierStatus.OnHold]: \"clryellow\",\r\n [SupplierStatus.Closed]: \"clrred\"\r\n };\r\n\r\n private readonly stringValueMapping = {\r\n Active: SupplierStatus.Active,\r\n OnHold: SupplierStatus.OnHold,\r\n Closed: SupplierStatus.Closed\r\n };\r\n\r\n transform(value: SupplierStatus | number | string, args?: any): string {\r\n if (value) {\r\n let safeValue = Number(value);\r\n if (isNaN(safeValue)) {\r\n safeValue = this.stringValueMapping[value];\r\n }\r\n\r\n const colors = {\r\n bg: this.bgcolors[safeValue],\r\n bar: this.status[safeValue]\r\n };\r\n\r\n return colors[args];\r\n }\r\n\r\n return null;\r\n }\r\n\r\n}\r\n","\r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n
\r\n
{{ item.data.Supplier }}
\r\n
\r\n\r\n
\r\n
{{ item.value | supplierStatus | translate }}
\r\n
\r\n\r\n","import { Component, Input, OnInit } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { SupplierService } from \"../../services/supplier/supplier.service\";\r\nimport { ChildContactType } from \"../child-contacts-list/child-contact-type.enum\";\r\nimport { Router } from \"@angular/router\";\r\n\r\n@Component({\r\n selector: \"app-child-sites-list\",\r\n templateUrl: \"./child-sites-list.component.html\",\r\n styleUrls: [\"./child-sites-list.component.scss\"]\r\n})\r\nexport class ChildSitesListComponent implements OnInit {\r\n\r\n @Input() entityId: number = null;\r\n @Input() entityType: ChildContactType = null;\r\n\r\n public supplierType: ChildContactType = ChildContactType.Supplier;\r\n\r\n public dataSource: DataSource;\r\n\r\n constructor(\r\n private supplierService: SupplierService,\r\n private router: Router\r\n ) { }\r\n\r\n public GoTo(id: number): void {\r\n this.router.navigateByUrl(\"/suppliers/list\", { skipLocationChange: true}).then(() => {\r\n this.router.navigate([\"/suppliers/detail/\", id]);\r\n });\r\n }\r\n\r\n public ngOnInit(): void {\r\n let dataSource: DataSource = null;\r\n\r\n switch (this.entityType) {\r\n case ChildContactType.Customer:\r\n throw new Error(\"Not implemented\");\r\n case ChildContactType.Supplier:\r\n dataSource = this.supplierService.GetSupplierDataSource();\r\n break;\r\n default:\r\n throw new Error(\"Not implemented\");\r\n }\r\n\r\n dataSource.filter([[\"InvoiceId\", \"=\", this.entityId]]);\r\n\r\n this.dataSource = dataSource;\r\n }\r\n\r\n public Reload(): void {\r\n this.dataSource.reload().then();\r\n }\r\n}\r\n","export class Supplier {\r\n Alpha: string;\r\n SupplierId: number;\r\n InvoiceId: number;\r\n Logo: string;\r\n Name: string;\r\n Status: number = 300;\r\n Address1: string;\r\n Address2: string;\r\n Address3: string;\r\n Address4: string;\r\n PostCode: string;\r\n CountryID: number = 1;\r\n CurrencyId: number = 1;\r\n Telephone: string;\r\n Fax: string;\r\n Email: string;\r\n Website: string;\r\n UserRef1SupplierID: number;\r\n UserRef2SupplierID: number;\r\n WarningNotes: string;\r\n Notes: string;\r\n AccountsContactId: number;\r\n SupplierTaxCodeId: number = 1;\r\n PurchaseOutputType: number;\r\n EmailPurchase: string;\r\n EmailPurchaseFormat: number;\r\n VatRegNo: string;\r\n OnHoldReason: string;\r\n isSite: boolean;\r\n ReverseChargeVat: boolean;\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { ContactStatus } from \"../enums/contact-status.eum\";\r\n\r\n@Pipe({\r\n name: \"contactStatus\"\r\n})\r\nexport class ContactStatusPipe implements PipeTransform {\r\n private readonly statusMapping = {\r\n [ContactStatus.ACTIVE]: \"contact.status.active\",\r\n [ContactStatus.INACTIVE]: \"contact.status.inactive\"\r\n };\r\n\r\n private readonly stringValueMapping = {\r\n Active: ContactStatus.ACTIVE,\r\n Inactive: ContactStatus.INACTIVE\r\n };\r\n\r\n transform(value: number | string | ContactStatus): string {\r\n let safeValue = Number(value);\r\n if (isNaN(safeValue)) {\r\n safeValue = this.stringValueMapping[value];\r\n }\r\n\r\n return this.statusMapping[safeValue];\r\n }\r\n\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { ContactStatus } from \"../enums/contact-status.eum\";\r\n\r\n@Pipe({\r\n name: \"contactStatusBar\"\r\n})\r\nexport class ContactStatusBarPipe implements PipeTransform {\r\n private readonly bgcolors = {\r\n [ContactStatus.ACTIVE]: \"clrgreen\",\r\n [ContactStatus.INACTIVE]: \"clrred\"\r\n };\r\n\r\n private readonly stringValueMapping = {\r\n Active: ContactStatus.ACTIVE,\r\n Inactive: ContactStatus.INACTIVE\r\n };\r\n\r\n transform(value: ContactStatus | number | string, args?: any): string {\r\n if (value) {\r\n let safeValue = Number(value);\r\n if (isNaN(safeValue)) {\r\n safeValue = this.stringValueMapping[value];\r\n }\r\n\r\n const colors = {\r\n bg: this.bgcolors[safeValue]\r\n };\r\n\r\n return colors[args];\r\n }\r\n\r\n return null;\r\n }\r\n\r\n}\r\n","\r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n
\r\n
{{ item.value | contactStatus | translate }}
\r\n
\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges\r\n} from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { ChildContactType } from \"./child-contact-type.enum\";\r\nimport { ChildContactsService } from \"../../services/child-contacts/child-contracts.service\";\r\n\r\n@Component({\r\n selector: \"app-child-contacts-list\",\r\n templateUrl: \"./child-contacts-list.component.html\",\r\n styleUrls: [\"./child-contacts-list.component.scss\"]\r\n})\r\nexport class ChildContactsListComponent implements OnInit, OnChanges {\r\n @Input() entityId: number = null;\r\n @Input() entityType: ChildContactType = null;\r\n @Input() shouldReload: boolean = false;\r\n @Output() shouldReloadChange = new EventEmitter();\r\n\r\n public dataSource: DataSource;\r\n\r\n constructor(\r\n private childContractsService: ChildContactsService\r\n ) { }\r\n\r\n public ngOnInit(): void {\r\n const childStore = this.childContractsService.GetDataStore(this.entityType);\r\n this.dataSource = new DataSource({\r\n store: childStore,\r\n filter: [\"CustomerId\", \"=\", this.entityId]\r\n });\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.shouldReload && this.dataSource) {\r\n this.Reload();\r\n }\r\n }\r\n\r\n public Reload(): void {\r\n this.dataSource.reload().then();\r\n this.shouldReload = false;\r\n this.shouldReloadChange.emit(this.shouldReload);\r\n }\r\n\r\n}\r\n","export class NewContact {\r\n FirstName: string;\r\n LastName: string;\r\n Telephone: string;\r\n Email: string;\r\n}\r\n","import { Component, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\r\nimport { NewContact } from \"../../models/new-contact.model\";\r\nimport { ChildContactsService } from \"../../services/child-contacts/child-contracts.service\";\r\nimport { ChildContactType } from \"../child-contacts-list/child-contact-type.enum\";\r\n\r\n@Component({\r\n selector: \"app-new-child-contact\",\r\n templateUrl: \"./new-child-contact.component.html\",\r\n styleUrls: [\"./new-child-contact.component.scss\"]\r\n})\r\nexport class NewChildContactComponent implements OnInit {\r\n\r\n @Input() entityId: number = null;\r\n @Input() entityType: ChildContactType = null;\r\n @Input() showNewContactDialog: boolean = false;\r\n @Output() showNewContactDialogChange: EventEmitter = new EventEmitter();\r\n @Output() newContactAdded: EventEmitter = new EventEmitter();\r\n\r\n public contact: NewContact = new NewContact();\r\n\r\n constructor(\r\n private childContractsService: ChildContactsService\r\n ) { }\r\n\r\n public ngOnInit(): void {\r\n }\r\n\r\n public Cancel(): void {\r\n this.contact = new NewContact();\r\n this.showNewContactDialog = false;\r\n this.showNewContactDialogChange.emit(false);\r\n }\r\n\r\n public Save(): void {\r\n this.childContractsService.Create(this.entityType, this.entityId, this.contact).subscribe(() => {\r\n this.Cancel();\r\n this.newContactAdded.emit(true);\r\n });\r\n }\r\n\r\n}\r\n","\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n","
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n","import { Component, Input, OnChanges, OnInit, ViewChild } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport ArrayStore from \"devextreme/data/array_store\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { DocumentTypeEnum } from \"servicesight-shared\";\r\nimport { SupplierService } from \"src/app/shared/services/supplier/supplier.service\";\r\nimport { LicenseService } from \"./../../../shared/services/licence/license.service\";\r\n\r\n@Component({\r\n selector: \"app-supplier-history\",\r\n templateUrl: \"./supplier-history.component.html\",\r\n styleUrls: [\"./supplier-history.component.scss\"]\r\n})\r\nexport class SupplierHistoryComponent implements OnInit, OnChanges {\r\n\r\n @Input() supplierId: number;\r\n @ViewChild(\"historyDataGrid\") private dataGrid: DxDataGridComponent;\r\n\r\n public searchText: string = \"\";\r\n public historyDataSource: DataSource;\r\n public historyType = DocumentTypeEnum;\r\n public historyFilterTypes: DataSource;\r\n public baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n private readonly filterTypes = [\r\n {\r\n ID: DocumentTypeEnum.PurchaseOrder,\r\n name: this.translate.instant(\"suppliers.history.types.purchase-orders\")\r\n },\r\n {\r\n ID: DocumentTypeEnum.AdviceNote,\r\n name: this.translate.instant(\"suppliers.history.types.goods-received-notes\")\r\n }];\r\n\r\n constructor(\r\n private licenseService: LicenseService,\r\n private supplierService: SupplierService,\r\n private translate: TranslateService) { }\r\n\r\n public ngOnInit(): void {\r\n this.SetFilters();\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(modules => {\r\n if (modules.ProEnabled && modules.PurchaseOrdersEnabled) {\r\n this.filterTypes.push({\r\n ID: DocumentTypeEnum.ReturnsNote,\r\n name: this.translate.instant(\"suppliers.history.types.returns-notes\")\r\n });\r\n this.SetFilters();\r\n }\r\n });\r\n }\r\n\r\n public ngOnChanges(): void {\r\n if (!this.historyDataSource && this.supplierId > 0) {\r\n this.historyDataSource = this.supplierService.GetSupplierHistory(this.supplierId);\r\n }\r\n }\r\n\r\n public SearchByText(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.searchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public FilterChanged(selectedFilters): void {\r\n if (selectedFilters.length === 0) {\r\n this.dataGrid.instance.clearFilter();\r\n } else {\r\n const filter = [];\r\n selectedFilters.forEach(key => {\r\n filter.push([\"Type\", \"=\", key]);\r\n filter.push(\"or\");\r\n });\r\n filter.pop();\r\n this.dataGrid.instance.filter(filter);\r\n }\r\n this.SearchByText();\r\n }\r\n\r\n private SetFilters(): void {\r\n this.historyFilterTypes = new DataSource({\r\n store: new ArrayStore({\r\n data: this.filterTypes,\r\n key: \"ID\"\r\n })\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

{{ 'suppliers.detail.title' | translate }} {{ supplier.Alpha }}

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

{{ 'suppliers.accounts.invoicing-header' | translate }}

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

{{ 'suppliers.accounts.orders' | translate }}

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

{{ 'suppliers.memo.warning-notes' | translate }}

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

{{ 'suppliers.memo.general-notes' | translate }}

\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
0\">\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n","import { AfterViewInit, Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { DomSanitizer, SafeUrl } from \"@angular/platform-browser\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxFileUploaderComponent, DxSelectBoxComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable } from \"rxjs\";\r\nimport {\r\n DocumentTypeEnum,\r\n FormMesssageService,\r\n PermissionsService,\r\n ProteanResponse,\r\n SelectOptionModel,\r\n SettingId,\r\n SettingsService,\r\n UICustomisation,\r\n UserReferenceService,\r\n UserRefType\r\n} from \"servicesight-shared\";\r\nimport { MessageService } from \"src/app/messages/services/message/message.service\";\r\nimport { ChildContactType } from \"src/app/shared/components/child-contacts-list/child-contact-type.enum\";\r\nimport { ChildSitesListComponent } from \"src/app/shared/components/child-sites-list/child-sites-list.component\";\r\nimport { ConfirmationMessageComponent } from \"src/app/shared/components/confirmation-message/confirmation-message.component\";\r\nimport { MessageDocTypeIds } from \"src/app/shared/enums/messages/message-doc-type-ids.enum\";\r\nimport { MessageTypes } from \"src/app/shared/enums/messages/message-types.enum\";\r\nimport { ChildContactsService } from \"src/app/shared/services/child-contacts/child-contracts.service\";\r\nimport { CurrencyService } from \"src/app/shared/services/currency.service\";\r\nimport { CustomerService } from \"src/app/shared/services/customer/customer.service\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { Ng1ReminderService } from \"src/app/shared/services/ng1-reminder.service\";\r\nimport { SupplierService } from \"src/app/shared/services/supplier/supplier.service\";\r\nimport { SupplierStatus } from \"../../../shared/pipes/enums/supplier-status.enum\";\r\nimport { Supplier } from \"../../models/supplier.model\";\r\n\r\nconst USA: number = 224;\r\n\r\n@Component({\r\n selector: \"app-supplier-details\",\r\n templateUrl: \"./supplier-details.component.html\",\r\n styleUrls: [\"./supplier-details.component.scss\"]\r\n})\r\nexport class SupplierDetailsComponent implements OnInit, AfterViewInit {\r\n // eslint-disable-next-line max-len\r\n private static defaultLogo: string = \"iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAIAAACRXR/mAAAAAXNSR0IArs4c6QAAAARnQU1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nZ+XDTG22/s3pj3t4F0zZ8bNmztbkkR1JfhSLIFXALk9k7on1y14FbHwrum0w+WGE9y2NY+lka13IO2p5+x9g4bY2EXJc73r4CYGD1NjHxm7nb564MjJU2coJCxZulCv0/+1xmzt6tGGBJW88RuDYaqqNBbAy/ade85Wn5cQ/Why4iPfjqmrrWttaw8PjzxyaE/CjDhVbwhj0+rpsW3a8mLrzZsCFkA7mAtGWN6U+3xm5o/GqERf9Pb2bSvc1fz3FjJmRIGhqWCNJuvZDPipGqMwNi1Ab1+fqfx01fvV3RbLY4mJq1b+IHl+ol+cvBjg+bLyquq/nL/98a05303ISE+bN3fOZ9oZFy0vRGiIsgQz6wEIjQaGxoAxx32RHT9o/T8x5gD5ahCg5Q8CtPxBgJY/CNDyBwFa4wdF/QfZAQjMeRYiMwAAAABJRU5ErkJggg==\";\r\n private allowedImageTypes = [\"image/bmp\", \"image/jpg\", \"image/jpeg\", \"image/png\"];\r\n\r\n @ViewChild(\"poform\", { static: true }) ngForm: NgForm;\r\n @ViewChild(\"DiscardChangesMessage\", { static: true }) discardChangesMessage: ConfirmationMessageComponent;\r\n @ViewChild(\"ContactsSelectBox\", { static: false }) contactSelectBoxComponent: DxSelectBoxComponent;\r\n @ViewChild(\"SitesList\") sitesList: ChildSitesListComponent;\r\n @ViewChild(\"FileUploader\") fileUploader: DxFileUploaderComponent;\r\n\r\n public readonly mainFormName: string = \"poform\";\r\n public readonly formName: string = \"myForm\";\r\n public readonly docType = DocumentTypeEnum;\r\n public newSupplier: Supplier = new Supplier();\r\n public showNewSupplierPopup: boolean = false;\r\n public isAllowedCreate: boolean = false;\r\n public isAllowedContactView: boolean = false;\r\n public isAllowedContactAdd: boolean = false;\r\n\r\n public contactListType: ChildContactType = ChildContactType.Supplier;\r\n public showNewContactDialog: boolean = false;\r\n public contactListShouldReload: boolean = false;\r\n public reverseChargeVatEnabled: boolean = false;\r\n\r\n public supplier: Supplier = new Supplier();\r\n public statusDataSource = [];\r\n public poOutputTypeDataSource = [];\r\n public poEmailFormatDataSource = [];\r\n\r\n public userRef1Label: string = null;\r\n public userRef2Label: string = null;\r\n\r\n public userRef1Store: ODataStore;\r\n public userRef2Store: ODataStore;\r\n public contactsStore: ODataStore;\r\n public currencySource: DataSource;\r\n public customerTaxCodesStore: ODataStore;\r\n public countryDataStore: ODataStore;\r\n public regionDataStore: SelectOptionModel[];\r\n public HasAccessToPro: boolean = false;\r\n\r\n public get SupplierLogo(): SafeUrl {\r\n let logo = this.supplier.Logo;\r\n if (!logo) {\r\n logo = SupplierDetailsComponent.defaultLogo;\r\n }\r\n\r\n return this.sanitizer.bypassSecurityTrustResourceUrl(\"data:image/bmp;charset=utf-8;base64,\" + logo);\r\n }\r\n\r\n public get supplierId(): number {\r\n if (this.supplier) {\r\n return this.supplier.SupplierId;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n public get isUnitedStates(): boolean {\r\n return this.supplier.CountryID === USA;\r\n }\r\n\r\n public get supplierOnHold(): boolean {\r\n if (this.supplier) {\r\n return this.supplier.Status === Number(SupplierStatus.OnHold);\r\n }\r\n\r\n return false;\r\n }\r\n\r\n constructor(\r\n private ng1reminderService: Ng1ReminderService,\r\n private permissionsService: PermissionsService,\r\n private formMessageService: FormMesssageService,\r\n private customerService: CustomerService,\r\n private currencyService: CurrencyService,\r\n private childContractsService: ChildContactsService,\r\n private messageService: MessageService,\r\n private supplierService: SupplierService,\r\n private userRefsService: UserReferenceService,\r\n private route: ActivatedRoute,\r\n private translate: TranslateService,\r\n private router: Router,\r\n private sanitizer: DomSanitizer,\r\n private settingService: SettingsService,\r\n private licenseService: LicenseService\r\n ) { }\r\n\r\n public ngOnInit(): void {\r\n this.userRef1Label = this.userRefsService.getLabel(UICustomisation.SUPPLIER_REF1);\r\n this.userRef2Label = this.userRefsService.getLabel(UICustomisation.SUPPLIER_REF2);\r\n\r\n this.userRef1Store = this.userRefsService.getListDataStore(UserRefType.SUPPLIER_1);\r\n this.userRef2Store = this.userRefsService.getListDataStore(UserRefType.SUPPLIER_2);\r\n\r\n this.customerTaxCodesStore = this.customerService.GetCustomerTaxCodesStore();\r\n this.contactsStore = this.childContractsService.GetDataStore(this.contactListType);\r\n\r\n this.countryDataStore = this.customerService.GetAllCountriesStore();\r\n this.customerService.GetRegions(USA).subscribe(collection => {\r\n this.regionDataStore = collection;\r\n }); // May need to be extended in future for other countries.\r\n\r\n this.statusDataSource = [\r\n { Value: Number(SupplierStatus.Active), Text: this.translate.instant(\"suppliers.status.active\") },\r\n { Value: Number(SupplierStatus.Closed), Text: this.translate.instant(\"suppliers.status.closed\") },\r\n { Value: Number(SupplierStatus.OnHold), Text: this.translate.instant(\"suppliers.status.on-hold\") }\r\n ];\r\n\r\n this.poOutputTypeDataSource = [\r\n { Value: 1, Text: this.translate.instant(\"suppliers.accounts.po-output-type.print\") },\r\n { Value: 2, Text: this.translate.instant(\"suppliers.accounts.po-output-type.email\") },\r\n { Value: 3, Text: this.translate.instant(\"suppliers.accounts.po-output-type.download\") },\r\n { Value: 4, Text: this.translate.instant(\"suppliers.accounts.po-output-type.export\") }\r\n ];\r\n\r\n this.poEmailFormatDataSource = [\r\n { Value: 1, Text: this.translate.instant(\"suppliers.accounts.po-email-format.html\") },\r\n { Value: 2, Text: this.translate.instant(\"suppliers.accounts.po-email-format.excel\") },\r\n { Value: 3, Text: this.translate.instant(\"suppliers.accounts.po-email-format.word\") },\r\n { Value: 4, Text: this.translate.instant(\"suppliers.accounts.po-email-format.pdf\") },\r\n { Value: 5, Text: this.translate.instant(\"suppliers.accounts.po-email-format.plain\") },\r\n ];\r\n\r\n const currencySource = this.currencyService.GetDataSource();\r\n currencySource.filter([[\"Active\", \"=\", -1]]);\r\n\r\n this.currencySource = currencySource;\r\n\r\n this.settingService.getSetting(SettingId.ReverseChargeVat).subscribe((setting) => {\r\n this.reverseChargeVatEnabled = setting.ValueBool;\r\n });\r\n\r\n this.permissionsService.CurrentUserHasPermission(\"SupplierAdd\").subscribe(hasPermission => {\r\n this.isAllowedCreate = hasPermission;\r\n });\r\n\r\n this.permissionsService.CurrentUserHasPermission(\"SupplierContactView\").subscribe(hasPermission => {\r\n this.isAllowedContactView = hasPermission;\r\n });\r\n\r\n this.permissionsService.CurrentUserHasPermission(\"SupplierContactAdd\").subscribe(hasPermission => {\r\n this.isAllowedContactAdd= hasPermission;\r\n });\r\n\r\n this.route.params.subscribe(params => {\r\n const id = Number(params.id);\r\n\r\n if (!isNaN(id)) {\r\n this.LoadSupplierData(id);\r\n }\r\n });\r\n\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(x => {\r\n this.HasAccessToPro = x.ProEnabled;\r\n });\r\n }\r\n\r\n public ngAfterViewInit() {\r\n if (this.supplier.SupplierId) {\r\n const contactSource = this.contactSelectBoxComponent.instance.getDataSource();\r\n contactSource.filter([\"CustomerId\", \"=\", this.supplier.SupplierId]);\r\n contactSource.load();\r\n }\r\n }\r\n\r\n public Save(): void {\r\n if (this.ngForm.form.valid) {\r\n this.saveForm(this.mainFormName).subscribe(result => {\r\n this.LoadSupplierData(result.EntityId);\r\n });\r\n }\r\n }\r\n\r\n public CreateNewReminder(): void {\r\n this.ng1reminderService.CreateSupplierReminder(this.supplier.SupplierId);\r\n }\r\n\r\n public CreateNewMessage(): void {\r\n this.messageService.SetNewMessageParameters(0, MessageTypes.RefMessage, false, MessageDocTypeIds.Supplier, this.supplier.SupplierId);\r\n this.router.navigate([\"messages/newmessage\"]);\r\n }\r\n\r\n public DiscardChanges(): void {\r\n if (this.supplier.SupplierId > 0) {\r\n this.supplierService.GetSupplier(this.supplier.SupplierId).subscribe(supplier => {\r\n this.supplier = supplier;\r\n });\r\n } else {\r\n this.supplier = new Supplier();\r\n }\r\n }\r\n\r\n public FileValueChanged(item: any): void {\r\n const uploadedItem = item.value[0];\r\n const that = this;\r\n\r\n if (!uploadedItem) {\r\n return;\r\n }\r\n\r\n if (!this.allowedImageTypes.includes(uploadedItem.type)) {\r\n this.ClearSelectedFile();\r\n this.ShowValidationAlert();\r\n return;\r\n }\r\n uploadedItem.arrayBuffer().then((data: ArrayBuffer) => {\r\n const blob = new Blob([data], { type: \"application/octet-binary\" });\r\n const reader = new FileReader();\r\n reader.onload = (e) => {\r\n const base64String = e.target.result as string;\r\n that.supplier.Logo = base64String.substr(base64String.indexOf(\",\") + 1);\r\n };\r\n reader.readAsDataURL(blob);\r\n });\r\n }\r\n\r\n public RemoveLogo(): void {\r\n this.ClearSelectedFile();\r\n this.supplier.Logo = SupplierDetailsComponent.defaultLogo;\r\n }\r\n\r\n public NewContact(): void {\r\n this.showNewContactDialog = true;\r\n }\r\n\r\n public NewContactAdded(): void {\r\n this.contactListShouldReload = true;\r\n const contactSource = this.contactSelectBoxComponent.instance.getDataSource();\r\n contactSource.reload();\r\n }\r\n\r\n public NewSupplier(): void {\r\n this.newSupplier = new Supplier();\r\n this.newSupplier.InvoiceId = this.supplier.SupplierId;\r\n this.showNewSupplierPopup = true;\r\n }\r\n\r\n public DismissNewSupplier(): void {\r\n this.showNewSupplierPopup = false;\r\n this.newSupplier = new Supplier();\r\n this.newSupplier.InvoiceId = this.supplier.SupplierId;\r\n }\r\n\r\n public CreateNewSupplier(): void {\r\n if (this.ngForm.form.valid) {\r\n this.saveForm(this.formName).subscribe(() => {\r\n this.showNewSupplierPopup = false;\r\n this.sitesList.Reload();\r\n this.newSupplier = new Supplier();\r\n });\r\n }\r\n }\r\n\r\n private LoadSupplierData(id: number): void {\r\n this.supplier.SupplierId = id;\r\n this.supplierService.GetSupplier(id).subscribe(supplier => {\r\n this.supplier = supplier;\r\n this.newSupplier.InvoiceId = this.supplier.SupplierId;\r\n });\r\n }\r\n\r\n private saveForm(formName: string): Observable {\r\n const supplier = (this.newSupplier && this.newSupplier.Name) ? this.newSupplier : this.supplier;\r\n return this.formMessageService\r\n .RegisterObservable(this.supplierService.Upsert(supplier), formName);\r\n }\r\n\r\n private ShowValidationAlert(): void {\r\n const supportedTypes = this.allowedImageTypes.join(\", \");\r\n const message = this.translate.instant(\"supported-image-types\", { supportedTypes });\r\n alert(message);\r\n }\r\n\r\n private ClearSelectedFile(): void {\r\n this.fileUploader.instance.reset();\r\n }\r\n}\r\n","import { ImportSummaryRow } from \"./import-summary-row\";\r\nimport { UploadSummary } from \"./upload-summary\";\r\nimport { UploadSummaryRow } from \"./upload-summary-row\";\r\n\r\n// represents the summary used in the import component\r\nexport class ImportSummary {\r\n\r\n FailedRows: number;\r\n\r\n Errors: ImportSummaryRow[] = [];\r\n\r\n public static FromUploadSummary(summary: UploadSummary): ImportSummary {\r\n const importSummary: ImportSummary = new ImportSummary();\r\n\r\n importSummary.FailedRows = summary.NumberOfInvalidRows;\r\n\r\n importSummary.Errors = Object.keys(summary.RowErrors).map(key => {\r\n const rowError: UploadSummaryRow = summary.RowErrors[key];\r\n\r\n const importSummaryRow: ImportSummaryRow = {\r\n RowNumber: rowError.RowNumber,\r\n Errors: rowError.Errors\r\n };\r\n\r\n return importSummaryRow;\r\n });\r\n\r\n return importSummary;\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { UploadSummary } from \"../../shared/components/importer/models/upload-summary\";\r\nimport { SupplierUpload } from \"../models/supplier-upload.model\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class SupplierUploadService {\r\n\r\n constructor(\r\n @Inject(APP_CONFIG) private config: IAppConfig,\r\n private http: HttpClient\r\n ) { }\r\n\r\n public Upload(rows: SupplierUpload[]): Observable {\r\n return this.http.post(`${this.config.apiLocations.ServiceSight}SupplierUpload/UploadSuppliers`, rows);\r\n }\r\n\r\n public GetSample(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}SupplierUpload/DownloadSample`);\r\n }\r\n}\r\n","import { Component, ViewChild } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { ToasterService, ToastType } from \"servicesight-shared\";\r\nimport { ImporterComponent } from \"src/app/shared/components/importer/importer.component\";\r\nimport { ImportSummary } from \"src/app/shared/components/importer/models/import-summary\";\r\nimport { ImportColumnDictionary } from \"src/app/shared/models/import/import-column-dictionary.model\";\r\nimport { ImportMap } from \"src/app/shared/models/import/import-map.model\";\r\nimport { ImportValidationObject } from \"src/app/shared/models/import/import-validation-object.model\";\r\nimport { ImportValidationFunc } from \"src/app/shared/models/import/import-validation.type\";\r\nimport { SupplierUpload } from \"../../models/supplier-upload.model\";\r\nimport { SupplierUploadService } from \"../../services/supplier-upload.service\";\r\n\r\n@Component({\r\n selector: \"app-supplier-upload\",\r\n templateUrl: \"./supplier-upload.component.html\",\r\n styleUrls: [\"./supplier-upload.component.scss\"]\r\n})\r\nexport class SupplierUploadComponent {\r\n @ViewChild(\"importer\") importer: ImporterComponent;\r\n\r\n public noMatch: number = -1;\r\n\r\n public defaultMap: ImportColumnDictionary = {\r\n Alpha: { displayName: \"Account Code\", value: this.noMatch, required: true },\r\n SupplierName: { displayName: \"Name\", value: this.noMatch, required: true },\r\n Address1: { displayName: \"Address Line 1\", value: this.noMatch, required: false },\r\n Address2: { displayName: \"Address Line 2\", value: this.noMatch, required: false },\r\n TownCity: { displayName: \"Town/City\", value: this.noMatch, required: false },\r\n County: { displayName: \"County\", value: this.noMatch, required: false },\r\n PostCode: { displayName: \"Post Code\", value: this.noMatch, required: false },\r\n Country: { displayName: \"Country\", value: this.noMatch, required: false },\r\n Phone: { displayName: \"Phone\", value: this.noMatch, required: false },\r\n Fax: { displayName: \"Fax\", value: this.noMatch, required: false },\r\n Email: { displayName: \"Email\", value: this.noMatch, required: false },\r\n Website: { displayName: \"Web\", value: this.noMatch, required: false },\r\n ContactFirstName: { displayName: \"Contact First Name\", value: this.noMatch, required: false },\r\n ContactLastName: { displayName: \"Contact Last Name\", value: this.noMatch, required: false },\r\n ContactMobileNo: { displayName: \"Contact Mobile\", value: this.noMatch, required: false },\r\n ContactPhoneNo: { displayName: \"Contact Phone\", value: this.noMatch, required: false },\r\n ContactEmail: { displayName: \"Contact Email\", value: this.noMatch, required: false }\r\n };\r\n\r\n public defaultMaps: { [key: string]: string } = {\r\n AccountCode: \"Alpha\",\r\n accountCode: \"Alpha\",\r\n accountcode: \"Alpha\",\r\n Accountcode: \"Alpha\",\r\n Alpha: \"Alpha\",\r\n alpha: \"Alpha\",\r\n AccountNo: \"Alpha\",\r\n accountNo: \"Alpha\",\r\n accountno: \"Alpha\",\r\n accno: \"Alpha\",\r\n CompanyName: \"SupplierName\",\r\n companyName: \"SupplierName\",\r\n companyname: \"SupplierName\",\r\n Companyname: \"SupplierName\",\r\n SupplierName: \"SupplierName\",\r\n supplierName: \"SupplierName\",\r\n suppliername: \"SupplierName\",\r\n Suppliername: \"SupplierName\",\r\n name: \"SupplierName\",\r\n Name: \"SupplierName\",\r\n Address1: \"Address1\",\r\n address1: \"Address1\",\r\n Street1: \"Address1\",\r\n street1: \"Address1\",\r\n Address2: \"Address2\",\r\n address2: \"Address2\",\r\n Street2: \"Address2\",\r\n street2: \"Address2\",\r\n TownCity: \"TownCity\",\r\n townCity: \"TownCity\",\r\n Towncity: \"TownCity\",\r\n towncity: \"TownCity\",\r\n Town: \"TownCity\",\r\n town: \"TownCity\",\r\n City: \"TownCity\",\r\n city: \"TownCity\",\r\n County: \"County\",\r\n county: \"County\",\r\n State: \"County\",\r\n state: \"County\",\r\n PostCode: \"PostCode\",\r\n Postcode: \"PostCode\",\r\n postCode: \"PostCode\",\r\n postcode: \"PostCode\",\r\n ZipCode: \"PostCode\",\r\n zipCode: \"PostCode\",\r\n Zipcode: \"PostCode\",\r\n zipcode: \"PostCode\",\r\n Zip: \"PostCode\",\r\n zip: \"PostCode\",\r\n Country: \"Country\",\r\n country: \"Country\",\r\n Phone: \"Phone\",\r\n phone: \"Phone\",\r\n PhoneNo: \"Phone\",\r\n Phoneno: \"Phone\",\r\n phoneNo: \"Phone\",\r\n phoneno: \"Phone\",\r\n PhoneNumber: \"Phone\",\r\n phoneNumber: \"Phone\",\r\n Phonenumber: \"Phone\",\r\n phonenumber: \"Phone\",\r\n Fax: \"Fax\",\r\n fax: \"Fax\",\r\n Email: \"Email\",\r\n email: \"Email\",\r\n Website: \"Website\",\r\n website: \"Website\",\r\n webSite: \"Website\",\r\n WebSite: \"Website\",\r\n Web: \"Website\",\r\n web: \"Website\",\r\n ContactFirstName: \"ContactFirstName\",\r\n ContactFirstname: \"ContactFirstName\",\r\n ContactfirstName: \"ContactFirstName\",\r\n Contactfirstname: \"ContactFirstName\",\r\n contactFirstName: \"ContactFirstName\",\r\n contactFirstname: \"ContactFirstName\",\r\n contactfirstName: \"ContactFirstName\",\r\n contactfirstname: \"ContactFirstName\",\r\n ContactLastName: \"ContactLastName\",\r\n ContactLastname: \"ContactLastName\",\r\n ContactlastName: \"ContactLastName\",\r\n Contactlastname: \"ContactLastName\",\r\n contactLastName: \"ContactLastName\",\r\n contactLastname: \"ContactLastName\",\r\n contactlastName: \"ContactLastName\",\r\n contactlastname: \"ContactLastName\",\r\n contactsurname: \"ContactLastName\",\r\n ContactMobileNo: \"ContactMobileNo\",\r\n ContactMobileno: \"ContactMobileNo\",\r\n ContactmobileNo: \"ContactMobileNo\",\r\n Contactmobileno: \"ContactMobileNo\",\r\n contactMobileNo: \"ContactMobileNo\",\r\n contactMobileno: \"ContactMobileNo\",\r\n contactmobileNo: \"ContactMobileNo\",\r\n contactmobileno: \"ContactMobileNo\",\r\n ContactMobileNumber: \"ContactMobileNo\",\r\n ContactMobilenumber: \"ContactMobileNo\",\r\n ContactmobileNumber: \"ContactMobileNo\",\r\n Contactmobilenumber: \"ContactMobileNo\",\r\n contactMobileNumber: \"ContactMobileNo\",\r\n contactMobilenumber: \"ContactMobileNo\",\r\n contactmobileNumber: \"ContactMobileNo\",\r\n contactmobilenumber: \"ContactMobileNo\",\r\n ContactMobile: \"ContactMobileNo\",\r\n Contactmobile: \"ContactMobileNo\",\r\n contactMobile: \"ContactMobileNo\",\r\n contactmobile: \"ContactMobileNo\",\r\n ContactCellPhoneNo: \"ContactMobileNo\",\r\n ContactCellPhoneno: \"ContactMobileNo\",\r\n ContactCellphoneNo: \"ContactMobileNo\",\r\n ContactCellphoneno: \"ContactMobileNo\",\r\n ContactcellPhoneNo: \"ContactMobileNo\",\r\n ContactcellPhoneno: \"ContactMobileNo\",\r\n ContactcellphoneNo: \"ContactMobileNo\",\r\n Contactcellphoneno: \"ContactMobileNo\",\r\n contactCellPhoneNo: \"ContactMobileNo\",\r\n contactCellPhoneno: \"ContactMobileNo\",\r\n contactCellphoneNo: \"ContactMobileNo\",\r\n contactCellphoneno: \"ContactMobileNo\",\r\n contactcellPhoneNo: \"ContactMobileNo\",\r\n contactcellPhoneno: \"ContactMobileNo\",\r\n contactcellphoneNo: \"ContactMobileNo\",\r\n contactcellphoneno: \"ContactMobileNo\",\r\n ContactCellPhoneNumber: \"ContactMobileNo\",\r\n ContactCellPhonenumber: \"ContactMobileNo\",\r\n ContactCellphoneNumber: \"ContactMobileNo\",\r\n ContactCellphonenumber: \"ContactMobileNo\",\r\n ContactcellPhoneNumber: \"ContactMobileNo\",\r\n ContactcellPhonenumber: \"ContactMobileNo\",\r\n ContactcellphoneNumber: \"ContactMobileNo\",\r\n Contactcellphonenumber: \"ContactMobileNo\",\r\n contactCellPhoneNumber: \"ContactMobileNo\",\r\n contactCellPhonenumber: \"ContactMobileNo\",\r\n contactCellphoneNumber: \"ContactMobileNo\",\r\n contactCellphonenumber: \"ContactMobileNo\",\r\n contactcellPhoneNumber: \"ContactMobileNo\",\r\n contactcellPhonenumber: \"ContactMobileNo\",\r\n contactcellphoneNumber: \"ContactMobileNo\",\r\n contactcellphonenumber: \"ContactMobileNo\",\r\n ContactCellPhone: \"ContactMobileNo\",\r\n ContactCellphone: \"ContactMobileNo\",\r\n ContactcellPhone: \"ContactMobileNo\",\r\n Contactcellphone: \"ContactMobileNo\",\r\n contactCellPhone: \"ContactMobileNo\",\r\n contactCellphone: \"ContactMobileNo\",\r\n contactcellPhone: \"ContactMobileNo\",\r\n contactcellphone: \"ContactMobileNo\",\r\n ContactPhoneNo: \"ContactPhoneNo\",\r\n ContactPhoneno: \"ContactPhoneNo\",\r\n ContactphoneNo: \"ContactPhoneNo\",\r\n Contactphoneno: \"ContactPhoneNo\",\r\n contactPhoneNo: \"ContactPhoneNo\",\r\n contactPhoneno: \"ContactPhoneNo\",\r\n contactphoneNo: \"ContactPhoneNo\",\r\n contactphoneno: \"ContactPhoneNo\",\r\n ContactPhoneNumber: \"ContactPhoneNo\",\r\n ContactPhonenumber: \"ContactPhoneNo\",\r\n ContactphoneNumber: \"ContactPhoneNo\",\r\n Contactphonenumber: \"ContactPhoneNo\",\r\n contactPhoneNumber: \"ContactPhoneNo\",\r\n contactPhonenumber: \"ContactPhoneNo\",\r\n contactphoneNumber: \"ContactPhoneNo\",\r\n contactphonenumber: \"ContactPhoneNo\",\r\n ContactPhone: \"ContactPhoneNo\",\r\n Contactphone: \"ContactPhoneNo\",\r\n contactPhone: \"ContactPhoneNo\",\r\n contactphone: \"ContactPhoneNo\",\r\n ContactTelephoneNo: \"ContactPhoneNo\",\r\n ContactTelephoneno: \"ContactPhoneNo\",\r\n ContacttelephoneNo: \"ContactPhoneNo\",\r\n Contacttelephoneno: \"ContactPhoneNo\",\r\n contactTelephoneNo: \"ContactPhoneNo\",\r\n contactTelephoneno: \"ContactPhoneNo\",\r\n contacttelephoneNo: \"ContactPhoneNo\",\r\n contacttelephoneno: \"ContactPhoneNo\",\r\n ContactTelephoneNumber: \"ContactPhoneNo\",\r\n ContactTelephonenumber: \"ContactPhoneNo\",\r\n ContacttelephoneNumber: \"ContactPhoneNo\",\r\n Contacttelephonenumber: \"ContactPhoneNo\",\r\n contactTelephoneNumber: \"ContactPhoneNo\",\r\n contactTelephonenumber: \"ContactPhoneNo\",\r\n contacttelephoneNumber: \"ContactPhoneNo\",\r\n contacttelephonenumber: \"ContactPhoneNo\",\r\n ContactTelephone: \"ContactPhoneNo\",\r\n Contacttelephone: \"ContactPhoneNo\",\r\n contactTelephone: \"ContactPhoneNo\",\r\n contacttelephone: \"ContactPhoneNo\",\r\n ContactEmail: \"ContactEmail\",\r\n Contactemail: \"ContactEmail\",\r\n contactEmail: \"ContactEmail\",\r\n contactemail: \"ContactEmail\"\r\n };\r\n\r\n public preDefinedMaps: Array = [\r\n {\r\n columns: [\r\n \"Acc No\",\r\n \"Name\",\r\n \"Street 1\",\r\n \"Street 2\",\r\n \"Town/City\",\r\n \"County\",\r\n \"Post code\",\r\n \"Country\",\r\n \"Phone\",\r\n \"fax\",\r\n \"Email\",\r\n \"Web\",\r\n \"Contact First Name\",\r\n \"Contact Surname\",\r\n \"Contact Phone\",\r\n \"Contact Mobile\",\r\n \"Contact Email\"\r\n ],\r\n name: \"ServiceSight\",\r\n map: {\r\n Alpha: { displayName: \"Acc No\", value: 0 },\r\n SupplierName: { displayName: \"Name\", value: 1 },\r\n Address1: { displayName: \"Street 1\", value: 2 },\r\n Address2: { displayName: \"Street 2\", value: 3 },\r\n TownCity: { displayName: \"Town/City\", value: 4 },\r\n County: { displayName: \"County\", value: 5 },\r\n PostCode: { displayName: \"Post code\", value: 6 },\r\n Country: { displayName: \"Country\", value: 7 },\r\n Phone: { displayName: \"Phone\", value: 8 },\r\n Fax: { displayName: \"Fax\", value: 9 },\r\n Email: { displayName: \"Email\", value: 10 },\r\n Website: { displayName: \"Web\", value: 11 },\r\n ContactFirstName: { displayName: \"Contact First Name\", value: 12 },\r\n ContactLastName: { displayName: \"Contact Surname\", value: 13 },\r\n ContactPhoneNo: { displayName: \"Contact Phone\", value: 14 },\r\n ContactMobileNo: { displayName: \"Contact Mobile\", value: 15 },\r\n ContactEmail: { displayName: \"Contact Email\", value: 16 }\r\n }\r\n },\r\n {\r\n columns: [\r\n \"Acc No\",\r\n \"Name\",\r\n \"Street 1\",\r\n \"Street 2\",\r\n \"Town/City\",\r\n \"State\",\r\n \"Zip code\",\r\n \"Country\",\r\n \"Phone\",\r\n \"fax\",\r\n \"Email\",\r\n \"Web\",\r\n \"Contact First Name\",\r\n \"Contact Surname\",\r\n \"Contact Phone\",\r\n \"Contact Mobile\",\r\n \"Contact Email\"\r\n ],\r\n name: \"ServiceSight US\",\r\n map: {\r\n Alpha: { displayName: \"Acc No\", value: 0 },\r\n SupplierName: { displayName: \"Name\", value: 1 },\r\n Address1: { displayName: \"Street 1\", value: 2 },\r\n Address2: { displayName: \"Street 2\", value: 3 },\r\n TownCity: { displayName: \"Town/City\", value: 4 },\r\n County: { displayName: \"County\", value: 5 },\r\n PostCode: { displayName: \"Post code\", value: 6 },\r\n Country: { displayName: \"Country\", value: 7 },\r\n Phone: { displayName: \"Phone\", value: 8 },\r\n Fax: { displayName: \"Fax\", value: 9 },\r\n Email: { displayName: \"Email\", value: 10 },\r\n Website: { displayName: \"Web\", value: 11 },\r\n ContactFirstName: { displayName: \"Contact First Name\", value: 12 },\r\n ContactLastName: { displayName: \"Contact Surname\", value: 13 },\r\n ContactPhoneNo: { displayName: \"Contact Phone\", value: 14 },\r\n ContactMobileNo: { displayName: \"Contact Mobile\", value: 15 },\r\n ContactEmail: { displayName: \"Contact Email\", value: 16 }\r\n }\r\n },\r\n {\r\n columns: [\r\n \"Account Code\",\r\n \"Company Name\",\r\n \"Address 1\",\r\n \"Address 2\",\r\n \"Town/City\",\r\n \"County\",\r\n \"PostCode\",\r\n \"Country\",\r\n \"Phone\",\r\n \"Fax\",\r\n \"Email\",\r\n \"Website\",\r\n \"Prospect (Y/N)\",\r\n \"Contact First Name\",\r\n \"Contact Last Name\",\r\n \"Contact Mobile No\",\r\n \"Contact Phone No\",\r\n \"Contact Phone Ext\",\r\n \"Contact Email\"\r\n ],\r\n name: \"Standard\",\r\n map: {\r\n Alpha: { displayName: \"Account Code\", value: 0 },\r\n SupplierName: { displayName: \"Company Name\", value: 1 },\r\n Address1: { displayName: \"Address 1\", value: 2 },\r\n Address2: { displayName: \"Address 2\", value: 3 },\r\n TownCity: { displayName: \"Town/City\", value: 4 },\r\n County: { displayName: \"County\", value: 5 },\r\n PostCode: { displayName: \"PostCode\", value: 6 },\r\n Country: { displayName: \"Country\", value: 7 },\r\n Phone: { displayName: \"Phone\", value: 8 },\r\n Fax: { displayName: \"Fax\", value: 9 },\r\n Email: { displayName: \"Email\", value: 10 },\r\n Website: { displayName: \"Website\", value: 11 },\r\n ContactFirstName: { displayName: \"Contact First Name\", value: 13 },\r\n ContactLastName: { displayName: \"Contact Last Name\", value: 14 },\r\n ContactMobileNo: { displayName: \"Contact Mobile No\", value: 15 },\r\n ContactPhoneNo: { displayName: \"Contact Phone No\", value: 16 },\r\n ContactEmail: { displayName: \"Contact Email\", value: 18 }\r\n }\r\n }\r\n ];\r\n\r\n public columnValidations: ImportValidationObject = {\r\n Alpha: (val) => val.toString().length <= 50,\r\n SupplierName: (val) => val.toString().length <= 255,\r\n Address1: (val) => !val || val.toString().length <= 500,\r\n Address2: (val) => !val || val.toString().length <= 500,\r\n TownCity: (val) => !val || val.toString().length <= 255,\r\n County: (val) => !val || val.toString().length <= 255,\r\n PostCode: (val) => !val || val.toString().length <= 30,\r\n Country: () => true,\r\n Phone: (val) => !val || val.toString().length <= 255,\r\n Fax: (val) => val.toString().length <= 50,\r\n Email: (val) => !val || (val.toString().length <= 255 && val.match(/.+?@.+/g)),\r\n Website: (val) => !val || val.length <= 1000,\r\n ContactFirstName: (val) => !val || val.toString().length <= 50,\r\n ContactLastName: (val) => !val || val.toString().length <= 100,\r\n ContactMobileNo: (val) => !val || val.toString().length <= 50,\r\n ContactPhoneNo: (val) => !val || val.toString().length <= 50,\r\n ContactEmail: (val) => !val || (val.toString().length <= 255 && val.match(/.+?@.+/g))\r\n };\r\n\r\n public supplierMap: Map = new Map();\r\n\r\n public rowValidator: ImportValidationFunc = (row: SupplierUpload) => {\r\n const errors: string[] = [];\r\n const isDuplicateSupplier = this.supplierMap.has(row.Alpha);\r\n\r\n if (!isDuplicateSupplier) {\r\n this.supplierMap.set(row.Alpha, true);\r\n } else {\r\n errors.push(this.translateService.instant(\"suppliers.import.error.duplicate\", { Name: row.Alpha }));\r\n }\r\n\r\n return {\r\n isValid: !isDuplicateSupplier,\r\n errors\r\n };\r\n };\r\n\r\n constructor(\r\n private router: Router,\r\n private supplierUploadService: SupplierUploadService,\r\n private toasterService: ToasterService,\r\n private translateService: TranslateService) {\r\n this.rowValidator = this.rowValidator.bind(this);\r\n }\r\n\r\n public reset(): void {\r\n this.supplierMap.clear();\r\n }\r\n\r\n public getSample(): void {\r\n this.supplierUploadService.GetSample().subscribe(response => {\r\n const contentType = \"text/csv\";\r\n const blob = new Blob([response], { type: contentType });\r\n const data = window.URL.createObjectURL(blob);\r\n const link = document.createElement(\"a\");\r\n link.hidden = true;\r\n link.href = data;\r\n link.download = \"suppliers-sample.csv\";\r\n document.body.appendChild(link);\r\n link.click();\r\n document.body.removeChild(link);\r\n setTimeout(() => {\r\n // For Firefox it is necessary to delay revoking the ObjectURL\r\n window.URL.revokeObjectURL(data);\r\n }, 100);\r\n });\r\n }\r\n\r\n public upload(rows: any[]): void {\r\n this.supplierUploadService.Upload(rows).subscribe(summary => {\r\n if (summary.NumberOfInvalidRows === 0) {\r\n this.toasterService.pop(\"suppliers.import.complete\", ToastType.medium);\r\n this.router.navigate([\"/suppliers/list\"]);\r\n } else {\r\n const importSummary = ImportSummary.FromUploadSummary(summary);\r\n\r\n this.toasterService.pop(\"suppliers.import.completewitherrors\", ToastType.dark);\r\n this.importer.uploadError(importSummary.FailedRows, importSummary.Errors);\r\n }\r\n });\r\n }\r\n}\r\n","\r\n","
\r\n
\r\n

{{ 'suppliers.list.title' | translate }}

\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n
\r\n \r\n
\r\n\r\n \r\n\r\n
\r\n
{{ item.value | supplierStatus | translate }}
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DomSanitizer, SafeResourceUrl } from \"@angular/platform-browser\";\r\nimport { Router } from \"@angular/router\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport {\r\n FormMesssageService,\r\n GridKind,\r\n GridService,\r\n Module,\r\n ModuleService,\r\n PermissionsService,\r\n ProteanResponse,\r\n UICustomisation,\r\n UserReferenceService,\r\n UserRefType\r\n} from \"servicesight-shared\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { SupplierService } from \"src/app/shared/services/supplier/supplier.service\";\r\nimport { SupplierStatus } from \"../../../shared/pipes/enums/supplier-status.enum\";\r\nimport { Supplier } from \"../../models/supplier.model\";\r\n\r\n@Component({\r\n selector: \"app-suppliers-list\",\r\n templateUrl: \"./suppliers-list.component.html\",\r\n styleUrls: [\r\n \"./suppliers-list.component.scss\",\r\n \"../../../../../projects/servicesight-shared/src/lib/styles/global.scss\",\r\n \"../../../../../projects/servicesight-shared/src/lib/styles/backgrounds.scss\",\r\n \"../../../../../projects/servicesight-shared/src/lib/styles/servicesight-shared.scss\"\r\n ]\r\n})\r\nexport class SuppliersListComponent implements OnInit {\r\n @ViewChild(\"grid\") private dataGrid: DxDataGridComponent;\r\n\r\n public readonly formName: string = \"myForm\";\r\n public newSupplier: Supplier = new Supplier();\r\n public isProEnabled: boolean = false;\r\n\r\n public userReference1DataStore: ODataStore;\r\n public userReference2DataStore: ODataStore;\r\n public dataSource: DataSource;\r\n\r\n public showNewSupplierPopup: boolean = false;\r\n public isAllowedCreate: boolean = false;\r\n public SearchText: string = \"\";\r\n\r\n public SaveEnabled: boolean = true;\r\n\r\n public filters: any = {\r\n 1: [\"Status\", \"=\", SupplierStatus.Active],\r\n 2: [\"Status\", \"=\", SupplierStatus.OnHold],\r\n 3: [\"Status\", \"=\", SupplierStatus.Closed]\r\n };\r\n\r\n public userRef1Label: string = null;\r\n public userRef2Label: string = null;\r\n\r\n constructor(\r\n private formMessageService: FormMesssageService,\r\n private permissionsService: PermissionsService,\r\n private gridService: GridService,\r\n private userRefsService: UserReferenceService,\r\n private supplierService: SupplierService,\r\n private sanitizer: DomSanitizer,\r\n private router: Router,\r\n private moduleService: ModuleService,\r\n private licenseService: LicenseService\r\n ) { }\r\n\r\n public ngOnInit(): void {\r\n this.userRef1Label = this.userRefsService.getLabel(UICustomisation.SUPPLIER_REF1);\r\n this.userRef2Label = this.userRefsService.getLabel(UICustomisation.SUPPLIER_REF2);\r\n\r\n this.permissionsService.CurrentUserHasPermission(\"SupplierAdd\").subscribe(hasPermission => {\r\n this.isAllowedCreate = hasPermission;\r\n });\r\n\r\n this.permissionsService.CurrentUserHasPermission(\"SupplierView\").subscribe(isAllowedView => {\r\n if (isAllowedView) {\r\n this.gridService.GetLayout(GridKind.Suppliers).subscribe(value => {\r\n if (value) {\r\n this.dataGrid.instance.state(value);\r\n }\r\n this.GetDataSources();\r\n }, () => this.GetDataSources());\r\n }\r\n });\r\n\r\n this.moduleService.GetEnabledModules().subscribe(enabledModules => {\r\n this.isProEnabled = enabledModules.includes(Module.Pro);\r\n });\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public FilterChanged($event): void {\r\n const filterValue = $event.currentTarget.value;\r\n if (filterValue === \"0\") {\r\n this.dataGrid.instance.clearFilter();\r\n } else {\r\n this.dataGrid.instance.filter(this.filters[filterValue]);\r\n }\r\n }\r\n\r\n public NewSupplier(): void {\r\n this.newSupplier = new Supplier();\r\n this.licenseService.GetCompanyCountryId().then(countryId => {\r\n this.newSupplier.CountryID = countryId;\r\n this.showNewSupplierPopup = true;\r\n });\r\n }\r\n\r\n public DismissNewSupplier(): void {\r\n this.showNewSupplierPopup = false;\r\n this.newSupplier = new Supplier();\r\n }\r\n\r\n public CreateNewSupplier(): void {\r\n this.SaveEnabled = false;\r\n this.formMessageService\r\n .RegisterObservable(this.supplierService.Upsert(this.newSupplier), this.formName)\r\n .subscribe(supplier => {\r\n this.SaveEnabled = true;\r\n this.showNewSupplierPopup = false;\r\n this.router.navigate([\"/suppliers/detail/\", supplier.EntityId]);\r\n }, () => {\r\n this.SaveEnabled = true;\r\n });\r\n }\r\n\r\n public SaveLayout(): void {\r\n const state = this.dataGrid.instance.state();\r\n this.gridService.SaveLayout(state, GridKind.Suppliers);\r\n }\r\n\r\n public ResetLayout(): void {\r\n this.gridService.ResetLayout(GridKind.Suppliers);\r\n this.dataGrid.instance.state(null);\r\n }\r\n\r\n public ViewDetails(event: any): void {\r\n this.router.navigate([\"/suppliers/detail/\", event.data.SupplierId]);\r\n }\r\n\r\n public GetImage(data: any): SafeResourceUrl {\r\n if (!data.value) {\r\n // eslint-disable-next-line max-len\r\n data.value = \"iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAIAAACRXR/mAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAd8SURBVFhH7VZ7UFTXGb/nPhZYsbIsDxNpOxlcpSjasVqQxEd8jA0+iRZLoHmQlrAgWFunphk0VowY46szWtOUaaeJkziGFYKCCe2IdZWXgrVtggi2migIu+zyuOzr3nNvv3P38ljzgLVpkz/2N8tw73e/832/853vcZAsy9TXD7T6/2uGAC1/EKDlDwK0/EGAlj8I0PIHnzETBUH4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Svc1fz3FjJmRIGhqWCNJuvZDPipGqMwNi1Ab1+fqfx01fvV3RbLY4mJq1b+IHl+ol+cvBjg+bLyquq/nL/98a05303ISE+bN3fOZ9oZFy0vRGiIsgQz6wEIjQaGxoAxx32RHT9o/T8x5gD5ahCg5Q8CtPxBgJY/CNDyBwFa4wdF/QfZAQjMeRYiMwAAAABJRU5ErkJggg==\";\r\n }\r\n return this.sanitizer.bypassSecurityTrustResourceUrl(\"data:image/bmp;charset=utf-8;base64,\" + data.value);\r\n }\r\n\r\n private GetDataSources(): void {\r\n const dataSource = this.supplierService.GetSupplierDataSource();\r\n dataSource.filter([\"Status\", \"=\", SupplierStatus.Active]);\r\n this.dataSource = dataSource;\r\n\r\n this.userReference1DataStore = this.userRefsService.getListDataStore(UserRefType.SUPPLIER_1);\r\n this.userReference2DataStore = this.userRefsService.getListDataStore(UserRefType.SUPPLIER_2);\r\n }\r\n}\r\n","import { NgModule } from \"@angular/core\";\r\nimport { RouterModule, Routes } from \"@angular/router\";\r\nimport { SupplierDetailsComponent } from \"./components/supplier-details/supplier-details.component\";\r\nimport { SupplierUploadComponent } from \"./components/supplier-upload/supplier-upload.component\";\r\nimport { SuppliersListComponent } from \"./components/suppliers-list/suppliers-list.component\";\r\n\r\nconst routes: Routes = [\r\n { path: \"list\", component: SuppliersListComponent },\r\n { path: \"detail/:id\", component: SupplierDetailsComponent },\r\n { path: \"detail/new\", component: SupplierDetailsComponent },\r\n { path: \"upload\", component: SupplierUploadComponent },\r\n { path: \"\", redirectTo: \"list\", pathMatch: \"full\" },\r\n { path: \"**\", redirectTo: \"list\" }\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class SuppliersRoutingModule {\r\n public static readonly Routes: Routes = routes;\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { IAppConfig, APP_CONFIG, IODataService, PageableDatastoreService } from \"servicesight-shared\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class SurveyDataService extends PageableDatastoreService {\r\n private static readonly odataKey: string = \"InviteId\";\r\n\r\n constructor(\r\n @Inject(\"ODataService\") protected odataService: IODataService,\r\n @Inject(APP_CONFIG) protected config: IAppConfig\r\n ) {\r\n super(SurveyDataService.odataKey);\r\n }\r\n\r\n protected GetDataSourceObject(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: this.config.apiLocations.ConsumersOData + \"SurveyOData\",\r\n key: SurveyDataService.odataKey,\r\n keyType: \"String\",\r\n paging: true,\r\n pageSize: 50,\r\n sortSelector: \"SortDateTime\",\r\n sortDesc: true\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'surveys.list.title' | translate }}

\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n \r\n
\r\n\r\n \r\n
\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DomSanitizer, SafeResourceUrl } from \"@angular/platform-browser\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { GridExportService, GridKind, GridService, Module } from \"servicesight-shared\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { SurveyDataService } from \"../../services/survey-data.service\";\r\n\r\n@Component({\r\n selector: \"app-survey-list\",\r\n templateUrl: \"./survey-list.component.html\",\r\n styleUrls: [\r\n \"../../../../../projects/servicesight-shared/src/lib/styles/global.scss\",\r\n \"../../../../../projects/servicesight-shared/src/lib/styles/backgrounds.scss\",\r\n \"../../../../../projects/servicesight-shared/src/lib/styles/servicesight-shared.scss\",\r\n \"./survey-list.component.scss\"\r\n ]\r\n})\r\nexport class SurveyListComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n\r\n public SearchText: string = \"\";\r\n public DataSource: DataSource;\r\n public hasProModule: boolean = false;\r\n\r\n private gridState: any = {};\r\n\r\n public filters: any = {\r\n 1: [\"Complete\", \"<>\", null],\r\n };\r\n\r\n public exportOptions: { id: number; label: string }[] = [\r\n { id: 1, label: \"Export data as xlsx\" },\r\n { id: 2, label: \"Export data as csv\" },\r\n { id: 3, label: \"Export data as pdf\" }\r\n ];\r\n\r\n constructor(\r\n private gridService: GridService,\r\n private sanitizer: DomSanitizer,\r\n private gridExportService: GridExportService,\r\n private translate: TranslateService,\r\n private surveyService: SurveyDataService,\r\n private licenseService: LicenseService\r\n ) {\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.licenseService.GetCompanyHasAccessToModule(Module.Pro).subscribe(hasProModule => {\r\n this.hasProModule = hasProModule;\r\n });\r\n\r\n this.gridService.GetLayout(GridKind.Survey).subscribe(value => {\r\n if (value) {\r\n this.gridState = value;\r\n this.dataGrid.instance.state(value);\r\n }\r\n this.GetDataSources();\r\n }, () => this.GetDataSources());\r\n }\r\n\r\n public onExportItemClick(e: any): void {\r\n switch (e.itemData.id) {\r\n case 1:\r\n this.gridExportService.exportGridAsXlsx(this.dataGrid.instance, this.translate.instant(\"surveys.list.title\"));\r\n break;\r\n case 2:\r\n this.gridExportService.exportGridAsCsv(this.dataGrid.instance, this.translate.instant(\"surveys.list.title\"));\r\n break;\r\n case 3:\r\n this.gridExportService.exportGridAsPdf(this.dataGrid.instance, this.translate.instant(\"surveys.list.title\"));\r\n break;\r\n default:\r\n throw new Error(\"Unhandled export type: \" + e.itemData.id);\r\n }\r\n }\r\n\r\n public SendSurvey(): void {\r\n alert(\"todo\");\r\n }\r\n\r\n public ViewDetails(event: any): void {\r\n alert(\"todo - \" + event.data.InviteId);\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public SaveLayout(): void {\r\n const state = this.dataGrid.instance.state();\r\n this.gridService.SaveLayout(state, GridKind.Survey);\r\n }\r\n\r\n public ResetLayout(): void {\r\n this.gridService.ResetLayout(GridKind.Survey);\r\n this.dataGrid.instance.state(null);\r\n this.gridState = null;\r\n }\r\n\r\n public FilterChanged($event): void {\r\n const filterValue = $event.currentTarget.value;\r\n if (filterValue === \"0\") {\r\n this.dataGrid.instance.clearFilter();\r\n } else {\r\n this.dataGrid.instance.filter(this.filters[filterValue]);\r\n }\r\n }\r\n\r\n public GetImage(data: string): SafeResourceUrl {\r\n return this.sanitizer.bypassSecurityTrustResourceUrl(\"data:image/bmp;charset=utf-8;base64,\" + data);\r\n }\r\n\r\n private GetDataSources(): void {\r\n this.DataSource = this.surveyService.GetDataSource(true);\r\n }\r\n\r\n public openColumnChooser(): void {\r\n this.dataGrid.instance.showColumnChooser();\r\n }\r\n\r\n public columnVisible(name: string, defaultValue: boolean): boolean {\r\n if (this.gridState && this.gridState.columns) {\r\n const column = this.gridState.columns.find(x => x.name === name);\r\n\r\n if (column) {\r\n return column.visible;\r\n }\r\n }\r\n\r\n return defaultValue;\r\n }\r\n\r\n}\r\n","import { NgModule } from \"@angular/core\";\r\nimport { RouterModule, Routes } from \"@angular/router\";\r\nimport { SurveyListComponent } from \"./components/survey-list/survey-list.component\";\r\n\r\nconst routes: Routes = [\r\n { path: \"list\", component: SurveyListComponent },\r\n { path: \"\", redirectTo: \"list\", pathMatch: \"full\" },\r\n { path: \"**\", redirectTo: \"list\" }\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class SurveysRoutingModule {\r\n public static readonly Routes: Routes = routes;\r\n}\r\n","export class PurchaseNoteTextVariant {\r\n Header: string;\r\n InvoiceDate: string;\r\n}\r\n","export enum PurchaseNoteStatus {\r\n Pending = 100,\r\n Queried = 200,\r\n Committed = 700\r\n}\r\n","export enum PurchaseNoteType {\r\n Invoice = 1,\r\n Credit = 2\r\n}\r\n","export class CurrencyModel {\r\n ShowInForeignCurrency: boolean;\r\n CurrencySymbol: string;\r\n IsForeignSupplier: boolean;\r\n}\r\n","import { PurchaseNoteStatus } from \"./../enums/purchase-note-status.enum\";\r\nimport { PurchaseNoteType } from \"./../enums/purchase-note-type.enum\";\r\nimport { PurchaseNoteLine } from \"./purchase-note-line.model\";\r\n\r\nexport class PurchaseNote {\r\n constructor() {\r\n this.Status = PurchaseNoteStatus.Pending;\r\n }\r\n\r\n PurchaseNoteId: number;\r\n SupplierId: number;\r\n SupplierContactId: number;\r\n PurchaseNoteTypeId: PurchaseNoteType;\r\n PurchaseNoteNo: string;\r\n Reference: string;\r\n EmployeeId: number;\r\n Notes: string;\r\n Net: number;\r\n Tax: number;\r\n TaxUpdated: boolean;\r\n Gross: number;\r\n ExchangeRate: number;\r\n DueDate: Date;\r\n DueDateUI: Date;\r\n InvoiceDate: Date;\r\n InvoiceDateUI: Date;\r\n CommittedDate: Date;\r\n CommittedDateUI: Date;\r\n CommittedById: number;\r\n Status: PurchaseNoteStatus;\r\n UserRef1Id: number;\r\n UserRef2: string;\r\n ReverseChargeVat: boolean;\r\n SupplierTaxCodeId: number;\r\n\r\n Lines: PurchaseNoteLine[];\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG, PageableDatastoreService } from \"servicesight-shared\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\nimport { PurchaseNoteType } from \"./../enums/purchase-note-type.enum\";\r\nimport { PurchaseNoteTextVariant } from \"./../models/purchase-note-text-variant.model\";\r\nimport { PurchaseNote } from \"./../models/purchase-note.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class PurchaseNoteService extends PageableDatastoreService {\r\n private static readonly odataKey: string = \"PurchaseNoteId\";\r\n\r\n constructor(\r\n private odataService: ODataService,\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) protected config: IAppConfig) {\r\n super(PurchaseNoteService.odataKey);\r\n }\r\n\r\n public Get(id: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.PurchaseOrders}PurchaseNote/${id}`);\r\n }\r\n\r\n public Create(model: PurchaseNote): Observable {\r\n return this.http.post(`${this.config.apiLocations.PurchaseOrders}PurchaseNote`, model);\r\n }\r\n\r\n public Update(model: PurchaseNote): Observable {\r\n return this.http.put(`${this.config.apiLocations.PurchaseOrders}PurchaseNote`, model);\r\n }\r\n\r\n public Delete(id: number): Observable {\r\n return this.http.delete(`${this.config.apiLocations.PurchaseOrders}PurchaseNote/${id}`);\r\n }\r\n\r\n public PurchaseNoteNumberDuplicated(id: number, purchaseNote: PurchaseNote) {\r\n const PurchaseNoteNo = purchaseNote.PurchaseNoteNo;\r\n const PurchaseNoteTypeId = purchaseNote.PurchaseNoteTypeId ?? 0;\r\n const SupplierId = purchaseNote.SupplierId ?? 0;\r\n return this.http.get(`${this.config.apiLocations.PurchaseOrders}PurchaseNote/${id}/Duplicated/${PurchaseNoteNo}/${PurchaseNoteTypeId}/${SupplierId}`);\r\n }\r\n\r\n public GetPurchaseNoteMatchingItemsDataSource(supplierId: number): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.PurchaseOrdersOData}PurchaseNoteMatchingItemsOData?supplierId=${supplierId}`,\r\n key: [\"DocumentId\", \"LineId\", \"LineItemType\", \"LineType\", \"CylinderId\"],\r\n keyType: [\"number\", \"number\", \"number\", \"number\", \"number\"]\r\n });\r\n }\r\n\r\n public Commit(id: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.PurchaseOrders}PurchaseNote/Commit/${id}`);\r\n }\r\n\r\n public SetPurchaseNoteFormTextVariant(purchaseNoteType: PurchaseNoteType): PurchaseNoteTextVariant {\r\n switch (purchaseNoteType) {\r\n case PurchaseNoteType.Credit:\r\n return {\r\n Header: \"purchase-notes.detail.purchase-credit\",\r\n InvoiceDate: \"purchase-notes.general.credit-date\"\r\n };\r\n case PurchaseNoteType.Invoice:\r\n return {\r\n Header: \"purchase-notes.detail.purchase-invoice\",\r\n InvoiceDate: \"purchase-notes.general.invoice-date\"\r\n };\r\n }\r\n }\r\n\r\n protected GetDataSourceObject(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.PurchaseOrdersOData}PurchaseNoteOData`,\r\n key: PurchaseNoteService.odataKey,\r\n keyType: \"Int32\"\r\n });\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ 'accordion.purchase.note.details.created-by' | translate }}{{ createdBy }}
{{ 'accordion.purchase.note.details.committed-by' | translate }}{{ committedBy }}
{{ 'accordion.purchase.note.details.committed-date' | translate }}{{ purchaseNote.CommittedDate | date: \"short\"}}
{{ 'accordion.purchase.note.details.net' | translate }}{{ Net | currency: currencySymbol }}
{{ 'accordion.purchase.note.details.tax' | translate }}{{ Tax | currency: currencySymbol }}
{{ 'accordion.purchase.note.details.gross' | translate }}{{ Gross | currency: currencySymbol }}
\r\n","import { Component, Input, OnChanges, OnInit } from \"@angular/core\";\r\nimport { PurchaseNote } from \"src/app/purchase-notes/models/purchase-note.model\";\r\nimport { ICurrency } from \"src/app/shared/models/icurrency.model\";\r\nimport { EmployeeService } from \"src/app/shared/services/employee/employee.service\";\r\nimport { SupplierService } from \"src/app/shared/services/supplier/supplier.service\";\r\n\r\n@Component({\r\n selector: \"app-purchase-note-accordion-item\",\r\n templateUrl: \"./purchase-note-accordion-item.component.html\",\r\n styleUrls: [\"./purchase-note-accordion-item.component.scss\"]\r\n})\r\nexport class PurchaseNoteAccordionItemComponent implements OnInit, OnChanges {\r\n @Input() purchaseNote: PurchaseNote = new PurchaseNote();\r\n @Input() currencySymbol: string;\r\n public createdBy: string;\r\n public committedBy: string;\r\n private baseCurrencySymbol: string;\r\n private supplierCurrency: ICurrency;\r\n\r\n public get Net(): number {\r\n const netValue: number = this.getSafeNumericValue(this.purchaseNote.Net);\r\n return this.exchangeRateApplied(netValue);\r\n }\r\n\r\n public get Tax(): number {\r\n const taxValue: number = this.getSafeNumericValue(this.purchaseNote.Tax);\r\n return this.exchangeRateApplied(taxValue);\r\n }\r\n\r\n public get Gross(): number {\r\n const netValue: number = this.getSafeNumericValue(this.purchaseNote.Net);\r\n const taxValue: number = this.getSafeNumericValue(this.purchaseNote.Tax);\r\n return this.exchangeRateApplied(netValue + taxValue);\r\n }\r\n\r\n constructor(\r\n public employeeService: EmployeeService,\r\n public supplierService: SupplierService\r\n ) {\r\n }\r\n\r\n ngOnInit(): void {\r\n this.baseCurrencySymbol = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n }\r\n\r\n public ngOnChanges(): void {\r\n if (this.purchaseNote.SupplierId) {\r\n this.supplierService.GetSupplierCurrency(this.purchaseNote.SupplierId).subscribe(currency => {\r\n this.supplierCurrency = currency;\r\n });\r\n }\r\n\r\n if (this.purchaseNote.EmployeeId) {\r\n this.employeeService.GetEmployeeById(this.purchaseNote.EmployeeId).subscribe(x => {\r\n this.createdBy = x.Name;\r\n });\r\n }\r\n\r\n if (this.purchaseNote.CommittedById) {\r\n this.employeeService.GetEmployeeById(this.purchaseNote.CommittedById).subscribe(x => {\r\n this.committedBy = x.Name;\r\n });\r\n } else {\r\n this.committedBy = null;\r\n }\r\n }\r\n\r\n private exchangeRateApplied(value: number): number {\r\n return this.foreignSupplierButCustomerCurrencySelected()\r\n ? value / this.purchaseNote.ExchangeRate\r\n : value;\r\n }\r\n\r\n private getSafeNumericValue(value: number): number {\r\n return Number(value) || 0;\r\n }\r\n\r\n private foreignSupplierButCustomerCurrencySelected() {\r\n return this.supplierCurrency &&\r\n this.supplierCurrency.CurrencySymbol !== this.baseCurrencySymbol && // Foreign supplier\r\n this.currencySymbol === this.baseCurrencySymbol; // Customer currency selected\r\n }\r\n}\r\n","export enum LedgerSystem {\r\n Paper = 1,\r\n NotUsed = 2,\r\n XeroAccounts = 3,\r\n QuickBooksAccounts = 4,\r\n CsvExport = 5,\r\n Sage50OnPremise = 6\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { map, Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { TaxCodeModel } from \"../models/tax-code.model\";\r\nimport { VatCodeModel } from \"../models/vat-code.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class TaxCodesService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) protected config: IAppConfig) { }\r\n\r\n public getVatCodes(): Observable {\r\n return this.http.post(`${this.config.apiLocations.ServiceSight}TaxProfile/GetVatCodes`, null)\r\n .pipe(\r\n map((taxCodes => {\r\n return taxCodes.map(taxCode => {\r\n return {\r\n VatCode: taxCode.VATCODE,\r\n VatRate: taxCode.VATRATE,\r\n DisplayText: taxCode.DisplayText,\r\n EffectiveDate: taxCode.MaxEffectiveDate\r\n };\r\n });\r\n }))\r\n );\r\n }\r\n\r\n public getTaxCodes(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}TaxProfile/GetTaxCodes`);\r\n }\r\n}\r\n","export enum PurchaseNoteLineType {\r\n Receipt,\r\n Return\r\n}\r\n","export enum PurchaseNoteLineItemType {\r\n Part = 1,\r\n Material = 2,\r\n Equipment = 3,\r\n Refrigerant = 4,\r\n Carriage = 5\r\n}\r\n","\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n {{ GetFormattedOsCost(item) }}\r\n
\r\n\r\n \r\n\r\n \r\n\r\n
\r\n
\r\n {{ 'purchase-note.matching.modal.carriage' | translate }}\r\n
\r\n \r\n {{ item.value }}\r\n \r\n
\r\n \r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n\r\n","import { CurrencyPipe } from \"@angular/common\";\r\nimport { Component, EventEmitter, Input, OnInit, Output, ViewChild } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { EdmLiteral } from \"devextreme/data/odata/utils\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { PurchaseNoteLineItemType } from \"../enums/purchase-note-line-item-type.enum\";\r\nimport { PurchaseNoteLineType } from \"../enums/purchase-note-line-type.enum\";\r\nimport { PurchaseNoteType } from \"../enums/purchase-note-type.enum\";\r\nimport { CurrencyModel } from \"../models/currency.model\";\r\nimport { PurchaseNoteLine } from \"../models/purchase-note-line.model\";\r\nimport { PurchaseNoteService } from \"../services/purchase-note.service\";\r\n\r\n@Component({\r\n selector: \"app-purchase-note-matching-modal\",\r\n templateUrl: \"./purchase-note-matching-modal.component.html\",\r\n styleUrls: [\"./purchase-note-matching-modal.component.scss\"]\r\n})\r\nexport class PurchaseNoteMatchingModalComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n @Input() purchaseNoteType: PurchaseNoteType;\r\n @Input() supplierId: number;\r\n @Input() currencyModel: CurrencyModel;\r\n @Input() alreadyAdded: PurchaseNoteLine[] = [];\r\n @Input() connectedToSage: boolean = false;\r\n @Output() itemsAdded = new EventEmitter();\r\n\r\n public showDialog: boolean = false;\r\n public SearchText: string = \"\";\r\n public itemsToMatchDataSource: DataSource;\r\n public filterTypesDataSource: DataSource;\r\n public lineTypeEnum = PurchaseNoteLineType;\r\n public lineItemType = PurchaseNoteLineItemType;\r\n\r\n private filters: any[] = [];\r\n private selectedFilters: number[] = [];\r\n\r\n private readonly filterTypes: any[] = [\r\n {\r\n ID: 1,\r\n name: \"Receipts\",\r\n expanded: true\r\n },\r\n {\r\n ID: 3,\r\n categoryId: 1,\r\n name: \"Materials\",\r\n filter: [[\"LineItemType\", \"=\", PurchaseNoteLineItemType.Material], \"and\", [\"LineType\", \"=\", PurchaseNoteLineType.Receipt]]\r\n },\r\n {\r\n ID: 7,\r\n name: \"Returns\",\r\n expanded: true\r\n },\r\n {\r\n ID: 9,\r\n categoryId: 7,\r\n name: \"Materials\",\r\n filter: [[\"LineItemType\", \"=\", PurchaseNoteLineItemType.Material], \"and\", [\"LineType\", \"=\", PurchaseNoteLineType.Return]]\r\n }];\r\n\r\n public PurchaseNoteTypes: { id: PurchaseNoteLineType; label: string } [] = [\r\n { id: PurchaseNoteLineType.Receipt, label: \"Receipt\" },\r\n { id: PurchaseNoteLineType.Return, label: \"Return\" }\r\n ];\r\n\r\n constructor(\r\n private router: Router,\r\n private licenseService: LicenseService,\r\n private translateService: TranslateService,\r\n private currencyPipe: CurrencyPipe,\r\n private purchaseNoteService: PurchaseNoteService) {\r\n this.CalculateSearchFilterForDocumentId = this.CalculateSearchFilterForDocumentId.bind(this);\r\n this.CalculateSearchFilterForOSCost = this.CalculateSearchFilterForOSCost.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.SetFilterDataSource();\r\n }\r\n\r\n public Show(): void {\r\n this.dataGrid.instance.clearSelection();\r\n this.SearchText = \"\";\r\n this.GetDataSources();\r\n this.SetFilters();\r\n this.showDialog = true;\r\n }\r\n\r\n public Close(): void {\r\n this.showDialog = false;\r\n }\r\n\r\n public AddItems(): void {\r\n this.showDialog = false;\r\n const itemsToAdd: PurchaseNoteLine[] = [];\r\n const selectedRowsData = this.dataGrid.instance.getSelectedRowsData();\r\n selectedRowsData.forEach(x => {\r\n const newItem = {\r\n PurchaseNoteLineId: x.Id,\r\n DocumentId: x.DocumentId,\r\n LineId: x.LineId,\r\n LineType: x.LineType,\r\n LineItemType: x.LineItemType,\r\n Description: x.Description,\r\n OSCost: x.OSCost,\r\n ExchangeRate: x.ExchangeRate,\r\n CurrentOSCost: 0,\r\n MatchedCost: 0,\r\n Variance: 0,\r\n Tax: 0,\r\n VatCode: null, // That will be set after the line is added to the purchase note because its value depends on the selected supplier\r\n ProductTaxCodeId: x.ProductTaxCodeId,\r\n CylinderId: x.CylinderId\r\n };\r\n\r\n if (newItem.LineItemType === PurchaseNoteLineItemType.Carriage) {\r\n newItem.Description = this.translateService.instant(\"purchase-note.matching.modal.carriage\");\r\n }\r\n\r\n itemsToAdd.push(newItem);\r\n });\r\n this.itemsAdded.emit(itemsToAdd);\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public SetFilters(): void {\r\n const filter = [];\r\n\r\n if (this.alreadyAdded?.length > 0) {\r\n this.alreadyAdded.forEach(line => {\r\n filter.push(\r\n [\"!\",\r\n [\r\n [\"DocumentId\", \"=\", line.DocumentId],\r\n \"and\", [\"LineId\", \"=\", line.LineId],\r\n \"and\", [\"LineItemType\", \"=\", Number(line.LineItemType)],\r\n \"and\", [\"LineType\", \"=\", Number(line.LineType)],\r\n \"and\", [\"CylinderId\", \"=\", Number(line.CylinderId)]\r\n ]\r\n ]);\r\n filter.push(\"and\");\r\n });\r\n }\r\n\r\n if (this.selectedFilters.length > 0) {\r\n const selectedFilters = [];\r\n this.selectedFilters.forEach(key => {\r\n const selectedFilter = this.filterTypes.find(x => x.ID === key);\r\n if (selectedFilter.filter) {\r\n selectedFilters.push(selectedFilter.filter);\r\n selectedFilters.push(\"or\");\r\n }\r\n });\r\n selectedFilters.pop();\r\n filter.push([selectedFilters]);\r\n } else {\r\n filter.pop();\r\n }\r\n\r\n this.filters = filter;\r\n if (this.purchaseNoteType === PurchaseNoteType.Invoice && this.connectedToSage) {\r\n if(filter.length > 0) {\r\n filter.push(\"and\");\r\n }\r\n filter.push(\r\n [[[\"LineType\", \"=\", Number(PurchaseNoteLineType.Receipt)], \"and\", [\"OSCost\", \">\", 0]],\r\n \"or\",\r\n [[\"LineType\", \"=\", Number(PurchaseNoteLineType.Return)], \"and\", [\"OSCost\", \"<\", 0]]]);\r\n } else if (this.purchaseNoteType === PurchaseNoteType.Credit && this.connectedToSage) {\r\n if(filter.length > 0) {\r\n filter.push(\"and\");\r\n }\r\n filter.push(\r\n [[[\"LineType\", \"=\", Number(PurchaseNoteLineType.Receipt)], \"and\", [\"OSCost\", \"<\", 0]],\r\n \"or\",\r\n [[\"LineType\", \"=\", Number(PurchaseNoteLineType.Return)], \"and\", [\"OSCost\", \">\", 0]]]);\r\n }\r\n\r\n if (filter.length > 0) {\r\n this.dataGrid.instance.filter(this.filters);\r\n } else {\r\n this.dataGrid.instance.clearFilter();\r\n }\r\n\r\n this.SearchTextChanged();\r\n }\r\n\r\n public FilterChanged(selectedFilters: number[]): void {\r\n this.selectedFilters = selectedFilters;\r\n this.SetFilters();\r\n }\r\n\r\n public OpenItemDetails(data: any): void {\r\n switch(data.LineType){\r\n case PurchaseNoteLineType.Receipt:\r\n this.router.navigate([\"goods-received\", \"detail\", data.DocumentId]);\r\n break;\r\n case PurchaseNoteLineType.Return:\r\n this.router.navigate([\"returns\", \"detail\", data.DocumentId]);\r\n break;\r\n }\r\n }\r\n\r\n public CalculateSearchFilterForDocumentId(filterValue: string, selectedFilterOperation: string, target: string) {\r\n return this.CalculateSearchFilter(\"DocumentId\", filterValue, selectedFilterOperation, target);\r\n }\r\n\r\n public CalculateSearchFilterForOSCost(filterValue: string, selectedFilterOperation: string, target: string) {\r\n return this.CalculateSearchFilter(\"OSCost\", filterValue, selectedFilterOperation, target);\r\n }\r\n\r\n public GetFormattedOsCost(item: any): string {\r\n const value = !this.currencyModel.ShowInForeignCurrency ? item.value * item.data.ExchangeRate : item.value;\r\n let osCost = this.currencyPipe.transform(value, this.currencyModel.CurrencySymbol);\r\n\r\n if (this.ShouldApplyAdditionalFormatting(item)) {\r\n osCost = `(${osCost})`;\r\n }\r\n\r\n return osCost;\r\n }\r\n\r\n public ShouldApplyAdditionalFormatting(item: any): boolean {\r\n return (item.data.LineType === PurchaseNoteLineType.Receipt && this.purchaseNoteType === PurchaseNoteType.Credit) ||\r\n (item.data.LineType === PurchaseNoteLineType.Return && this.purchaseNoteType === PurchaseNoteType.Invoice);\r\n }\r\n\r\n private GetDataSources(): void {\r\n this.itemsToMatchDataSource = this.purchaseNoteService.GetPurchaseNoteMatchingItemsDataSource(this.supplierId);\r\n this.SetFilters();\r\n\r\n if (this.filters.length) {\r\n this.itemsToMatchDataSource.filter(this.filters);\r\n }\r\n }\r\n\r\n private CalculateSearchFilter(column: string, filterValue: string, selectedFilterOperation: string, target: string) {\r\n if (target === \"search\") {\r\n return [\r\n new EdmLiteral(`cast(${column}, 'Edm.String')`),\r\n \"contains\",\r\n `${filterValue}`,\r\n ];\r\n }\r\n return [\r\n column,\r\n selectedFilterOperation,\r\n filterValue\r\n ];\r\n }\r\n\r\n private SetFilterDataSource(): void {\r\n this.filterTypesDataSource = new DataSource(this.filterTypes);\r\n\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(modules => {\r\n if (modules.EquipmentEnabled) {\r\n this.filterTypes.push({\r\n ID: 2,\r\n categoryId: 1,\r\n name: \"Equipment\",\r\n filter: [[\"LineItemType\", \"=\", PurchaseNoteLineItemType.Equipment], \"and\", [\"LineType\", \"=\", PurchaseNoteLineType.Receipt]]\r\n });\r\n this.filterTypes.push({\r\n ID: 8,\r\n categoryId: 7,\r\n name: \"Equipment\",\r\n filter: [[\"LineItemType\", \"=\", PurchaseNoteLineItemType.Equipment], \"and\", [\"LineType\", \"=\", PurchaseNoteLineType.Return]]\r\n });\r\n }\r\n\r\n if (modules.StockEnabled) {\r\n this.filterTypes.push({\r\n ID: 4,\r\n categoryId: 1,\r\n name: \"Parts\",\r\n filter: [[\"LineItemType\", \"=\", PurchaseNoteLineItemType.Part], \"and\", [\"LineType\", \"=\", PurchaseNoteLineType.Receipt]]\r\n });\r\n this.filterTypes.push({\r\n ID: 10,\r\n categoryId: 7,\r\n name: \"Parts\",\r\n filter: [[\"LineItemType\", \"=\", PurchaseNoteLineItemType.Part], \"and\", [\"LineType\", \"=\", PurchaseNoteLineType.Return]]\r\n });\r\n }\r\n\r\n if (modules.FGasEnabled) {\r\n this.filterTypes.push({\r\n ID: 5,\r\n categoryId: 1,\r\n name: \"Refrigerant\",\r\n filter: [[\"LineItemType\", \"=\", PurchaseNoteLineItemType.Refrigerant], \"and\", [\"LineType\", \"=\", PurchaseNoteLineType.Receipt]]\r\n });\r\n this.filterTypes.push({\r\n ID: 11,\r\n categoryId: 7,\r\n name: \"Refrigerant\",\r\n filter: [[\"LineItemType\", \"=\", PurchaseNoteLineItemType.Refrigerant], \"and\", [\"LineType\", \"=\", PurchaseNoteLineType.Return]]\r\n });\r\n }\r\n\r\n this.filterTypes.push({\r\n ID: 6,\r\n categoryId: 1,\r\n name: \"Carriage\",\r\n filter: [[\"LineItemType\", \"=\", PurchaseNoteLineItemType.Carriage], \"and\", [\"LineType\", \"=\", PurchaseNoteLineType.Receipt]]\r\n });\r\n this.filterTypes.push({\r\n ID: 12,\r\n categoryId: 7,\r\n name: \"Carriage\",\r\n filter: [[\"LineItemType\", \"=\", PurchaseNoteLineItemType.Carriage], \"and\", [\"LineType\", \"=\", PurchaseNoteLineType.Return]]\r\n });\r\n\r\n this.filterTypesDataSource = new DataSource(this.filterTypes);\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n \r\n {{ 'purchase-note.matching.remove-line' | translate }}\r\n \r\n
\r\n
\r\n \r\n {{ 'purchase-note.matching.add-line' | translate }}\r\n \r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n
\r\n ({{ (0 - PrepareCurrencyValue(data.value)) | currency: currencyModel.CurrencySymbol }})\r\n
\r\n
= 0\">\r\n {{ PrepareCurrencyValue(data.value) | currency: currencyModel.CurrencySymbol }}\r\n
\r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n\r\n\r\n","import { CurrencyPipe } from \"@angular/common\";\r\nimport { Component, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport { LedgerSystem } from \"projects/servicesight-shared/src/lib/pipes/enums/ledger-system.enum\";\r\nimport { AccountingService } from \"servicesight-shared\";\r\nimport { TaxCodeModel } from \"src/app/shared/models/tax-code.model\";\r\nimport { VatCodeModel } from \"src/app/shared/models/vat-code.model\";\r\nimport { BankersRoundService } from \"src/app/shared/services/bankers-round.service\";\r\nimport { TaxCodesService } from \"src/app/shared/services/tax-codes.service\";\r\nimport { PurchaseNoteLineType } from \"../enums/purchase-note-line-type.enum\";\r\nimport { PurchaseNoteStatus } from \"../enums/purchase-note-status.enum\";\r\nimport { PurchaseNoteType } from \"../enums/purchase-note-type.enum\";\r\nimport { CurrencyModel } from \"../models/currency.model\";\r\nimport { PurchaseNoteLine } from \"../models/purchase-note-line.model\";\r\nimport { PurchaseNote } from \"../models/purchase-note.model\";\r\nimport { PurchaseNoteMatchingModalComponent } from \"../purchase-note-matching-modal/purchase-note-matching-modal.component\";\r\n\r\n@Component({\r\n selector: \"app-purchase-note-matching\",\r\n templateUrl: \"./purchase-note-matching.component.html\",\r\n styleUrls: [\"./purchase-note-matching.component.scss\"]\r\n})\r\n\r\nexport class PurchaseNoteMatchingComponent implements OnInit, OnChanges {\r\n @ViewChild(\"MatchingGrid\", { static: false }) MatchingGrid: DxDataGridComponent;\r\n @ViewChild(PurchaseNoteMatchingModalComponent, { static: true }) purchaseNoteMatchingModal: PurchaseNoteMatchingModalComponent;\r\n\r\n @Input() public purchaseNote: PurchaseNote = new PurchaseNote();\r\n @Input() public currencyModel: CurrencyModel;\r\n @Input() public form: NgForm;\r\n @Input() public totalNet: number = 0;\r\n @Input() public totalTax: number = 0;\r\n\r\n public lineTypes = PurchaseNoteLineType;\r\n public selectedLineIds: string[] = [];\r\n public isUsaTaxSystem: boolean = false;\r\n public connectedToSage: boolean = false;\r\n\r\n private bottomSummaryColumns: string[] = [\"MatchedCost\", \"DocumentId\", \"Variance\", \"VatCode\"];\r\n private topSummaryColumns: string[] = [\"OSCost\", \"Empty\"];\r\n\r\n private sumOfMatchedCost: number = 0;\r\n private sumOfTax: number = 0;\r\n private unmatchedNetSummaryColumnIndex: number = 9;\r\n private unmatchedTaxSummaryColumnIndex: number = 8;\r\n\r\n public PurchaseNoteTypes: { id: PurchaseNoteLineType; label: string } [] = [\r\n { id: PurchaseNoteLineType.Receipt, label: \"Receipt\" },\r\n { id: PurchaseNoteLineType.Return, label: \"Return\" }\r\n ];\r\n\r\n public vatCodes: VatCodeModel[] = [];\r\n public taxCodes: TaxCodeModel[] = [];\r\n\r\n public get CurrencyFormat(): string {\r\n return this.currencyModel.CurrencySymbol + \"#,##0.00\";\r\n }\r\n\r\n public get RemoveLinesDisabled(): boolean {\r\n return this.selectedLineIds.length === 0 || this.noteIsCommited;\r\n }\r\n\r\n public get IsNew(): boolean {\r\n return !this.purchaseNote || !this.purchaseNote.PurchaseNoteId;\r\n }\r\n\r\n public get noteIsCommited(): boolean {\r\n return this.purchaseNote?.Status === PurchaseNoteStatus.Committed;\r\n }\r\n\r\n constructor(\r\n private taxCodesService: TaxCodesService,\r\n private translateService: TranslateService,\r\n private currencyPipe: CurrencyPipe,\r\n private accountsLinkService: AccountingService,\r\n private bankersRoundService: BankersRoundService\r\n ) {\r\n this.OnLineRowUpdating = this.OnLineRowUpdating.bind(this);\r\n this.CellPrepared = this.CellPrepared.bind(this);\r\n this.CalculateSelectedRow = this.CalculateSelectedRow.bind(this);\r\n this.CustomiseUnmatchedNetText = this.CustomiseUnmatchedNetText.bind(this);\r\n this.CustomiseUnmatchedTaxText = this.CustomiseUnmatchedTaxText.bind(this);\r\n this.TotalText = this.TotalText.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.accountsLinkService.GetAccountsInfo().subscribe(result => {\r\n this.isUsaTaxSystem = result.IsUsaTaxSystem;\r\n this.connectedToSage = result.LedgerSystemId === LedgerSystem.Sage50OnPremise;\r\n if (!this.isUsaTaxSystem) {\r\n this.taxCodesService.getTaxCodes().subscribe(res => {\r\n this.taxCodes = res;\r\n });\r\n this.taxCodesService.getVatCodes().subscribe(res => {\r\n this.vatCodes = res;\r\n });\r\n }\r\n });\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.currencyModel) {\r\n if (this.MatchingGrid && this.MatchingGrid.instance) {\r\n this.MatchingGrid.instance.getDataSource().reload();\r\n }\r\n }\r\n\r\n if(changes.purchaseNote && changes.purchaseNote.currentValue && this.purchaseNote.Lines){\r\n this.purchaseNote.Lines.forEach(i => {\r\n i.CurrentOSCost = i.OSCost - i.MatchedCost + i.Variance;\r\n });\r\n }\r\n }\r\n\r\n public SetMatchedCost = (newData: Partial, value: number, currentRowData: PurchaseNoteLine) => {\r\n newData.MatchedCost = value;\r\n newData.Variance = - currentRowData.OSCost + value;\r\n newData.CurrentOSCost = currentRowData.OSCost - value + newData.Variance;\r\n newData.Tax = this.bankersRoundService.bankersRound(value * this.GetVatRate(currentRowData.VatCode), 2);\r\n };\r\n\r\n public SetVariance = (newData: Partial, value: number, currentRowData: PurchaseNoteLine) => {\r\n newData.Variance = value;\r\n newData.CurrentOSCost = currentRowData.OSCost - currentRowData.MatchedCost + value;\r\n };\r\n\r\n public SetVatCode = (newData: Partial, value: string, currentRowData: PurchaseNoteLine) => {\r\n newData.VatCode = value;\r\n newData.Tax = this.bankersRoundService.bankersRound(currentRowData.MatchedCost * this.GetVatRate(newData.VatCode), 2);\r\n };\r\n\r\n public CellPrepared(e): void {\r\n if (e.rowType === \"totalFooter\") {\r\n e.cellElement.style.height = \"70px\";\r\n\r\n if (this.bottomSummaryColumns.includes(e.column.name)) {\r\n e.cellElement.style.verticalAlign = \"bottom\";\r\n }\r\n\r\n if (this.topSummaryColumns.includes(e.column.name)) {\r\n e.cellElement.style.verticalAlign = \"top\";\r\n }\r\n\r\n if (e.columnIndex === this.unmatchedTaxSummaryColumnIndex) {\r\n e.cellElement.querySelector(\".dx-datagrid-summary-item\").style.position = \"absolute\";\r\n e.cellElement.querySelector(\".dx-datagrid-summary-item\").style.right = \"5px\";\r\n }\r\n\r\n if (e.columnIndex === this.unmatchedNetSummaryColumnIndex) {\r\n e.cellElement.querySelector(\".dx-datagrid-summary-item\").style.position = \"absolute\";\r\n e.cellElement.querySelector(\".dx-datagrid-summary-item\").style.right = \"210px\";\r\n }\r\n }\r\n }\r\n\r\n public CalculateSelectedRow(options): void {\r\n if (options.name === \"TaxSummary\") {\r\n if (options.summaryProcess === \"start\") {\r\n options.totalValue = 0;\r\n this.sumOfTax = 0;\r\n } else if (options.summaryProcess === \"calculate\") {\r\n const value = options.value.Tax;\r\n this.sumOfTax += this.PrepareCurrencyValue(value);\r\n options.totalValue = this.sumOfTax;\r\n }\r\n }\r\n\r\n if (options.name === \"VarianceSummary\") {\r\n if (options.summaryProcess === \"start\") {\r\n options.totalValue = 0;\r\n } else if (options.summaryProcess === \"calculate\") {\r\n const value = options.value.Variance;\r\n options.totalValue += this.PrepareCurrencyValue(value);\r\n }\r\n }\r\n\r\n if (options.name === \"MatchedCostSummary\") {\r\n if (options.summaryProcess === \"start\") {\r\n options.totalValue = 0;\r\n this.sumOfMatchedCost = 0;\r\n } else if (options.summaryProcess === \"calculate\") {\r\n const value = options.value.MatchedCost;\r\n this.sumOfMatchedCost += this.PrepareCurrencyValue(value);\r\n options.totalValue = this.sumOfMatchedCost;\r\n }\r\n }\r\n\r\n if (options.name === \"UnmatchedNetSummary\") {\r\n if (options.summaryProcess === \"start\") {\r\n options.totalValue = 0;\r\n } else if (options.summaryProcess === \"calculate\") {\r\n const calculatedTotalNet = this.PrepareCurrencyValue(this.totalNet);\r\n options.totalValue = calculatedTotalNet - this.sumOfMatchedCost;\r\n }\r\n }\r\n\r\n if (options.name === \"UnmatchedTaxSummary\") {\r\n if (options.summaryProcess === \"start\") {\r\n options.totalValue = 0;\r\n } else if (options.summaryProcess === \"calculate\") {\r\n const calculatedTotaltax = this.PrepareCurrencyValue(this.totalTax);\r\n options.totalValue = calculatedTotaltax - this.sumOfTax;\r\n }\r\n }\r\n }\r\n\r\n public TotalText(data: any): string {\r\n return this.currencyPipe.transform(data.value, this.currencyModel.CurrencySymbol);\r\n }\r\n\r\n public PrepareCurrencyValue(value: number): number {\r\n return this.currencyModel.ShowInForeignCurrency ? this.bankersRoundService.bankersRound(value / this.purchaseNote.ExchangeRate, 2) : value;\r\n }\r\n\r\n public OnLineRowUpdating(): void {\r\n this.SetFormDirty();\r\n }\r\n\r\n public AddLine(): void {\r\n this.purchaseNoteMatchingModal.Show();\r\n }\r\n\r\n public RemoveSelectedLines(): void {\r\n this.selectedLineIds.forEach(id => {\r\n const index = this.purchaseNote.Lines.findIndex(x => x.PurchaseNoteLineId === id);\r\n this.purchaseNote.Lines.splice(index, 1);\r\n });\r\n\r\n this.SetFormDirty();\r\n }\r\n\r\n public CustomiseUnmatchedNetText(data): string {\r\n return this.CustomiseUnmatchedText(\"purchase-note.matching.grid.unmatched-net\", data);\r\n }\r\n\r\n public CustomiseUnmatchedTaxText(data): string {\r\n return this.CustomiseUnmatchedText(\"purchase-note.matching.grid.unmatched-tax\", data);\r\n }\r\n\r\n public OnItemsAdded(newItems: PurchaseNoteLine[]): void {\r\n newItems.forEach(item => {\r\n item.OSCost = (item.OSCost * item.ExchangeRate);\r\n const sign = this.purchaseNote.PurchaseNoteTypeId === PurchaseNoteType.Invoice ? 1 : -1;\r\n if(item.LineType === PurchaseNoteLineType.Return) {\r\n item.OSCost *=-sign;\r\n } else {\r\n item.OSCost *=sign;\r\n }\r\n item.MatchedCost = item.OSCost;\r\n if(!this.isUsaTaxSystem) {\r\n const taxModel = this.taxCodes.find(i => i.ProductTaxCodeId === item.ProductTaxCodeId &&\r\n i.CustomerTaxCodeId === (this.purchaseNote.SupplierTaxCodeId ?? \"1\"));\r\n if(taxModel) {\r\n item.VatCode = taxModel.VatCode;\r\n item.Tax = this.bankersRoundService.bankersRound(item.MatchedCost * this.GetVatRate(taxModel.VatCode), 2);\r\n }\r\n } else {\r\n item.VatCode = \"1\"; // the database does not allow null in the VatCode column so we default it to \"1\"\r\n }\r\n this.purchaseNote.Lines.push(item);\r\n });\r\n\r\n this.SetFormDirty();\r\n }\r\n\r\n private SetFormDirty(): void {\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n private CustomiseUnmatchedText(key: string, data: any): string {\r\n const currency = this.TotalText(data);\r\n const text = this.translateService.instant(key);\r\n return `${text}: ${currency}`;\r\n }\r\n\r\n private GetVatRate(vatCode: string): number {\r\n return this.vatCodes.find(c => c.VatCode === vatCode)?.VatRate ?? 0;\r\n }\r\n}\r\n","
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
","import { Component, OnInit, Input, Output, OnChanges, EventEmitter } from \"@angular/core\";\r\nimport { CurrencyService } from \"../../services/currency.service\";\r\nimport { ICurrency } from \"../../models/icurrency.model\";\r\n\r\n\r\n@Component({\r\n selector: \"app-exchange-rate\",\r\n templateUrl: \"./exchange-rate.component.html\",\r\n styleUrls: [\"./exchange-rate.component.scss\"]\r\n})\r\nexport class ExchangeRateComponent implements OnInit, OnChanges {\r\n @Input() showInForeignCurrency: boolean;\r\n @Input() foreignCurrency: ICurrency;\r\n @Input() disabled: boolean;\r\n @Input() exchangeRate: number;\r\n @Output() exchangeRateChange: EventEmitter = new EventEmitter();\r\n @Output() currencyChange: EventEmitter = new EventEmitter();\r\n\r\n public baseCurrencySymbol: string = null;\r\n public baseCurrencyCode: string = null;\r\n\r\n constructor(\r\n private currencyService: CurrencyService) { }\r\n\r\n public ngOnInit(): void {\r\n this.baseCurrencySymbol = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n this.baseCurrencyCode = JSON.parse(localStorage.getItem(\"ls.BaseCurrencyCode\"));\r\n }\r\n\r\n public ngOnChanges(): void {\r\n if (this.foreignCurrency && this.baseCurrencyCode && !this.exchangeRate) {\r\n this.GetRate();\r\n }\r\n }\r\n\r\n public GetRate(): void {\r\n const base: string = this.baseCurrencyCode;\r\n const code: string = this.foreignCurrency.CurrencyCode;\r\n this.currencyService\r\n .getExchangeRate(base, code)\r\n .subscribe(res => {\r\n this.exchangeRate = res.quotes[base + code];\r\n this.OnExchangeRateChange();\r\n });\r\n }\r\n\r\n public ToggleCurrency(): void {\r\n this.showInForeignCurrency = !this.showInForeignCurrency;\r\n this.currencyChange.emit(this.showInForeignCurrency);\r\n }\r\n\r\n public OnExchangeRateChange(): void {\r\n this.exchangeRateChange.emit(this.exchangeRate);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n {{ 'label.user-updated' | translate }}\r\n {{ 'label.system-generated' | translate }}\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n","import {\r\n ChangeDetectorRef,\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { ControlContainer, NgForm } from \"@angular/forms\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxSelectBoxComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport {\r\n AccountingService,\r\n ContactService,\r\n CustomerService,\r\n DocumentTypePipe,\r\n JobDataService,\r\n MakeModelSharedService,\r\n SettingId,\r\n SettingsService,\r\n UICustomisation,\r\n UserReferenceService,\r\n UserRefType\r\n} from \"servicesight-shared\";\r\nimport { BasePopSopDetailComponent } from \"src/app/shared-pop-sop/components/base-pop-sop-detail/base-pop-sop-detail.component\";\r\nimport { ChildContactType } from \"src/app/shared/components/child-contacts-list/child-contact-type.enum\";\r\nimport { ExchangeRateComponent } from \"src/app/shared/components/exchange-rate/exchange-rate.component\";\r\nimport { ContactStatus } from \"src/app/shared/enums/contact-status.eum\";\r\nimport { ICurrency } from \"src/app/shared/models/icurrency.model\";\r\nimport { TaxCodeModel } from \"src/app/shared/models/tax-code.model\";\r\nimport { VatCodeModel } from \"src/app/shared/models/vat-code.model\";\r\nimport { SupplierStatus } from \"src/app/shared/pipes/enums/supplier-status.enum\";\r\nimport { BankersRoundService } from \"src/app/shared/services/bankers-round.service\";\r\nimport { ChildContactsService } from \"src/app/shared/services/child-contacts/child-contracts.service\";\r\nimport { MaterialTypeService } from \"src/app/shared/services/material-type/material-type.service\";\r\nimport { SupplierService } from \"src/app/shared/services/supplier/supplier.service\";\r\nimport { TaxCodesService } from \"src/app/shared/services/tax-codes.service\";\r\nimport { StockService } from \"src/app/stock/services/stock.service\";\r\nimport { PurchaseNoteStatus } from \"../enums/purchase-note-status.enum\";\r\nimport { CurrencyModel } from \"../models/currency.model\";\r\nimport { PurchaseNoteTextVariant } from \"../models/purchase-note-text-variant.model\";\r\nimport { PurchaseNote } from \"../models/purchase-note.model\";\r\n\r\n@Component({\r\n selector: \"app-purchase-note-general\",\r\n templateUrl: \"./purchase-note-general.component.html\",\r\n styleUrls: [\"./purchase-note-general.component.scss\"],\r\n viewProviders: [ { provide: ControlContainer, useExisting: NgForm } ]\r\n})\r\nexport class PurchaseNoteGeneralComponent extends BasePopSopDetailComponent implements OnInit, OnChanges {\r\n @Input() public purchaseNote: PurchaseNote = new PurchaseNote();\r\n @Input() public purchaseNoteTextVariant: PurchaseNoteTextVariant = new PurchaseNoteTextVariant();\r\n @Input() public form: NgForm;\r\n @ViewChild(\"supplierContactSelectBox\", { static: false }) supplierContactSelectBoxComponent: DxSelectBoxComponent;\r\n @ViewChild(\"exchangeRate\", { static: false }) exchangeRateComponent: ExchangeRateComponent;\r\n @Output() currencyChange: EventEmitter = new EventEmitter();\r\n @Output() supplierChange: EventEmitter = new EventEmitter();\r\n\r\n public userRefDataSource: DataSource;\r\n public supplierDataSource: DataSource;\r\n public supplierContactsDataSource: DataSource;\r\n public supplierContactsDataStore: ODataStore;\r\n\r\n public baseCurrencySymbol: string = null;\r\n public showInForeignCurrency: boolean = false;\r\n public isUsaTaxSystem: boolean = false;\r\n public currency: ICurrency;\r\n public vatCodes: VatCodeModel[] = [];\r\n public taxCodes: TaxCodeModel[] = [];\r\n\r\n public userRef1Label: string;\r\n public userRef2Label: string;\r\n\r\n public reverseChargeVatEnabled: boolean = false;\r\n\r\n public get purchaseNoteDisabled(): boolean {\r\n return !this.purchaseNote || this.noteIsCommited;\r\n }\r\n\r\n public get noteIsCommited(): boolean {\r\n return this.purchaseNote?.Status === PurchaseNoteStatus.Committed;\r\n }\r\n\r\n public get currencySymbol(): string {\r\n return !this.showInForeignCurrency && this.currency\r\n ? this.currency.CurrencySymbol\r\n : this.baseCurrencySymbol;\r\n }\r\n\r\n public get isForeignSupplier(): boolean {\r\n return this.currency && this.currency.IsForeignCustomer;\r\n }\r\n\r\n public get calculatedGrossValue(): number {\r\n return Number(this.purchaseNote.Net) + Number(this.purchaseNote.Tax);\r\n }\r\n\r\n public get exhangeRateDifference(): number {\r\n let x: number = 0;\r\n this.purchaseNote?.Lines?.forEach(l => x += (l.MatchedCost / this.purchaseNote?.ExchangeRate) - (l.MatchedCost / l.ExchangeRate));\r\n return x;\r\n }\r\n\r\n constructor(\r\n private changeDetectorRef: ChangeDetectorRef,\r\n private userRefService: UserReferenceService,\r\n private childContactsService: ChildContactsService,\r\n private settingService: SettingsService,\r\n private taxCodesService: TaxCodesService,\r\n private accountsLinkService: AccountingService,\r\n translate: TranslateService,\r\n documentTypePipe: DocumentTypePipe,\r\n materialType: MaterialTypeService,\r\n customerService: CustomerService,\r\n contactService: ContactService,\r\n makeModelService: MakeModelSharedService,\r\n jobDataService: JobDataService,\r\n stockService: StockService,\r\n supplierService: SupplierService,\r\n private bankersRoundService: BankersRoundService) {\r\n super(\r\n translate,\r\n documentTypePipe,\r\n materialType,\r\n customerService,\r\n contactService,\r\n makeModelService,\r\n jobDataService,\r\n supplierService,\r\n stockService);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.baseCurrencySymbol = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n this.supplierContactsDataStore = this.childContactsService.GetDataStore(ChildContactType.Supplier);\r\n this.userRefDataSource = this.userRefService.getListDataSource(UserRefType.PURCHASE_NOTE_1);\r\n this.userRef1Label = this.userRefService.getLabel(UICustomisation.PURCHASE_NOTE_1);\r\n this.userRef2Label = this.userRefService.getLabel(UICustomisation.PURCHASE_NOTE_2);\r\n\r\n this.settingService.getSetting(SettingId.ReverseChargeVat).subscribe((setting) => {\r\n this.reverseChargeVatEnabled = setting.ValueBool;\r\n });\r\n\r\n this.accountsLinkService.GetAccountsInfo().subscribe(result => {\r\n this.isUsaTaxSystem = result.IsUsaTaxSystem;\r\n if (!this.isUsaTaxSystem) {\r\n this.taxCodesService.getTaxCodes().subscribe(res => {\r\n this.taxCodes = res;\r\n });\r\n this.taxCodesService.getVatCodes().subscribe(res => {\r\n this.vatCodes = res;\r\n });\r\n }\r\n });\r\n super.ngOnInit();\r\n\r\n this.supplierDataSource = new DataSource({\r\n store: this.supplierStore,\r\n filter: [[\"Status\", \"=\", SupplierStatus.Active], \"and\", [\"IsSite\", \"=\", false]]\r\n });\r\n\r\n this.supplierContactsDataSource = new DataSource({\r\n store: this.supplierContactsDataStore,\r\n filter: [\"Status\", \"=\", ContactStatus.ACTIVE]\r\n });\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.purchaseNote) {\r\n if (changes.purchaseNote.currentValue.UserRef1Id && !changes.purchaseNote.previousValue.UserRef1Id) {\r\n this.selectUserRef1();\r\n }\r\n }\r\n }\r\n\r\n public onSupplierChanged(e: any): void {\r\n if (e.value) {\r\n const dataSource = this.supplierContactSelectBoxComponent.instance.getDataSource();\r\n dataSource.filter([[\"CustomerId\", \"=\", e.value], \"and\", [\"Status\", \"=\" , ContactStatus.ACTIVE]]);\r\n dataSource.load().then(() => {\r\n if (e.event) {\r\n this.purchaseNote.SupplierContactId = null;\r\n this.purchaseNote.ExchangeRate = 1;\r\n this.supplierStore.byKey(this.purchaseNote.SupplierId).then(supplier => {\r\n this.purchaseNote.ReverseChargeVat = supplier.ReverseChargeVat;\r\n this.purchaseNote.SupplierTaxCodeId = supplier.SupplierTaxCodeId;\r\n this.calculateTax();\r\n });\r\n } else { // on initial load of the supplier we only need the supplier tax code\r\n this.supplierStore.byKey(this.purchaseNote.SupplierId).then(supplier => {\r\n this.purchaseNote.SupplierTaxCodeId = supplier.SupplierTaxCodeId;\r\n });\r\n }\r\n });\r\n this.setSupplierCurrency(this.purchaseNote.SupplierId);\r\n this.supplierChange.emit(this.purchaseNote.SupplierId);\r\n }\r\n }\r\n\r\n public ShowInForeignCurrency(showInForeignCurrency: boolean): void {\r\n this.showInForeignCurrency = showInForeignCurrency;\r\n this.currencyChange.emit({\r\n ShowInForeignCurrency: showInForeignCurrency,\r\n CurrencySymbol: this.currencySymbol,\r\n IsForeignSupplier: this.isForeignSupplier\r\n });\r\n }\r\n\r\n public SetExchangeRate(exchangeRate: number): void {\r\n this.purchaseNote.ExchangeRate = exchangeRate;\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public MarkTaxValueUpdated(taxValue: number): void {\r\n if (taxValue !== this.purchaseNote.Tax) {\r\n this.purchaseNote.TaxUpdated = true;\r\n }\r\n }\r\n\r\n public ValidateDueDate(): void {\r\n const dueDate: any = this.form.form.controls[\"purchase-notes.general.due-date\"];\r\n if (dueDate) {\r\n if (this.purchaseNote.DueDateUI && this.purchaseNote.DueDateUI < this.purchaseNote.InvoiceDateUI) {\r\n dueDate.markAsDirty();\r\n dueDate.setErrors({ dueDateBeforeInvoiceDate: true });\r\n } else if (this.purchaseNote.DueDateUI) {\r\n dueDate.setErrors(null);\r\n }\r\n }\r\n }\r\n\r\n public OnChangeNet() {\r\n this.calculateTax();\r\n }\r\n\r\n\r\n private selectUserRef1(): void {\r\n const cached = this.purchaseNote.UserRef1Id;\r\n this.purchaseNote.UserRef1Id = null;\r\n this.userRefDataSource.load().then(() => {\r\n this.purchaseNote.UserRef1Id = cached;\r\n });\r\n }\r\n\r\n private setSupplierCurrency(supplierId: number): void {\r\n this.supplierService.GetSupplierCurrency(supplierId).subscribe(currency => {\r\n this.currency = currency;\r\n this.currencyChange.emit({\r\n ShowInForeignCurrency: this.showInForeignCurrency,\r\n CurrencySymbol: this.currencySymbol,\r\n IsForeignSupplier: this.isForeignSupplier\r\n });\r\n if (!this.purchaseNote.ExchangeRate || this.purchaseNote.ExchangeRate === 1) {\r\n this.changeDetectorRef.detectChanges();\r\n this.purchaseNote.ExchangeRate = currency.ExchangeRateSales;\r\n }\r\n });\r\n }\r\n\r\n private getVatRate(vatCode: string): number {\r\n return this.vatCodes.find(c => c.VatCode === vatCode)?.VatRate ?? 0;\r\n }\r\n\r\n private calculateTax() {\r\n if(!this.isUsaTaxSystem) {\r\n if(this.taxCodes && this.taxCodes.length > 0) {\r\n this.setGeneratedTax();\r\n } else {\r\n this.taxCodesService.getTaxCodes().subscribe(res => {\r\n this.taxCodes = res;\r\n this.setGeneratedTax();\r\n });\r\n }\r\n }\r\n }\r\n\r\n private setGeneratedTax() {\r\n const taxModel = this.taxCodes.find(i => i.ProductTaxCodeId === 1 && // System generated tax should get populated from the supplier tax code and standard product tax code\r\n i.CustomerTaxCodeId === (this.purchaseNote.SupplierTaxCodeId ?? 1));\r\n if(taxModel) {\r\n this.purchaseNote.Tax = this.bankersRoundService.bankersRound(this.purchaseNote.Net * this.getVatRate(taxModel.VatCode), 2);\r\n } else {\r\n this.purchaseNote.Tax = 0;\r\n }\r\n this.purchaseNote.TaxUpdated = false;\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { PurchaseNoteStatus } from \"./../enums/purchase-note-status.enum\";\r\n\r\n@Pipe({\r\n name: \"purchaseNotesStatus\"\r\n})\r\nexport class PurchaseNotesStatusPipe implements PipeTransform {\r\n private readonly purchaseNoteStatus = {\r\n [PurchaseNoteStatus.Pending]: \"purchase-notes.status.pending\",\r\n [PurchaseNoteStatus.Queried]: \"purchase-notes.status.queried\",\r\n [PurchaseNoteStatus.Committed]: \"purchase-notes.status.committed\"\r\n };\r\n\r\n private readonly stringValueMapping = {\r\n Pending: PurchaseNoteStatus.Pending,\r\n Queried: PurchaseNoteStatus.Queried,\r\n Committed: PurchaseNoteStatus.Committed\r\n };\r\n\r\n public transform(value: number | PurchaseNoteStatus): string {\r\n let safeValue = Number(value);\r\n if (isNaN(safeValue)) {\r\n safeValue = this.stringValueMapping[value];\r\n }\r\n\r\n return this.purchaseNoteStatus[safeValue];\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { PurchaseNoteStatus } from \"../enums/purchase-note-status.enum\";\r\n\r\n@Pipe({\r\n name: \"purchaseNotesStatusColour\"\r\n})\r\nexport class PurchaseNotesStatusColourPipe implements PipeTransform {\r\n private readonly purchaseNoteStatusColour = {\r\n [PurchaseNoteStatus.Pending]: \"clrred\",\r\n [PurchaseNoteStatus.Queried]: \"clryellow\",\r\n [PurchaseNoteStatus.Committed]: \"clrgreen\"\r\n };\r\n\r\n private readonly stringValueMapping = {\r\n Pending: PurchaseNoteStatus.Pending,\r\n Queried: PurchaseNoteStatus.Queried,\r\n Committed: PurchaseNoteStatus.Committed\r\n };\r\n\r\n transform(value: number | PurchaseNoteStatus): string {\r\n let safeValue = Number(value);\r\n if (isNaN(safeValue)) {\r\n safeValue = this.stringValueMapping[value];\r\n }\r\n\r\n return this.purchaseNoteStatusColour[safeValue];\r\n }\r\n\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n {{ purchaseNoteTextVariant?.Header | translate }}  \r\n \r\n

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

{{ purchaseNote.Status | purchaseNotesStatus | translate }}

\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import { Location } from \"@angular/common\";\r\nimport { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { forkJoin, lastValueFrom } from \"rxjs\";\r\nimport {\r\n ContactModel,\r\n DateOnlyService,\r\n DocumentTypeEnum,\r\n FormMesssageService,\r\n IProteanResponse,\r\n Module,\r\n ModuleService,\r\n PermissionsService\r\n} from \"servicesight-shared\";\r\nimport { MessageService } from \"src/app/messages/services/message/message.service\";\r\nimport { MessageDocTypeIds } from \"src/app/shared/enums/messages/message-doc-type-ids.enum\";\r\nimport { MessageTypes } from \"src/app/shared/enums/messages/message-types.enum\";\r\nimport { AuthService } from \"src/app/shared/services/auth/auth.service\";\r\nimport { BankersRoundService } from \"src/app/shared/services/bankers-round.service\";\r\nimport { ContactService } from \"src/app/shared/services/contact/contact.service\";\r\nimport { Ng1ReminderService } from \"src/app/shared/services/ng1-reminder.service\";\r\nimport { PreviousRouteService } from \"src/app/shared/services/previous-route.service\";\r\nimport { SupplierService } from \"src/app/shared/services/supplier/supplier.service\";\r\nimport { Supplier } from \"src/app/suppliers/models/supplier.model\";\r\nimport { PurchaseNoteTextVariant } from \"./../models/purchase-note-text-variant.model\";\r\nimport { PurchaseNoteStatus } from \"../enums/purchase-note-status.enum\";\r\nimport { PurchaseNoteType } from \"../enums/purchase-note-type.enum\";\r\nimport { CurrencyModel } from \"../models/currency.model\";\r\nimport { PurchaseNote } from \"../models/purchase-note.model\";\r\nimport { PurchaseNoteService } from \"../services/purchase-note.service\";\r\n\r\n@Component({\r\n selector: \"app-purchase-note\",\r\n templateUrl: \"./purchase-note.component.html\",\r\n styleUrls: [\"./purchase-note.component.scss\"]\r\n})\r\nexport class PurchaseNoteComponent implements OnInit {\r\n @ViewChild(\"purchaseNoteForm\", { static: true }) form: NgForm;\r\n public readonly formName: string = \"purchaseNoteForm\";\r\n public currencyModel: CurrencyModel = new CurrencyModel();\r\n public purchaseNoteTextVariant: PurchaseNoteTextVariant = new PurchaseNoteTextVariant();\r\n\r\n public purchaseNote: PurchaseNote = new PurchaseNote();\r\n public purchaseNoteId: number;\r\n\r\n public isProEnabled: boolean;\r\n public isLoading: boolean = false;\r\n public IsRecordNavigationEnabled: boolean = false;\r\n public CanNavigatePrevious: boolean = false;\r\n public CanNavigateNext: boolean = false;\r\n public documentTypeEnum = DocumentTypeEnum;\r\n public showDeleteConfirmation: boolean = false;\r\n public showQueryConfirmation: boolean = false;\r\n public hasDeletePermission: boolean = false;\r\n public hasQueryPermission: boolean = false;\r\n public hasCommitPermission: boolean = false;\r\n public unmatchedNet: number = -1;\r\n public unmatchedTax: number = -1;\r\n public showMatchedOnOtherPopup: boolean = false;\r\n public matchedOnOther: boolean = false;\r\n\r\n public get noteIsCommited(): boolean {\r\n return this.purchaseNote?.Status === PurchaseNoteStatus.Committed;\r\n }\r\n\r\n public get hasUnmatchedValue() {\r\n const taxTotal = this.purchaseNote?.Lines?.reduce((sum, current) => sum + this.bankersRoundService.bankersRound(current.Tax, 2), 0);\r\n const netTotal = this.purchaseNote?.Lines?.reduce((sum, current) => sum + this.bankersRoundService.bankersRound(current.MatchedCost, 2), 0);\r\n\r\n const unmatchedTax = Math.abs(this.purchaseNote?.Tax - taxTotal) >= 0.01;\r\n const unmatchedNet = Math.abs(this.purchaseNote?.Net - netTotal) >= 0.01;\r\n return unmatchedTax || unmatchedNet;\r\n }\r\n\r\n public get isNew(): boolean {\r\n return !this.purchaseNote || !this.purchaseNoteId;\r\n }\r\n\r\n public get canDelete(): boolean {\r\n return (this.purchaseNote.Status === PurchaseNoteStatus.Pending ||\r\n this.purchaseNote.Status === PurchaseNoteStatus.Queried) &&\r\n !this.isNew;\r\n }\r\n\r\n public get canCommit(): boolean {\r\n return !this.isNew && !this.hasUnmatchedValue;\r\n }\r\n\r\n public get commitBtnTooltip(): string {\r\n return this.canCommit ? \"\" : this.translateService.instant(\"purchase-note.matching.cannot-commit-tooltip\");\r\n }\r\n\r\n public get isQueryButtonDisabled(): boolean {\r\n return this.purchaseNote.Status !== PurchaseNoteStatus.Pending || !this.form.valid;\r\n }\r\n\r\n constructor(\r\n private purchaseNoteService: PurchaseNoteService,\r\n private moduleService: ModuleService,\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private location: Location,\r\n private dateOnlyService: DateOnlyService,\r\n private formMessageService: FormMesssageService,\r\n private previousRouteService: PreviousRouteService,\r\n private reminderService: Ng1ReminderService,\r\n private supplierService: SupplierService,\r\n private contactService: ContactService,\r\n private messageService: MessageService,\r\n private authService: AuthService,\r\n private translateService: TranslateService,\r\n private permissionsService: PermissionsService,\r\n private bankersRoundService: BankersRoundService) { }\r\n\r\n public ngOnInit(): void {\r\n // Default to the base currency. This will be overridden when a supplier is selected.\r\n this.currencyModel.CurrencySymbol = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n this.currencyModel.ShowInForeignCurrency = false;\r\n\r\n this.route.params.subscribe(params => {\r\n this.purchaseNoteId = Number(params.id);\r\n if (this.purchaseNoteId) {\r\n this.isLoading = true;\r\n this.purchaseNoteService.Get(this.purchaseNoteId).subscribe((result) => {\r\n this.SetPurchaseNote(result);\r\n this.isLoading = false;\r\n }, () => this.isLoading = false);\r\n } else {\r\n // For the new purchase note\r\n this.purchaseNote.EmployeeId = this.authService.EmployeeId;\r\n this.purchaseNote.PurchaseNoteTypeId = Number(this.route.snapshot.queryParamMap.get(\"type\"));\r\n this.purchaseNote.Net = 0;\r\n this.purchaseNote.Tax = 0;\r\n this.setPurchaseNoteFormTextVariant();\r\n }\r\n });\r\n\r\n this.moduleService.GetEnabledModules().subscribe(x => {\r\n this.isProEnabled = x.includes(Module.Pro);\r\n });\r\n\r\n this.permissionsService.CurrentUserHasPermissions(\"PurchaseNoteDelete\", \"PurchaseNoteQuery\", \"PurchaseNoteCommit\")\r\n .subscribe(permissions => {\r\n this.hasDeletePermission = permissions.PurchaseNoteDelete;\r\n this.hasQueryPermission = permissions.PurchaseNoteQuery;\r\n this.hasCommitPermission = permissions.PurchaseNoteCommit;\r\n });\r\n\r\n this.IsRecordNavigationEnabled = this.previousRouteService.PreviousUrlContains(\"/purchase-notes\");\r\n }\r\n\r\n private CheckConcurrencyAfterSave(before: PurchaseNote, after: PurchaseNote): boolean {\r\n let result: boolean = false;\r\n before.Lines?.forEach(lBefore => {\r\n const lAfter = after.Lines?.find(\r\n l => l.DocumentId === lBefore.DocumentId &&\r\n l.LineId === lBefore.LineId &&\r\n l.LineItemType === lBefore.LineItemType &&\r\n l.LineItemId === lBefore.LineItemId);\r\n if (lAfter?.OSCost !== lBefore.OSCost) {\r\n result = true;\r\n }\r\n });\r\n\r\n return result;\r\n }\r\n\r\n private PerformSave(): Promise {\r\n this.isLoading = true;\r\n this.purchaseNote.Gross = Number(this.purchaseNote.Tax) + Number(this.purchaseNote.Net);\r\n this.recalculateDatesOnSave();\r\n\r\n const func = this.purchaseNote.PurchaseNoteId\r\n ? this.purchaseNoteService.Update(this.purchaseNote)\r\n : this.purchaseNoteService.Create(this.purchaseNote);\r\n\r\n return lastValueFrom(this.formMessageService.RegisterChainableObservable(func, this.formName)).then(result => {\r\n this.location.replaceState(`/purchase-notes/detail/${result.PurchaseNoteId}`);\r\n this.purchaseNoteId = result.PurchaseNoteId;\r\n this.matchedOnOther = this.CheckConcurrencyAfterSave(this.purchaseNote, result);\r\n this.SetPurchaseNote(result);\r\n this.isLoading = false;\r\n }, () => this.isLoading = false);\r\n }\r\n\r\n public Save(): void {\r\n this.PerformSave();\r\n }\r\n\r\n public NewReminder(): void {\r\n\r\n forkJoin([\r\n this.supplierService.GetSupplier(this.purchaseNote.SupplierId),\r\n this.contactService.GetContact(this.purchaseNote.SupplierContactId)\r\n ]).subscribe(([supplier, contactResponse]: [Supplier, IProteanResponse]) => {\r\n const contact = contactResponse.ViewModel as ContactModel;\r\n let contactSuffix = contact.FirstName !== undefined ?\r\n \" - \" + contact.FirstName :\r\n \"\";\r\n contactSuffix = contact.LastName !== undefined ?\r\n contactSuffix + \" \" + contact.LastName :\r\n contactSuffix;\r\n\r\n const customerId = 1; // todo: DEPOT 1 - update to support multi depot\r\n this.reminderService.CreatePurchaseNoteReminder(\r\n this.purchaseNoteId,\r\n supplier.Name + contactSuffix,\r\n this.getPurchaseNoteTypeText() + \" \" + this.purchaseNote.PurchaseNoteNo,\r\n customerId);\r\n });\r\n }\r\n\r\n public NewMessage(): void {\r\n const reference = `${this.getPurchaseNoteTypeText()} ${this.purchaseNote.PurchaseNoteNo}`;\r\n this.messageService.SetNewMessageParameters(0, MessageTypes.RefMessage, false, MessageDocTypeIds.PurchaseNote, this.purchaseNoteId, reference);\r\n this.router.navigate([\"messages/newmessage\"]);\r\n }\r\n\r\n public Delete(): void {\r\n this.showDeleteConfirmation = true;\r\n }\r\n\r\n public ConfirmedDelete(confirmed: boolean): void {\r\n if (confirmed) {\r\n const func = this.purchaseNoteService.Delete(this.purchaseNoteId);\r\n this.formMessageService.RegisterObservable(func, this.formName).subscribe((result: boolean) => {\r\n if (result) {\r\n this.router.navigate([\"/purchase-notes\", \"list\"]);\r\n }\r\n });\r\n }\r\n\r\n this.showDeleteConfirmation = false;\r\n }\r\n\r\n public Query(): void {\r\n this.showQueryConfirmation = true;\r\n }\r\n\r\n public OnQueryConfirmed(queryConfirmed: boolean): void {\r\n if (queryConfirmed) {\r\n this.purchaseNote.Status = PurchaseNoteStatus.Queried;\r\n this.Save();\r\n }\r\n\r\n this.showQueryConfirmation = false;\r\n }\r\n\r\n public Commit(): void {\r\n this.PerformSave().then(() => {\r\n if (this.matchedOnOther) {\r\n this.showMatchedOnOtherPopup = true;\r\n } else {\r\n this.PerformCommit();\r\n }\r\n });\r\n }\r\n\r\n public ConfirmedMatchedOnOther(confirmed: boolean) {\r\n this.showMatchedOnOtherPopup = false;\r\n if (confirmed) {\r\n this.PerformCommit();\r\n }\r\n }\r\n\r\n public PerformCommit() {\r\n this.isLoading = true;\r\n\r\n const func = this.purchaseNoteService.Commit(this.purchaseNote.PurchaseNoteId);\r\n this.formMessageService.RegisterObservable(func, this.formName).subscribe((result) => {\r\n this.SetPurchaseNote(result);\r\n this.isLoading = false;\r\n }, () => this.isLoading = false);\r\n }\r\n\r\n public Dismiss(): void {\r\n if (this.purchaseNote.PurchaseNoteId) {\r\n this.router.navigate([\"/purchase-notes\", \"detail\", this.purchaseNote.PurchaseNoteId]);\r\n } else {\r\n this.router.navigate([\"/purchase-notes\", \"list\"]);\r\n }\r\n }\r\n\r\n public Validate(): void {\r\n if (this.purchaseNote.PurchaseNoteNo) {\r\n const purchaseNoteId = this.isNew ? 0 : this.purchaseNote.PurchaseNoteId;\r\n this.purchaseNoteService.PurchaseNoteNumberDuplicated(purchaseNoteId, this.purchaseNote).subscribe(duplicated => {\r\n if (duplicated) {\r\n this.form.form.controls[\"purchase-notes.detail.purchase-invoice\"].markAsDirty();\r\n this.form.form.controls[\"purchase-notes.detail.purchase-invoice\"].setErrors({ duplicatedPurchaseNoteNo: true });\r\n } else {\r\n this.form.form.controls[\"purchase-notes.detail.purchase-invoice\"].setErrors(null);\r\n }\r\n });\r\n }\r\n }\r\n\r\n public NavigateNext(): void {\r\n if (this.CanNavigateNext) {\r\n this.purchaseNoteService.GetNextId().then(nextId => {\r\n this.router.navigate([\"purchase-notes\", \"detail\", nextId]);\r\n });\r\n }\r\n }\r\n\r\n public currencyChanged(currencyChanged: CurrencyModel): void {\r\n this.currencyModel = currencyChanged;\r\n }\r\n\r\n public supplierChanged(_supplierId: number): void {\r\n this.Validate();\r\n }\r\n\r\n public NavigatePrevious(): void {\r\n if (this.CanNavigatePrevious) {\r\n this.purchaseNoteService.GetPreviousId().then(previousId => {\r\n this.router.navigate([\"purchase-notes\", \"detail\", previousId]);\r\n });\r\n }\r\n }\r\n\r\n private SetPurchaseNote(purchaseNote: PurchaseNote): void {\r\n const suplierTaxCodeId = this.purchaseNote.SupplierTaxCodeId;\r\n this.purchaseNote = purchaseNote;\r\n this.purchaseNote.SupplierTaxCodeId = suplierTaxCodeId;\r\n this.setPurchaseNoteFormTextVariant();\r\n this.recalculateDatesOnLoad();\r\n this.SetCurrentItem(this.purchaseNote.PurchaseNoteId);\r\n }\r\n\r\n private SetCurrentItem(id: number) {\r\n if (this.IsRecordNavigationEnabled) {\r\n this.purchaseNoteService.SetCurrentItem(id).then(() => {\r\n this.CanNavigatePrevious = this.purchaseNoteService.IsPreviousAvailable();\r\n this.CanNavigateNext = this.purchaseNoteService.IsNextAvailable();\r\n });\r\n }\r\n }\r\n\r\n private recalculateDatesOnSave(): void {\r\n this.purchaseNote.DueDate = this.dateOnlyService.RecalculateDateOnSave(this.purchaseNote.DueDateUI);\r\n this.purchaseNote.InvoiceDate = this.dateOnlyService.RecalculateDateOnSave(this.purchaseNote.InvoiceDateUI);\r\n this.purchaseNote.CommittedDate = this.dateOnlyService.RecalculateDateOnSave(this.purchaseNote.CommittedDateUI);\r\n }\r\n\r\n private recalculateDatesOnLoad(): void {\r\n this.purchaseNote.DueDateUI = this.dateOnlyService.RecalculateDateOnLoad(this.purchaseNote.DueDate);\r\n this.purchaseNote.InvoiceDateUI = this.dateOnlyService.RecalculateDateOnLoad(this.purchaseNote.InvoiceDate);\r\n this.purchaseNote.CommittedDateUI = this.dateOnlyService.RecalculateDateOnLoad(this.purchaseNote.CommittedDate);\r\n }\r\n\r\n private setPurchaseNoteFormTextVariant(): void {\r\n this.purchaseNoteTextVariant = this.purchaseNoteService.SetPurchaseNoteFormTextVariant(this.purchaseNote.PurchaseNoteTypeId);\r\n }\r\n\r\n private getPurchaseNoteTypeText(): string {\r\n if (this.purchaseNote &&\r\n this.purchaseNote.PurchaseNoteTypeId &&\r\n this.purchaseNote.PurchaseNoteTypeId === PurchaseNoteType.Credit) {\r\n return this.translateService.instant(\"purchase-note.reminder.link.type.credit\");\r\n }\r\n\r\n return this.translateService.instant(\"purchase-note.reminder.link.type.invoice\");\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { PurchaseNoteType } from \"../enums/purchase-note-type.enum\";\r\n\r\n@Pipe({\r\n name: \"purchaseNoteType\"\r\n})\r\nexport class PurchaseNoteTypePipe implements PipeTransform {\r\n\r\n private readonly purchaseNoteType = {\r\n [PurchaseNoteType.Invoice]: \"purchase-notes.type.invoice\",\r\n [PurchaseNoteType.Credit]: \"purchase-notes.type.credit\"\r\n };\r\n\r\n private readonly stringValueMapping = {\r\n Invoice: PurchaseNoteType.Invoice,\r\n Credit: PurchaseNoteType.Credit\r\n };\r\n\r\n public transform(value: PurchaseNoteType | number): string {\r\n let safeValue = Number(value);\r\n if (isNaN(safeValue)) {\r\n safeValue = this.stringValueMapping[value];\r\n }\r\n\r\n return this.purchaseNoteType[safeValue];\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'purchase-notes.list.title' | translate}}

\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n {{ data.value | customDate: 'shortDate' }}\r\n
\r\n\r\n
\r\n {{ data.value | purchaseNoteType | translate }}\r\n
\r\n\r\n
\r\n
\r\n {{ data.value | purchaseNotesStatus | translate }}\r\n
\r\n
\r\n\r\n
\r\n {{ data.value | customCurrency: data.data.SupplierCurrencyCode }}\r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n
\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DomSanitizer, SafeResourceUrl } from \"@angular/platform-browser\";\r\nimport { Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { EdmLiteral } from \"devextreme/data/odata/utils\";\r\nimport {\r\n GridExportService,\r\n GridKind,\r\n GridService,\r\n Module,\r\n ModuleService,\r\n PermissionsService,\r\n UICustomisation,\r\n UserReferenceService\r\n} from \"servicesight-shared\";\r\nimport { PurchaseNoteService } from \"./../services/purchase-note.service\";\r\nimport { PurchaseNoteType } from \"../enums/purchase-note-type.enum\";\r\n\r\n@Component({\r\n selector: \"app-purchase-notes-list\",\r\n templateUrl: \"./purchase-notes-list.component.html\",\r\n styleUrls: [\"./purchase-notes-list.component.scss\"]\r\n})\r\nexport class PurchaseNotesListComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n\r\n public SearchText: string = \"\";\r\n public hasCreatePermission: boolean;\r\n public purchaseNotesDataSource: DataSource;\r\n public purchaseNoteType = PurchaseNoteType;\r\n\r\n private gridState: any = { };\r\n\r\n public userRef1Label: string = null;\r\n public userRef2Label: string = null;\r\n public isProEnabled: boolean = false;\r\n\r\n public exportOptions: { id: number; label: string }[] = [\r\n { id: 1, label: \"Export data as xlsx\" },\r\n { id: 2, label: \"Export data as csv\" },\r\n { id: 3, label: \"Export data as pdf\" }\r\n ];\r\n\r\n public purchaseNotesStatuses: string[] = [];\r\n public purchaseNotesTypes: { id: number; value: string }[] = [];\r\n\r\n public filterSelected: number | string = 0;\r\n public filters: any = {\r\n 0: [],\r\n 1: [\"Status\", \"=\", new EdmLiteral(\"PurchaseOrders.Enums.PurchaseNoteStatus'Pending'\")],\r\n 2: [\"Status\", \"=\", new EdmLiteral(\"PurchaseOrders.Enums.PurchaseNoteStatus'Queried'\")],\r\n 3: [\"Status\", \"=\", new EdmLiteral(\"PurchaseOrders.Enums.PurchaseNoteStatus'Committed'\")]\r\n };\r\n\r\n constructor(\r\n private gridService: GridService,\r\n private permissionService: PermissionsService,\r\n private userRefsService: UserReferenceService,\r\n private sanitizer: DomSanitizer,\r\n private purchaseNoteService: PurchaseNoteService,\r\n protected translator: TranslateService,\r\n private router: Router,\r\n private gridExportService: GridExportService,\r\n private moduleService: ModuleService) {\r\n this.purchaseNoteTypeDisplayValue = this.purchaseNoteTypeDisplayValue.bind(this);\r\n this.CalculateSearchFilterForStatus = this.CalculateSearchFilterForStatus.bind(this);\r\n this.CalculateSearchFilterForPurchaseNoteType = this.CalculateSearchFilterForPurchaseNoteType.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.GetUserReferences();\r\n this.permissionService.CurrentUserHasPermission(\"PurchaseNoteAdd\")\r\n .subscribe(x => this.hasCreatePermission = x);\r\n\r\n this.gridService.GetLayout(GridKind.PurchaseNotes).subscribe(value => {\r\n if (value) {\r\n this.gridState = value;\r\n this.dataGrid.instance.state(value);\r\n }\r\n this.SetDataSources();\r\n });\r\n\r\n this.moduleService.GetEnabledModules().subscribe(enabledModules => {\r\n this.isProEnabled = enabledModules.includes(Module.Pro);\r\n });\r\n\r\n this.translator.get([\r\n \"purchase-notes.status.pending\",\r\n \"purchase-notes.status.queried\",\r\n \"purchase-notes.status.committed\",\r\n \"purchase-notes.type.invoice\",\r\n \"purchase-notes.type.credit\"\r\n ]).subscribe(value => {\r\n this.purchaseNotesStatuses = [\r\n value[\"purchase-notes.status.pending\"],\r\n value[\"purchase-notes.status.queried\"],\r\n value[\"purchase-notes.status.committed\"]\r\n ];\r\n\r\n this.purchaseNotesTypes = [\r\n { id: PurchaseNoteType.Invoice, value: value[\"purchase-notes.type.invoice\"] },\r\n { id: PurchaseNoteType.Credit, value: value[\"purchase-notes.type.credit\"] }\r\n ];\r\n });\r\n }\r\n\r\n public GetImage(data: any): SafeResourceUrl {\r\n if (!data.value) {\r\n // eslint-disable-next-line max-len\r\n data.value = \"iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAIAAACRXR/mAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAd8SURBVFhH7VZ7UFTXGb/nPhZYsbIsDxNpOxlcpSjasVqQxEd8jA0+iRZLoHmQlrAgWFunphk0VowY46szWtOUaaeJkziGFYKCCe2IdZWXgrVtggi2migIu+zyuOzr3nNvv3P38ljzgLVpkz/2N8tw73e/832/853vcZAsy9TXD7T6/2uGAC1/EKDlDwK0/EGAlj8I0PIHnzETBUH4Egclx3EIIfVl3Lif1rVr//jZLwo9okwjhpJVexhRkvI0WtX7iZEpWlblmFZtyUhSdCVK8qSlrtmSn+cvs/tpFe87ZCo7K0k0IpzAI5iTZSSDnyEmw/rEFaxXpPAPVoDa8FeSHrLk/ubD4RWmEwzDeKXjxP20dhW/duq9qripsbkvZMEWfb59EUYUlSdCteV62+slf5rykL6i9J3/ltavgVZF5cbUNS/98ueq6EFR39iUu/lXoaEhaamrGYYFvkpkwZ3McfS6tSsjIyNU1U/Bh5bH4ynad6C88oMfrl21bUu+smnyFdKWpv2u2YbGZmPBS4imaCSCE/BEUyxCLBy3JAtLHk/eu3vH5+XcCK3mq1d37Npt6x/kHS6OYSeFhiKKRB4hceGCpMIXt/nLrOFyszG/kJLpuLgYmgb3mAWGFMMPOm/euq0N1ZYcOxA3fZqq7YsRWsfffvvo70oEDO/gn2YRg5VnRIkhWvrs6TJtiNarOU7AIb6QV+hyCGZzmU43EQx5K8huH0zPfNZqs61YvviVou2qti9GaDmdzpbWVlki76NSnZxjdHRUTMwUVTBu1Ddcyc7b7nGiC+YTk3ShHBq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zYiPZ1mmrb0dXD3946eMOVmwa7gRbMx8vsNimTTxG9+aMhkiC5y6LLZ73d2OgT7S5UeDYznI6857lnvdfRiqEfqJJGNRXvDYfEhJSJaJ2gkzZs6uq21sbW2/fr2N0FJTAwKvBhlu2JjCpMAoxHKathvtiIYDRzw/mDQ/CaSgqp0QkjBrZuc5c2+/kx/4Fw31JmFoXfAArev+aFms1vcqKj1uLJPuJzs9ztLyKo9bykhfnZ+XDTG22/s3pj3t4F0zZ8bNmztbkkR1JfhSLIFXALk9k7on1y14FbHwrum0w+WGE9y2NY+lka13IO2p5+x9g4bY2EXJc73r4CYGD1NjHxm7nb564MjJU2coJCxZulCv0/+1xmzt6tGGBJW88RuDYaqqNBbAy/ade85Wn5cQ/Why4iPfjqmrrWttaw8PjzxyaE/CjDhVbwhj0+rpsW3a8mLrzZsCFkA7mAtGWN6U+3xm5o/GqERf9Pb2bSvc1fz3FjJmRIGhqWCNJuvZDPipGqMwNi1Ab1+fqfx01fvV3RbLY4mJq1b+IHl+ol+cvBjg+bLyquq/nL/98a05303ISE+bN3fOZ9oZFy0vRGiIsgQz6wEIjQaGxoAxx32RHT9o/T8x5gD5ahCg5Q8CtPxBgJY/CNDyBwFa4wdF/QfZAQjMeRYiMwAAAABJRU5ErkJggg==\";\r\n }\r\n return this.sanitizer.bypassSecurityTrustResourceUrl(\"data:image/bmp;charset=utf-8;base64,\" + data.value);\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public FilterChanged($event): void {\r\n this.filterSelected = $event.currentTarget.value;\r\n this.SetFilter();\r\n }\r\n\r\n public SaveLayout(): void {\r\n const state = this.dataGrid.instance.state();\r\n this.gridService.SaveLayout(state, GridKind.PurchaseNotes);\r\n }\r\n\r\n public ResetLayout(): void {\r\n this.gridService.ResetLayout(GridKind.PurchaseNotes);\r\n this.dataGrid.instance.state(null);\r\n this.gridState = null;\r\n }\r\n\r\n public OpenColumnChooser(): void {\r\n this.dataGrid.instance.showColumnChooser();\r\n }\r\n\r\n public OnExportItemClick(e: any): void {\r\n const title = this.translator.instant(\"purchase-notes.list.title.export\");\r\n switch (e.itemData.id) {\r\n case 1:\r\n this.gridExportService.exportGridAsXlsx(this.dataGrid.instance, title, this.purchaseNoteCustomCellFunction);\r\n break;\r\n case 2:\r\n this.gridExportService.exportGridAsCsv(this.dataGrid.instance, title, this.purchaseNoteCustomCellFunction);\r\n break;\r\n case 3:\r\n this.gridExportService.exportGridAsPdf(this.dataGrid.instance, title, { orientation: \"l\" });\r\n break;\r\n default:\r\n throw new Error(\"Unhandled export type: \" + e.itemData.id);\r\n }\r\n }\r\n\r\n public ColumnVisible(name: string, defaultValue: boolean): boolean {\r\n if (this.gridState && this.gridState.columns) {\r\n const column = this.gridState.columns.find(x => x.name === name);\r\n\r\n if (column) {\r\n return column.visible;\r\n }\r\n }\r\n\r\n return defaultValue;\r\n }\r\n\r\n public ViewDetails(event: any): void {\r\n if (event.data){\r\n this.router.navigate([\"/purchase-notes/detail\", event.data.PurchaseNoteId]);\r\n }\r\n }\r\n\r\n public SetFilter(): void {\r\n if (this.filterSelected === 0 || this.filterSelected === \"0\") {\r\n this.dataGrid.instance.clearFilter();\r\n } else {\r\n this.dataGrid.instance.filter(this.filters[this.filterSelected]);\r\n }\r\n }\r\n\r\n public NewPurchaseNote(type: PurchaseNoteType): void {\r\n this.router.navigate([ \"/purchase-notes/detail\", 0], { queryParams: { type } });\r\n }\r\n\r\n public CalculateSearchFilterForPurchaseNoteType(filterValue: string, selectedFilterOperation: string, target: string) {\r\n return this.CalculateSearchFilter(\"PurchaseNoteTypeId\", filterValue, selectedFilterOperation, target);\r\n }\r\n\r\n public CalculateSearchFilterForStatus(filterValue: string, selectedFilterOperation: string, target: string) {\r\n return this.CalculateSearchFilter(\"Status\", filterValue, selectedFilterOperation, target);\r\n }\r\n\r\n public purchaseNoteTypeDisplayValue(rowData: any): string {\r\n return this.GetPurchaseNoteTypeDisplayValue(rowData.PurchaseNoteTypeId);\r\n }\r\n\r\n public SetLookupsDataSources(e: any): void {\r\n if(e.dataField === \"Status\" && e.parentType === \"filterRow\") {\r\n e.editorOptions.dataSource = this.purchaseNotesStatuses;\r\n }\r\n\r\n if(e.dataField === \"PurchaseNoteTypeId\" && e.parentType === \"filterRow\") {\r\n e.editorOptions.dataSource = this.purchaseNotesTypes;\r\n }\r\n }\r\n\r\n private SetDataSources(): void {\r\n this.purchaseNotesDataSource = this.purchaseNoteService.GetDataSource();\r\n }\r\n\r\n private GetUserReferences(): void {\r\n this.userRef1Label = this.userRefsService.getLabel(UICustomisation.PURCHASE_NOTE_1);\r\n this.userRef2Label = this.userRefsService.getLabel(UICustomisation.PURCHASE_NOTE_2);\r\n }\r\n\r\n private purchaseNoteCustomCellFunction = ({ gridCell, excelCell }): void => {\r\n if (gridCell.rowType === \"data\" && gridCell.value) {\r\n if (gridCell.column.dataField === \"PurchaseNoteTypeId\") {\r\n excelCell.value = this.GetPurchaseNoteTypeDisplayValue(gridCell.data.PurchaseNoteTypeId);\r\n }\r\n }\r\n };\r\n\r\n private GetPurchaseNoteTypeDisplayValue(typeId: number): string {\r\n switch (typeId) {\r\n case PurchaseNoteType.Credit:\r\n return this.translator.instant(\"purchase-notes.type.credit\");\r\n case PurchaseNoteType.Invoice:\r\n return this.translator.instant(\"purchase-notes.type.invoice\");\r\n default:\r\n return \"Unknown type\";\r\n }\r\n }\r\n\r\n private CalculateSearchFilter(column: string, filterValue: string, selectedFilterOperation: string, target: string) {\r\n if (target === \"search\") {\r\n return [\r\n new EdmLiteral(`cast(${column}, 'Edm.String')`),\r\n \"contains\",\r\n `${filterValue}`,\r\n ];\r\n }\r\n\r\n return selectedFilterOperation\r\n ? [column, selectedFilterOperation, filterValue]\r\n : null;\r\n }\r\n\r\n protected ClearSearchText(): void {\r\n this.SearchText = \"\";\r\n this.SearchTextChanged();\r\n }\r\n}\r\n","import { NgModule } from \"@angular/core\";\r\nimport { Routes, RouterModule } from \"@angular/router\";\r\nimport { PurchaseNoteComponent } from \"./purchase-note/purchase-note.component\";\r\nimport { PurchaseNotesListComponent } from \"./purchase-notes-list/purchase-notes-list.component\";\r\n\r\nconst routes: Routes = [\r\n { path: \"detail/:id\", component: PurchaseNoteComponent },\r\n { path: \"list\", component: PurchaseNotesListComponent },\r\n { path: \"\", redirectTo: \"list\", pathMatch: \"full\" },\r\n { path: \"**\", redirectTo: \"list\" }\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\n\r\nexport class PurchaseNotesRoutingModule {\r\n public static readonly Routes: Routes = routes;\r\n}\r\n","import { Component, OnInit } from \"@angular/core\";\r\n\r\n@Component({\r\n selector: \"app-dashboard\",\r\n templateUrl: \"./dashboard.component.html\",\r\n styleUrls: [\"./dashboard.component.scss\"]\r\n})\r\nexport class DashboardComponent implements OnInit {\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

{{ 'helpdesk.dashboard.title' | translate }}

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n 90%\r\n \r\n
\r\n

Test

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n 90%\r\n \r\n
\r\n

Test

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n 90%\r\n \r\n
\r\n

Test

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n 90%\r\n \r\n
\r\n

Test

\r\n
\r\n
\r\n
\r\n
\r\n
","import { Component } from \"@angular/core\";\r\n\r\n@Component({\r\n selector: \"app-ticket\",\r\n templateUrl: \"./ticket.component.html\",\r\n styleUrls: [\"./ticket.component.scss\"]\r\n})\r\nexport class TicketComponent {\r\n\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

{{ 'helpdesk.tickets.title' | translate }}

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

Assigned to me (1)

\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n 2809 Some title\r\n
\r\n
\r\n Customer name\r\n
\r\n
\r\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean sed elementum ipsum. Nulla efficitur, dui eget sodales finibus, augue risus tempus orci, vitae mollis lectus dolor in diam. Vivamus id urna egestas, placerat neque tempus, pellentesque massa.\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

Overdue (5)

\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n {{ item }} Some title\r\n
\r\n
\r\n Customer name\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

Due today (10)

\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n {{ item }} Some title\r\n
\r\n
\r\n Customer name\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

Due this week or later (50)

\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n {{ item }} Some title\r\n
\r\n
\r\n Customer name\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
","

ticket works!

\r\n","import { Component, OnInit } from \"@angular/core\";\r\n\r\n@Component({\r\n selector: \"app-tickets\",\r\n templateUrl: \"./tickets.component.html\",\r\n styleUrls: [\"./tickets.component.scss\"]\r\n})\r\nexport class TicketsComponent implements OnInit {\r\n\r\n public overdue: any[] = [];\r\n public today: any[] = [];\r\n public future: any[] = [];\r\n\r\n constructor() { }\r\n\r\n public ngOnInit(): void {\r\n let index = 0;\r\n for (let x = 2810; x <= 2875; x++) {\r\n if (index < 5) {\r\n this.overdue.push(x);\r\n } else if (index < 15) {\r\n this.today.push(x);\r\n } else {\r\n this.future.push(x);\r\n }\r\n index++;\r\n }\r\n }\r\n}\r\n","import { NgModule } from \"@angular/core\";\r\nimport { RouterModule, Routes } from \"@angular/router\";\r\nimport { DashboardComponent } from \"./components/dashboard/dashboard.component\";\r\nimport { TicketComponent } from \"./components/ticket/ticket.component\";\r\nimport { TicketsComponent } from \"./components/tickets/tickets.component\";\r\n\r\n\r\nconst routes: Routes = [\r\n { path: \"dashboard\", component: DashboardComponent },\r\n { path: \"list\", component: TicketsComponent },\r\n { path: \"detail/:id\", component: TicketComponent },\r\n { path: \"\", redirectTo: \"list\", pathMatch: \"full\" },\r\n { path: \"**\", redirectTo: \"list\" }\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\n\r\nexport class HelpdeskRoutingModule {\r\n public static readonly Routes: Routes = routes;\r\n}\r\n","import { Component, Inject, OnInit } from \"@angular/core\";\r\nimport { ActivatedRoute } from \"@angular/router\";\r\nimport { combineLatest } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { AuthService } from \"../shared/services/auth/auth.service\";\r\n\r\n@Component({\r\n selector: \"app-external-sign-in\",\r\n templateUrl: \"./external-sign-in.component.html\",\r\n styleUrls: [\"./external-sign-in.component.scss\"]\r\n})\r\nexport class ExternalSignInComponent implements OnInit {\r\n\r\n constructor(\r\n private route: ActivatedRoute,\r\n private authService: AuthService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) { }\r\n\r\n public ngOnInit(): void {\r\n combineLatest([this.route.params, this.route.queryParams]).subscribe(([params, queryParams]) => {\r\n if (params.provider === \"xero\") {\r\n if (queryParams.token) {\r\n this.authService.XeroSignIn(queryParams.token, queryParams.verificationCode).subscribe(result => {\r\n if (result) {\r\n window.location.href = \"/#/\";\r\n } else {\r\n window.location.href = \"/#/login\";\r\n }\r\n });\r\n } else {\r\n window.location.href = this.appConfig.apiLocations.ServiceSight + \"AccountsLink/XeroSignIn\";\r\n }\r\n } else {\r\n alert(\"Unknown provider: \" + params.provider);\r\n }\r\n });\r\n }\r\n}\r\n","

If you are not redirected within 5 seconds click here.

","import { NgModule } from \"@angular/core\";\r\nimport { RouterModule, Routes, UrlHandlingStrategy } from \"@angular/router\";\r\nimport { CreditNotesRoutingModule } from \"./credit-notes/credit-notes-routing.module\";\r\nimport { DespatchNotesRoutingModule } from \"./despatch-notes/despatch-notes-routing.module\";\r\nimport { EquipmentRoutingModule } from \"./equipment/equipment-routing.module\";\r\nimport { FGasRoutingModule } from \"./f-gas/f-gas-routing.module\";\r\nimport { GoodsReceivedRoutingModule } from \"./goods-received/goods-received-routing.module\";\r\nimport { InspectionsRoutingModule } from \"./inspections/inspections-routing.module\";\r\nimport { InvoicesRoutingModule } from \"./invoices/invoices-routing.module\";\r\nimport { JobRoutingModule } from \"./jobs/job-routing.module\";\r\nimport { MessagesRoutingModule } from \"./messages/messages-routing.module\";\r\nimport { MySettingsRoutingModule } from \"./my-settings/my-settings.routing.module\";\r\nimport { Ng1Ng2UrlHandlingStrategy } from \"./ng1-ng2-url-handling-strategy\";\r\nimport { PlannerRoutingModule } from \"./planner/planner-routing.module\";\r\nimport { PlannerShellComponent } from \"./planner/planner-shell/planner-shell.component\";\r\nimport { PortalRoutingModule } from \"./portal/portal-routing.module\";\r\nimport { PowerBiDashboardComponent } from \"./power-bi/components/power-bi-dashboard/power-bi-dashboard.component\";\r\nimport { PowerBiRoutingModule } from \"./power-bi/power-bi-routing.module\";\r\nimport { PurchaseOrdersRoutingModule } from \"./purchase-orders/purchase-orders-routing.module\";\r\nimport { Quotes2RoutingModule } from \"./quotes2/quotes2-routing.module\";\r\nimport { ReturnsNoteRoutingModule } from \"./returns-note/returns-note-routing.module\";\r\nimport { SalesCampaignsRoutingModule } from \"./sales-campaigns/sales-campaigns-routing.module\";\r\nimport { SalesOpportunityRoutingModule } from \"./sales-opportunity/sales-opportunity-routing.module\";\r\nimport { SalesOrdersRoutingModule } from \"./sales-orders/sales-orders-routing.module\";\r\nimport { ServiceContractsRoutingModule } from \"./service-contracts/service-contracts-routing.module\";\r\nimport { EmptyComponentComponent } from \"./shared/empty-component/empty-component.component\";\r\nimport { StockRoutingModule } from \"./stock/stock-routing.module\";\r\nimport { SuppliersRoutingModule } from \"./suppliers/suppliers-routing.module\";\r\nimport { SurveysRoutingModule } from \"./surveys/surveys-routing.module\";\r\nimport { PurchaseNotesRoutingModule } from \"./purchase-notes/purchase-notes-routing.module\";\r\nimport { HelpdeskRoutingModule } from \"./helpdesk/helpdesk-routing.module\";\r\nimport { ExternalSignInComponent } from \"./external-sign-in/external-sign-in.component\";\r\n\r\nconst routes: Routes = [\r\n { path: \"inspections\", children: InspectionsRoutingModule.Routes },\r\n { path: \"helpdesk\", children: HelpdeskRoutingModule.Routes },\r\n { path: \"quotes\", children: Quotes2RoutingModule.Routes },\r\n { path: \"stock\", children: StockRoutingModule.Routes },\r\n { path: \"messages\", children: MessagesRoutingModule.Routes },\r\n { path: \"portal\", children: PortalRoutingModule.Routes },\r\n { path: \"equipment\", children: EquipmentRoutingModule.Routes },\r\n { path: \"jobs\", children: JobRoutingModule.Routes },\r\n { path: \"contracts\", children: ServiceContractsRoutingModule.Routes },\r\n { path: \"suppliers\", children: SuppliersRoutingModule.Routes },\r\n { path: \"purchase-orders\", children: PurchaseOrdersRoutingModule.Routes },\r\n { path: \"f-gas\", children: FGasRoutingModule.Routes },\r\n { path: \"goods-received\", children: GoodsReceivedRoutingModule.Routes },\r\n { path: \"returns\", children: ReturnsNoteRoutingModule.Routes },\r\n { path: \"purchase-notes\", children: PurchaseNotesRoutingModule.Routes },\r\n { path: \"planner\", component: PlannerShellComponent, children: PlannerRoutingModule.Routes },\r\n { path: \"insights\", component: PowerBiDashboardComponent, children: PowerBiRoutingModule.Routes },\r\n { path: \"credit-notes\", children: CreditNotesRoutingModule.Routes },\r\n { path: \"sales-orders\", children: SalesOrdersRoutingModule.Routes },\r\n { path: \"despatch-notes\", children: DespatchNotesRoutingModule.Routes },\r\n { path: \"sales-opportunities\", children: SalesOpportunityRoutingModule.Routes },\r\n { path: \"sales-campaigns\", children: SalesCampaignsRoutingModule.Routes },\r\n { path: \"mysettings\", children: MySettingsRoutingModule.Routes },\r\n { path: \"surveys\", children: SurveysRoutingModule.Routes },\r\n { path: \"invoices\", children: InvoicesRoutingModule.Routes },\r\n { path: \"customers/*\", component: EmptyComponentComponent },\r\n { path: \"tasks/*\", component: EmptyComponentComponent },\r\n { path: \"sign-in/:provider\", component: ExternalSignInComponent },\r\n { path: \"\", component: EmptyComponentComponent }, // --- Dashboard, blank route\r\n { path: \"**\", component: EmptyComponentComponent } // --- all other routes\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forRoot(routes, { useHash: true, onSameUrlNavigation: \"reload\" })],\r\n exports: [RouterModule],\r\n providers: [\r\n // Providing a custom url handling strategy to tell the Angular 2 router\r\n // which routes it is responsible for.\r\n { provide: UrlHandlingStrategy, useClass: Ng1Ng2UrlHandlingStrategy }\r\n ]\r\n})\r\nexport class AppRoutingModule {\r\n public static readonly Routes: Routes = routes;\r\n}\r\n","export enum WelcomeViews {\r\n GettingStarted = -1,\r\n DownloadApp = 0,\r\n LoginApp = 1,\r\n SignOff = 2,\r\n CompleteJob = 3,\r\n WellDone = 4,\r\n}\r\n","\r\n \r\n
\r\n

{{ 'welcome.title' | translate }}

\r\n
\r\n

{{ 'welcome.getstarted' | translate }}

\r\n

{{ 'welcome.getstarted.easystart' | translate }}

\r\n \r\n

{{ 'welcome.getstarted.foursteps' | translate }}

\r\n
\r\n\r\n -1 && currentStep < 4\" class=\"brdbtgrey app-wizard-step\">\r\n \r\n
\r\n

{{ 'welcome.step.download' | translate }}

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

{{ 'welcome.step.download.downloadHint' | translate }}

\r\n \r\n \"Get\r\n \r\n
\r\n
\r\n \r\n

{{ 'welcome.step.download.downloadHint' | translate }}

\r\n \r\n \"Download\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n

{{ 'welcome.step.accept' | translate }}

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

{{ 'welcome.step2.point1' | translate }}

\r\n

{{ 'welcome.step2.point2' | translate }}

\r\n

{{ 'welcome.step2.point3' | translate }}

\r\n

{{ 'welcome.step2.point4' | translate }}

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

{{ 'welcome.step.signoff' | translate }}

\r\n
\r\n
\r\n
\r\n {{ 'welcome.step3.syncprompt' | translate }}\r\n
\r\n

{{ 'welcome.step3.point1' | translate }}

\r\n

{{ 'welcome.step3.point2' | translate }}

\r\n

{{ 'welcome.step3.point3' | translate }}

\r\n

{{ 'welcome.step3.point4' | translate }}

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

{{ 'welcome.step.invoice' | translate }}

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

{{ 'welcome.end.welldone' | translate }}

\r\n
\r\n

{{ 'welcome.end.welldone.message' | translate }}

\r\n

{{ 'welcome.end.features' | translate }}

\r\n
\r\n
    \r\n
  • {{ 'welcome.end.quotations' | translate }}
  • \r\n
  • {{ 'welcome.end.database' | translate }}
  • \r\n
  • {{ 'welcome.end.plannerboard' | translate }}
  • \r\n
  • {{ 'welcome.end.gps' | translate }}
  • \r\n
  • {{ 'welcome.end.invoicing&payments' | translate }}
  • \r\n
  • {{ 'welcome.end.checklists' | translate }}
  • \r\n
\r\n \r\n
\r\n\r\n

{{ 'welcome.end.freeconsultancy' | translate }}

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

\r\n {{ 'welcome.end.starthere' | translate }}\r\n \r\n {{ 'welcome.end.here' | translate }}\r\n \r\n

\r\n

\r\n {{ 'welcome.end.consultancy' | translate }}\r\n {{ 'welcome.end.email' | translate }}\r\n {{ 'welcome.end.booksession' | translate }}\r\n

\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n","import { Location } from \"@angular/common\";\r\nimport { Component, ElementRef, OnInit, Renderer2, ViewChild } from \"@angular/core\";\r\nimport { JobDataService } from \"servicesight-shared\";\r\nimport { WelcomeStatus } from \"../../pipes/enums/welcome-status-enum\";\r\nimport { WelcomeViews } from \"../../pipes/enums/welcome-views-enum\";\r\nimport { WalkthoughService } from \"../../services/walkthough/walkthough.service\";\r\n\r\n@Component({\r\n selector: \"app-welcome\",\r\n templateUrl: \"./welcome.component.html\",\r\n styleUrls: [\"./welcome.component.scss\"]\r\n})\r\nexport class WelcomeComponent implements OnInit {\r\n @ViewChild(\"loginVideo\", { static: true }) loginVideo: ElementRef;\r\n @ViewChild(\"signOffVideo\", { static: true }) signOffVideo: ElementRef;\r\n\r\n private closingForCompleteJob: boolean = false;\r\n private jobIsReadyToComplete: boolean = false;\r\n\r\n public get showWelcomeDialog(): boolean {\r\n return this.walkthoughService.WelcomeIsShowing;\r\n }\r\n public set showWelcomeDialog(val) {\r\n this.walkthoughService.WelcomeIsShowing = val;\r\n }\r\n public readonly steps: Array = [\"welcome.step.download\", \"welcome.step.accept\", \"welcome.step.signoff\", \"welcome.step.invoice\"];\r\n public currentStep: number = WelcomeViews.GettingStarted;\r\n public showSyncMessage: boolean = false;\r\n public get nextButtonText(): string {\r\n switch (this.currentStep) {\r\n case WelcomeViews.GettingStarted:\r\n return \"buttons.getstarted\";\r\n case WelcomeViews.DownloadApp:\r\n case WelcomeViews.LoginApp:\r\n case WelcomeViews.SignOff:\r\n return \"buttons.next\";\r\n case WelcomeViews.CompleteJob:\r\n return \"buttons.complete\";\r\n default:\r\n return \"buttons.close\";\r\n }\r\n }\r\n\r\n constructor(\r\n private walkthoughService: WalkthoughService,\r\n private location: Location,\r\n private renderer: Renderer2,\r\n private jobDataService: JobDataService\r\n ) {\r\n walkthoughService.renderer = renderer;\r\n }\r\n\r\n ngOnInit() { }\r\n\r\n // eslint-disable-next-line\r\n ngOnDestroy() {\r\n this.renderer.removeClass(document.body, \"dialog-opened\");\r\n }\r\n\r\n public SkipWelcome(): void {\r\n this.showWelcomeDialog = false;\r\n this.renderer.removeClass(document.body, \"dialog-opened\");\r\n }\r\n\r\n public Next(): void {\r\n if (this.currentStep === WelcomeViews.SignOff && !this.jobIsReadyToComplete) {\r\n this.jobDataService.IsReadyToComplete(10000).subscribe(x => {\r\n this.jobIsReadyToComplete = x.Value;\r\n if (this.jobIsReadyToComplete) {\r\n this.currentStep = WelcomeViews.CompleteJob;\r\n this.showSyncMessage = false;\r\n this.Next();\r\n } else {\r\n // show \"make sure you have completed and synced job\" message \"\"\r\n this.showSyncMessage = true;\r\n }\r\n\r\n });\r\n return;\r\n }\r\n\r\n this.currentStep++;\r\n this.handleVideoStates();\r\n\r\n if (this.currentStep > WelcomeViews.WellDone) {\r\n this.showWelcomeDialog = false;\r\n this.renderer.removeClass(document.body, \"dialog-opened\");\r\n this.location.go(\"/\");\r\n } else if (this.currentStep === WelcomeViews.CompleteJob) {\r\n this.closingForCompleteJob = true;\r\n this.showWelcomeDialog = false;\r\n this.renderer.removeClass(document.body, \"dialog-opened\");\r\n location.href = \"#/jobs/job/10000\"; //This could be configurable\r\n this.walkthoughService.JobWalkthoughEnabled = true;\r\n this.walkthoughService.JobWalkthroughCompleted.subscribe((hasCompleted) => {\r\n if (hasCompleted) {\r\n this.Next();\r\n this.renderer.addClass(document.body, \"dialog-opened\");\r\n }\r\n });\r\n }\r\n }\r\n\r\n public Prev() {\r\n this.currentStep--;\r\n this.handleVideoStates();\r\n }\r\n\r\n public DialogClosed(): void {\r\n this.handleVideoStates(true);\r\n let status: WelcomeStatus;\r\n if (!this.closingForCompleteJob) {\r\n if (this.currentStep === WelcomeViews.GettingStarted) {\r\n status = WelcomeStatus.Skipped;\r\n } else if (this.currentStep === this.steps.length) {\r\n status = WelcomeStatus.Complete;\r\n } else {\r\n status = WelcomeStatus.StartedNotComplete;\r\n }\r\n this.walkthoughService.UpdateWelcomeStatus(status);\r\n } else {\r\n this.closingForCompleteJob = false;\r\n }\r\n }\r\n\r\n public handleVideoStates(skipped: boolean = false): void {\r\n if (skipped) {\r\n this.loginVideo.nativeElement.pause();\r\n this.signOffVideo.nativeElement.pause();\r\n } else {\r\n if (this.currentStep === WelcomeViews.LoginApp) {\r\n this.signOffVideo.nativeElement.pause();\r\n this.loginVideo.nativeElement.play();\r\n } else if (this.currentStep === WelcomeViews.SignOff) {\r\n this.loginVideo.nativeElement.pause();\r\n this.signOffVideo.nativeElement.play();\r\n } else {\r\n this.loginVideo.nativeElement.pause();\r\n this.signOffVideo.nativeElement.pause();\r\n }\r\n }\r\n }\r\n}\r\n","import { DOCUMENT } from \"@angular/common\";\r\nimport { Component, Inject, OnInit } from \"@angular/core\";\r\nimport { NavigationEnd, Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { WebAppConfig } from \"./shared/models/web-app-config.model\";\r\nimport { AuthService } from \"./shared/services/auth/auth.service\";\r\nimport { JstranslateService } from \"./shared/services/jstranslate/jstranslate.service\";\r\nimport { APP_CONFIG } from \"servicesight-shared\";\r\n\r\n// eslint-disable-next-line no-var\r\ndeclare var hj: any;\r\n\r\n@Component({\r\n selector: \"app-root\",\r\n templateUrl: \"./app.component.html\",\r\n styleUrls: [\"./app.component.scss\"]\r\n})\r\nexport class AppComponent implements OnInit {\r\n private hotjarDeployed: boolean = false;\r\n\r\n public constructor(\r\n translation: JstranslateService,\r\n translate: TranslateService,\r\n router: Router,\r\n authService: AuthService,\r\n @Inject(DOCUMENT) doc: any,\r\n @Inject(APP_CONFIG) config: WebAppConfig) {\r\n translation.SetupTranslation(translate);\r\n\r\n router.events.subscribe(event => {\r\n if (event instanceof NavigationEnd) {\r\n const anyWindow = window as any;\r\n if (authService.UniqueUserId) {\r\n anyWindow.Appcues.identify(authService.UniqueUserId);\r\n }\r\n\r\n anyWindow.Appcues.page();\r\n anyWindow.gtag(\"event\", \"page_view\", {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n page_location: event.url\r\n });\r\n\r\n if (typeof hj === \"function\") {\r\n hj(\"stateChange\", event.url);\r\n }\r\n }\r\n });\r\n\r\n authService.deployHotJar.subscribe(deploy => {\r\n if (deploy && !this.hotjarDeployed) {\r\n this.hotjarDeployed = true;\r\n const s = doc.createElement(\"script\");\r\n s.type = \"text/javascript\";\r\n s.innerHTML = \"(function(h,o,t,j,a,r){\"\r\n + \"h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};\"\r\n + \"h._hjSettings={hjid:\" + config.hotjar + \",hjsv:6};\"\r\n + \"a=o.getElementsByTagName('head')[0];\"\r\n + \"r=o.createElement('script');r.async=1;\"\r\n + \"r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;\"\r\n + \"a.appendChild(r);\"\r\n + \"})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');\";\r\n const head = doc.getElementsByTagName(\"head\")[0];\r\n head.appendChild(s);\r\n }\r\n });\r\n }\r\n\r\n public ngOnInit(): void {\r\n if (localStorage.getItem(\"compact-lists-enabled\") !== null) {\r\n document.getElementById(\"main\").classList.add(\"compact-lists\");\r\n }\r\n }\r\n}\r\n","\r\n\r\n","import { Component, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { ContactService, CustomerService, CustomerStatus, SettingId, SettingsService } from \"servicesight-shared\";\r\nimport { ContactStatus } from \"../../enums/contact-status.eum\";\r\nimport { Ng1ContactService } from \"../../services/ng1-contact.service\";\r\nimport { Ng1CustomerService } from \"../../services/ng1-customer.service\";\r\n\r\n@Component({\r\n selector: \"app-customer-contacts-select-box\",\r\n templateUrl: \"./customer-contacts-select-box.component.html\",\r\n styleUrls: [\"./customer-contacts-select-box.component.scss\"]\r\n})\r\nexport class CustomerContactsSelectBoxComponent implements OnInit {\r\n\r\n @Input() customerId: number;\r\n @Input() contactId: number;\r\n @Output() updateContact: EventEmitter = new EventEmitter();\r\n @Output() updateCustomer: EventEmitter = new EventEmitter();\r\n\r\n public customerDataSource: DataSource;\r\n public contactDataSource: DataSource;\r\n public hasManagingAgentEnabled: boolean = false;\r\n\r\n\r\n public constructor(\r\n private contactService: ContactService,\r\n private customerService: CustomerService,\r\n private settingService: SettingsService,\r\n private ngCustomerService: Ng1CustomerService,\r\n private ngContactService: Ng1ContactService\r\n ) {\r\n this.CustomerIdHasChanged = this.CustomerIdHasChanged.bind(this);\r\n this.ContactIdHasChanged = this.ContactIdHasChanged.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.settingService.getSetting(SettingId.CustomerManagingAgents).subscribe(isEnabled => {\r\n let filter: any[] = [ \"Status\", \"<>\", CustomerStatus.CLOSED ];\r\n this.hasManagingAgentEnabled = isEnabled.ValueBool;\r\n\r\n if (!isEnabled.ValueBool) {\r\n filter = [ filter, \"or\", [ \"Status\", \"<>\", CustomerStatus.MANAGING_AGENT ] ];\r\n }\r\n this.customerDataSource = this.customerService.GetCustomersDataSource();\r\n this.contactDataSource = this.contactService.GetContactsDataSource();\r\n this.customerDataSource.filter(filter);\r\n });\r\n }\r\n\r\n public CustomerHasChanged($event): void {\r\n if ($event && $event.value) {\r\n this.CustomerIdHasChanged($event.value);\r\n }\r\n }\r\n\r\n public ContactHasChanged($event): void {\r\n if ($event && $event.value) {\r\n this.ContactIdHasChanged($event.value);\r\n }\r\n }\r\n\r\n public NewCustomer(): void {\r\n this.ngCustomerService.openCustomerModal(\"customer\")\r\n .then(this.CustomerIdHasChanged);\r\n }\r\n\r\n public NewContact(): void {\r\n this.ngContactService.openContactModal(0, this.customerId)\r\n .then(this.ContactIdHasChanged);\r\n }\r\n\r\n private CustomerIdHasChanged(customerId: number): void {\r\n this.updateCustomer.emit(customerId);\r\n this.customerService.GetCustomerSimpleModel(this.customerId)\r\n .subscribe(customer => {\r\n const filter: any[] = [\r\n [\"CustomerId\", \"=\", customerId]\r\n ];\r\n\r\n if (this.hasManagingAgentEnabled && customer.ManagingAgentID) {\r\n filter.push(\"or\", [\"CustomerId\", \"=\", customer.ManagingAgentID]);\r\n }\r\n\r\n this.contactDataSource.filter([filter, \"and\", [ \"Status\", \"=\", ContactStatus.ACTIVE ]]);\r\n this.contactDataSource.reload().then(() => {\r\n if (this.contactDataSource.items().length === 1) {\r\n this.updateContact.emit(this.contactDataSource.items()[0].ContactId);\r\n }\r\n });\r\n });\r\n }\r\n\r\n private ContactIdHasChanged(contactId: number): void {\r\n this.updateContact.emit(contactId);\r\n }\r\n}\r\n","
\r\n + {{ 'label.new.customer' | translate }}\r\n \r\n \r\n \r\n
\r\n
\r\n + {{ 'label.new.contact' | translate }}\r\n \r\n \r\n \r\n
\r\n","
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n
\r\n\r\n \r\n {{'customer.history.reminder' | translate}} {{item.data.ElementId}} {{item.data.Date | date: \"short\"}}, {{item.data.ElementType}} - {{item.data.Status | taskStatus | translate}}\r\n \r\n\r\n \r\n {{'customer.history.message' | translate}} {{item.data.Date | date: \"short\"}}\r\n \r\n\r\n \r\n {{'customer.history.quote' | translate}} {{item.data.ElementId}}/{{item.data.SubElementId}} {{'customer.history.created' | translate}} {{item.data.Date | date: \"shortDate\"}}, {{'customer.history.due' | translate}} {{item.data.EndDate | date: \"shortDate\"}} {{item.data.Status | quoteStatus | translate}}\r\n \r\n\r\n \r\n {{'customer.history.service-contract' | translate}} {{item.data.ElementId}} {{item.data.Date | date: \"shortDate\"}} - {{item.data.EndDate | date: \"shortDate\"}} {{item.data.ElementType}} - {{ item.data.Status | serviceContractStatus | translate}}\r\n \r\n\r\n \r\n {{'customer.history.job' | translate}} {{item.data.ElementId}} {{item.data.Date | date: \"short\"}},\r\n {{item.data.ElementType}} {{'customer.history.at' | translate}} {{item.data.ElementText}} - {{item.data.Status | jobStatus | translate}}\r\n
\r\n 1\">{{item.data.AttachmentCount}} \r\n \r\n
\r\n
\r\n\r\n \r\n {{'customer.history.sales-order' | translate}} {{item.data.ElementId}} {{item.data.Date | date: \"shortDate\"}}\r\n \r\n \r\n \r\n \r\n \r\n {{'customer.history.for' | translate}} {{item.data.ElementText}} - {{item.data.Status | salesOrderStatus | translate}}\r\n \r\n\r\n \r\n {{'customer.history.despatch-note' | translate}} {{item.data.ElementId}} {{item.data.Date | date: \"shortDate\"}}\r\n \r\n \r\n \r\n \r\n \r\n {{'customer.history.to' | translate}} {{item.data.ElementText}} - {{item.data.Status | despatchNoteStatus | translate}}\r\n \r\n\r\n \r\n {{'customer.history.sales-invoice' | translate}} {{item.data.Link}} {{item.data.Date | date: \"shortDate\"}} {{item.data.CurrencySymbol}}{{item.data.ElementText}}\r\n \r\n\r\n \r\n {{'customer.history.credit' | translate}} {{item.data.ElementId}} {{item.data.Date | date: \"shortDate\"}} {{item.data.CurrencySymbol}}{{item.data.SalesValue}} {{'customer.history.re-invoice' | translate}} {{item.data.ElementText}}\r\n \r\n\r\n \r\n {{'customer.history.sales-opportunity' | translate}} {{item.data.ElementId}} {{'customer.history.created' | translate}} {{item.data.Date | date: \"shortDate\"}} , {{'customer.history.expected-close' | translate}} {{item.data.EndDate | date: \"shortDate\"}} {{ item.data.ElementText }} {{ item.data.Status | salesOpportunityStatus | translate }}\r\n \r\n\r\n

{{item.data.Date | date: \"shortDate\"}}

\r\n\r\n

\r\n {{'customer.history.for-job' | translate}} {{item.data.Description}}\r\n

\r\n
\r\n\r\n
\r\n","import { Component, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport ArrayStore from \"devextreme/data/array_store\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { CustomerService, DocumentTypeEnum } from \"servicesight-shared\";\r\nimport { LicenseService } from \"../../services/licence/license.service\";\r\n\r\n@Component({\r\n selector: \"app-customer-history\",\r\n templateUrl: \"./customer-history.component.html\",\r\n styleUrls: [\"./customer-history.component.scss\"]\r\n})\r\nexport class CustomerHistoryComponent implements OnInit, OnChanges {\r\n @Input() customerId: number;\r\n @Input() repaint: boolean = false;\r\n @ViewChild(\"historyDataGrid\") private dataGrid: DxDataGridComponent;\r\n\r\n public searchText: string = \"\";\r\n public historyDataSource: DataSource;\r\n public historyType = DocumentTypeEnum;\r\n public historyFilterTypes: DataSource;\r\n\r\n private readonly filterTypes = [\r\n {\r\n ID: DocumentTypeEnum.Reminder,\r\n name: this.translate.instant(\"customer.history.type.reminders\")\r\n },\r\n {\r\n ID: DocumentTypeEnum.Message,\r\n name: this.translate.instant(\"customer.history.type.messages\")\r\n },\r\n {\r\n ID: DocumentTypeEnum.Job,\r\n name: this.translate.instant(\"customer.history.type.jobs\")\r\n },\r\n {\r\n ID: DocumentTypeEnum.SalesInvoice,\r\n name: this.translate.instant(\"customer.history.type.sales-invoices\")\r\n },\r\n {\r\n ID: DocumentTypeEnum.Credit,\r\n name: this.translate.instant(\"customer.history.type.credits\")\r\n },\r\n {\r\n ID: DocumentTypeEnum.Quote,\r\n name: this.translate.instant(\"customer.history.type.quotes\")\r\n }\r\n ];\r\n\r\n constructor(\r\n private licenseService: LicenseService,\r\n private customerService: CustomerService,\r\n private translate: TranslateService) { }\r\n\r\n public ngOnInit(): void {\r\n this.SetFilters();\r\n\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(x => {\r\n if (x.ServiceContractsEnabled) {\r\n this.filterTypes.push({\r\n ID: DocumentTypeEnum.ServiceContract,\r\n name: this.translate.instant(\"customer.history.type.service-contracts\")\r\n });\r\n }\r\n if (x.SalesOpportunityEnabled) {\r\n this.filterTypes.push({\r\n ID: DocumentTypeEnum.SalesOpportunity,\r\n name: this.translate.instant(\"customer.history.type.sales-opportunities\")\r\n });\r\n }\r\n if (x.SalesOrderEnabled) {\r\n this.filterTypes.push({\r\n ID: DocumentTypeEnum.SalesOrder,\r\n name: this.translate.instant(\"customer.history.type.sales-orders\")\r\n });\r\n this.filterTypes.push({\r\n ID: DocumentTypeEnum.DespatchNote,\r\n name: this.translate.instant(\"customer.history.type.despatch-notes\")\r\n });\r\n }\r\n this.SetFilters();\r\n });\r\n }\r\n\r\n public RepaintGrid() {\r\n this.dataGrid.instance.repaint();\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.repaint && this.repaint) {\r\n this.RepaintGrid();\r\n this.repaint = false;\r\n }\r\n if (!this.historyDataSource && this.customerId > 0\r\n || changes.customerId && changes.customerId.currentValue !== changes.customerId.previousValue) {\r\n this.historyDataSource = this.customerService.GetCustomerHistory(this.customerId);\r\n }\r\n }\r\n\r\n public SearchByText() {\r\n this.dataGrid.instance.searchByText(encodeURI(this.searchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public FilterChanged(selectedFilters) {\r\n if (selectedFilters.length === 0) {\r\n this.dataGrid.instance.clearFilter();\r\n } else {\r\n const filter = [];\r\n selectedFilters.forEach(key => {\r\n filter.push([\"Type\", \"=\", key]);\r\n filter.push(\"or\");\r\n });\r\n filter.pop();\r\n this.dataGrid.instance.filter(filter);\r\n }\r\n this.SearchByText();\r\n }\r\n\r\n public SetFilters(): void {\r\n this.historyFilterTypes = new DataSource({\r\n store: new ArrayStore({\r\n data: this.filterTypes,\r\n key: \"ID\"\r\n })\r\n });\r\n }\r\n}\r\n","
\r\n \r\n
\r\n {{ data.nameTranslationKey | translate }}\r\n
\r\n \r\n \r\n
","import { Component, Input, OnInit } from \"@angular/core\";\r\nimport { HelpItemTagEnum, HelpService, SupportKnowledgeBaseResult } from \"servicesight-shared\";\r\nimport { DropdownItem } from \"../../models/dropdown-item.model\";\r\n\r\n@Component({\r\n selector: \"app-dropdown-button-with-help\",\r\n templateUrl: \"./dropdown-button-with-help.component.html\",\r\n styleUrls: [\"./dropdown-button-with-help.component.scss\"]\r\n})\r\nexport class DropdownButtonWithHelpComponent implements OnInit {\r\n\r\n @Input() public helpItemsTags: HelpItemTagEnum[];\r\n @Input() public labelTranslationKey: string;\r\n @Input() public dropdownItems: DropdownItem[];\r\n @Input() public action: (event: any) => void;\r\n\r\n private helpItems: SupportKnowledgeBaseResult[] = [];\r\n\r\n constructor(private helpService: HelpService) { }\r\n\r\n public ngOnInit(): void {\r\n if (this.helpItemsTags) {\r\n this.helpService.getItemsByTags(this.helpItemsTags).subscribe(x => this.helpItems = x);\r\n }\r\n }\r\n\r\n public openHelpWindow(): void {\r\n this.helpService.openHelpModal(this.helpItems);\r\n }\r\n}\r\n","\r\n \r\n\r\n","import { Component, Input, OnInit } from \"@angular/core\";\r\nimport { IDropdownOptions } from \"./model/IDropdownOptions\";\r\nimport { IDropdownSettings } from \"./model/IDropdownSettings\";\r\n\r\n@Component({\r\n selector: \"app-dropdown\",\r\n templateUrl: \"./dropdown.component.html\",\r\n styleUrls: [\"./dropdown.component.scss\"]\r\n})\r\nexport class DropdownComponent implements OnInit {\r\n\r\n @Input() options?: IDropdownOptions[] = [];\r\n @Input() settings?: IDropdownSettings;\r\n @Input() selectedValue: any = \"\";\r\n\r\n constructor() { }\r\n\r\n ngOnInit() { }\r\n\r\n}\r\n","
\r\n
\r\n {{ placeholder | translate }}{{fileName}}\r\n \r\n
\r\n \r\n \r\n
","import { AfterViewInit, Component, ElementRef, EventEmitter, Input, Output, ViewChild } from \"@angular/core\";\r\n\r\n@Component({\r\n selector: \"app-file-picker\",\r\n templateUrl: \"./file-picker.component.html\",\r\n})\r\n\r\nexport class FilePickerComponent implements AfterViewInit {\r\n @ViewChild(\"filePicker\") filePicker: ElementRef;\r\n @Output() public filesSelected = new EventEmitter();\r\n @Input() multiple = false;\r\n @Input() required = false;\r\n @Input() acceptedTypes: string[];\r\n\r\n public placeholder: string;\r\n public anyFileSelected = false;\r\n public fileName: string;\r\n\r\n ngAfterViewInit(): void {\r\n if (this.multiple) {\r\n this.filePicker.nativeElement.setAttribute(\"multiple\", \"\");\r\n }\r\n if (this.required) {\r\n this.filePicker.nativeElement.setAttribute(\"required\", \"\");\r\n }\r\n if (this.acceptedTypes) {\r\n this.filePicker.nativeElement.setAttribute(\"accept\", this.acceptedTypes);\r\n }\r\n this.placeholder = this.multiple ? \"settings.file-picker.placeholder.select-files\" : \"settings.file-picker.placeholder.select-file\";\r\n }\r\n\r\n openFilePicker(): void {\r\n if (this.filePicker) {\r\n this.filePicker.nativeElement.click();\r\n }\r\n }\r\n\r\n selectFiles(files): void {\r\n if(!files || !files.length) {\r\n return;\r\n }\r\n this.anyFileSelected = true;\r\n this.filesSelected.emit(files);\r\n this.fileName = this.multiple ? this.fileListToString(files) : files[0].name;\r\n }\r\n\r\n private fileListToString(files): string {\r\n let result = \"\";\r\n for (let i = 0; i < files.length; i++) {\r\n result += (i > 0 ? \",\" : \"\") + files[i].name;\r\n }\r\n return result;\r\n }\r\n}\r\n","import { Component, Input, OnInit } from \"@angular/core\";\r\nimport { HelpItemTagEnum, HelpService, SupportKnowledgeBaseResult } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-info-button\",\r\n templateUrl: \"./info-button.component.html\",\r\n styleUrls: [\"./info-button.component.scss\"]\r\n})\r\nexport class InfoButtonComponent implements OnInit {\r\n\r\n @Input() public size: string = \"44px\";\r\n @Input() public helpItemsTags: HelpItemTagEnum[];\r\n private helpItems: SupportKnowledgeBaseResult[] = [];\r\n\r\n constructor(private helpService: HelpService) { }\r\n\r\n public ngOnInit(): void {\r\n if (this.helpItemsTags) {\r\n this.helpService.getItemsByTags(this.helpItemsTags).subscribe(x => this.helpItems = x);\r\n }\r\n }\r\n\r\n public openHelpWindow(): void {\r\n this.helpService.openHelpModal(this.helpItems);\r\n }\r\n}\r\n","
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n

{{ 'auth.login' | translate }}

\r\n

{{ 'auth.support-login' | translate }}

\r\n\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
0\">\r\n
\r\n
{{ message }}
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n {{ versionInfo }}\r\n
\r\n
","","import { Component, Input, OnInit } from \"@angular/core\";\r\nimport { AuthService } from \"../../services/auth/auth.service\";\r\n\r\n@Component({\r\n selector: \"app-login\",\r\n templateUrl: \"./login.component.html\",\r\n styleUrls: [\"./login.component.scss\"]\r\n})\r\nexport class LoginComponent implements OnInit {\r\n @Input() public isSupportLogin: boolean = false;\r\n @Input() public message: string = \"\";\r\n\r\n public email: string = \"\";\r\n public password: string = \"\";\r\n public versionInfo: string = \"\";\r\n\r\n constructor(\r\n private authService: AuthService\r\n ) { }\r\n\r\n public ngOnInit(): void {\r\n this.authService.getVersionInfo().subscribe(versionInfo => {\r\n this.versionInfo = versionInfo.Summary;\r\n });\r\n }\r\n\r\n public login(): void {\r\n }\r\n\r\n}\r\n","import { Component, OnInit } from \"@angular/core\";\r\n\r\n@Component({\r\n selector: \"app-new-child-site\",\r\n templateUrl: \"./new-child-site.component.html\",\r\n styleUrls: [\"./new-child-site.component.scss\"]\r\n})\r\nexport class NewChildSiteComponent implements OnInit {\r\n\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n}\r\n","

\r\n new-child-site works!\r\n

\r\n","import { Component, OnInit } from \"@angular/core\";\r\nimport { ToasterService, ToastType } from \"servicesight-shared\";\r\nimport { NotificationsService } from \"../../services/notifications/notifications.service\";\r\n\r\n@Component({\r\n selector: \"app-notifications\",\r\n templateUrl: \"./notifications.component.html\",\r\n styleUrls: [\"./notifications.component.scss\"]\r\n})\r\nexport class NotificationsComponent implements OnInit {\r\n\r\n public newNotifications: boolean = false;\r\n public notificationsCount: number = 0;\r\n\r\n public get bellIcon(): string[] {\r\n const icon = [\"fas\"];\r\n\r\n if (this.newNotifications) {\r\n icon.push(\"fa-bell-on\");\r\n } else {\r\n icon.push(\"fa-bell\");\r\n }\r\n\r\n return icon;\r\n }\r\n\r\n constructor(\r\n private toasterService: ToasterService,\r\n private notificationsService: NotificationsService) {\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.notificationsService.GetNotifications().subscribe(notifications => {\r\n this.notificationsCount = notifications.Notifications.filter(x => !x.NotificationSeen).length;\r\n });\r\n\r\n this.notificationsService.newNotificationRecieved.subscribe(notification => {\r\n this.toasterService.pop(notification.Message, notification.ToastType ?? ToastType.light, 3000);\r\n this.notificationsCount = notification.Count;\r\n this.newNotifications = notification.Count > 0;\r\n });\r\n }\r\n\r\n}\r\n","
\r\n \r\n Notifications\r\n {{ notificationsCount }}\r\n
","\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \"preview\"\r\n
\r\n
\r\n {{ \"settings.no-image-in-database\" | translate }}\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n {{ \"settings.type-unsupported\" | translate }}\r\n
\r\n
\r\n
\r\n
\r\n

{{currentSetting.Description}}

\r\n

{{ \"settings.contact-support\" | translate }}

\r\n

{{ \"settings.minimum-allowed-value\" | translate }} {{currentSetting.MinValue}}.

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

{{ errorMessage }}

\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n","import { Component, EventEmitter, Output, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { DomSanitizer } from \"@angular/platform-browser\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { first } from \"rxjs/operators\";\r\nimport { GenericFormMessagesComponent, SettingsService, UploadFileModel } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-settings-edit\",\r\n templateUrl: \"./settings-edit.component.html\",\r\n styleUrls: [\"./settings-edit.component.scss\"]\r\n})\r\nexport class SettingsEditComponent {\r\n @Output() public refreshGrid = new EventEmitter();\r\n public currentSetting: any;\r\n public showDialog: boolean = false;\r\n public errorMessage: string = \"\";\r\n public errorLevel: number;\r\n public logReportLogoSupportedImageTypes = [\"image/jpeg\", \"image/png\"];\r\n public fileToBase64: string;\r\n private file: any;\r\n @ViewChild(\"formmessages\", { static: true }) formmessages: GenericFormMessagesComponent;\r\n @ViewChild(\"settingForm\") form: NgForm;\r\n public readonly SettingForm: string = \"settingForm\";\r\n\r\n constructor(\r\n private domSanitizer: DomSanitizer,\r\n private translateService: TranslateService,\r\n private settingsService: SettingsService) { }\r\n\r\n public EditSetting(settingId: number): void {\r\n this.ClearErrorMessage();\r\n this.settingsService.getSetting(settingId).pipe(first()).subscribe(x => {\r\n this.currentSetting = x;\r\n if (this.currentSetting.ValueDate) {\r\n this.currentSetting.ValueDate = new Date(this.currentSetting.ValueDate);\r\n } else if (this.currentSetting.Binary) {\r\n this.currentSetting.binary = this.domSanitizer.bypassSecurityTrustUrl(\"data:image/png;base64,\" + this.currentSetting.ValueText);\r\n this.currentSetting.file = null;\r\n this.fileToBase64 = this.currentSetting.ValueText;\r\n } else if (this.currentSetting.Password) {\r\n this.currentSetting.ValueText = \"\";\r\n } else if (this.currentSetting.Url) {\r\n this.currentSetting.isDisable = true;\r\n }\r\n this.showDialog = true;\r\n });\r\n }\r\n\r\n public Save(): void {\r\n if (this.form.form.valid) {\r\n if (this.currentSetting.Binary) {\r\n this.UploadFile();\r\n } else {\r\n this.settingsService.SaveSetting(this.currentSetting).subscribe(response => this.OnSuccess(response));\r\n }\r\n }\r\n }\r\n\r\n public FilesSelected(files) {\r\n this.file = files[0];\r\n this.ConvertSelectedFileToBase64();\r\n }\r\n\r\n private UploadFile(): void {\r\n if (this.file) {\r\n if (!this.logReportLogoSupportedImageTypes.includes(this.file.type)) { // check if the uploaded file is with the right MIME type\r\n const errorMessage = this.translateService.instant(\"settings.supported-image-types\");\r\n this.SetErrorMessage(errorMessage, 2); // 2-Warning\r\n return;\r\n }\r\n this.UploadFileInTheDatabase(this.currentSetting.SettingID);\r\n }\r\n }\r\n\r\n private UploadFileInTheDatabase(settingId: number) {\r\n const model: UploadFileModel = {\r\n EntityId: settingId,\r\n Base64String: this.fileToBase64\r\n };\r\n\r\n this.settingsService.UpdateFile(model).subscribe(response => this.OnSuccess(response));\r\n }\r\n\r\n private ConvertSelectedFileToBase64(): void {\r\n const reader = new FileReader();\r\n reader.readAsDataURL(this.file);\r\n reader.onload = () => {\r\n const fileToBase64 = (reader.result as string).split(\",\")[1];\r\n this.fileToBase64 = fileToBase64;\r\n };\r\n }\r\n\r\n private OnSuccess(response: any): void {\r\n if (this.IsSuccess(response)) {\r\n this.refreshGrid.emit();\r\n this.showDialog = false;\r\n }\r\n }\r\n\r\n private IsSuccess(response: any): boolean {\r\n if (response && response.hasOwnProperty(\"Messages\") && !response.IsSuccess) {\r\n this.SetErrorMessage(response.Messages[0].Message);\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n private SetErrorMessage(message: string, level?: number): void {\r\n this.errorMessage = message;\r\n this.errorLevel = level ?? 3;\r\n }\r\n\r\n private ClearErrorMessage(): void {\r\n if (this.formmessages) {\r\n this.formmessages.ClearFormErrors();\r\n }\r\n this.SetErrorMessage(\"\", -1);\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'settings.header' | translate }}\r\n
{{ 'settings.fgas-subheader' | translate }}
\r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{data.value}}\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n {{ value.data.DisplayValue.length > 90 ? (value.data.DisplayValue | slice:0:90) + \"...\" : value.data.DisplayValue }}\r\n
\r\n
\r\n
{{ \"settings.description\" | translate}}: {{setting.data.Description}}
\r\n
\r\n
\r\n\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { SettingsService } from \"servicesight-shared\";\r\nimport { SettingsEditComponent } from \"./settings-edit/settings-edit.component\";\r\n\r\n@Component({\r\n selector: \"app-settings\",\r\n templateUrl: \"./settings.component.html\",\r\n styleUrls: [\"./settings.component.scss\"]\r\n})\r\nexport class SettingsComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) dataGrid: DxDataGridComponent;\r\n @ViewChild(\"settingsEdit\", { static: true }) settingsEdit: SettingsEditComponent;\r\n\r\n public settingsDataSource: DataSource;\r\n public searchText: string = \"\";\r\n public isExpanded: boolean = false;\r\n public expandedRows: number[] = [];\r\n\r\n constructor(\r\n private settingsService: SettingsService) { }\r\n\r\n public ngOnInit(): void {\r\n this.settingsDataSource = this.settingsService.GetSettingsDataSource();\r\n }\r\n\r\n public OnSearchValueChange(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.searchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public HandleRows(row: any): void {\r\n const expandItems = row.rowElement.querySelector(\".dx-command-expand\");\r\n if (expandItems) {\r\n expandItems.firstChild.classList.remove(\"dx-datagrid-group-closed\");\r\n expandItems.firstChild.classList.remove(\"dx-datagrid-group-opened\");\r\n expandItems.classList.remove(\"dx-datagrid-expand\");\r\n }\r\n }\r\n\r\n public ToggleRow(row: any): void {\r\n if (this.dataGrid.instance.isRowExpanded(row.key)) {\r\n this.dataGrid.instance.collapseRow(row.key);\r\n this.expandedRows = this.expandedRows.filter(x => x !== row.key);\r\n } else {\r\n this.dataGrid.instance.expandRow(row.key);\r\n this.expandedRows.push(row.key);\r\n }\r\n if (!this.expandedRows.length) {\r\n this.isExpanded = false;\r\n } else {\r\n this.isExpanded = true;\r\n }\r\n }\r\n\r\n public ToggleAllRows(): void {\r\n if (this.expandedRows.length || this.isExpanded) {\r\n this.dataGrid.instance.collapseAll(-1);\r\n this.expandedRows = [];\r\n this.isExpanded = false;\r\n } else {\r\n this.dataGrid.instance.expandAll(-1);\r\n this.isExpanded = true;\r\n }\r\n }\r\n\r\n public EditSetting(settingId: number): void {\r\n this.settingsEdit.EditSetting(settingId);\r\n }\r\n\r\n public RefeshDataGrid(): void {\r\n this.dataGrid.instance.refresh();\r\n }\r\n}\r\n","import { Component, EventEmitter, Input, Output } from \"@angular/core\";\r\n\r\n@Component({\r\n selector: \"app-stepped-number-input\",\r\n templateUrl: \"./stepped-number-input.component.html\",\r\n styleUrls: [\"./stepped-number-input.component.scss\"]\r\n})\r\nexport class SteppedNumberInputComponent {\r\n @Input() value: number = 0;\r\n @Input() readonly: boolean = false;\r\n @Output() valueChange: EventEmitter = new EventEmitter();\r\n\r\n @Input() steps: number[] = [];\r\n\r\n constructor() { }\r\n\r\n public Updated(value: number): void {\r\n this.value = value;\r\n this.valueChange.emit(value);\r\n }\r\n\r\n public DecreaseValue(): void {\r\n if (this.steps.length > 0) {\r\n let index = this.steps.indexOf(this.value);\r\n if (index === -1) {\r\n this.value--;\r\n this.Updated(this.value);\r\n return;\r\n }\r\n index--;\r\n\r\n if (index < 0) {\r\n index = 0;\r\n }\r\n\r\n this.value = this.steps[index];\r\n } else {\r\n this.value--;\r\n }\r\n\r\n if (this.value < 0) {\r\n this.value = 0;\r\n }\r\n\r\n this.Updated(this.value);\r\n }\r\n\r\n public IncreaseValue(): void {\r\n if (this.steps.length > 0) {\r\n let index = this.steps.indexOf(this.value);\r\n if (index === -1) {\r\n this.value++;\r\n this.Updated(this.value);\r\n return;\r\n }\r\n index++;\r\n\r\n if (index >= this.steps.length - 1) {\r\n index = this.steps.length - 1;\r\n }\r\n\r\n this.value = this.steps[index];\r\n if (!this.value) {\r\n this.value = this.steps[index - 1] + 1;\r\n }\r\n\r\n } else {\r\n this.value++;\r\n }\r\n\r\n this.Updated(this.value);\r\n }\r\n}\r\n","\r\n {{ 'stripe.connect.button' | translate }}\r\n {{ 'stripe.disconnect.button' | translate }}\r\n","
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
","import { Component, EventEmitter, Inject, Input, OnInit, Output } from \"@angular/core\";\r\nimport { WebAppConfig } from \"../../models/web-app-config.model\";\r\nimport { AuthService } from \"../../services/auth/auth.service\";\r\nimport { APP_CONFIG } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-stripe-connect-button\",\r\n templateUrl: \"./stripe-connect-button.component.html\",\r\n styleUrls: [\"./stripe-connect-button.component.scss\"]\r\n})\r\nexport class StripeConnectButtonComponent implements OnInit {\r\n\r\n @Input() public isConnected: boolean;\r\n @Output() public disconnect = new EventEmitter();\r\n public baseUrl: string;\r\n public clientId: string;\r\n public userEmail: string;\r\n\r\n public get fullUrl(): string {\r\n const redirect = encodeURIComponent(location.origin + \"/payments/stripe\");\r\n return `${this.baseUrl}express/oauth/authorize?response_type=code&client_id=${this.clientId}&assert_capabilities[]=card_payments&scope=read_write&redirect_uri=${redirect}`;\r\n }\r\n\r\n constructor(\r\n @Inject(APP_CONFIG) private config: WebAppConfig,\r\n private authService: AuthService) {\r\n this.baseUrl = this.config.stripe.BaseUrl;\r\n this.clientId = this.config.stripe.ClientId;\r\n this.userEmail = this.authService.Username;\r\n }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n public click(e: Event): void {\r\n if (this.isConnected) {\r\n this.disconnect.emit();\r\n e.preventDefault();\r\n }\r\n }\r\n}\r\n\r\n","import { Component, EventEmitter, Input, Output, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\n\r\n@Component({\r\n selector: \"app-skill-dialogue\",\r\n templateUrl: \"./add-skill-dialogue.component.html\",\r\n styleUrls: [\"./add-skill-dialogue.component.scss\"]\r\n})\r\nexport class AddSkillDialogueComponent {\r\n @Input() skillsDataSource: DataSource;\r\n @Output() skillsAdded = new EventEmitter();\r\n @ViewChild(\"skillsGrid\", { static: true }) skillsGrid: DxDataGridComponent;\r\n\r\n selected: number[] = [];\r\n visible: boolean = false;\r\n\r\n Show(): void {\r\n this.selected = [];\r\n this.skillsGrid.instance.refresh()\r\n .then(() => this.visible = true)\r\n .catch((error) => console.error(error));\r\n }\r\n\r\n Close(): void {\r\n this.visible = false;\r\n }\r\n\r\n AddSkills(): void {\r\n this.skillsAdded.emit(this.selected);\r\n this.Close();\r\n }\r\n}\r\n","\r\n
\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n","import { Component, Input, Output, EventEmitter } from \"@angular/core\";\r\n\r\n@Component({\r\n selector: \"app-switch\",\r\n template: \"\"\r\n})\r\nexport class SwitchComponent {\r\n\r\n @Input() value: boolean;\r\n\r\n @Output() valueChange: EventEmitter = new EventEmitter();\r\n\r\n public get switchValue(): boolean {\r\n return this.value;\r\n }\r\n\r\n public set switchValue(newValue: boolean) {\r\n this.value = newValue;\r\n this.valueChange.emit(newValue);\r\n }\r\n}\r\n","import { Directive, ElementRef, HostListener } from \"@angular/core\";\r\nimport { NUMBERS_KEY, SPECIAL_KEY_NAMES } from \"../../enums/key-code.enums\";\r\n\r\n@Directive({\r\n selector: \"[appOnlyNumbers]\"\r\n})\r\nexport class OnlyNumbersDirective {\r\n\r\n private regex: RegExp = new RegExp(/^\\d*(\\.?\\d{1,2})/);\r\n private removeCharacters: RegExp = new RegExp(/\\D+[^\\d*\\.?\\d{1,2}]/g);\r\n\r\n constructor(private el: ElementRef) { }\r\n\r\n @HostListener(\"keydown\", [ \"$event\" ])\r\n onKeyDown(event: KeyboardEvent) {\r\n return this.PreventCharacters(event);\r\n }\r\n\r\n @HostListener(\"blur\")\r\n onBlur() {\r\n const curr = this.el.nativeElement.value.replace(this.removeCharacters, \"\");\r\n const newValue = Number(curr) ? Number(curr) : 0;\r\n this.el.nativeElement.value = newValue.toFixed(2);\r\n }\r\n\r\n @HostListener(\"paste\", [ \"$event\" ])\r\n onPaste(event: ClipboardEvent) {\r\n event.preventDefault();\r\n this.onlyNumbers(event.clipboardData);\r\n }\r\n\r\n @HostListener(\"drop\", [ \"$event\" ])\r\n onDrop(event: DragEvent) {\r\n event.preventDefault();\r\n this.onlyNumbers(event.dataTransfer);\r\n }\r\n\r\n private onlyNumbers(value: DataTransfer) {\r\n const data2insert: string = value.getData(\"text/plain\").replace(this.removeCharacters, \"\");\r\n const formattedNumber = Number(data2insert.replace(/\\s+/, \"\")).toFixed(2); // remove whitespace\r\n document.execCommand(\"insertText\", false, formattedNumber); // remove whitespace\r\n }\r\n\r\n private IsNumberKeyPressed(event: KeyboardEvent) {\r\n return (NUMBERS_KEY.find(k => k.Name === event.key) || (event.ctrlKey && NUMBERS_KEY.find(k => k.Name === event.key)));\r\n }\r\n\r\n private PreventCharacters(event: KeyboardEvent) {\r\n const keyPressed = SPECIAL_KEY_NAMES.find(k => k.Name === event.key);\r\n if (keyPressed || this.IsNumberKeyPressed(event)) {\r\n return;\r\n }\r\n\r\n // Do not use event.keycode this is deprecated.\r\n // See: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode\r\n if (!Number(event.key) && !event.key.match(this.regex)) {\r\n event.preventDefault();\r\n return false;\r\n }\r\n }\r\n}\r\n","import { NgModule } from \"@angular/core\";\r\nimport { FieldsMatchDirective } from \"./form/fields-match.directive\";\r\nimport { StoresDifferDirective } from \"./form/stock/stores-differ.directive\";\r\nimport { OnlyIntegerDirective } from \"./only-numbers/only-integer.directive\";\r\nimport { OnlyNumbersDirective } from \"./only-numbers/only-numbers.directive\";\r\n\r\nconst directives = [\r\n OnlyNumbersDirective,\r\n OnlyIntegerDirective,\r\n FieldsMatchDirective,\r\n StoresDifferDirective\r\n];\r\n\r\n@NgModule({\r\n declarations: directives,\r\n exports: directives\r\n})\r\nexport class SharedDirectivesModule { }\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Injectable } from \"@angular/core\";\r\nimport { APP_CONFIG } from \"servicesight-shared\";\r\nimport { WebAppConfig } from \"./models/web-app-config.model\";\r\nimport { environment } from \"../../environments/environment\";\r\n@Injectable()\r\nexport class AppConfigWrapper {\r\n static settings: WebAppConfig;\r\n constructor(private http: HttpClient) { }\r\n load() {\r\n const name = environment.production ? \"deployment\" : \"dev\";\r\n const jsonFile = `environments/config/config.${name}.json`;\r\n return new Promise((resolve, reject) => {\r\n this.http.get(jsonFile).toPromise().then((response: WebAppConfig) => {\r\n AppConfigWrapper.settings = response as WebAppConfig;\r\n resolve();\r\n }).catch((response: any) => {\r\n reject(`Could not load file '${jsonFile}': ${JSON.stringify(response)}`);\r\n });\r\n });\r\n }\r\n\r\n get Settings(): WebAppConfig {\r\n return AppConfigWrapper.settings;\r\n }\r\n}\r\n\r\n\r\n// eslint-disable-next-line prefer-arrow/prefer-arrow-functions\r\nexport function AppConfigFactory(appConfig: AppConfigWrapper): WebAppConfig {\r\n return appConfig.Settings;\r\n}\r\n\r\nexport const AppConfigProvider = {\r\n provide: APP_CONFIG,\r\n deps: [AppConfigWrapper],\r\n useFactory: AppConfigFactory\r\n};\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { TranslateHttpLoader } from \"@ngx-translate/http-loader\";\r\nimport { AppConfigWrapper } from \"../app.config\";\r\n\r\n// eslint-disable-next-line prefer-arrow/prefer-arrow-functions\r\nexport function HttpLoaderFactory(httpClient: HttpClient) {\r\n return new TranslateHttpLoader(httpClient, \"assets/i18n/\", \".json?bust=\" + AppConfigWrapper.settings.cacheBust);\r\n}\r\n","import { CommonModule, DatePipe } from \"@angular/common\";\r\nimport { NgModule } from \"@angular/core\";\r\nimport { DaysUntilNowPipe } from \"src/app/jobs/pipes/days-until-now.pipe\";\r\nimport { BillingAmountPipe } from \"./billing-amount.pipe\";\r\nimport { BoolToStringPipe } from \"./bool-to-string.pipe\";\r\nimport { ContactStatusBarPipe } from \"./contact-status-bar.pipe\";\r\nimport { ContactStatusPipe } from \"./contact-status.pipe\";\r\nimport { CustomDatePipe } from \"./custom-date.pipe\";\r\nimport { DurationFromDatePipe } from \"./duration-from-date.pipe\";\r\nimport { CustomerStatusPipe } from \"./enums/customer-status-pipe\";\r\nimport { ErrorMessagePipe } from \"./enums/error-message.pipe\";\r\nimport { InspectionAutocompletePipe } from \"./enums/inspection-autocomplete.pipe\";\r\nimport { InspectionTypePipe } from \"./enums/inspection-type.pipe\";\r\nimport { QuoteStatusPipe } from \"./enums/quote-status.pipe\";\r\nimport { GoodsReceivedStatusPipe } from \"./goods-received-status.pipe\";\r\nimport { JobCategoryPipe } from \"./job-category.pipe\";\r\nimport { JobPropertyPipe } from \"./job-property.pipe\";\r\nimport { JobVisitStatusPipe } from \"./job-visit-status.pipe\";\r\nimport { PriceCalcTypePipe } from \"./price-calc-type.pipe\";\r\nimport { PurchaseOrderStatusPipe } from \"./purchase-order-status.pipe\";\r\nimport { QuoteStatusBarPipe } from \"./quote-status-bar.pipe\";\r\nimport { ReturnsNoteStatusPipe } from \"./returns-note.status.pipe\";\r\nimport { SupplierStatusBarPipe } from \"./supplier-status-bar.pipe\";\r\nimport { SupplierStatusPipe } from \"./supplier-status.pipe\";\r\nimport { TaskStatusPipe } from \"./task-status.pipe\";\r\nimport { VisitDetailsPipe } from \"./visit-details-pipe\";\r\n\r\n@NgModule({\r\n declarations: [\r\n InspectionTypePipe,\r\n InspectionAutocompletePipe,\r\n QuoteStatusPipe,\r\n QuoteStatusBarPipe,\r\n ErrorMessagePipe,\r\n BoolToStringPipe,\r\n CustomDatePipe,\r\n DurationFromDatePipe,\r\n CustomerStatusPipe,\r\n TaskStatusPipe,\r\n PriceCalcTypePipe,\r\n VisitDetailsPipe,\r\n SupplierStatusPipe,\r\n SupplierStatusBarPipe,\r\n JobVisitStatusPipe,\r\n JobPropertyPipe,\r\n JobCategoryPipe,\r\n GoodsReceivedStatusPipe,\r\n PurchaseOrderStatusPipe,\r\n ContactStatusPipe,\r\n ContactStatusBarPipe,\r\n ReturnsNoteStatusPipe,\r\n BillingAmountPipe,\r\n DaysUntilNowPipe\r\n ],\r\n exports: [\r\n InspectionTypePipe,\r\n InspectionAutocompletePipe,\r\n QuoteStatusPipe,\r\n QuoteStatusBarPipe,\r\n ErrorMessagePipe,\r\n BoolToStringPipe,\r\n CustomDatePipe,\r\n DurationFromDatePipe,\r\n CustomerStatusPipe,\r\n TaskStatusPipe,\r\n VisitDetailsPipe,\r\n SupplierStatusPipe,\r\n SupplierStatusBarPipe,\r\n JobVisitStatusPipe,\r\n JobPropertyPipe,\r\n JobCategoryPipe,\r\n GoodsReceivedStatusPipe,\r\n PurchaseOrderStatusPipe,\r\n ContactStatusPipe,\r\n ContactStatusBarPipe,\r\n ReturnsNoteStatusPipe,\r\n BillingAmountPipe,\r\n DaysUntilNowPipe\r\n ],\r\n imports: [\r\n CommonModule\r\n ],\r\n providers: [\r\n DatePipe,\r\n JobCategoryPipe\r\n ]\r\n})\r\nexport class PipesModule {\r\n}\r\n","import { Component, Input, Output, EventEmitter } from \"@angular/core\";\r\n\r\n@Component({\r\n selector: \"app-currency-toggle\",\r\n templateUrl: \"currency-toggle.component.html\"\r\n})\r\nexport class CurrencyToggleComponent {\r\n @Input() SelectedCurrencySymbol: string = \"\";\r\n @Output() SelectedCurrencySymbolChange: EventEmitter = new EventEmitter();\r\n\r\n @Input() BaseCurrencySymbol: string = \"\";\r\n @Input() AlternateCurrencySymbol: string = \"\";\r\n\r\n @Input() Title: string = \"Toggle Currency\";\r\n\r\n public get IsBaseCurrency(): boolean {\r\n return this.SelectedCurrencySymbol === this.BaseCurrencySymbol;\r\n }\r\n\r\n public ToggleCurrency(): void {\r\n this.SelectedCurrencySymbol = (this.SelectedCurrencySymbol === this.BaseCurrencySymbol) ? this.AlternateCurrencySymbol : this.BaseCurrencySymbol;\r\n this.SelectedCurrencySymbolChange.emit(this.SelectedCurrencySymbol);\r\n }\r\n}\r\n","
\r\n \r\n \r\n
\r\n","import { Component, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\n\r\n@Component({\r\n selector: \"app-what3words\",\r\n templateUrl: \"./what3words.component.html\",\r\n styleUrls: [\"./what3words.component.scss\"]\r\n})\r\nexport class What3wordsComponent implements OnInit {\r\n\r\n @Input() value: string;\r\n @Input() updated: boolean;\r\n @Output() valueChange: EventEmitter = new EventEmitter();\r\n\r\n constructor(private translate: TranslateService) {\r\n this.OpenWhatThreeWords = this.OpenWhatThreeWords.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n }\r\n\r\n public WhatThreeWordsActive(): boolean {\r\n // eslint-disable-next-line max-len\r\n const regex = /^\\/{0,}[^0-9`~!@#$%^&*()+\\-_=[{\\]}\\\\|'<,.>?/\";:£§º©®\\s]{1,}[.。。・・︒។։။۔።।][^0-9`~!@#$%^&*()+\\-_=[{\\]}\\\\|'<,.>?/\";:£§º©®\\s]{1,}[.。。・・︒។։။۔።।][^0-9`~!@#$%^&*()+\\-_=[{\\]}\\\\|'<,.>?/\";:£§º©®\\s]{1,}$/;\r\n return this.value && regex.test(this.value);\r\n }\r\n\r\n public OpenWhatThreeWords() {\r\n const val: string = this.WhatThreeWordsActive() ? this.value.replace(\"///\", \"\") : \"\";\r\n const url: string = `https://what3words.com/${val}`;\r\n window.open(url);\r\n }\r\n\r\n public WhatThreeWordsChanged(val: string): void {\r\n this.valueChange.emit(val);\r\n }\r\n\r\n public WhatThreeWordsInfoText() {\r\n return this.updated ? this.translate.instant(\"label.user-updated\") : this.translate.instant(\"label.system-generated\");\r\n }\r\n}\r\n","\r\n\r\n","import { Component, Input } from \"@angular/core\";\r\n\r\n@Component({\r\n selector: \"app-fa-icon-button\",\r\n templateUrl: \"./fa-icon-button.component.html\",\r\n styleUrls: [\"./fa-icon-button.component.scss\"]\r\n})\r\nexport class FaIconButtonComponent {\r\n @Input() iconName: string;\r\n @Input() selected: boolean;\r\n\r\n public get prettyIconName(): string {\r\n let text = this.iconName.replace(/-/g, \" \");\r\n text = text.charAt(0).toUpperCase() + text.substring(1);\r\n return text;\r\n }\r\n}\r\n","","import { CommonModule } from \"@angular/common\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { NgModule } from \"@angular/core\";\r\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\r\nimport { MatLegacyButtonModule as MatButtonModule } from \"@angular/material/legacy-button\";\r\nimport { MatLegacyDialogModule as MatDialogModule } from \"@angular/material/legacy-dialog\";\r\nimport { RouterModule } from \"@angular/router\";\r\nimport { TranslateLoader, TranslateModule } from \"@ngx-translate/core\";\r\nimport { DxReportViewerModule } from \"devexpress-reporting-angular\";\r\nimport {\r\n DxAccordionModule,\r\n DxButtonGroupModule,\r\n DxButtonModule,\r\n DxChartModule,\r\n DxCheckBoxModule,\r\n DxDataGridModule,\r\n DxDateBoxModule,\r\n DxDropDownButtonModule,\r\n DxFileUploaderModule,\r\n DxFilterBuilderModule,\r\n DxFormModule,\r\n DxHtmlEditorModule,\r\n DxListModule,\r\n DxMapModule,\r\n DxNumberBoxModule,\r\n DxPopupModule,\r\n DxProgressBarModule,\r\n DxScrollViewModule,\r\n DxSelectBoxModule,\r\n DxSwitchModule,\r\n DxTextAreaModule,\r\n DxTextBoxModule,\r\n DxTooltipModule,\r\n DxValidatorModule\r\n} from \"devextreme-angular\";\r\nimport {\r\n DxoAdaptiveLayoutModule,\r\n DxoCommonAxisSettingsModule,\r\n DxoCommonSeriesSettingsModule,\r\n DxoFontModule,\r\n DxoGridModule,\r\n DxoLabelModule,\r\n DxoLegendModule,\r\n DxoSeriesTemplateModule,\r\n DxoSizeModule,\r\n DxoTickModule\r\n} from \"devextreme-angular/ui/nested\";\r\nimport { ServicesightComponentsModule } from \"servicesight-components\";\r\nimport { PhraseBookModule, ServicesightSharedModule, SharedPipesModule } from \"servicesight-shared\";\r\nimport { CftsAccordionItemComponent } from \"./accordion/cfts-accordion-item/cfts-accordion-item.component\";\r\nimport { ContactAccordionItemComponent } from \"./accordion/contact-accordion-item/contact-accordion-item.component\";\r\nimport { ContractAccordionItemComponent } from \"./accordion/contract-accordion-item/contract-accordion-item.component\";\r\nimport { CreditControlAccordionItemComponent } from \"./accordion/credit-control-accordion-item/credit-control-accordion-item.component\";\r\nimport { CreditNotesAccordionItemComponent } from \"./accordion/credit-notes-accordion-item/credit-notes-accordion-item.component\";\r\nimport { CreditRaisedAccordionItemComponent } from \"./accordion/credit-raised-accordion-item/credit-raised-accordion-item.component\";\r\nimport { CustomerAccordionItemComponent } from \"./accordion/customer-accordion-item/customer-accordion-item.component\";\r\nimport { DemandAccordionItemComponent } from \"./accordion/demand-accordion-item/demand-accordion-item.component\";\r\nimport { EquipmentDetailsItemComponent } from \"./accordion/equipment-details-item/equipment-details-item.component\";\r\nimport { EquipmentPurchasingAccordionItemComponent } from \"./accordion/equipment-purchasing-accordion-item/equipment-purchasing-accordion-item.component\";\r\nimport { EquipmentSalesAccordionItemComponent } from \"./accordion/equipment-sales-accordion-item/equipment-sales-accordion-item.component\";\r\nimport { HelpAccordionItemComponent } from \"./accordion/help-accordion-item/help-accordion-item.component\";\r\nimport { InspectionAccordionItemComponent } from \"./accordion/inspection-accordion-item/inspection-accordion-item.component\";\r\nimport { InvoiceStatusAccordionItemComponent } from \"./accordion/invoice-status-accordion-item/invoice-status-accordion-item.component\";\r\nimport { JobDetailsAccordionItemComponent } from \"./accordion/job-details-accordion-item/job-details-accordion-item.component\";\r\nimport { MapAccordionItemComponent } from \"./accordion/map-accordion-item/map-accordion-item.component\";\r\nimport { PreferredSupplierAccordionItemComponent } from \"./accordion/preferred-supplier-accordion-item/preferred-supplier-accordion-item.component\";\r\nimport { PurchaseNoteAccordionItemComponent } from \"./accordion/purchase-note-accordion-item/purchase-note-accordion-item.component\";\r\nimport { PurchaseOrderDetailsAccordionItemComponent } from \"./accordion/purchase-order-details-accordion-item/purchase-order-details-accordion-item.component\";\r\nimport { PurchaseOrderPendingOrdersAccordionItemComponent } from \"./accordion/purchase-order-pending-orders-accordion-item/purchase-order-pending-orders-accordion-item.component\";\r\nimport { PurchaseOrderReceiptsAccordionItemComponent } from \"./accordion/purchase-order-receipts-accordion-item/purchase-order-receipts-accordion-item.component\";\r\nimport { QuoteDetailsAccordionItemComponent } from \"./accordion/quote-details-accordion-item/quote-details-accordion-item.component\";\r\nimport { QuoteRevisionsAccordionItemComponent } from \"./accordion/quote-revisions-accordion-item/quote-revisions-accordion-item.component\";\r\nimport { ReceiptDetailsAccordionItemComponent } from \"./accordion/receipt-details-accordion-item/receipt-details-accordion-item.component\";\r\nimport { RemindersAccordionItemComponent } from \"./accordion/reminders-accordion-item/reminders-accordion-item.component\";\r\nimport { ReturnsDetailsAccordionItemComponent } from \"./accordion/returns-details-accordion-item/returns-details-accordion-item.component\";\r\nimport { SalesOpportunityDetailsAccordionItemComponent } from \"./accordion/sales-opportunity-details-accordion-item/sales-opportunity-details-accordion-item.component\";\r\nimport { StockPurchasesAccordionItemComponent } from \"./accordion/stock-purchases-accordion-item/stock-purchases-accordion-item.component\";\r\nimport { SupplierAccordionItemComponent } from \"./accordion/supplier-accordion-item/supplier-accordion-item.component\";\r\nimport { SurveysAccordionItemComponent } from \"./accordion/surveys-accordion-item/surveys-accordion-item.component\";\r\nimport { WarningNotesAccordionItemComponent } from \"./accordion/warning-notes-accordion-item/warning-notes-accordion-item.component\";\r\nimport { AccountNumberComponent } from \"./account-number/account-number.component\";\r\nimport { AddCylinderDialogComponent } from \"./add-cylinder-dialog/add-cylinder-dialog.component\";\r\nimport { AddMakeModelDialogueComponent } from \"./add-make-model-dialogue/add-make-model-dialogue.component\";\r\nimport { AddPartDialogueComponent } from \"./add-part-dialogue/add-part-dialogue.component\";\r\nimport { AddSiteDialogueComponent } from \"./add-site-dialogue/add-site-dialogue.component\";\r\nimport { BulkEquipmentOrderPopupComponent } from \"./bulk-equipment-order-popup/bulk-equipment-order-popup.component\";\r\nimport { BulkMaterialOrderPopupComponent } from \"./bulk-material-order-popup/bulk-material-order-popup.component\";\r\nimport { BulkPartOrderPopupComponent } from \"./bulk-part-order-popup/bulk-part-order-popup.component\";\r\nimport { CancelComponent } from \"./cancel/cancel.component\";\r\nimport { ChildContactsListComponent } from \"./child-contacts-list/child-contacts-list.component\";\r\nimport { ChildSitesListComponent } from \"./child-sites-list/child-sites-list.component\";\r\nimport { ConfirmationDialogueComponent } from \"./confirmation-dialogue/confirmation-dialogue.component\";\r\nimport { ConfirmationMessageComponent } from \"./confirmation-message/confirmation-message.component\";\r\nimport { CurrencyComponent } from \"./currency/currency.component\";\r\nimport { CustomerContactsSelectBoxComponent } from \"./customer-contacts-select-box/customer-contacts-select-box.component\";\r\nimport { CustomerHistoryComponent } from \"./customer-history/customer-history.component\";\r\nimport { CylindersListComponent } from \"./cylinders-list/cylinders-list.component\";\r\nimport { DiscountToggleComponent } from \"./discount-toggle/discount-toggle.component\";\r\nimport { DiscussionComponent } from \"./discussion/discussion.component\";\r\nimport { DocumentLinkSelectComponent } from \"./document-link-select/document-link-select.component\";\r\nimport { DropdownButtonWithHelpComponent } from \"./dropdown-button-with-help/dropdown-button-with-help.component\";\r\nimport { DropdownComponent } from \"./dropdown/dropdown.component\";\r\nimport { DurationComponent } from \"./duration/duration.component\";\r\nimport { EmailComponent } from \"./email/email.component\";\r\nimport { AddMessagesComponent } from \"./error-messages/add-messages.component\";\r\nimport { ErrorMessagesComponent } from \"./error-messages/error-messages.component\";\r\nimport { ExchangeRateComponent } from \"./exchange-rate/exchange-rate.component\";\r\nimport { FilePickerComponent } from \"./file-picker/file-picker.component\";\r\nimport { HtmlBodyComponent } from \"./html-body/html-body.component\";\r\nimport { ImporterComponent } from \"./importer/importer.component\";\r\nimport { InfoButtonComponent } from \"./info-button/info-button.component\";\r\nimport { InfoMessageComponent } from \"./info-message/info-message.component\";\r\nimport { InputWithButtonComponent } from \"./input-with-button/input-with-button.component\";\r\nimport { InspectionTemplateDialogComponent } from \"./inspection-template-dialog/inspection-template-dialog.component\";\r\nimport { JobCylinderLogDialogComponent } from \"./job-cylinder-log-dialog/job-cylinder-log-dialog.component\";\r\nimport { JobFileUploadDialogueComponent } from \"./job-file-upload-dialogue/job-file-upload-dialogue.component\";\r\nimport { JobFilesComponent } from \"./job-files/job-files.component\";\r\nimport { JobMiscDialogComponent } from \"./job-misc-dialog/job-misc-dialog.component\";\r\nimport { LabourAnalysisChartComponent } from \"./labour-analysis-chart/labour-analysis-chart.component\";\r\nimport { LabourRateDialogComponent } from \"./labour-rate-dialog/labour-rate-dialog.component\";\r\nimport { LabourRateComponent } from \"./labour-rate/labour-rate.component\";\r\nimport { LoginComponent } from \"./login/login.component\";\r\nimport { MarketingTemplateComponent } from \"./marketing-template/marketing-template.component\";\r\nimport { MoneyComponent } from \"./money/money.component\";\r\nimport { NewChildContactComponent } from \"./new-child-contact/new-child-contact.component\";\r\nimport { NewChildSiteComponent } from \"./new-child-site/new-child-site.component\";\r\nimport { NotificationsComponent } from \"./notifications/notifications.component\";\r\nimport { PartSerialNumberDialogueComponent } from \"./part-serial-number-dialogue/part-serial-number-dialogue.component\";\r\nimport { PurchaseInvoicePopupComponent } from \"./purchase-invoice-popup/purchase-invoice-popup.component\";\r\nimport { RecordNavButtonsComponent } from \"./record-nav-buttons/record-nav-buttons.component\";\r\nimport { SalesOpportunitySelectBoxComponent } from \"./sales-opportunity-select-box/sales-opportunity-select-box.component\";\r\nimport { SettingsEditComponent } from \"./settings/settings-edit/settings-edit.component\";\r\nimport { SettingsComponent } from \"./settings/settings.component\";\r\nimport { SidebarMenuComponent } from \"./sidebar-menu/sidebar-menu.component\";\r\nimport { SteppedNumberInputComponent } from \"./stepped-number-input/stepped-number-input.component\";\r\nimport { StockListComponent } from \"./stock-list/stock-list.component\";\r\nimport { StockSuppliersAddComponent } from \"./stock-suppliers-add/stock-suppliers-add.component\";\r\nimport { StoreIconComponent } from \"./store-icon/store-icon.component\";\r\nimport { StripeConnectButtonComponent } from \"./stripe-connect-button/stripe-connect-button.component\";\r\nimport { SurveyDialogComponent } from \"./survey-dialog/survey-dialog.component\";\r\nimport { TextInputDialogueComponent } from \"./text-input-dialogue/text-input-dialogue.component\";\r\nimport { WelcomeComponent } from \"./welcome/welcome.component\";\r\nimport { AddSkillDialogueComponent } from \"../components/add-skill-dialogue/add-skill-dialogue.component\";\r\nimport { SwitchComponent } from \"../components/switch/switch.component\";\r\nimport { SharedDirectivesModule } from \"../directives/shared-directives.module\";\r\nimport { HttpLoaderFactory } from \"../factory/http-loader.factory\";\r\nimport { PipesModule } from \"../pipes/pipes.module\";\r\nimport { CurrencyToggleComponent } from \"./currency-toggle/currency-toggle,component\";\r\nimport { What3wordsComponent } from \"./what3words/what3words.component\";\r\nimport { ReorderingComponent } from \"./reordering/reordering.component\";\r\nimport { JobTabsPopupComponent } from \"./job-tabs-popup/job-tabs-popup.component\";\r\nimport { StockLevelsComponent } from \"./stock-levels/stock-levels.component\";\r\nimport { BulkOrderPopupComponent } from \"./bulk-order-popup/bulk-order-popup.component\";\r\nimport { FaIconButtonComponent } from \"./fa-icon-button/fa-icon-button.component\";\r\nimport { PrioritySelectBoxComponent } from \"./priority-select-box/priority-select-box.component\";\r\nimport { PriorityIconComponent } from \"./priority-icon/priority-icon.component\";\r\n\r\nconst components = [\r\n SupplierAccordionItemComponent,\r\n BulkPartOrderPopupComponent,\r\n PreferredSupplierAccordionItemComponent,\r\n PurchaseNoteAccordionItemComponent,\r\n StockPurchasesAccordionItemComponent,\r\n EquipmentPurchasingAccordionItemComponent,\r\n EquipmentSalesAccordionItemComponent,\r\n CustomerAccordionItemComponent,\r\n ContactAccordionItemComponent,\r\n DemandAccordionItemComponent,\r\n CreditControlAccordionItemComponent,\r\n WarningNotesAccordionItemComponent,\r\n HelpAccordionItemComponent,\r\n InspectionAccordionItemComponent,\r\n QuoteDetailsAccordionItemComponent,\r\n QuoteRevisionsAccordionItemComponent,\r\n PurchaseOrderDetailsAccordionItemComponent,\r\n PurchaseOrderReceiptsAccordionItemComponent,\r\n ReceiptDetailsAccordionItemComponent,\r\n SalesOpportunityDetailsAccordionItemComponent,\r\n ReturnsDetailsAccordionItemComponent,\r\n JobMiscDialogComponent,\r\n BulkMaterialOrderPopupComponent,\r\n BulkEquipmentOrderPopupComponent,\r\n DropdownComponent,\r\n CancelComponent,\r\n MoneyComponent,\r\n ConfirmationMessageComponent,\r\n ErrorMessagesComponent,\r\n AddMessagesComponent,\r\n ConfirmationMessageComponent,\r\n WelcomeComponent,\r\n InfoMessageComponent,\r\n TextInputDialogueComponent,\r\n EquipmentDetailsItemComponent,\r\n MapAccordionItemComponent,\r\n ConfirmationDialogueComponent,\r\n JobDetailsAccordionItemComponent,\r\n DurationComponent,\r\n StripeConnectButtonComponent,\r\n ImporterComponent,\r\n JobFilesComponent,\r\n JobFileUploadDialogueComponent,\r\n ContractAccordionItemComponent,\r\n CreditNotesAccordionItemComponent,\r\n CreditRaisedAccordionItemComponent,\r\n EmailComponent,\r\n AddPartDialogueComponent,\r\n AddMakeModelDialogueComponent,\r\n StockListComponent,\r\n InputWithButtonComponent,\r\n What3wordsComponent,\r\n ChildContactsListComponent,\r\n NewChildContactComponent,\r\n ChildSitesListComponent,\r\n NewChildSiteComponent,\r\n SwitchComponent,\r\n AddSkillDialogueComponent,\r\n RecordNavButtonsComponent,\r\n AccountNumberComponent,\r\n PartSerialNumberDialogueComponent,\r\n SalesOpportunitySelectBoxComponent,\r\n HtmlBodyComponent,\r\n CustomerContactsSelectBoxComponent,\r\n SidebarMenuComponent,\r\n DiscussionComponent,\r\n StoreIconComponent,\r\n CustomerHistoryComponent,\r\n PurchaseOrderPendingOrdersAccordionItemComponent,\r\n AddCylinderDialogComponent,\r\n SettingsComponent,\r\n SettingsEditComponent,\r\n StockSuppliersAddComponent,\r\n SteppedNumberInputComponent,\r\n NotificationsComponent,\r\n JobCylinderLogDialogComponent,\r\n MarketingTemplateComponent,\r\n FilePickerComponent,\r\n CylindersListComponent,\r\n SurveyDialogComponent,\r\n SurveysAccordionItemComponent,\r\n InspectionTemplateDialogComponent,\r\n LabourAnalysisChartComponent,\r\n LabourRateComponent,\r\n LabourRateDialogComponent,\r\n AddSiteDialogueComponent,\r\n RemindersAccordionItemComponent,\r\n CurrencyToggleComponent,\r\n DocumentLinkSelectComponent,\r\n DiscountToggleComponent,\r\n CurrencyComponent,\r\n InvoiceStatusAccordionItemComponent,\r\n LoginComponent,\r\n CftsAccordionItemComponent,\r\n InfoButtonComponent,\r\n DropdownButtonWithHelpComponent,\r\n ExchangeRateComponent,\r\n PurchaseInvoicePopupComponent,\r\n ReorderingComponent,\r\n JobTabsPopupComponent,\r\n StockLevelsComponent,\r\n BulkOrderPopupComponent,\r\n FaIconButtonComponent,\r\n PriorityIconComponent,\r\n PrioritySelectBoxComponent\r\n];\r\n\r\n@NgModule({\r\n declarations: components,\r\n exports: components,\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n SharedDirectivesModule,\r\n DxAccordionModule,\r\n DxSelectBoxModule,\r\n DxPopupModule,\r\n DxCheckBoxModule,\r\n PipesModule,\r\n MatDialogModule,\r\n MatButtonModule,\r\n RouterModule,\r\n DxDateBoxModule,\r\n DxDataGridModule,\r\n DxTextAreaModule,\r\n DxTextBoxModule,\r\n DxNumberBoxModule,\r\n DxProgressBarModule,\r\n DxReportViewerModule,\r\n DxMapModule,\r\n DxSwitchModule,\r\n DxFileUploaderModule,\r\n DxHtmlEditorModule,\r\n DxListModule,\r\n DxDropDownButtonModule,\r\n DxButtonGroupModule,\r\n DxScrollViewModule,\r\n ServicesightSharedModule,\r\n SharedPipesModule,\r\n ServicesightComponentsModule,\r\n PhraseBookModule,\r\n TranslateModule.forRoot({\r\n loader: {\r\n provide: TranslateLoader,\r\n useFactory: HttpLoaderFactory,\r\n deps: [HttpClient]\r\n }\r\n }),\r\n ReactiveFormsModule,\r\n DxoSeriesTemplateModule,\r\n DxoLabelModule,\r\n DxoCommonAxisSettingsModule,\r\n DxoCommonSeriesSettingsModule,\r\n DxoFontModule,\r\n DxChartModule,\r\n DxoSizeModule,\r\n DxoGridModule,\r\n DxoTickModule,\r\n DxoLegendModule,\r\n DxoAdaptiveLayoutModule,\r\n DxDropDownButtonModule,\r\n DxValidatorModule,\r\n DxFormModule,\r\n DxFilterBuilderModule,\r\n DxButtonModule,\r\n DxTooltipModule\r\n ]\r\n})\r\nexport class SharedComponentsModule { }\r\n","import { NgModule } from \"@angular/core\";\r\nimport { CommonModule } from \"@angular/common\";\r\nimport { ContactListComponent } from \"./contact-list/contact-list.component\";\r\nimport { ContactUploadComponent } from \"./contact-upload/contact-upload.component\";\r\nimport {\r\n DxAccordionModule,\r\n DxButtonModule,\r\n DxDataGridModule,\r\n DxDateBoxModule,\r\n DxDropDownBoxModule,\r\n DxDropDownButtonModule,\r\n DxLoadPanelModule,\r\n DxNumberBoxModule,\r\n DxPopupModule,\r\n DxSelectBoxModule,\r\n DxTabPanelModule,\r\n DxTextAreaModule,\r\n DxTextBoxModule,\r\n DxValidatorModule\r\n} from \"devextreme-angular\";\r\nimport { HttpClient, HttpClientModule } from \"@angular/common/http\";\r\nimport { FormsModule } from \"@angular/forms\";\r\nimport { RouterModule } from \"@angular/router\";\r\nimport { CanDeactivateGuard, HttpLoaderFactory, ServicesightSharedModule, SharedPipesModule } from \"servicesight-shared\";\r\nimport { SharedComponentsModule } from \"../shared/components/shared-components.module\";\r\nimport { TranslateLoader, TranslateModule } from \"@ngx-translate/core\";\r\nimport { PipesModule } from \"../shared/pipes/pipes.module\";\r\nimport { SharedDirectivesModule } from \"../shared/directives/shared-directives.module\";\r\n\r\n@NgModule({\r\n declarations: [\r\n ContactListComponent,\r\n ContactUploadComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n RouterModule,\r\n FormsModule,\r\n HttpClientModule,\r\n ServicesightSharedModule,\r\n SharedComponentsModule,\r\n SharedPipesModule,\r\n SharedDirectivesModule,\r\n PipesModule,\r\n DxDataGridModule,\r\n DxSelectBoxModule,\r\n DxDateBoxModule,\r\n DxTabPanelModule,\r\n DxTextAreaModule,\r\n DxAccordionModule,\r\n DxPopupModule,\r\n DxLoadPanelModule,\r\n DxNumberBoxModule,\r\n DxValidatorModule,\r\n DxTextBoxModule,\r\n DxDropDownBoxModule,\r\n DxButtonModule,\r\n DxDropDownButtonModule,\r\n TranslateModule.forRoot({\r\n loader: {\r\n provide: TranslateLoader,\r\n useFactory: HttpLoaderFactory,\r\n deps: [HttpClient]\r\n }\r\n }),\r\n ],\r\n exports: [],\r\n providers: [\r\n CanDeactivateGuard\r\n ]\r\n})\r\nexport class ContactsModule { }\r\n","
\r\n
\r\n

{{ 'customer.equipmentSystems.popup.header' | translate }} {{systemName}}

\r\n
\r\n \r\n
\r\n
\r\n \r\n\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n
\r\n
{{ item.data.Status | equipmentStatus | translate }}
\r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n
{{ item.data.Status | equipmentStatus | translate }}
\r\n
\r\n\r\n
\r\n \r\n","import { Location } from \"@angular/common\";\r\nimport { Component, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { DxDataGridComponent, DxPopupComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { zip } from \"rxjs\";\r\nimport {\r\n CustomerEquipmentSystemModel,\r\n EquipmentFilters,\r\n EquipmentRefrigerantComponent,\r\n FormMesssageService,\r\n Module,\r\n ModuleService,\r\n ProteanResponse\r\n} from \"servicesight-shared\";\r\nimport { JobCylinderLogDialogComponent } from \"src/app/shared/components/job-cylinder-log-dialog/job-cylinder-log-dialog.component\";\r\nimport { IListItemModel } from \"src/app/shared/models/ilist-item.model\";\r\nimport { EquipmentService } from \"../../equipment/services/equipment.service\";\r\nimport { CustomerEquipmentSystemsService } from \"../services/customer-equipment-systems.service\";\r\n\r\n@Component({\r\n selector: \"app-assign-equipment-system\",\r\n templateUrl: \"./assign-equipment-system.component.html\",\r\n styleUrls: [\"./assign-equipment-system.component.scss\"]\r\n})\r\nexport class AssignEquipmentSystemComponent implements OnInit, OnChanges {\r\n @ViewChild(\"equipmentSystem\") form: NgForm;\r\n @ViewChild(\"availableEquipmentGrid\") private availableEquipmentGrid: DxDataGridComponent;\r\n @ViewChild(\"availableEquipmentPopup\") private availableEquipmentPopup: DxPopupComponent;\r\n @ViewChild(\"LogEntryDialogue\") CylinderLogDialog: JobCylinderLogDialogComponent;\r\n @ViewChild(\"equipmentRefrigerant\", { static: false }) equipmentRefrigerant: EquipmentRefrigerantComponent;\r\n\r\n @Input() equipmentSystemId: number;\r\n @Input() customerId: number;\r\n\r\n public formName: string = \"equipmentSystem\";\r\n public system: CustomerEquipmentSystemModel = null;\r\n public systemName: string;\r\n public systemEquipmentDataSource: DataSource;\r\n public availableEquipmentDataSource: DataSource;\r\n public makeModelsDataStore: ODataStore;\r\n public locationDataSource: ODataStore;\r\n public searchText: string = \"\";\r\n public selectedEquipmentIds: Array = [];\r\n public newEquipmentIds: Array = [];\r\n public fgasEnabled: boolean = false;\r\n\r\n private filters = EquipmentFilters;\r\n private equipIds: number[] = [];\r\n public searchOptions: IListItemModel[] = [\r\n { Id: 0, Name: \"equipment.list.no.filter\" },\r\n { Id: 1, Name: \"equipment.list.filter.active\" },\r\n { Id: 2, Name: \"equipment.list.filter.my.equipment\" },\r\n { Id: 3, Name: \"equipment.list.filter.customers.equipment\" },\r\n { Id: 4, Name: \"equipment.list.filter.hire.equipment\" }\r\n ];\r\n private removedEquipmentIds: number[] = [];\r\n\r\n constructor(\r\n private location: Location,\r\n private moduleService: ModuleService,\r\n private customerEquipmentSystemsService: CustomerEquipmentSystemsService,\r\n private equipmentService: EquipmentService,\r\n private formMessageService: FormMesssageService) { }\r\n\r\n public ngOnInit(): void {\r\n this.makeModelsDataStore = this.equipmentService.GetMakeModelsDataStore();\r\n\r\n this.moduleService.GetEnabledModules().subscribe(modules => {\r\n this.fgasEnabled = modules.includes(Module.FGas);\r\n });\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.equipmentSystemId && changes.equipmentSystemId.currentValue > 0) {\r\n this.loadData();\r\n }\r\n\r\n if (changes.customerId && changes.customerId.currentValue > 0) {\r\n this.locationDataSource = this.equipmentService.GetLocationsDataStore(this.customerId);\r\n }\r\n\r\n if (this.customerId && this.equipmentSystemId) {\r\n this.updateDataSources(true);\r\n }\r\n }\r\n\r\n public discardChanges(): void {\r\n this.customerEquipmentSystemsService.lastOpenedModal = this.equipmentSystemId;\r\n this.location.go(`/customers/customer/${this.customerId}`);\r\n }\r\n\r\n public save(): void {\r\n this.formMessageService\r\n .RegisterObservable<[void, ProteanResponse]>(zip(\r\n this.customerEquipmentSystemsService.SaveDataInEquipmentSystem(this.equipmentSystemId, this.equipIds),\r\n this.customerEquipmentSystemsService.SaveCustomerEquipmentSystem(this.system)\r\n ), this.formName)\r\n .subscribe(() => {\r\n this.loadData();\r\n });\r\n }\r\n\r\n public goBackToCustomerEquipmentSystems() {\r\n this.customerEquipmentSystemsService.lastOpenedModal = this.equipmentSystemId;\r\n this.location.go(`/customers/customer/${this.customerId}`);\r\n }\r\n\r\n public openModal(): void {\r\n this.availableEquipmentPopup.instance.show();\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.availableEquipmentGrid.instance.searchByText(encodeURI(this.searchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public FilterChanged($event: any): void {\r\n const filterValue = $event.currentTarget.value;\r\n\r\n if (filterValue === \"0\") {\r\n this.availableEquipmentGrid.instance.clearFilter();\r\n } else {\r\n this.availableEquipmentGrid.instance.filter(this.filters[filterValue]);\r\n }\r\n }\r\n\r\n public closeModal(): void {\r\n this.availableEquipmentPopup.instance.hide();\r\n this.newEquipmentIds = [];\r\n }\r\n\r\n public removeEquipment(): void {\r\n this.selectedEquipmentIds.forEach(equipmentId => {\r\n this.equipIds = this.equipIds.filter(y => y !== equipmentId);\r\n\r\n if (!this.removedEquipmentIds.includes(equipmentId)) {\r\n this.removedEquipmentIds.push(equipmentId);\r\n }\r\n });\r\n\r\n this.selectedEquipmentIds = [];\r\n this.updateDataSources(false);\r\n }\r\n\r\n public addEquipment(): void {\r\n // Changing/reloading data on popup closing causes it to flicker so we need to close the popup first\r\n this.availableEquipmentPopup.instance.hide().then(() => {\r\n this.newEquipmentIds.forEach(equipmentId => {\r\n if (!this.equipIds.includes(equipmentId)) {\r\n this.equipIds.push(equipmentId);\r\n }\r\n //in case some removes an item and then readds it, take the id out of the removed ids\r\n this.removedEquipmentIds = this.removedEquipmentIds.filter(y => y !== equipmentId);\r\n });\r\n\r\n this.newEquipmentIds = [];\r\n this.updateDataSources(false);\r\n });\r\n }\r\n\r\n public OpenLogEntryDialog(): void {\r\n this.CylinderLogDialog.Show();\r\n }\r\n\r\n public OnLogAdded(): void {\r\n this.loadData();\r\n }\r\n\r\n private loadData(): void {\r\n this.customerEquipmentSystemsService.GetEquipmentSystem(this.equipmentSystemId).subscribe(system => {\r\n this.system = system;\r\n this.systemName = system.SystemName;\r\n this.equipmentRefrigerant.OnLogUpdated();\r\n });\r\n }\r\n\r\n private updateDataSources(initialLoad: boolean): void {\r\n if (initialLoad) {\r\n //first we need to get the equip ids which are in the system\r\n const equipmentDataSource = this.equipmentService.GetDataSource(true);\r\n\r\n const equipmentInSystem = new DataSource({\r\n store: equipmentDataSource.store(),\r\n filter: [\r\n [\r\n [\"EquipmentSystemId\", \"=\", Number(this.equipmentSystemId)]\r\n ]\r\n ]\r\n });\r\n equipmentInSystem.reload().then((data) => {\r\n this.equipIds = data.map((p) => {\r\n return p.EquipId;\r\n });\r\n this.updateSystemEquipmentDataSource();\r\n this.updateAvailableEquipmentDataSource();\r\n });\r\n } else {\r\n this.updateSystemEquipmentDataSource();\r\n this.updateAvailableEquipmentDataSource();\r\n }\r\n }\r\n\r\n private updateSystemEquipmentDataSource(): void {\r\n const equipmentDataSource = this.equipmentService.GetDataSource(true);\r\n\r\n const filter = [];\r\n\r\n if (this.equipIds.length) {\r\n this.equipIds.forEach(id => {\r\n filter.push([\"EquipId\", \"=\", id]);\r\n filter.push(\"or\");\r\n });\r\n filter.pop();\r\n }\r\n\r\n if (filter.length === 0) {\r\n //if there are no equipids then add a single filter with an invalid id so that we return an empty dataset\r\n //as there might actually be data in the system, however we dont want any returned as the user has removed them\r\n filter.push([\"EquipId\", \"=\", -1]);\r\n }\r\n\r\n this.systemEquipmentDataSource = new DataSource({\r\n store: equipmentDataSource.store(),\r\n filter\r\n });\r\n }\r\n\r\n private updateAvailableEquipmentDataSource(): void {\r\n const equipmentDataSource = this.equipmentService.GetDataSource(true);\r\n\r\n let filter = [];\r\n filter.push([\r\n [\"SiteId\", \"=\", Number(this.customerId)],\r\n \"and\",\r\n [\"EquipmentSystemId\", \"=\", null]\r\n ]);\r\n\r\n if (this.removedEquipmentIds.length) {\r\n const removedEquipmentFilter = [];\r\n this.removedEquipmentIds.forEach(id => {\r\n removedEquipmentFilter.push([\"EquipId\", \"=\", id]);\r\n removedEquipmentFilter.push(\"or\");\r\n });\r\n removedEquipmentFilter.pop();\r\n\r\n filter.push(\"or\");\r\n filter.push(removedEquipmentFilter);\r\n }\r\n\r\n if (this.equipIds.length) {\r\n const equipIdFilter = [];\r\n this.equipIds.forEach(id => {\r\n equipIdFilter.push([\"EquipId\", \"<>\", id]);\r\n equipIdFilter.push(\"and\");\r\n });\r\n equipIdFilter.pop();\r\n\r\n filter = [filter];\r\n filter.push(\"and\");\r\n filter.push(equipIdFilter);\r\n }\r\n\r\n this.availableEquipmentDataSource = new DataSource({\r\n store: equipmentDataSource.store(),\r\n filter,\r\n sort: [\r\n { selector: \"EquipNumber\", desc: false }\r\n ]\r\n });\r\n\r\n this.availableEquipmentDataSource.reload();\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable, Subject } from \"rxjs\";\r\nimport { GenericAttribute, IAppConfig, APP_CONFIG, CustomerModel } from \"servicesight-shared\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class CustomerAttributesService {\r\n\r\n private attributesSubject: Subject = new Subject();\r\n public saveSubscribe: Observable = this.attributesSubject.asObservable();\r\n public customer: CustomerModel;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private config: IAppConfig) {\r\n }\r\n\r\n // for AngularJS communication\r\n public OnCustomerSave() {\r\n this.attributesSubject.next();\r\n }\r\n\r\n public SaveAttributes(customerId: number, attributes: GenericAttribute[]): Observable {\r\n return this.http.post(`${this.config.apiLocations.ServiceSight}Customer/AddOrUpdateAttributes?customerId=${customerId}`, attributes);\r\n }\r\n\r\n public GetAttributes(customerId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Customer/GetAttributes?customerId=${customerId}`);\r\n }\r\n\r\n public GetCftsMemberNumber(customerId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Customer/GetCftsMemberNumber?customerId=${customerId}`);\r\n }\r\n}\r\n","import {\r\n Component,\r\n Inject,\r\n Input,\r\n OnChanges,\r\n OnDestroy,\r\n OnInit,\r\n SimpleChanges\r\n} from \"@angular/core\";\r\nimport { CustomerTypeModel } from \"projects/servicesight-shared/src/lib/models/customer-type.model\";\r\nimport { Subscription } from \"rxjs\";\r\nimport { DocumentTypeEnum, GenericAttribute } from \"servicesight-shared\";\r\nimport { CustomerAttributesService } from \"../services/customer-attributes.service\";\r\n\r\n@Component({\r\n selector: \"app-customer-attribute\",\r\n templateUrl: \"./customer-attribute.component.html\",\r\n styleUrls: [\"./customer-attribute.component.scss\"]\r\n})\r\nexport class CustomerAttributeComponent implements OnInit, OnChanges, OnDestroy {\r\n private saveSubscription: Subscription = null;\r\n\r\n public docType: typeof DocumentTypeEnum = DocumentTypeEnum;\r\n public customerAttributes: GenericAttribute[] = [];\r\n public cftsMemberNumber: string;\r\n public customerType: CustomerTypeModel;\r\n\r\n @Input() customerId: number;\r\n @Input() selected: boolean;\r\n\r\n private $rootScope = null;\r\n\r\n constructor(\r\n private attributeService: CustomerAttributesService,\r\n @Inject(\"$injector\") $injector) {\r\n this.$rootScope = $injector.get(\"$rootScope\");\r\n }\r\n\r\n // set 'dirty' on AngularJS site\r\n public FormSimulator = {\r\n markAsDirty: () => {\r\n this.$rootScope.$broadcast(\"form-changed\", {});\r\n }\r\n };\r\n\r\n public ngOnInit() {\r\n this.ngOnDestroy();\r\n\r\n this.saveSubscription = this.attributeService.saveSubscribe.subscribe(() => {\r\n this.attributeService.SaveAttributes(this.customerId, this.customerAttributes).subscribe();\r\n });\r\n\r\n this.customerType = this.attributeService.customer.Type;\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.customerId && changes.customerId.currentValue > 0) {\r\n this.attributeService.GetAttributes(this.customerId).subscribe(attributes => this.customerAttributes = attributes);\r\n this.attributeService.GetCftsMemberNumber(this.customerId).subscribe(cftsMemberNumber => this.cftsMemberNumber = cftsMemberNumber);\r\n }\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n if (this.saveSubscription) {\r\n this.saveSubscription.unsubscribe();\r\n this.saveSubscription = null;\r\n }\r\n }\r\n\r\n public UpdateCftsMemberNumber(cftsMemberNumber: string): void {\r\n this.cftsMemberNumber = cftsMemberNumber;\r\n this.$rootScope.$broadcast(\"customer-member-number-changed\", cftsMemberNumber);\r\n }\r\n}\r\n","\r\n","
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n
\r\n {{ data.displayValue ?? '0' }}\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n\r\n\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n \r\n\r\n
\r\n\r\n","import { Location } from \"@angular/common\";\r\nimport { Component, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Orientation } from \"servicesight-components\";\r\nimport {\r\n CustomerEquipmentSystemModel,\r\n FormMesssageService,\r\n Module,\r\n ModuleService,\r\n ProteanResponse,\r\n SettingData,\r\n SettingId,\r\n SettingsService\r\n} from \"servicesight-shared\";\r\nimport { CustomerEquipmentSystemsService } from \"../services/customer-equipment-systems.service\";\r\n\r\n\r\n@Component({\r\n selector: \"app-customer-equipment-systems\",\r\n templateUrl: \"./customer-equipment-systems.component.html\",\r\n styleUrls: [\"./customer-equipment-systems.component.scss\"]\r\n})\r\nexport class CustomerEquipmentSystemsComponent implements OnInit, OnChanges {\r\n @ViewChild(\"editCustomerEquipmentSystemForm\", { static: true }) form: NgForm;\r\n @Input() customerId: number;\r\n\r\n public formName: string = \"editCustomerEquipmentSystemForm\";\r\n public selectedKeys: Array = [];\r\n public customerEquipmentSystemsDataSource: DataSource;\r\n public customerEquipmentSystemCountsDataStore: ODataStore;\r\n public currentEditItem: CustomerEquipmentSystemModel = new CustomerEquipmentSystemModel();\r\n public isEditModalOpened: boolean = false;\r\n public unit: string = null;\r\n public orientation = Orientation;\r\n public fgasEnabled: boolean = false;\r\n\r\n constructor(\r\n private moduleService: ModuleService,\r\n private customerEquipmentSystemsService: CustomerEquipmentSystemsService,\r\n private formMessageService: FormMesssageService,\r\n private translate: TranslateService,\r\n private settingsService: SettingsService,\r\n private location: Location) {\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.customerEquipmentSystemCountsDataStore = this.customerEquipmentSystemsService.CustomerEquipmentSystemCounts();\r\n this.customerEquipmentSystemCountsDataStore.load().then(() => {\r\n if (this.customerEquipmentSystemsService.lastOpenedModal) {\r\n this.isEditModalOpened = true;\r\n }\r\n });\r\n\r\n this.settingsService.getSetting(SettingId.FGasRefrigerantUnits).subscribe((settingData: SettingData) => {\r\n this.unit = settingData.ValueListSelectedId === 1 ? \"kg\" : \"lb\";\r\n });\r\n\r\n this.moduleService.GetEnabledModules().subscribe(modules => {\r\n this.fgasEnabled = modules.includes(Module.FGas);\r\n });\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.customerId && changes.customerId.currentValue > 0) {\r\n this.customerEquipmentSystemsDataSource = this.customerEquipmentSystemsService.GetCustomerEquipmentSystems();\r\n this.customerEquipmentSystemsDataSource.filter([\"CustomerId\", \"=\", this.customerId]);\r\n\r\n if (this.customerEquipmentSystemsService.lastOpenedModal) {\r\n this.customerEquipmentSystemsDataSource.store().byKey(this.customerEquipmentSystemsService.lastOpenedModal).then(res => {\r\n const { EquipmentSystemId, SystemName, SystemDescription } = res;\r\n const parsedData: CustomerEquipmentSystemModel = {\r\n EquipmentSystemId,\r\n SystemDescription,\r\n SystemName,\r\n CustomerId: this.customerId\r\n };\r\n this.openEditModal(parsedData);\r\n this.isEditModalOpened = true;\r\n this.customerEquipmentSystemsService.lastOpenedModal = null;\r\n });\r\n }\r\n\r\n this.customerEquipmentSystemsDataSource.load();\r\n }\r\n }\r\n\r\n public DeleteSystem(): void {\r\n if (this.selectedKeys) {\r\n this.customerEquipmentSystemsService.DeleteCustomerEquipmentSystem(this.selectedKeys).subscribe(() => {\r\n this.customerEquipmentSystemsDataSource.reload();\r\n });\r\n }\r\n }\r\n\r\n public openEditModal(data: CustomerEquipmentSystemModel = null): void {\r\n this.form.form.markAsPristine();\r\n this.formMessageService.ClearForm(this.formName);\r\n if (data) {\r\n this.currentEditItem.EquipmentSystemId = data.EquipmentSystemId;\r\n this.currentEditItem.SystemDescription = data.SystemDescription;\r\n this.currentEditItem.SystemName = data.SystemName;\r\n this.form.form.markAsUntouched();\r\n } else {\r\n this.currentEditItem = new CustomerEquipmentSystemModel();\r\n }\r\n\r\n this.currentEditItem.CustomerId = this.customerId;\r\n this.currentEditItem.CustomerId = this.customerId;\r\n this.isEditModalOpened = true;\r\n }\r\n\r\n public saveCustomerEquipmentSystem(): void {\r\n this.formMessageService\r\n .RegisterObservable(this.customerEquipmentSystemsService.SaveCustomerEquipmentSystem(this.currentEditItem), this.formName)\r\n .subscribe(x => {\r\n this.customerEquipmentSystemsDataSource.reload();\r\n this.form.form.markAsPristine();\r\n this.currentEditItem.EquipmentSystemId = x.EntityId;\r\n });\r\n }\r\n\r\n public closeModal(): void {\r\n this.isEditModalOpened = false;\r\n }\r\n\r\n public assignEquipment(): void {\r\n if (this.form.form.dirty) {\r\n this.formMessageService\r\n .RegisterObservable(this.customerEquipmentSystemsService.SaveCustomerEquipmentSystem(this.currentEditItem), this.formName)\r\n .subscribe(x => {\r\n this.location.go(`/customers/equipment-system/${this.customerId}/${x.EntityId}`);\r\n });\r\n } else if (this.currentEditItem.EquipmentSystemId !== 0) {\r\n this.location.go(`/customers/equipment-system/${this.customerId}/${this.currentEditItem.EquipmentSystemId}`);\r\n }\r\n }\r\n\r\n public markFormAsDirty(): void {\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public handlePopupTitle(): string {\r\n if (this.currentEditItem.EquipmentSystemId && this.currentEditItem.EquipmentSystemId !== 0) {\r\n return this.translate.instant(\"customer.equipmentSystems.popup.header\") + ` ${this.currentEditItem.SystemName}`;\r\n } else {\r\n return this.translate.instant(\"customer.equipmentSystems.popup.new-header\");\r\n }\r\n }\r\n}\r\n","import { Component, Input } from \"@angular/core\";\r\nimport { DocumentTypeEnum } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-customer-file\",\r\n templateUrl: \"./customer-file.component.html\",\r\n styleUrls: [\"./customer-file.component.scss\"]\r\n})\r\nexport class CustomerFileComponent {\r\n public docType = DocumentTypeEnum;\r\n @Input() customerId: number;\r\n}\r\n","\r\n\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable, Subject } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { CustomerJobAlertsModel } from \"../models/customer-job-alerts.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class CustomerJobAlertsService {\r\n\r\n private jobAlertsSubject: Subject = new Subject();\r\n public saveSubscribe: Observable = this.jobAlertsSubject.asObservable();\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private config: IAppConfig) {\r\n }\r\n\r\n // for AngularJS communication\r\n public OnCustomerSave() {\r\n this.jobAlertsSubject.next();\r\n }\r\n\r\n public SaveJobAlerts(customerId: number, customerJobAlertsModel: CustomerJobAlertsModel): Observable {\r\n return this.http.post(`${this.config.apiLocations.ServiceSight}Customer/AddOrUpdateJobAlerts?customerId=${customerId}`, customerJobAlertsModel);\r\n }\r\n\r\n public GetJobAlerts(customerId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Customer/GetJobAlerts?customerId=${customerId}&location=ui`);\r\n }\r\n}\r\n","
\r\n
\r\n \r\n \r\n  \r\n \r\n \r\n beta\r\n
\r\n
\r\n \r\n \r\n  \r\n \r\n \r\n  \r\n \r\n \r\n  \r\n \r\n \r\n  \r\n
\r\n \r\n \r\n  \r\n \r\n \r\n  \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n You must provide a service contact email address\r\n
","import {\r\n Component,\r\n Inject,\r\n Input,\r\n OnChanges,\r\n OnDestroy,\r\n OnInit,\r\n SimpleChanges\r\n} from \"@angular/core\";\r\nimport { Module } from \"servicesight-shared\";\r\nimport { Subscription } from \"rxjs\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { ContactModel } from \"../../shared/models/contact.model\";\r\nimport { ContactService } from \"../../shared/services/contact/contact.service\";\r\nimport { CustomerJobAlertsModel } from \"../models/customer-job-alerts.model\";\r\nimport { CustomerJobAlertsService } from \"../services/customer-job-alerts.service\";\r\n\r\n@Component({\r\n selector: \"app-customer-job-alerts\",\r\n templateUrl: \"./customer-job-alerts.component.html\",\r\n styleUrls: [\"./customer-job-alerts.component.scss\"]\r\n})\r\nexport class CustomerJobAlertsComponent implements OnInit, OnChanges, OnDestroy {\r\n\r\n @Input() customerId: number;\r\n @Input() serviceContactId: number;\r\n public model: CustomerJobAlertsModel;\r\n public hasServiceContact: boolean;\r\n\r\n private $rootScope = null;\r\n private subscription: Subscription = new Subscription();\r\n private proEnabled: boolean = false;\r\n\r\n public get controlsDisabled(): boolean {\r\n return !this.proEnabled || !this.serviceContactId;\r\n }\r\n\r\n constructor(\r\n private moduleService: LicenseService,\r\n private customerJobAlertsService: CustomerJobAlertsService,\r\n private contactService: ContactService,\r\n @Inject(\"$injector\") $injector) {\r\n this.$rootScope = $injector.get(\"$rootScope\");\r\n }\r\n\r\n // set 'dirty' on AngularJS site\r\n public FormSimulator = {\r\n markAsDirty: () => {\r\n this.$rootScope.$broadcast(\"form-changed\", { });\r\n }\r\n };\r\n\r\n public ngOnInit(): void {\r\n this.moduleService.GetCompanyHasAccessToModule(Module.Pro).subscribe(proEnabled => {\r\n this.proEnabled = proEnabled;\r\n });\r\n\r\n const saveSubscription = this.customerJobAlertsService.saveSubscribe.subscribe(() => {\r\n this.customerJobAlertsService.SaveJobAlerts(this.customerId, this.model).subscribe();\r\n });\r\n this.subscription.add(saveSubscription);\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.customerId && changes.customerId.currentValue > 0) {\r\n const getSubscription = this.customerJobAlertsService.GetJobAlerts(this.customerId).subscribe(model => { this.model = model; });\r\n this.subscription.add(getSubscription);\r\n }\r\n if (changes.serviceContactId && changes.serviceContactId.currentValue > 0) {\r\n const contactSubscription = this.contactService.GetContact(this.serviceContactId).subscribe(data => {\r\n const viewModel = data.ViewModel as ContactModel;\r\n if (viewModel.Email) {\r\n this.hasServiceContact = true;\r\n }\r\n });\r\n this.subscription.add(contactSubscription);\r\n }\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.subscription.unsubscribe();\r\n }\r\n\r\n public SetFormDirty(): void {\r\n this.FormSimulator.markAsDirty();\r\n }\r\n\r\n public JobCompleteOptionChanged(): void {\r\n if (!this.model.JobCompleted) {\r\n this.model.JobCompletedIncludeInspections = false;\r\n this.model.JobCompletedIncludeJobSheet = false;\r\n }\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { CustomerStatus } from \"servicesight-shared\";\r\n\r\n@Pipe({\r\n name: \"customerStatus\"\r\n})\r\nexport class CustomerStatusPipe implements PipeTransform {\r\n private readonly status = {\r\n [CustomerStatus.PROSPECT]: \"customer.status.prospect\",\r\n [CustomerStatus.ACTIVE]: \"customer.status.active\",\r\n [CustomerStatus.MANAGING_AGENT]: \"customer.status.managing-agent\",\r\n [CustomerStatus.CLOSED]: \"customer.status.closed\",\r\n };\r\n\r\n private readonly colours = {\r\n [CustomerStatus.PROSPECT]: \"clryellow\",\r\n [CustomerStatus.ACTIVE]: \"clrgreen\",\r\n [CustomerStatus.MANAGING_AGENT]: \"clrnavy\",\r\n [CustomerStatus.CLOSED]: \"clrred\"\r\n };\r\n\r\n private readonly stringValueMapping = {\r\n Active: CustomerStatus.ACTIVE,\r\n Closed: CustomerStatus.CLOSED,\r\n Prospect: CustomerStatus.PROSPECT,\r\n ManagingAgent: CustomerStatus.MANAGING_AGENT\r\n };\r\n\r\n transform(value: number | string | CustomerStatus, args?: any): string {\r\n let safeValue = Number(value);\r\n\r\n if (isNaN(safeValue)) {\r\n safeValue = this.stringValueMapping[value];\r\n }\r\n\r\n const customerStatus = {\r\n colour: this.colours[safeValue],\r\n text: this.status[safeValue]\r\n };\r\n return customerStatus[args];\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'menu.customers' | translate }}

\r\n
\r\n {{ 'buttons.sync' | translate }}\r\n {{ 'buttons.upload' | translate }}\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n {{ data.name | translate }}\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n {{ data.data.Status | customerStatus: 'text' | translate }}\r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n
\r\n\r\n\r\n
\r\n
\r\n {{ tooltipText }}\r\n
\r\n
\r\n
","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxTooltipComponent } from \"devextreme-angular\";\r\nimport { DxDataGridComponent } from \"devextreme-angular/ui/data-grid\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { on } from \"devextreme/events\";\r\nimport {\r\n CustomerMetaData,\r\n CustomerService,\r\n CustomerStatus,\r\n GridExportService,\r\n GridKind,\r\n GridService,\r\n HelpItemTagEnum,\r\n IUserReferences,\r\n Module,\r\n ModuleService,\r\n PermissionsService,\r\n PriorityService,\r\n SettingData,\r\n SettingId,\r\n SettingsService,\r\n UICustomisation\r\n} from \"servicesight-shared\";\r\nimport { CustomerStatusPipe } from \"src/app/shared/pipes/enums/customer-status-pipe\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { Ng1CustomerService } from \"src/app/shared/services/ng1-customer.service\";\r\n\r\n@Component({\r\n selector: \"app-customer-list\",\r\n templateUrl: \"./customer-list.component.html\",\r\n styleUrls: [\r\n \"../../../../projects/servicesight-shared/src/lib/styles/global.scss\",\r\n \"../../../../projects/servicesight-shared/src/lib/styles/backgrounds.scss\",\r\n \"../../../../projects/servicesight-shared/src/lib/styles/servicesight-shared.scss\",\r\n \"./customer-list.component.scss\"]\r\n})\r\nexport class CustomerListComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n @ViewChild(DxTooltipComponent) tooltip: DxTooltipComponent;\r\n\r\n public helpItemTagEnum = HelpItemTagEnum;\r\n public salesCampaignsEnabled: boolean = false;\r\n public salesOpportunityEnabled: boolean = false;\r\n public hasQuotesEnabled: boolean = false;\r\n\r\n public SearchText: string = \"\";\r\n public CustomersDataSource: DataSource;\r\n public CustomerStatus = CustomerStatus;\r\n public ManagingAgentsEnabled: boolean = false;\r\n public CustomersMetaData: CustomerMetaData = new Object() as CustomerMetaData;\r\n public UICustomisations: IUserReferences;\r\n public userRef1Label: string;\r\n public userRef2Label: string;\r\n public CustomerManagingAgentsEnabled: boolean = false;\r\n public UseEORINumbersEnabled: boolean = false;\r\n public ynDataSource = [{ id: false, name: \"No\" }, { id: true, name: \"Yes\" }];\r\n public zeroOneDataSource = [{ id: 0, name: \"No\" }, { id: -1, name: \"Yes\" }];\r\n public hasProModule: boolean = false;\r\n public prioritiesDataSource: DataSource;\r\n public tooltipText: string;\r\n\r\n public newCustomerText: string = \"New customer\";\r\n\r\n public customerOptions: { id: number; name: string }[] = [];\r\n\r\n private gridState: any = {};\r\n\r\n public filters: any = {\r\n 1: [\"Status\", \"=\", CustomerStatus.MANAGING_AGENT],\r\n 2: [\"Status\", \"=\", CustomerStatus.PROSPECT],\r\n 3: [\"Status\", \"=\", CustomerStatus.ACTIVE],\r\n 4: [\"Status\", \"=\", CustomerStatus.CLOSED]\r\n };\r\n\r\n public exportOptions: { id: number; label: string }[] = [\r\n { id: 1, label: \"Export data as xlsx\" },\r\n { id: 2, label: \"Export data as csv\" },\r\n { id: 3, label: \"Export data as pdf\" }\r\n ];\r\n\r\n constructor(\r\n private customerModalService: Ng1CustomerService,\r\n private gridService: GridService,\r\n private customerService: CustomerService,\r\n private translate: TranslateService,\r\n private settingsService: SettingsService,\r\n private moduleService: ModuleService,\r\n private permissionsService: PermissionsService,\r\n private customerStatusPipe: CustomerStatusPipe,\r\n private gridExportService: GridExportService,\r\n private licenseService: LicenseService,\r\n private priorityService: PriorityService\r\n ) {\r\n this.StatusToText = this.StatusToText.bind(this);\r\n this.CustomerType = this.CustomerType.bind(this);\r\n this.onEditorPreparing = this.onEditorPreparing.bind(this);\r\n this.onCellPrepared = this.onCellPrepared.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.prioritiesDataSource = this.priorityService.OrderedPrioritiesDataSource();\r\n this.prioritiesDataSource.load();\r\n this.gridService.GetLayout(GridKind.Customers).subscribe(value => {\r\n if (value) {\r\n this.gridState = value;\r\n this.dataGrid.instance.state(value);\r\n }\r\n this.GetDataSources();\r\n }, () => this.GetDataSources());\r\n\r\n this.settingsService.getSetting(SettingId.CustomerManagingAgents).subscribe((setting: SettingData) => {\r\n this.ManagingAgentsEnabled = setting.ValueBool;\r\n this.CustomerManagingAgentsEnabled = setting.ValueBool;\r\n if (this.ManagingAgentsEnabled) {\r\n this.customerOptions.push({ id: 2, name: \"customer.list.new-managing-agent\" });\r\n }\r\n });\r\n\r\n this.settingsService.getSetting(SettingId.UseEORINumbers).subscribe((setting: SettingData) => {\r\n this.UseEORINumbersEnabled = setting.ValueBool;\r\n });\r\n\r\n this.moduleService.GetEnabledModules().subscribe(enabledModules => {\r\n this.salesOpportunityEnabled = enabledModules.includes(Module.SalesOpportunity);\r\n this.salesCampaignsEnabled = enabledModules.includes(Module.SalesCampaigns);\r\n });\r\n\r\n this.permissionsService.CurrentUserHasPermission(\"QuoteView\").subscribe(permission => {\r\n this.hasQuotesEnabled = permission;\r\n });\r\n\r\n this.customerService.GetCustomerMetaData().subscribe(customerMetaData => {\r\n this.CustomersMetaData = customerMetaData;\r\n if (this.CustomersMetaData.IsAllowedAddProspect) {\r\n this.customerOptions.push({ id: 1, name: \"customer.list.new-prospect\" });\r\n }\r\n if (this.CustomersMetaData.IsAllowedImport) {\r\n this.customerOptions.push({ id: 3, name: \"buttons.upload\" });\r\n }\r\n });\r\n\r\n this.translate.get([\r\n \"customer.list.new-customer\",\r\n ]).subscribe(value => {\r\n this.newCustomerText = value[\"customer.list.new-customer\"];\r\n });\r\n\r\n this.licenseService.GetCompanyHasAccessToModule(Module.Pro).subscribe(r => {\r\n this.hasProModule = r;\r\n });\r\n\r\n this.getUserReferences();\r\n }\r\n\r\n public onItemClick(e: any): void {\r\n switch (e.itemData.id) {\r\n case 1:\r\n this.TriggerModal(\"prospect\");\r\n break;\r\n case 2:\r\n this.TriggerModal(\"managingagent\");\r\n break;\r\n case 3:\r\n location.href = \"#/customers/upload\";\r\n break;\r\n }\r\n }\r\n\r\n public onExportItemClick(e: any): void {\r\n switch (e.itemData.id) {\r\n case 1:\r\n this.gridExportService.exportGridAsXlsx(this.dataGrid.instance, this.translate.instant(\"menu.customers\"));\r\n break;\r\n case 2:\r\n this.gridExportService.exportGridAsCsv(this.dataGrid.instance, this.translate.instant(\"menu.customers\"));\r\n break;\r\n case 3:\r\n this.gridExportService.exportGridAsPdf(this.dataGrid.instance, this.translate.instant(\"menu.customers\"), { orientation: \"l\" });\r\n break;\r\n default:\r\n throw new Error(\"Unhandled export type: \" + e.itemData.id);\r\n }\r\n }\r\n\r\n public onDataErrorOccurred(e: any): void {\r\n // TODO: Remove this temporary error message once we've got the export working serverside\r\n if (!e.error.requestOptions.data.$top && e.error.message === \"Network connection timeout\") {\r\n // A network connection timeout with no $top in the request is pretty much the only way we can tell this error came specifically from the export\r\n e.error.message = this.translate.instant(\"customer.list.export.error\");\r\n }\r\n }\r\n\r\n public onCellPrepared(e: any): void {\r\n if (e.rowType === \"data\" && e.column.dataField === \"PriorityName\") {\r\n on(e.cellElement, \"mouseover\", arg => {\r\n this.tooltipText = e.text;\r\n this.tooltip.instance.show(arg.target);\r\n });\r\n\r\n on(e.cellElement, \"mouseout\", () => {\r\n this.tooltip.instance.hide();\r\n });\r\n }\r\n }\r\n\r\n public onEditorPreparing(e: any): void {\r\n if (e.parentType === \"filterRow\" && e.name === \"PriorityName\") {\r\n e.editorName = \"dxSelectBox\";\r\n const prioritiesNames = this.prioritiesDataSource.items().map(x => x.Name);\r\n e.editorOptions.dataSource = [\"(All)\", ...prioritiesNames];\r\n }\r\n }\r\n\r\n public calculatePriorityFilter(filterValue, selectedFilterOperation, filterType) {\r\n filterValue = filterValue.replace(\" \", \"\");\r\n const column = this as any;\r\n\r\n if (filterValue === \"(All)\"){\r\n return null;\r\n }\r\n // Invokes the default filtering behavior\r\n return column.defaultCalculateFilterExpression(filterValue, selectedFilterOperation, filterType);\r\n }\r\n\r\n private getUserReferences() {\r\n this.UICustomisations = JSON.parse(localStorage.getItem(\"ls.userReferences\"));\r\n if (this.UICustomisations) {\r\n const userRefJob1 = this.UICustomisations.list.filter((i) => i.UICustomisationID === UICustomisation.CUSTOMER_REF1)[0];\r\n this.userRef1Label = userRefJob1.CustomText || userRefJob1.OriginalText;\r\n const userRefJob2 = this.UICustomisations.list.filter((i) => i.UICustomisationID === UICustomisation.CUSTOMER_REF2)[0];\r\n this.userRef2Label = userRefJob2.CustomText || userRefJob2.OriginalText;\r\n }\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.dataGrid.instance.pageIndex(0);\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public SaveLayout(): void {\r\n const state = this.dataGrid.instance.state();\r\n this.gridService.SaveLayout(state, GridKind.Customers);\r\n }\r\n\r\n public ResetLayout(): void {\r\n this.gridService.ResetLayout(GridKind.Customers);\r\n this.dataGrid.instance.state(null);\r\n this.gridState = null;\r\n }\r\n\r\n public TriggerModal(type: string): void {\r\n this.customerModalService.openCustomerModal(type)\r\n .then((customerId: number) => {\r\n location.href = \"#/customers/customer/\" + customerId;\r\n });\r\n }\r\n\r\n public FilterChanged($event): void {\r\n const filterValue = $event.currentTarget.value;\r\n if (filterValue === \"0\") {\r\n this.dataGrid.instance.clearFilter();\r\n } else {\r\n this.dataGrid.instance.filter(this.filters[filterValue]);\r\n }\r\n }\r\n\r\n public CustomerType(rowData: any): string {\r\n switch (rowData.Status) {\r\n case CustomerStatus.MANAGING_AGENT:\r\n return this.translate.instant(\"customer.status.managing-agent\");\r\n case CustomerStatus.PROSPECT:\r\n return this.translate.instant(\"customer.status.prospect\");\r\n default:\r\n if (rowData.IsCustomer) {\r\n return this.translate.instant(\"label.customer\");\r\n }\r\n return this.translate.instant(\"label.site\");\r\n }\r\n }\r\n\r\n public IsCreditHold(CreditHold: number): string {\r\n if (CreditHold) {\r\n return this.translate.instant(\"generic.yes\");\r\n } else {\r\n return this.translate.instant(\"generic.no\");\r\n }\r\n }\r\n\r\n public StatusToText(rowData): string {\r\n const { Status } = rowData;\r\n const piped = this.customerStatusPipe.transform(Status, \"text\");\r\n const translated = this.translate.instant(piped);\r\n return translated;\r\n }\r\n\r\n public ViewDetails(event: any): void {\r\n window.location.href = `/#/customers/customer/${event.data.CustomerId}`;\r\n }\r\n\r\n private GetDataSources(): void {\r\n this.CustomersDataSource = this.customerService.GetCustomersDataSource();\r\n }\r\n\r\n public openColumnChooser(): void {\r\n this.dataGrid.instance.showColumnChooser();\r\n }\r\n\r\n public columnVisible(name: string, defaultValue: boolean): boolean {\r\n if (this.gridState && this.gridState.columns) {\r\n const column = this.gridState.columns.find(x => x.name === name);\r\n\r\n if (column) {\r\n return column.visible;\r\n }\r\n }\r\n\r\n return defaultValue;\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable, Subject } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { CustomerSkill } from \"../models/customer-skill\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class CustomerSkillsService {\r\n\r\n private skillsSubject: Subject = new Subject();\r\n public saveSubscribe: Observable = this.skillsSubject.asObservable();\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private config: IAppConfig) {\r\n }\r\n\r\n // for AngularJS communication\r\n public OnCustomerSave() {\r\n this.skillsSubject.next();\r\n }\r\n\r\n public SaveSkills(customerId: number, skills: CustomerSkill[]): Observable {\r\n return this.http.post(`${this.config.apiLocations.ServiceSight}Customer/AddOrUpdateSkills?customerId=${customerId}`, skills);\r\n }\r\n\r\n public GetSkills(customerId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Customer/GetSkills?customerId=${customerId}`);\r\n }\r\n}\r\n","
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n\r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n\r\n \r\n\r\n\r\n\r\n\r\n\r\n","import {\r\n Component,\r\n Inject,\r\n Input,\r\n OnChanges,\r\n OnDestroy,\r\n OnInit,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { Subscription } from \"rxjs\";\r\nimport { AddSkillDialogueComponent } from \"src/app/shared/components/add-skill-dialogue/add-skill-dialogue.component\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\nimport { EngineerSkillService } from \"../../settings/services/engineer-skill.service\";\r\nimport { CustomerSkill } from \"../models/customer-skill\";\r\nimport { CustomerSkillsService } from \"../services/customer-skills.service\";\r\n\r\n@Component({\r\n selector: \"app-customer-skills\",\r\n templateUrl: \"./customer-skills.component.html\",\r\n styleUrls: [\"./customer-skills.component.scss\"]\r\n})\r\nexport class CustomerSkillsComponent implements OnInit, OnChanges, OnDestroy {\r\n @ViewChild(\"addSkill\") skillsPopup: AddSkillDialogueComponent;\r\n\r\n @Input() customerId: number;\r\n public skillsAddDialogDataSource: DataSource;\r\n public skillsGridDataSource: DataSource;\r\n public selectedIds: number[] = [];\r\n public skills: CustomerSkill[];\r\n\r\n private $rootScope = null;\r\n private subscription: Subscription = new Subscription();\r\n\r\n constructor(\r\n private odataService: ODataService,\r\n private engineerSkillService: EngineerSkillService,\r\n private customerSkillService: CustomerSkillsService,\r\n @Inject(\"$injector\") $injector) {\r\n this.$rootScope = $injector.get(\"$rootScope\");\r\n }\r\n\r\n // set 'dirty' on AngularJS site\r\n public FormSimulator = {\r\n markAsDirty: () => {\r\n this.$rootScope.$broadcast(\"form-changed\", { });\r\n }\r\n };\r\n\r\n ngOnInit() {\r\n this.SetDataSource();\r\n\r\n const getSubscription = this.customerSkillService.saveSubscribe.subscribe(() => {\r\n this.customerSkillService.SaveSkills(this.customerId, this.skills).subscribe();\r\n });\r\n this.subscription.add(getSubscription);\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.customerId && changes.customerId.currentValue > 0) {\r\n const saveSubscription = this.customerSkillService.GetSkills(this.customerId).subscribe(skills => {\r\n this.skills = skills;\r\n this.SetDataSource();\r\n });\r\n this.subscription.add(saveSubscription);\r\n }\r\n }\r\n\r\n ngOnDestroy() {\r\n this.subscription.unsubscribe();\r\n }\r\n\r\n public RemoveSkill(): void {\r\n for (const skillId of this.selectedIds) {\r\n this.skills.splice(this.skills.findIndex(s => s.SkillId === skillId), 1);\r\n }\r\n this.selectedIds = [];\r\n this.FormSimulator.markAsDirty();\r\n this.SetDataSource();\r\n }\r\n\r\n public OpenAddSkill(): void {\r\n const filter = [];\r\n this.skills.forEach(a => {\r\n filter.push([\"SkillID\", \"<>\", a.SkillId]);\r\n filter.push(\"and\");\r\n });\r\n\r\n //FYI - We cant filter based on the correct property as the datasource doesnt like it (filter.push([\"SkillType = \", EngineerSkillTypeEnum.Site]))\r\n filter.push([\"SkillTypeDescription\", \"=\", \"Site\"]);\r\n\r\n if (filter.length > 0) {\r\n this.skillsAddDialogDataSource.filter(filter);\r\n }\r\n this.skillsPopup.Show();\r\n }\r\n\r\n public async OnSkillIdsAdded(ids: number[]): Promise {\r\n\r\n for (const skillId of ids) {\r\n const newSkill: CustomerSkill = {\r\n CustomerId: this.customerId,\r\n SkillId: skillId\r\n };\r\n this.skills.push(newSkill);\r\n }\r\n this.FormSimulator.markAsDirty();\r\n this.SetDataSource();\r\n }\r\n\r\n private SetDataSource(): void {\r\n this.skillsAddDialogDataSource = this.engineerSkillService.GetEngineerSkills();\r\n this.skillsGridDataSource = this.odataService.GetDataSourceWithLookups(\r\n this.skills,\r\n \"SkillId\",\r\n [\r\n {\r\n store: this.engineerSkillService.ODataEngineerSkills(),\r\n dataKey: \"SkillId\",\r\n lookupKey: \"SkillID\",\r\n displayExprs: [\"Name\", \"Description\"]\r\n }\r\n ]\r\n );\r\n }\r\n}\r\n","
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n
\r\n
{{ item.data.Status | equipmentStatus | translate }}
\r\n
\r\n
\r\n\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n
\r\n
\r\n \r\n \r\n {{ data.displayValue ?? 'customer.equipmentSystems.not-assigned' | translate }}\r\n {{data.groupContinuesMessage ? ' ('+data.groupContinuesMessage+')' : ''}}\r\n {{data.groupContinuedMessage ? ' ('+data.groupContinuedMessage+')': ''}}\r\n
\r\n
\r\n\r\n \r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n
{{ item.data.Status | equipmentStatus | translate }}
\r\n
\r\n\r\n
\r\n \r\n\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { DxDataGridComponent, DxPopupComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { EquipmentFilters, SettingData, SettingId, SettingsService } from \"servicesight-shared\";\r\nimport { IListItemModel } from \"src/app/shared/models/ilist-item.model\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { EquipmentService } from \"../../equipment/services/equipment.service\";\r\nimport { CustomerEquipmentSystemsService } from \"../services/customer-equipment-systems.service\";\r\nimport { ServiceGroupsService } from \"../services/service-groups.service\";\r\n\r\n@Component({\r\n selector: \"app-service-group-equipments\",\r\n templateUrl: \"./service-group-equipments.component.html\",\r\n styleUrls: [\r\n \"./service-group-equipments.component.scss\",\r\n \"../../../../projects/servicesight-shared/src/lib/styles/servicesight-shared.scss\"\r\n ]\r\n})\r\nexport class ServiceGroupEquipmentsComponent implements OnInit, OnChanges {\r\n private isProEnabled: boolean = false;\r\n private isEquipmentEnabled: boolean = false;\r\n private isEquipmentSystemsEnabled: boolean = false;\r\n\r\n @ViewChild(\"serviceGroupsGrid\") private dataGrid: DxDataGridComponent;\r\n @ViewChild(\"equipmentsPopup\") private equipmentsPopup: DxPopupComponent;\r\n @Input() serviceGroupId: number;\r\n @Input() customerId: string;\r\n @Input() public equipmentsToRemove: number[] = [];\r\n @Input() public equipmentsToAdd: number[] = [];\r\n @Output() public equipmentsToRemoveChange = new EventEmitter();\r\n @Output() public equipmentsToAddChange = new EventEmitter();\r\n\r\n public equipmentsInServiceGroups: DataSource;\r\n public availableEquipments: DataSource;\r\n public makeModelsDataStore: ODataStore;\r\n public locationDataSource: ODataStore;\r\n public equipmentSystemDataStore: ODataStore;\r\n public SearchText: string = \"\";\r\n public selectedEquipments: Array = [];\r\n public selectedNewEquipments: Array = [];\r\n public filters = EquipmentFilters;\r\n public searchOptions: IListItemModel[] = [\r\n { Id: 0, Name: \"equipment.list.no.filter\" },\r\n { Id: 1, Name: \"equipment.list.filter.active\" },\r\n { Id: 2, Name: \"equipment.list.filter.my.equipment\" },\r\n { Id: 3, Name: \"equipment.list.filter.customers.equipment\" },\r\n { Id: 4, Name: \"equipment.list.filter.hire.equipment\" }\r\n ];\r\n public equipmentSystemGroupSelectedValues: any = {};\r\n public useGroupCheckBoxes: boolean;\r\n\r\n constructor(\r\n private licenseService: LicenseService,\r\n private serviceGroups: ServiceGroupsService,\r\n private equipmentService: EquipmentService,\r\n private equipmentSystemsService: CustomerEquipmentSystemsService,\r\n private settingsService: SettingsService) {\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.makeModelsDataStore = this.equipmentService.GetMakeModelsDataStore();\r\n\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(modules => {\r\n this.isProEnabled = modules.ProEnabled;\r\n this.isEquipmentEnabled = modules.EquipmentEnabled;\r\n this.SetupServiceGroupsData();\r\n });\r\n this.settingsService.getSetting(SettingId.EquipmentSystems).subscribe((setting: SettingData) => {\r\n this.isEquipmentSystemsEnabled = setting.ValueBool;\r\n });\r\n }\r\n\r\n public ngOnChanges(): void {\r\n this.SetupServiceGroupsData();\r\n }\r\n\r\n public openModal(): void {\r\n this.equipmentsPopup.instance.show();\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public FilterChanged($event: any): void {\r\n const filterValue = $event.currentTarget.value;\r\n if (filterValue === \"0\") {\r\n this.dataGrid.instance.clearFilter();\r\n } else {\r\n this.dataGrid.instance.filter(this.filters[filterValue]);\r\n }\r\n }\r\n\r\n public closeModal(): void {\r\n this.equipmentsPopup.instance.hide();\r\n }\r\n\r\n public removeEquipments(): void {\r\n this.selectedEquipments.forEach(equipmentId => {\r\n if (!this.equipmentsToRemove.includes(equipmentId)) {\r\n this.equipmentsToRemove.push(equipmentId);\r\n }\r\n this.equipmentsToAdd = this.equipmentsToAdd.filter(y => y !== equipmentId);\r\n this.equipmentsToAddChange.emit(this.equipmentsToAdd);\r\n this.equipmentsToRemoveChange.emit(this.equipmentsToRemove);\r\n });\r\n\r\n this.selectedEquipments = [];\r\n this.filterUsedEquipments();\r\n }\r\n\r\n public addEquipments(): void {\r\n // Changing/reloading data on popup closing causes it to flicker so we need to close the popup first\r\n this.equipmentsPopup.instance.hide().then(() => {\r\n this.selectedNewEquipments.forEach(equipmentId => {\r\n if (!this.equipmentsToAdd.includes(equipmentId)) {\r\n this.equipmentsToAdd.push(equipmentId);\r\n }\r\n this.equipmentsToRemove = this.equipmentsToRemove.filter(y => y !== equipmentId);\r\n this.equipmentsToAddChange.emit(this.equipmentsToAdd);\r\n this.equipmentsToRemoveChange.emit(this.equipmentsToRemove);\r\n });\r\n\r\n this.selectedNewEquipments = [];\r\n this.filterUsedEquipments();\r\n });\r\n }\r\n\r\n public showSystemGroups(): boolean {\r\n return this.isProEnabled && this.isEquipmentSystemsEnabled;\r\n }\r\n\r\n public onGridSelectionChanged(args: any) {\r\n if (this.showSystemGroups() && this.useGroupCheckBoxes) {\r\n this.SynchronizeCheckBoxes(args.currentDeselectedRowKeys);\r\n this.SynchronizeCheckBoxes(args.selectedRowKeys);\r\n }\r\n }\r\n\r\n public onEquipmentSystemGroupChecked(e: any, d: any) {\r\n if (e.event) {\r\n const keys = [];\r\n\r\n if (d.data.items) {\r\n for (const item of d.data.items) {\r\n keys.push(item.EquipId);\r\n }\r\n }\r\n if (d.data.collapsedItems) {\r\n for (const item of d.data.collapsedItems) {\r\n keys.push(item.EquipId);\r\n }\r\n }\r\n if (e.value) {\r\n this.dataGrid.instance.selectRows(keys, true);\r\n } else {\r\n this.dataGrid.instance.deselectRows(keys);\r\n }\r\n }\r\n }\r\n\r\n private SetupServiceGroupsData(): void {\r\n if (this.serviceGroups && this.customerId && this.isEquipmentEnabled && this.isProEnabled) {\r\n this.filterUsedEquipments();\r\n\r\n this.locationDataSource = this.equipmentService.GetLocationsDataStore(parseInt(this.customerId, 10));\r\n this.equipmentSystemDataStore = this.equipmentSystemsService.DataStore();\r\n }\r\n }\r\n\r\n private filterUsedEquipments(): void {\r\n const equipmentDataSource = this.equipmentService.GetDataSource(true);\r\n const listFilter = this.getEquipmentListFilter();\r\n const availableEquipmentsFilter = this.getavailableEquipmentsAddFilter();\r\n\r\n this.equipmentsInServiceGroups = new DataSource({\r\n store: equipmentDataSource.store(),\r\n filter: listFilter\r\n });\r\n\r\n this.availableEquipments = new DataSource({\r\n store: equipmentDataSource.store(),\r\n filter: availableEquipmentsFilter,\r\n sort: [\r\n { selector: \"EquipNumber\", desc: false }\r\n ]\r\n });\r\n\r\n this.equipmentsInServiceGroups.reload();\r\n this.availableEquipments.reload();\r\n\r\n this.equipmentSystemGroupSelectedValues = {};\r\n if (this.showSystemGroups() && this.useGroupCheckBoxes) {\r\n const dataSource = new DataSource({\r\n store: equipmentDataSource.store(),\r\n filter: availableEquipmentsFilter\r\n });\r\n\r\n dataSource.load().then((data) => {\r\n data.map((p) => {\r\n this.equipmentSystemGroupSelectedValues[p.EquipmentSystemId] = false;\r\n });\r\n });\r\n }\r\n }\r\n\r\n private getEquipmentListFilter(): any[] {\r\n let filter = [];\r\n\r\n filter.push([\r\n [\"SiteId\", \"=\", parseInt(this.customerId, 10)],\r\n \"and\",\r\n [\"ServiceGroupId\", \"=\", Number(this.serviceGroupId)]\r\n ]);\r\n\r\n if (this.equipmentsToAdd.length) {\r\n const equipmentToAddFilter = [];\r\n this.equipmentsToAdd.forEach(id => {\r\n equipmentToAddFilter.push([\"EquipId\", \"=\", id]);\r\n equipmentToAddFilter.push(\"or\");\r\n });\r\n equipmentToAddFilter.pop();\r\n\r\n filter.push(\"or\");\r\n filter.push(equipmentToAddFilter);\r\n }\r\n\r\n if (this.equipmentsToRemove.length) {\r\n const equipmentToRemoveFilter = [];\r\n this.equipmentsToRemove.forEach(id => {\r\n equipmentToRemoveFilter.push([\"EquipId\", \"<>\", id]);\r\n equipmentToRemoveFilter.push(\"and\");\r\n });\r\n equipmentToRemoveFilter.pop();\r\n\r\n filter = [filter];\r\n filter.push(\"and\");\r\n filter.push(equipmentToRemoveFilter);\r\n }\r\n\r\n return filter;\r\n }\r\n\r\n private getavailableEquipmentsAddFilter(): any[] {\r\n let filter = [];\r\n\r\n filter.push([\r\n [\"SiteId\", \"=\", parseInt(this.customerId, 10)],\r\n \"and\",\r\n [\"ServiceGroupId\", \"=\", null]\r\n ]);\r\n\r\n if (this.equipmentsToRemove.length) {\r\n const equipmentToRemoveFilter = [];\r\n this.equipmentsToRemove.forEach(id => {\r\n equipmentToRemoveFilter.push([\"EquipId\", \"=\", id]);\r\n equipmentToRemoveFilter.push(\"or\");\r\n });\r\n equipmentToRemoveFilter.pop();\r\n\r\n filter.push(\"or\");\r\n filter.push(equipmentToRemoveFilter);\r\n }\r\n\r\n if (this.equipmentsToAdd.length) {\r\n const equipmentToAddFilter = [];\r\n this.equipmentsToAdd.forEach(id => {\r\n equipmentToAddFilter.push([\"EquipId\", \"<>\", id]);\r\n equipmentToAddFilter.push(\"and\");\r\n });\r\n equipmentToAddFilter.pop();\r\n\r\n filter = [filter];\r\n filter.push(\"and\");\r\n filter.push(equipmentToAddFilter);\r\n }\r\n\r\n return filter;\r\n }\r\n\r\n private SynchronizeCheckBoxes(keys: any){\r\n for (const key of keys) {\r\n const rowIndex = this.dataGrid.instance.getRowIndexByKey(key);\r\n const equipmentSystemId = this.dataGrid.instance.cellValue(rowIndex, \"EquipmentSystemId\");\r\n\r\n this.dataGrid.instance.byKey([equipmentSystemId]).then(group => {\r\n const everyChecked = group.items.every(e => this.selectedNewEquipments.includes(e.EquipId));\r\n const someChecked = group.items.some(e => this.selectedNewEquipments.includes(e.EquipId));\r\n\r\n if (everyChecked) {\r\n this.equipmentSystemGroupSelectedValues[equipmentSystemId] = true;\r\n } else if (someChecked) {\r\n this.equipmentSystemGroupSelectedValues[equipmentSystemId] = undefined;\r\n } else {\r\n this.equipmentSystemGroupSelectedValues[equipmentSystemId] = false;\r\n }\r\n });\r\n }\r\n }\r\n}\r\n","export enum ServiceGroupsTabModel {\r\n Schedule = 0,\r\n Equipment = 1\r\n}\r\n","
\r\n
\r\n

{{ 'serviceGroups.popup.header' | translate }} {{serviceGroupName}}

\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n","import { Location } from \"@angular/common\";\r\nimport { Component, Input, OnChanges, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { FormMesssageService, ServicingComponentUsageEnum, ServicingItem } from \"servicesight-shared\";\r\nimport { ServiceGroupsTabModel } from \"../../shared/models/service-groups-tab.model\";\r\nimport { ServiceGroupsService } from \"../services/service-groups.service\";\r\n\r\n@Component({\r\n selector: \"app-service-groups-items-assignation\",\r\n templateUrl: \"./service-groups-items-assignation.component.html\",\r\n styleUrls: [\"./service-groups-items-assignation.component.scss\"]\r\n})\r\nexport class ServiceGroupsItemsAssignationComponent implements OnInit, OnChanges {\r\n @ViewChild(\"serviceGroups\") form: NgForm;\r\n @Input() serviceGroupId: number;\r\n @Input() customerId: number;\r\n\r\n public formName: string = \"serviceGroups\";\r\n public servicingComponentUsageEnum = ServicingComponentUsageEnum;\r\n public serviceGroupServicing: ServicingItem[];\r\n public selectedTab: ServiceGroupsTabModel = ServiceGroupsTabModel.Schedule;\r\n public serviceGroupName: string;\r\n public sfg20ScheduleId: number;\r\n public equipmentsToAdd: number[] = [];\r\n public equipmentsToRemove: number[] = [];\r\n\r\n constructor(\r\n private location: Location,\r\n private serviceGroups: ServiceGroupsService,\r\n private formMessageService: FormMesssageService) { }\r\n\r\n public ngOnInit(): void {\r\n this.serviceGroups.GetServicingDataInServiceGroup(this.serviceGroupId).subscribe(result => {\r\n this.serviceGroupServicing = result.ServiceGroupServicing;\r\n this.sfg20ScheduleId = result.Sfg20ScheduleId;\r\n });\r\n this.selectedTab = this.serviceGroups.openOnTab;\r\n }\r\n\r\n public ngOnChanges(): void {\r\n if (this.serviceGroupId) {\r\n this.serviceGroups.GetServiceGroupName(this.serviceGroupId).subscribe(x => this.serviceGroupName = x);\r\n }\r\n }\r\n\r\n public discardChanges(): void {\r\n this.location.go(`/customers/customer/${this.customerId}`);\r\n }\r\n\r\n public equipmentsToAddChanged(items: number[]): void {\r\n this.equipmentsToAdd = this.equipmentsToAdd.concat(items);\r\n }\r\n\r\n public equipmentsToRemoveChanged(items: number[]): void {\r\n this.equipmentsToRemove = this.equipmentsToRemove.concat(items);\r\n }\r\n\r\n public saveEquipmentsAndServicingItems(): void {\r\n const data = {\r\n RemoveEquipmentsInSvcGroup: this.equipmentsToRemove,\r\n AddEquipmentsInSvcGroup: this.equipmentsToAdd,\r\n ServiceGroupId: this.serviceGroupId,\r\n Sfg20ScheduleId: this.sfg20ScheduleId,\r\n ServiceGroupServicing: this.serviceGroupServicing\r\n };\r\n\r\n this.formMessageService\r\n .RegisterObservable>(this.serviceGroups.SaveDataInServiceGroup(data), this.formName)\r\n .subscribe(() => this.serviceGroupServicing.forEach(i => i.IsNew = false));\r\n }\r\n\r\n public servicingsSourceChanged(items: Array): void {\r\n this.serviceGroupServicing = items;\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public goToServiceGroups() {\r\n this.serviceGroups.lastOpenedModal = this.serviceGroupId;\r\n this.location.go(`/customers/customer/${this.customerId}`);\r\n }\r\n}\r\n","export class ServiceGroupModel {\r\n Name: string;\r\n Description: string;\r\n GroupId: number;\r\n isNew: boolean;\r\n CustomerId: number;\r\n Group?: string;\r\n}\r\n","
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n\r\n\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n \r\n\r\n
\r\n
\r\n","import { Location } from \"@angular/common\";\r\nimport { Component, Input, OnChanges, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { FormMesssageService, ProteanResponse } from \"servicesight-shared\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { ServiceGroupsTabModel } from \"../../shared/models/service-groups-tab.model\";\r\nimport { ServiceGroupModel } from \"../models/service-group.model\";\r\nimport { ServiceGroupsService } from \"../services/service-groups.service\";\r\n\r\n@Component({\r\n selector: \"app-service-groups\",\r\n templateUrl: \"./service-groups.component.html\",\r\n styleUrls: [\"./service-groups.component.scss\"]\r\n})\r\nexport class ServiceGroupsComponent implements OnInit, OnChanges {\r\n @ViewChild(\"newServiceGroupForm\", { static: true }) form: NgForm;\r\n @Input() customerId: number;\r\n\r\n public formName: string = \"newServiceGroupForm\";\r\n public selected: Array = [];\r\n public serviceGroupsDataSource: DataSource;\r\n public EquipmentsInSvcGroupsDataStore: ODataStore;\r\n public groupIdsWithEquipments: number[] = [];\r\n public serviceGroup: ServiceGroupModel = new ServiceGroupModel();\r\n public isServiceGroupModalOpened: boolean = false;\r\n public tab = ServiceGroupsTabModel;\r\n private checkBoxUpdating: boolean = false;\r\n private selectAllCheckBox;\r\n\r\n private isEquipmentEnabled: boolean = false;\r\n private isProEnabled: boolean = false;\r\n\r\n constructor(\r\n private serviceGroups: ServiceGroupsService,\r\n private formMessageService: FormMesssageService,\r\n private location: Location,\r\n private licenseService: LicenseService,\r\n private translate: TranslateService) {\r\n this.onEditorPreparing = this.onEditorPreparing.bind(this);\r\n this.onSelectionChanged = this.onSelectionChanged.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(modules => {\r\n this.isEquipmentEnabled = modules.EquipmentEnabled;\r\n this.isProEnabled = modules.ProEnabled;\r\n\r\n this.ngOnChanges();\r\n\r\n this.EquipmentsInSvcGroupsDataStore = this.serviceGroups.GetEquipmentsInSvcGroups();\r\n this.EquipmentsInSvcGroupsDataStore.load().then(res => {\r\n res.map(item => {\r\n if (item.EquipmentQuantity && item.EquipmentQuantity > 0) {\r\n this.groupIdsWithEquipments.push(item.ServiceGroupId);\r\n }\r\n });\r\n if (this.serviceGroups.lastOpenedModal) {\r\n this.isServiceGroupModalOpened = true;\r\n }\r\n });\r\n });\r\n }\r\n\r\n public ngOnChanges(): void {\r\n if (this.customerId && this.isProEnabled && this.isEquipmentEnabled) {\r\n this.serviceGroupsDataSource = this.serviceGroups.GetCustomerSvcGroupList();\r\n this.serviceGroupsDataSource.filter([\"CustomerId\", \"=\", this.customerId]);\r\n if (this.serviceGroups.lastOpenedModal) {\r\n this.serviceGroupsDataSource.store().byKey({ CustomerId: this.customerId, GroupId: this.serviceGroups.lastOpenedModal }).then(res => {\r\n const { GroupId, Group, Description } = res;\r\n const parsedData: ServiceGroupModel = {\r\n GroupId,\r\n Description,\r\n Group,\r\n Name: Group,\r\n isNew: false,\r\n CustomerId: this.customerId\r\n };\r\n this.openServiceGroupModal(parsedData);\r\n this.isServiceGroupModalOpened = true;\r\n this.serviceGroups.lastOpenedModal = null;\r\n });\r\n }\r\n this.serviceGroupsDataSource.load();\r\n }\r\n }\r\n\r\n public onSelectionChanged(e): void {\r\n const deselectRowKeys = [];\r\n e.selectedRowsData.forEach((item) => {\r\n if (!this.isSelectable(item)) {\r\n deselectRowKeys.push(e.component.keyOf(item));\r\n }\r\n });\r\n if (deselectRowKeys.length) {\r\n e.component.deselectRows(deselectRowKeys);\r\n }\r\n this.checkBoxUpdating = true;\r\n this.selectAllCheckBox.option(\"value\", this.isSelectAll(e.component));\r\n this.checkBoxUpdating = false;\r\n }\r\n\r\n public DeleteServicing(): void {\r\n if (this.selected) {\r\n this.serviceGroups.DeleteServiceGroup(this.selected).subscribe(() => {\r\n this.serviceGroupsDataSource.reload();\r\n });\r\n }\r\n }\r\n\r\n public onEditorPreparing(e): void {\r\n const dataGrid = e.component;\r\n if (e.command === \"select\") {\r\n if (e.parentType === \"dataRow\" && e.row) {\r\n if (!this.isSelectable(e.row.data)) {\r\n e.editorOptions.disabled = true;\r\n }\r\n } else if (e.parentType === \"headerRow\") {\r\n e.editorOptions.onInitialized = (event) => {\r\n this.selectAllCheckBox = event.component;\r\n };\r\n e.editorOptions.value = this.isSelectAll(dataGrid);\r\n e.editorOptions.onValueChanged = (event) => {\r\n if (!event.event) {\r\n if (event.previousValue && !this.checkBoxUpdating) {\r\n event.component.option(\"value\", event.previousValue);\r\n }\r\n return;\r\n }\r\n\r\n if (this.isSelectAll(dataGrid) === event.value) {\r\n return;\r\n }\r\n\r\n if (event.value) {\r\n dataGrid.selectAll();\r\n } else {\r\n dataGrid.deselectAll();\r\n }\r\n\r\n event.event.preventDefault();\r\n };\r\n }\r\n }\r\n }\r\n\r\n private isSelectable(item): boolean {\r\n if (this && this.groupIdsWithEquipments) {\r\n return !this.groupIdsWithEquipments.includes(item.GroupId);\r\n } else {\r\n return true;\r\n }\r\n }\r\n\r\n private isSelectAll(dataGrid): boolean {\r\n const items = this.serviceGroupsDataSource ? this.serviceGroupsDataSource.items() : [];\r\n const selectableItems = items.filter(this.isSelectable);\r\n const selectedRowKeys = dataGrid.option(\"selectedRowKeys\");\r\n\r\n if (!selectedRowKeys.length) {\r\n return false;\r\n }\r\n\r\n return selectedRowKeys.length >= (selectableItems.length - this.groupIdsWithEquipments.length) ? true : undefined;\r\n }\r\n\r\n public openServiceGroupModal(data: ServiceGroupModel = null): void {\r\n this.form.form.markAsPristine();\r\n this.formMessageService.ClearForm(this.formName);\r\n if (data) {\r\n this.serviceGroup.GroupId = data.GroupId;\r\n this.serviceGroup.Description = data.Description;\r\n this.serviceGroup.Name = data.Group;\r\n this.serviceGroup.isNew = false;\r\n this.form.form.markAsUntouched();\r\n } else {\r\n this.serviceGroup = new ServiceGroupModel();\r\n this.serviceGroup.isNew = true;\r\n }\r\n\r\n this.serviceGroup.CustomerId = this.customerId;\r\n this.isServiceGroupModalOpened = true;\r\n }\r\n\r\n public saveServiceGroup(): void {\r\n this.formMessageService\r\n .RegisterObservable(this.serviceGroups.SaveServiceGroup(this.serviceGroup), this.formName)\r\n .subscribe(x => {\r\n this.serviceGroupsDataSource.reload();\r\n this.form.form.markAsPristine();\r\n this.serviceGroup.isNew = false;\r\n this.serviceGroup.GroupId = x.EntityId;\r\n });\r\n }\r\n\r\n public closeModal(): void {\r\n this.isServiceGroupModalOpened = false;\r\n }\r\n\r\n public goToTab(tab: ServiceGroupsTabModel): void {\r\n if (this.form.form.dirty) {\r\n this.formMessageService\r\n .RegisterObservable(this.serviceGroups.SaveServiceGroup(this.serviceGroup), this.formName)\r\n .subscribe(x => {\r\n this.location.go(`/customers/service-group/${this.customerId}/${x.EntityId}`);\r\n });\r\n } else if (!this.serviceGroup.isNew) {\r\n this.location.go(`/customers/service-group/${this.customerId}/${this.serviceGroup.GroupId}`);\r\n if (tab === this.tab.Schedule) {\r\n this.serviceGroups.openOnTab = ServiceGroupsTabModel.Schedule;\r\n } else {\r\n this.serviceGroups.openOnTab = ServiceGroupsTabModel.Equipment;\r\n }\r\n }\r\n }\r\n\r\n public markFormAsDirty(): void {\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public handlePopupTitle(): string {\r\n if (this.serviceGroup.isNew) {\r\n return this.translate.instant(\"serviceGroups.popup.newServiceGroup\");\r\n } else {\r\n return this.translate.instant(\"serviceGroups.popup.header\") + ` ${this.serviceGroup.Name}`;\r\n }\r\n }\r\n}\r\n","import { Component, OnInit } from \"@angular/core\";\r\n\r\n@Component({\r\n selector: \"app-equipment-settings\",\r\n template: `\r\n \r\n
\r\n `\r\n})\r\nexport class AttributeSettingsComponent implements OnInit {\r\n\r\n constructor() { }\r\n\r\n ngOnInit() { }\r\n\r\n}\r\n","import { HttpClient, HttpParams } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable } from \"rxjs\";\r\nimport { DocumentTypeEnum, IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { ISelectOption } from \"../../../shared/models/iselect-option.model\";\r\nimport { ODataService } from \"../../../shared/services/odata/odata.service\";\r\nimport { AttributeCategoryModel } from \"../models/attribute-category.model\";\r\nimport { AttributeListTypeModel } from \"../models/attribute-list-type.model\";\r\nimport { AttributeSortModel } from \"../models/attribute-sort.model\";\r\nimport { AttributeModel } from \"../models/attribute.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class AttributesService {\r\n\r\n private get BaseUrl(): string {\r\n return this.appConfig.apiLocations.ServiceSight + \"Attribute\";\r\n }\r\n\r\n private get ODataBaseUrl(): string {\r\n return this.appConfig.apiLocations.ServiceSightOData;\r\n }\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private odataService: ODataService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) {\r\n }\r\n\r\n public Get(id: number): Observable {\r\n return this.http.get(this.BaseUrl + `/Get/?attributeId=${id}`);\r\n }\r\n\r\n public GetAttributeByName(attribute: string, docType: DocumentTypeEnum): Observable {\r\n return this.http.get(`${this.BaseUrl}/GetAttributeByName?attribute=${attribute}&docType=${docType}`);\r\n }\r\n\r\n public GetCategoriesListByDocumentTypeId(id: DocumentTypeEnum): Observable {\r\n return this.http.get(this.BaseUrl + `/GetCategories?documentTypeId=${id}`);\r\n }\r\n\r\n public Update(model: AttributeModel): Observable {\r\n return this.http.put(this.BaseUrl + `/Update`, model);\r\n }\r\n\r\n public Save(model: AttributeModel): Observable {\r\n return this.http.post(this.BaseUrl + \"/Save\", model);\r\n }\r\n\r\n public CreateCategory(model: AttributeCategoryModel): Observable {\r\n return this.http.post(this.BaseUrl + `/CreateCategory`, model);\r\n }\r\n\r\n public IsOptionItemInUse(model: AttributeListTypeModel): Observable {\r\n const params = new HttpParams();\r\n params.append(\"attributeId\", model.AttributeId.toString());\r\n params.append(\"listId\", model.ListId.toString());\r\n return this.http.get(`${this.BaseUrl}/IsOptionItemInUse?attributeId=${model.AttributeId}&listId=${model.ListId}&docType=${model.DocType}`);\r\n }\r\n\r\n public AttributeInUse(attributeId: number, docType: DocumentTypeEnum): Observable {\r\n return this.http.get(`${this.BaseUrl}/IsAttributeInUse?attributeId=${attributeId}&docType=${docType}`);\r\n }\r\n\r\n public DeleteAttribute(attributeId: number, documentTypeId: number): Observable {\r\n return this.http.delete(`${this.BaseUrl}/Delete/?attributeId=${attributeId}&documentTypeId=${documentTypeId}`);\r\n }\r\n\r\n public ODataTypes(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: this.ODataBaseUrl + \"AttributeTypesOD\",\r\n key: \"AttributeTypeId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public ODataCategories(docTypeId: DocumentTypeEnum): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.ODataBaseUrl}/AttributeCategoriesOD`,\r\n key: \"CategoryId\",\r\n keyType: \"Int32\",\r\n queryStringParams: {\r\n docType: docTypeId\r\n }\r\n });\r\n }\r\n\r\n public ODataAttributes(docTypeId: DocumentTypeEnum): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.ODataBaseUrl}/AttributesOD`,\r\n key: \"AttributeId\",\r\n keyType: \"Int32\",\r\n queryStringParams: {\r\n docType: docTypeId\r\n }\r\n });\r\n }\r\n\r\n public ODataStoreCategories(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.ODataBaseUrl}AttributeCategoriesOD`,\r\n key: \"AttributeCatId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public ODataStoreAttributes(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.ODataBaseUrl}AttributesOD`,\r\n key: \"AttributeId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetAttributeListDataSource(attributeId: number): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.ODataBaseUrl}AttributeListOD`,\r\n key: \"AttributeId\",\r\n keyType: \"Int32\",\r\n queryStringParams: {\r\n attributeId\r\n }\r\n });\r\n }\r\n\r\n public UpdateAttributeSortOrder(attribute: AttributeSortModel): Observable {\r\n return this.http.put(`${this.BaseUrl}/UpdateAttributeSortOrder`, attribute);\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { AttributeType } from \"servicesight-shared\";\r\n\r\n@Pipe({\r\n name: \"selectedType\"\r\n})\r\nexport class SelectedTypePipe implements PipeTransform {\r\n private attributesTypes = {\r\n [AttributeType.List]: \"equipments.type.list\",\r\n [AttributeType.Memo]: \"equipments.type.memo\",\r\n [AttributeType.YesNo]: \"equipments.type.yesNo\",\r\n [AttributeType.Date]: \"equipments.type.date\",\r\n [AttributeType.Numeric]: \"equipments.type.numeric\",\r\n [AttributeType.Text]: \"equipments.type.text\"\r\n };\r\n\r\n transform(value: any): any {\r\n return this.attributesTypes.hasOwnProperty(value) ? this.attributesTypes[value] : value;\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { DocumentTypeEnum } from \"servicesight-shared\";\r\n\r\n@Pipe({\r\n name: \"attributeCaption\"\r\n})\r\nexport class AttributesCaptionPipe implements PipeTransform {\r\n private readonly captions = {\r\n [DocumentTypeEnum.Customer]: \"attributes.caption.customer-attribute\",\r\n [DocumentTypeEnum.Job]: \"attribute.caption.job-attribute\",\r\n [DocumentTypeEnum.Equipment]: \"label.equipment.attributes\",\r\n [DocumentTypeEnum.SalesOpportunity]: \"sales-opp.settings.heading\",\r\n [DocumentTypeEnum.Project]: \"attributes.caption.project-attribute\"\r\n };\r\n\r\n transform(value: DocumentTypeEnum): string {\r\n return this.captions[value];\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { DocumentTypeEnum } from \"servicesight-shared\";\r\n\r\n@Pipe({\r\n name: \"attributesSubheading\"\r\n})\r\nexport class AttributesSubheadingPipe implements PipeTransform {\r\n private readonly captions = {\r\n [DocumentTypeEnum.SalesOpportunity]: \"sales-opp.settings.subheading\"\r\n };\r\n\r\n transform(value: DocumentTypeEnum): string {\r\n return this.captions[value];\r\n }\r\n\r\n}\r\n","
\r\n

{{ docTypeId | attributeCaption | translate}}\r\n
{{ docTypeId | attributesSubheading | translate }}
\r\n

\r\n \r\n
\r\n\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n
\r\n {{x.data.AttributeTypeId | selectedType | translate }}\r\n
\r\n\r\n\r\n","import { Location } from \"@angular/common\";\r\nimport { Component, Inject, Input, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { DocumentTypeEnum, EquipmentPermissionsService, GridKind, GridService } from \"servicesight-shared\";\r\nimport { AttributeType } from \"servicesight-shared\";\r\nimport { AttributeTypeModel } from \"../../../shared/models/attribute-type.model\";\r\nimport { AttributeSortModel } from \"../models/attribute-sort.model\";\r\nimport { AttributesService } from \"../services/attributes.service\";\r\n\r\n@Component({\r\n selector: \"app-attributes\",\r\n templateUrl: \"./attributes.component.html\",\r\n styleUrls: [\"./attributes.component.scss\"]\r\n})\r\nexport class AttributesComponent implements OnInit {\r\n public searchText = \"\";\r\n public attributesDataSource: DataSource;\r\n public categoriesDataSource: DataSource;\r\n public hasAddPermission: boolean;\r\n\r\n public typeFilterOptions: object = {\r\n 1: [\"AttributeTypeId\", \"=\", AttributeType.Text],\r\n 2: [\"AttributeTypeId\", \"=\", AttributeType.Memo],\r\n 3: [\"AttributeTypeId\", \"=\", AttributeType.Numeric],\r\n 4: [\"AttributeTypeId\", \"=\", AttributeType.Date],\r\n 5: [\"AttributeTypeId\", \"=\", AttributeType.List],\r\n 6: [\"AttributeTypeId\", \"=\", AttributeType.YesNo]\r\n };\r\n\r\n public typeListFilter: AttributeTypeModel[] = [\r\n { AttributeTypeID: AttributeType.Text, AttributeTypeName: \"equipments.type.text\"},\r\n { AttributeTypeID: AttributeType.Memo, AttributeTypeName: \"equipments.type.memo\"},\r\n { AttributeTypeID: AttributeType.Numeric, AttributeTypeName: \"equipments.type.numeric\"},\r\n { AttributeTypeID: AttributeType.Date, AttributeTypeName: \"equipments.type.date\"},\r\n { AttributeTypeID: AttributeType.List, AttributeTypeName: \"equipments.type.list\"},\r\n { AttributeTypeID: AttributeType.YesNo, AttributeTypeName: \"equipments.type.yesNo\"}\r\n ];\r\n\r\n @Input() docTypeId: DocumentTypeEnum;\r\n @ViewChild(\"grid\", { static: true }) dataGrid: DxDataGridComponent;\r\n @ViewChild(\"attributeFilterCategory\", { static: true }) filterCategory: any;\r\n @ViewChild(\"attributeFilterType\", { static: true }) filterType: any;\r\n\r\n private resetFilter = false;\r\n private $rootScope = null;\r\n\r\n constructor(\r\n private service: AttributesService,\r\n private gridService: GridService,\r\n private permissionsService: EquipmentPermissionsService,\r\n private location: Location,\r\n @Inject(\"$injector\") $injector) {\r\n this.OnAttributeReordered = this.OnAttributeReordered.bind(this);\r\n this.$rootScope = $injector.get(\"$rootScope\");\r\n this.AttributeCategoryName = this.AttributeCategoryName.bind(this);\r\n }\r\n\r\n ngOnInit() {\r\n\r\n if (!this.docTypeId) {\r\n this.location.go(\"/#/proteansystem/systems\");\r\n }\r\n\r\n this.permissionsService.Reload();\r\n this.permissionsService.HasAddAttributePermission.subscribe(x => this.hasAddPermission = x);\r\n\r\n this.gridService.GetLayout(GridKind.Attributes).subscribe(value => {\r\n if (value) {\r\n this.dataGrid.instance.state(value);\r\n }\r\n this.GetDataCollection();\r\n }, () => {\r\n this.GetDataCollection();\r\n });\r\n }\r\n\r\n public AttributeCategoryName(e): string {\r\n const category = this.categoriesDataSource.items().find(x => x.AttributeCatId === e.AttributeCatId);\r\n return category.AttributeCat;\r\n }\r\n\r\n public OnFilterChange() {\r\n if (!this.resetFilter) {\r\n let currentFilter = [];\r\n const categoryFilterIndex = this.filterCategory.nativeElement.selectedIndex;\r\n const typeFilterIndex = this.filterType.nativeElement.selectedIndex;\r\n\r\n if (categoryFilterIndex === 0 && typeFilterIndex > 0) {\r\n currentFilter = this.typeFilterOptions[typeFilterIndex];\r\n } else if (categoryFilterIndex > 0 && typeFilterIndex === 0) {\r\n const categoryId = Number(this.filterCategory.nativeElement[categoryFilterIndex].value);\r\n currentFilter = [\"AttributeCatId\", \"=\", categoryId];\r\n } else if (categoryFilterIndex > 0 && typeFilterIndex > 0) {\r\n const categoryId = Number(this.filterCategory.nativeElement[categoryFilterIndex].value);\r\n const typeFilter = this.typeFilterOptions[typeFilterIndex];\r\n currentFilter = [\r\n [\"AttributeCatId\", \"=\", categoryId],\r\n \"and\",\r\n typeFilter\r\n ];\r\n }\r\n // check if filter was added if not clear filter on data grid\r\n if (currentFilter.length > 0) {\r\n this.dataGrid.instance.filter(currentFilter);\r\n } else {\r\n this.dataGrid.instance.clearFilter();\r\n }\r\n }\r\n }\r\n\r\n public SaveLayout() {\r\n const state = this.dataGrid.instance.state();\r\n this.gridService.SaveLayout(state, GridKind.Attributes);\r\n }\r\n\r\n public ResetLayout() {\r\n this.gridService.ResetLayout(GridKind.Attributes);\r\n this.dataGrid.instance.state(null);\r\n }\r\n\r\n public OnResetButtonClicked() {\r\n this.resetFilter = true;\r\n this.searchText = \"\";\r\n this.filterCategory.nativeElement.selectedIndex = 0;\r\n this.filterType.nativeElement.selectedIndex = 0;\r\n this.dataGrid.instance.clearFilter();\r\n this.resetFilter = false;\r\n }\r\n\r\n public OnSearchValueChange() {\r\n this.dataGrid.instance.searchByText(encodeURI(this.searchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public OnAttributeReordered(e) {\r\n const visibleRows = e.component.getVisibleRows();\r\n const attribute: AttributeSortModel = {\r\n DocTypeId: this.docTypeId,\r\n FromIndex: visibleRows[e.fromIndex].data.SortOrder,\r\n ToIndex: visibleRows[e.toIndex].data.SortOrder\r\n };\r\n this.service.UpdateAttributeSortOrder(attribute).subscribe(() => {\r\n this.attributesDataSource.reload();\r\n this.dataGrid.instance.refresh();\r\n });\r\n }\r\n\r\n public CreateNewAttribute() {\r\n this.$rootScope.$broadcast(\"create-attribute\", { docType: this.docTypeId });\r\n }\r\n\r\n private GetDataCollection() {\r\n this.attributesDataSource = this.service.ODataAttributes(this.docTypeId);\r\n this.categoriesDataSource = this.service.ODataCategories(this.docTypeId);\r\n this.categoriesDataSource.load();\r\n }\r\n\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

{{ 'label.categories.header' | translate }}\r\n   
{{ 'label.categories.headerDescription' | translate }}
\r\n

\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
0 }\">\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
0}\">\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { Component, HostListener, Input, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { Observable } from \"rxjs\";\r\nimport { ComponentCanDeactivate, EquipmentPermissionsService, FormMesssageService } from \"servicesight-shared\";\r\nimport { EquipmentCategory } from \"../../models/equipment-category\";\r\nimport { EquipmentSubtype } from \"../../models/equipment-subtypes\";\r\nimport { EquipmentType } from \"../../models/equipment-type\";\r\nimport { EquipmentCategoriesService } from \"../../services/equipment-categories.service\";\r\n\r\n@Component({\r\n selector: \"app-category-types\",\r\n templateUrl: \"./category-types.component.html\",\r\n styleUrls: [\"./category-types.component.scss\"]\r\n})\r\nexport class CategoryTypesComponent implements OnInit, ComponentCanDeactivate {\r\n\r\n @ViewChild(\"categoriesForm\", { static: true }) form: NgForm;\r\n @Input() public isNew: boolean;\r\n\r\n public searchText: string = \"\";\r\n public isLoading = false;\r\n public Categories: Array = [];\r\n public readonly formName: string = \"categoriesForm\";\r\n public hasAddPermission: boolean;\r\n public hasDeletePermission: boolean;\r\n\r\n constructor(\r\n private categoriesService: EquipmentCategoriesService,\r\n private formMessageService: FormMesssageService,\r\n private permissionsService: EquipmentPermissionsService) {\r\n }\r\n\r\n private saveTimeout: any;\r\n private nextCategoryId: number = 0;\r\n private nextTypeId: number = 0;\r\n private nextSubTypeId: number = 0;\r\n\r\n public get allCollapsed(): boolean {\r\n return this.Categories.every(i => i.IsCollapsed);\r\n }\r\n\r\n @HostListener(\"window:beforeunload\")\r\n public canDeactivate(): Observable | boolean {\r\n return !this.form.form.dirty;\r\n }\r\n\r\n ngOnInit() {\r\n this.permissionsService.Reload();\r\n this.permissionsService.HasAddCategoryPermission.subscribe(x => this.hasAddPermission = x);\r\n this.permissionsService.HasDeleteCategoryPermission.subscribe(x => this.hasDeletePermission = x);\r\n\r\n this.LoadCategories();\r\n }\r\n\r\n Save() {\r\n this.isLoading = true;\r\n this.formMessageService.RegisterObservable(this.categoriesService.Save(this.Categories), this.formName)\r\n .subscribe( response => {\r\n this.Categories = response;\r\n this.Categories.forEach(c => c.IsCollapsed = true);\r\n this.isLoading = false;\r\n }, () => this.LoadCategories());\r\n }\r\n\r\n Discard() {\r\n this.LoadCategories();\r\n }\r\n\r\n AddCategory() {\r\n const newType = this.EmptyType();\r\n const newCategory = this.EmptyCategory();\r\n\r\n newType.SubTypes.push(this.EmptySubtype());\r\n newCategory.Types.push(newType);\r\n this.Categories.push(newCategory);\r\n\r\n this.ModelChanged();\r\n }\r\n\r\n DeleteCategory(category: EquipmentCategory) {\r\n this.Categories.splice(this.Categories.indexOf(category), 1);\r\n\r\n this.ModelChanged();\r\n }\r\n\r\n AddType(category: EquipmentCategory) {\r\n const newType = this.EmptyType();\r\n\r\n newType.SubTypes.push(this.EmptySubtype());\r\n category.Types.push(newType);\r\n\r\n category.IsCollapsed = false;\r\n this.ModelChanged();\r\n }\r\n\r\n DeleteType(category: EquipmentCategory, type: EquipmentType) {\r\n category.Types.splice(category.Types.indexOf(type), 1);\r\n\r\n this.ModelChanged();\r\n }\r\n\r\n AddSubtype(type: EquipmentType) {\r\n type.SubTypes.push(this.EmptySubtype());\r\n\r\n type.IsCollapsed = false;\r\n this.ModelChanged();\r\n }\r\n\r\n DeleteSubtype(type: EquipmentType, subtype: EquipmentSubtype) {\r\n type.SubTypes.splice(type.SubTypes.indexOf(subtype), 1);\r\n\r\n this.ModelChanged();\r\n }\r\n\r\n ModelChanged() {\r\n if (this.saveTimeout !== null) {\r\n clearTimeout(this.saveTimeout);\r\n }\r\n\r\n this.form.form.markAsDirty();\r\n this.saveTimeout = setTimeout(() => this.DuplicatedItemsValidation(this.Categories), 500);\r\n }\r\n\r\n Collapse() {\r\n const len = this.Categories.length;\r\n const target = !this.allCollapsed;\r\n for (let i = 0; i < len; i++) {\r\n this.Categories[i].IsCollapsed = target;\r\n }\r\n }\r\n\r\n OnFilterChanged(): void {\r\n this.Categories.forEach(category => {\r\n category.IsHidden = false;\r\n });\r\n\r\n if (this.searchText && this.searchText.length > 0) {\r\n this.Categories.forEach(category => {\r\n if (!category.Name.includes(this.searchText)) {\r\n category.IsHidden = true;\r\n }\r\n });\r\n }\r\n }\r\n\r\n LoadCategories(): void {\r\n this.isLoading = true;\r\n this.categoriesService.GetAll().subscribe(response => {\r\n if (response.length > 0) {\r\n this.Categories = response;\r\n this.Categories.forEach(c => c.IsCollapsed = true);\r\n\r\n this.SetNextCategoryId();\r\n this.SetNextTypeId();\r\n this.SetNextSubtypeId();\r\n }\r\n this.isLoading = false;\r\n }, () => this.isLoading = false);\r\n }\r\n\r\n private DuplicatedItemsValidation(categories: EquipmentCategory[]) {\r\n const inputKeys = Object.keys(this.form.form.controls);\r\n\r\n this.ClearValidationHighlight(inputKeys);\r\n this.FindDuplicatedCategories(categories, inputKeys);\r\n }\r\n\r\n private FindDuplicatedCategories(categories: EquipmentCategory[], inputKeys: Array) {\r\n const categoryNames: Array = [];\r\n\r\n categories.forEach( category => {\r\n categoryNames.push(category.Name.toLowerCase().trim());\r\n this.FindDuplicatedTypes(category, inputKeys);\r\n });\r\n\r\n const duplicatedCategories = this.FindDuplicates(categoryNames);\r\n this.MarkCategoriesAsInvalid(duplicatedCategories, inputKeys);\r\n }\r\n\r\n private FindDuplicatedTypes(category: EquipmentCategory, inputKeys: Array) {\r\n const typeNames: Array = [];\r\n\r\n category.Types.forEach( type => {\r\n typeNames.push(type.Name.toLowerCase().trim());\r\n this.FindDuplicatedSubTypes(type, inputKeys);\r\n });\r\n\r\n const duplicatedTypes = this.FindDuplicates(typeNames);\r\n this.MarkTypesAsInvalid(category, duplicatedTypes, inputKeys);\r\n }\r\n\r\n private FindDuplicatedSubTypes(type: EquipmentType, inputKeys: Array) {\r\n const subtypeNames: Array = [];\r\n\r\n type.SubTypes.forEach( subtype => {\r\n subtypeNames.push(subtype.Name.toLowerCase().trim());\r\n });\r\n\r\n const duplicatedSubTypes = this.FindDuplicates(subtypeNames);\r\n this.MarkSubTypesAsInvalid(type, duplicatedSubTypes, inputKeys);\r\n }\r\n\r\n private ClearValidationHighlight(inputKeys: Array) {\r\n const formControls = this.form.form.controls;\r\n inputKeys.forEach((key) => {\r\n if (formControls[key].value) {\r\n formControls[key].setErrors(null);\r\n }\r\n });\r\n }\r\n\r\n private FindDuplicates(items: Array): Set {\r\n const duplicates = new Set();\r\n items.sort().forEach((item, index) => {\r\n if (item === items[++index]) {\r\n duplicates.add(item);\r\n }\r\n });\r\n return duplicates;\r\n }\r\n\r\n private MarkCategoriesAsInvalid(categories: Set, inputKeys: Array) {\r\n const formControls = this.form.form.controls;\r\n categories.forEach((item) => {\r\n const categoryKeys = inputKeys.filter((key) => {\r\n if (key.includes(\"categoryName-\")) {\r\n return key;\r\n }\r\n });\r\n categoryKeys.forEach((key) => {\r\n if (formControls[key].value.toLowerCase() === item) {\r\n formControls[key].setErrors({ duplicatedCategories: true});\r\n formControls[key].markAsDirty();\r\n }\r\n });\r\n });\r\n }\r\n\r\n private MarkTypesAsInvalid(category: EquipmentCategory, types: Set, inputKeys: Array) {\r\n const formControls = this.form.form.controls;\r\n\r\n types.forEach((item) => {\r\n const typeKeys = inputKeys.filter((key) => {\r\n if (key.includes(`categoryTypeName-${category.Id ? category.Id : category.TempId}-`)) {\r\n return key;\r\n }\r\n });\r\n typeKeys.forEach((key) => {\r\n if (formControls[key].value.toLowerCase() === item) {\r\n formControls[key].setErrors({ duplicatedType: true});\r\n formControls[key].markAsDirty();\r\n }\r\n });\r\n });\r\n }\r\n\r\n private MarkSubTypesAsInvalid(type: EquipmentType, subtypes: Set, inputKeys: Array) {\r\n const formControls = this.form.form.controls;\r\n\r\n subtypes.forEach((item) => {\r\n const subTypeKeys = inputKeys.filter((key) => {\r\n if (key.includes(`typeSubtypeName-${type.Id ? type.Id : type.TempId}-`)) {\r\n return key;\r\n }\r\n });\r\n subTypeKeys.forEach((key) => {\r\n if (formControls[key].value.toLowerCase() === item) {\r\n formControls[key].setErrors({ duplicatedSubType: true});\r\n formControls[key].markAsDirty();\r\n }\r\n });\r\n });\r\n }\r\n\r\n private SetNextCategoryId() {\r\n const ids: Array = [];\r\n this.Categories.forEach(c => {\r\n ids.push(c.Id);\r\n });\r\n this.nextCategoryId = Math.max(...ids) + 1;\r\n }\r\n\r\n private SetNextTypeId() {\r\n const ids: Array = [];\r\n this.Categories.forEach(c => {\r\n c.Types.forEach(t => {\r\n ids.push(t.Id);\r\n });\r\n });\r\n this.nextTypeId = Math.max(...ids) + 1;\r\n }\r\n\r\n private SetNextSubtypeId() {\r\n const ids: Array = [];\r\n this.Categories.forEach(c => {\r\n c.Types.forEach(t => {\r\n t.SubTypes.forEach(s => {\r\n ids.push(s.Id);\r\n });\r\n });\r\n });\r\n this.nextSubTypeId = Math.max(...ids) + 1;\r\n }\r\n\r\n private EmptyCategory(): EquipmentCategory {\r\n return {\r\n Id: 0,\r\n Name: \"\",\r\n Types: [],\r\n IsCollapsed: false,\r\n IsHidden: false,\r\n TempId: this.NewCategoryId()\r\n };\r\n }\r\n\r\n private EmptyType(): EquipmentType {\r\n return {\r\n Id: 0,\r\n Name: \"Standard\",\r\n SubTypes: [],\r\n IsCollapsed: false,\r\n TempId: this.NewTypeId()\r\n };\r\n }\r\n\r\n private EmptySubtype(): EquipmentSubtype {\r\n return {\r\n Id: 0,\r\n Name: \"Standard\",\r\n TempId: this.NewSubtypeId()\r\n };\r\n }\r\n\r\n private NewCategoryId(): number {\r\n return this.nextCategoryId++;\r\n }\r\n\r\n private NewTypeId(): number {\r\n return this.nextTypeId++;\r\n }\r\n\r\n private NewSubtypeId(): number {\r\n return this.nextSubTypeId++;\r\n }\r\n}\r\n","export class EquipmentAttributeInUse {\r\n public EquipmentInUse: number;\r\n public MakeModelInUse: number;\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n\r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n
\r\n \r\n \r\n {{ 'buttons.delete' | translate }}\r\n \r\n
\r\n\r\n\r\n\r\n","import { Component, EventEmitter, Input, Output, ViewChild } from \"@angular/core\";\r\nimport { ISelectOption } from \"../../../../shared/models/iselect-option.model\";\r\nimport { AttributesService } from \"../../services/attributes.service\";\r\nimport { AttributeListTypeModel } from \"../../models/attribute-list-type.model\";\r\nimport { AddMessagesComponent } from \"../../../../shared/components/error-messages/add-messages.component\";\r\nimport { JstranslateService } from \"../../../../shared/services/jstranslate/jstranslate.service\";\r\nimport { DocumentTypeEnum } from \"servicesight-shared\";\r\nimport { ConfirmationMessageComponent } from \"src/app/shared/components/confirmation-message/confirmation-message.component\";\r\n\r\n@Component({\r\n selector: \"app-attribute-list-type\",\r\n templateUrl: \"./attribute-list-type.component.html\",\r\n styleUrls: [\"./attribute-list-type.component.scss\"]\r\n})\r\nexport class AttributeListTypeComponent {\r\n\r\n @Output() attributeListType = new EventEmitter();\r\n @Input() listTypesCollection: ISelectOption[] = [];\r\n @Input() attributeId: number;\r\n @Input() addMessagesComponent: AddMessagesComponent;\r\n @Input() docType: DocumentTypeEnum;\r\n\r\n @ViewChild(\"confirmationMessage\", { static: true }) confirmationMessage: ConfirmationMessageComponent;\r\n\r\n public itemToDelete: AttributeListTypeModel;\r\n\r\n public constructor(private service: AttributesService, private translate: JstranslateService) {\r\n }\r\n\r\n public AddNewItemList() {\r\n const i: ISelectOption = {\r\n Id: null,\r\n Name: \"\",\r\n FormName: \"attributeListOption\" + this.listTypesCollection.length\r\n };\r\n this.listTypesCollection.push(i);\r\n this.OnListChanged();\r\n }\r\n\r\n public CheckDuplicates(): void {\r\n this.addMessagesComponent.ShowAlertMessages([]);\r\n if (this.listTypesCollection.length > 1) {\r\n const duplicates: any[] = [];\r\n\r\n for (const key of Object.keys(this.listTypesCollection)) {\r\n const value = this.listTypesCollection[key].Name;\r\n const exist = this.listTypesCollection.filter(item => item.Name === value);\r\n if (exist.length > 1 && value.length > 0) {\r\n duplicates.push({ [value]: exist.length});\r\n }\r\n }\r\n\r\n if (duplicates.length > 0) {\r\n this.translate.Translate(\"messages.validators.attributes.thereAreDuplicates\").subscribe(msg => {\r\n this.addMessagesComponent.ShowAlertMessages([msg]);\r\n });\r\n } else {\r\n this.OnListChanged();\r\n }\r\n }\r\n }\r\n\r\n public DeleteItemFromList(x: any) {\r\n this.addMessagesComponent.ShowErrorsMessages([]);\r\n this.itemToDelete = {\r\n Value: x.key.Name,\r\n AttributeId: this.attributeId,\r\n ListId: x.key.Id,\r\n DocType: this.docType\r\n };\r\n const removedItemIndex = this.listTypesCollection.findIndex(a => a.Name === this.itemToDelete.Value);\r\n\r\n if (x.key.Id && x.key.Id > 0) {\r\n this.service.IsOptionItemInUse(this.itemToDelete).subscribe((result) => {\r\n if (!result) {\r\n this.listTypesCollection.splice(removedItemIndex, 1);\r\n } else {\r\n if ((this.docType as DocumentTypeEnum) === DocumentTypeEnum.Equipment) {\r\n // show warning\r\n this.confirmationMessage.show();\r\n } else {\r\n this.translate.Translate(\"messages.attributes.attributeiteminuse\").subscribe(message => {\r\n this.addMessagesComponent.ShowErrorsMessages([message]);\r\n });\r\n }\r\n }\r\n },\r\n () => {\r\n this.translate.Translate(\"messages.error.genericError\").subscribe(message => {\r\n this.addMessagesComponent.ShowErrorsMessages([message]);\r\n });\r\n });\r\n } else {\r\n this.listTypesCollection.splice(removedItemIndex, 1);\r\n }\r\n this.OnListChanged();\r\n }\r\n\r\n public OnDeleteAttributeOption() {\r\n const removedItemIndex = this.listTypesCollection.findIndex(a => a.Name === this.itemToDelete.Value);\r\n this.listTypesCollection.splice(removedItemIndex, 1);\r\n }\r\n\r\n private OnListChanged() {\r\n this.attributeListType.emit(this.listTypesCollection);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n {{ 'label.newattribute' | translate }}\r\n {{ attributeName }}\r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n\r\n","import { Location } from \"@angular/common\";\r\nimport { Component, HostListener, Input, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxSelectBoxComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { Observable } from \"rxjs\";\r\nimport { AttributeType, CanDeactivateGuard, ComponentCanDeactivate, DocumentTypeEnum, EquipmentPermissionsService, FormMesssageService } from \"servicesight-shared\";\r\nimport { ConfirmationMessageComponent } from \"../../../shared/components/confirmation-message/confirmation-message.component\";\r\nimport { AddMessagesComponent } from \"../../../shared/components/error-messages/add-messages.component\";\r\nimport { TextInputDialogueComponent } from \"../../../shared/components/text-input-dialogue/text-input-dialogue.component\";\r\nimport \"../../../shared/extensions/string.extensions\";\r\nimport { IListItemModel } from \"../../../shared/models/ilist-item.model\";\r\nimport { AttributeCategoryModel } from \"../models/attribute-category.model\";\r\nimport { AttributeModel } from \"../models/attribute.model\";\r\nimport { AttributesService } from \"../services/attributes.service\";\r\nimport { EquipmentService } from \"src/app/equipment/services/equipment.service\";\r\nimport { EquipmentAttributeInUse } from \"./../../../equipment/models/equipment-attribute-in-use.model\";\r\n\r\n@Component({\r\n selector: \"app-new-attribute\",\r\n templateUrl: \"./new-attribute.component.html\",\r\n styleUrls: [\"./new-attribute.component.scss\"],\r\n providers: [ CanDeactivateGuard ]\r\n})\r\nexport class NewAttributeComponent implements OnInit, ComponentCanDeactivate {\r\n public categories: DataSource;\r\n public types: DataSource;\r\n public selectedAttributeType: number;\r\n public originalAttributeType: number;\r\n public attributeTypesEnum = AttributeType;\r\n public selectedCategoryId: number;\r\n public attributeCollection: any[] = [];\r\n public attributeName: string;\r\n public attributeDocType: DocumentTypeEnum;\r\n public readonly formName = \"attributeForm\";\r\n private isLoading: Array = [];\r\n public scopeCollection: IListItemModel[] = [];\r\n public scopeFlag: number;\r\n public hasDeletePermission: boolean;\r\n public equipmentAttributeInUse: EquipmentAttributeInUse = new EquipmentAttributeInUse();\r\n public deleteEquipmentAttributeConfirmationMessage: string;\r\n public updateEquipmentAttributeConfirmationMessage: string;\r\n\r\n @Input() id: number;\r\n @Input() docType: DocumentTypeEnum;\r\n @ViewChild(\"addCategoryComponent\", { static: true }) addCategoryComponent: TextInputDialogueComponent;\r\n @ViewChild(\"confirmationMessage\", { static: true }) confirmationMessage: ConfirmationMessageComponent;\r\n @ViewChild(\"equipmentconfirmationMessage\", { static: true }) equipmentconfirmationMessage: ConfirmationMessageComponent;\r\n @ViewChild(\"equipmentUpdateconfirmationMessage\", { static: true }) equipmentUpdateconfirmationMessage: ConfirmationMessageComponent;\r\n @ViewChild(\"addMessagesComponent\", { static: true }) messageComponent: AddMessagesComponent;\r\n @ViewChild(\"equipmentAttribute\", { static: true }) equipmentAttributeForm: NgForm;\r\n @ViewChild(\"equipmentType\", { static: true }) equipmentTypeField: DxSelectBoxComponent;\r\n\r\n constructor(private service: AttributesService,\r\n private location: Location,\r\n private translate: TranslateService,\r\n private formMessageService: FormMesssageService,\r\n private permissionsService: EquipmentPermissionsService,\r\n private equipmentService: EquipmentService) { }\r\n\r\n public AddNewCategory(ev: any) {\r\n const cat: AttributeCategoryModel = { AttributeCat: ev, DocTypeId: this.docType};\r\n this.isLoading.push(true);\r\n this.service.CreateCategory(cat).subscribe((x) => {\r\n this.selectedCategoryId = x.AttributeCatId;\r\n this.categories = this.service.ODataCategories(this.docType);\r\n this.categories.load();\r\n this.isLoading.pop();\r\n this.equipmentAttributeForm.form.markAsDirty();\r\n });\r\n }\r\n\r\n @HostListener(\"window:beforeunload\")\r\n public canDeactivate(): Observable | boolean {\r\n return !this.equipmentAttributeForm.form.dirty;\r\n }\r\n\r\n private CheckAnyListOptionEmpty(): boolean {\r\n if (this.equipmentTypeField.value === AttributeType.List) {\r\n return this.attributeCollection.some(x => x.Name.isEmpty());\r\n }\r\n\r\n return false;\r\n }\r\n\r\n public SaveAttribute() {\r\n this.messageComponent.ShowAlertMessages([]);\r\n const attribute: AttributeModel = {\r\n Attribute: this.attributeName,\r\n Type: this.selectedAttributeType,\r\n AttribCatId: this.selectedCategoryId,\r\n DocTypeId: this.docType,\r\n SelectOptions: this.attributeCollection,\r\n PrintAttribute: this.scopeFlag\r\n };\r\n\r\n if (this.CheckAnyListOptionEmpty() || (this.selectedAttributeType === AttributeType.List && this.attributeCollection.length === 0)) {\r\n const message = this.translate.instant(\"messages.validators.attributes.emptyOption\");\r\n this.messageComponent.ShowAlertMessages([ message ]);\r\n return;\r\n }\r\n\r\n if (this.id) {\r\n // if updating and Type has changed ...\r\n if (this.selectedAttributeType !== this.originalAttributeType &&\r\n (this.equipmentAttributeInUse.EquipmentInUse > 0 || this.equipmentAttributeInUse.MakeModelInUse > 0)) {\r\n this.updateEquipmentAttributeConfirmationMessage =\r\n this.translate.instant(\"messages.attributes.updateEquipmentMessage\",\r\n {\r\n equipmentCount: this.equipmentAttributeInUse.EquipmentInUse,\r\n makeModelCount: this.equipmentAttributeInUse.MakeModelInUse\r\n });\r\n\r\n this.equipmentUpdateconfirmationMessage.show();\r\n }\r\n else {\r\n this.UpdateAttribute(attribute);\r\n }\r\n } else {\r\n this.CreateAttribute(attribute);\r\n }\r\n }\r\n\r\n public OnUpdateAttribute() {\r\n const attribute: AttributeModel = {\r\n Attribute: this.attributeName,\r\n Type: this.selectedAttributeType,\r\n AttribCatId: this.selectedCategoryId,\r\n DocTypeId: this.docType,\r\n SelectOptions: this.attributeCollection,\r\n PrintAttribute: this.scopeFlag\r\n };\r\n this.UpdateAttribute(attribute);\r\n }\r\n\r\n private CreateAttribute(attribute: AttributeModel) {\r\n this.isLoading.push(true);\r\n this.service.GetAttributeByName(this.attributeName, this.docType).subscribe((attrib) => {\r\n if (attrib.AttribId === 0) {\r\n this.formMessageService.RegisterObservable(this.service.Save(attribute), this.formName).subscribe((response) => {\r\n this.location.go(`/proteansystem/systems/attributes/detail/${response.AttribId}/${this.docType}`);\r\n }, () => this.isLoading.pop());\r\n } else {\r\n this.equipmentAttributeForm.form.markAsDirty();\r\n const message = this.translate.instant(\"messages.attributes.attributeExist\");\r\n this.messageComponent.ShowAlertMessages([ message ]);\r\n this.isLoading.pop();\r\n }\r\n }, () => this.isLoading.pop());\r\n }\r\n\r\n private UpdateAttribute(attribute: AttributeModel) {\r\n this.isLoading.push(true);\r\n attribute.AttribId = this.id;\r\n this.formMessageService.RegisterObservable(this.service.Update(attribute), this.formName).subscribe(() => {\r\n this.attributeCollection = attribute.SelectOptions;\r\n this.attributeCollection.forEach((el, index) => {\r\n el.FormName = \"attributeListOption\" + index;\r\n });\r\n this.LoadAttribute();\r\n this.isLoading.pop();\r\n }, () => this.isLoading.pop());\r\n }\r\n\r\n public DeleteAttribute() {\r\n switch (this.attributeDocType) {\r\n case DocumentTypeEnum.Equipment:\r\n if (this.equipmentAttributeInUse.EquipmentInUse > 0 || this.equipmentAttributeInUse.MakeModelInUse > 0) {\r\n this.deleteEquipmentAttributeConfirmationMessage =\r\n this.translate.instant(\"messages.attributes.deleteEquipmentMessage\",\r\n {\r\n equipmentCount: this.equipmentAttributeInUse.EquipmentInUse,\r\n makeModelCount: this.equipmentAttributeInUse.MakeModelInUse\r\n });\r\n\r\n this.equipmentconfirmationMessage.show();\r\n } else {\r\n this.confirmationMessage.show();\r\n }\r\n break;\r\n default:\r\n this.confirmationMessage.show();\r\n break;\r\n }\r\n\r\n }\r\n\r\n public OnCancelAttribute() {\r\n if (this.id) {\r\n this.equipmentAttributeForm.resetForm();\r\n this.LoadAttribute();\r\n } else {\r\n this.GoToList();\r\n }\r\n }\r\n\r\n public OnDeleteAttribute() {\r\n this.isLoading.push(true);\r\n this.service.DeleteAttribute(this.id, this.docType).subscribe((response) => {\r\n if (response) {\r\n this.GoToList();\r\n } else {\r\n const message = this.translate.instant(\"messages.attributes.attributeinuse\");\r\n this.messageComponent.ShowErrorsMessages([message]);\r\n this.isLoading.pop();\r\n }\r\n }, () => {\r\n const message = this.translate.instant(\"messages.error.genericError\");\r\n this.messageComponent.ShowErrorsMessages([message]);\r\n this.isLoading.pop();\r\n });\r\n }\r\n\r\n public CreateNewCategory() {\r\n this.addCategoryComponent.model = null;\r\n this.addCategoryComponent.Show();\r\n }\r\n\r\n public CheckAttributeName() {\r\n this.messageComponent.ShowAlertMessages([]);\r\n this.service.GetAttributeByName(this.attributeName, this.docType).subscribe(model => {\r\n if ((model.Attribute.length > 0 || model.AttribId > 0) && model.AttribId !== Number(this.id)) {\r\n const message = this.translate.instant(\"messages.attribute.attributeNameMustBeUnique\");\r\n this.messageComponent.ShowErrorsMessages([message]);\r\n }\r\n });\r\n }\r\n\r\n ngOnInit() {\r\n if (!this.docType) {\r\n this.GoToList();\r\n }\r\n\r\n this.permissionsService.Reload();\r\n this.permissionsService.HasDeleteAttributePermission.subscribe(x => this.hasDeletePermission = x);\r\n\r\n this.types = this.service.ODataTypes();\r\n this.types.load().then(() => {\r\n this.LoadAttribute();\r\n });\r\n\r\n this.categories = this.service.ODataCategories(this.docType);\r\n this.categories.load();\r\n\r\n const internalType = this.translate.instant(\"option.attribute.scope.internal\");\r\n const publicType = this.translate.instant(\"option.attribute.scope.public\");\r\n this.scopeCollection.push({ Id: 0, Name: internalType});\r\n this.scopeCollection.push({ Id: 1, Name: publicType});\r\n }\r\n\r\n private LoadAttribute() {\r\n if (this.id) {\r\n this.isLoading.push(true);\r\n this.service.Get(this.id).subscribe((attribute) => {\r\n switch (attribute.DocTypeId) {\r\n case DocumentTypeEnum.Equipment:\r\n this.equipmentService.EquipmentAttributeInUse(this.id).subscribe((equipmentAttributeInUse: EquipmentAttributeInUse) => {\r\n this.equipmentAttributeInUse = equipmentAttributeInUse;\r\n });\r\n break;\r\n default:\r\n this.service.AttributeInUse(this.id, this.docType).subscribe(inUse => {\r\n this.equipmentTypeField.disabled = inUse;\r\n });\r\n break;\r\n }\r\n this.MapAttributeMembers(attribute);\r\n });\r\n }\r\n }\r\n\r\n private MapAttributeMembers(attribute: AttributeModel) {\r\n this.attributeName = attribute.Attribute;\r\n this.attributeDocType = attribute.DocTypeId;\r\n this.selectedCategoryId = attribute.AttribCatId;\r\n this.selectedAttributeType = attribute.Type;\r\n this.originalAttributeType = attribute.Type;\r\n this.attributeCollection = attribute.SelectOptions;\r\n this.scopeFlag = attribute.PrintAttribute;\r\n\r\n this.attributeCollection.forEach((el, index) => {\r\n el.FormName = \"attributeListOption\" + index;\r\n });\r\n\r\n this.isLoading.pop();\r\n }\r\n\r\n public IsLoading() {\r\n return this.isLoading.length > 0;\r\n }\r\n\r\n public AttributeListChanged(event) {\r\n if (event) {\r\n this.equipmentAttributeForm.form.markAsDirty();\r\n }\r\n }\r\n\r\n private GoToList() {\r\n let url = \"/proteansystem/systems\";\r\n\r\n // this '+' must stay to convert from string\r\n // at that point 'this.docType' is converting to string\r\n // expectation at that place is that we need have int or enum\r\n switch (+this.docType) {\r\n case DocumentTypeEnum.Equipment:\r\n url += \"/equipment-settings/attributes\";\r\n break;\r\n case DocumentTypeEnum.Job:\r\n url += \"/job-settings/attributes\";\r\n break;\r\n case DocumentTypeEnum.SalesOpportunity:\r\n url += \"/sales-opportunity-attributes/list\";\r\n break;\r\n case DocumentTypeEnum.Project:\r\n url += \"/project-attributes/list\";\r\n }\r\n\r\n this.location.go(url);\r\n }\r\n}\r\n","import { Component, OnDestroy, OnInit } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { MakeModel, ToasterService, ToastType, UICustomisation, UserReferenceService } from \"servicesight-shared\";\r\nimport { ImportColumnDictionary } from \"src/app/shared/models/import/import-column-dictionary.model\";\r\nimport { ImportMap } from \"src/app/shared/models/import/import-map.model\";\r\nimport { ImportValidationObject } from \"src/app/shared/models/import/import-validation-object.model\";\r\nimport { ImportValidationFunc } from \"src/app/shared/models/import/import-validation.type\";\r\nimport { MakeModelService } from \"src/app/shared/services/make-model/make-model.service\";\r\n\r\n@Component({\r\n selector: \"app-make-model-upload\",\r\n templateUrl: \"./make-model-upload.component.html\",\r\n styleUrls: [\"./make-model-upload.component.scss\"]\r\n})\r\nexport class MakeModelUploadComponent implements OnInit, OnDestroy {\r\n\r\n private poll: any;\r\n private userRef1Label: string;\r\n private userRef2Label: string;\r\n\r\n public noMatch: number = -1;\r\n public isUs: boolean = false;\r\n public isProcessing: boolean = false;\r\n public remainingRows: number = 0;\r\n public defaultMap: ImportColumnDictionary = {\r\n Make: { displayName: \"Make\", value: this.noMatch, required: true },\r\n Model: { displayName: \"Model\", value: this.noMatch, required: true },\r\n Description: { displayName: \"Description\", value: this.noMatch, required: false },\r\n Category: { displayName: \"Category\", value: this.noMatch, required: true },\r\n Type: { displayName: \"Type\", value: this.noMatch, required: true },\r\n SubType: { displayName: \"SubType\", value: this.noMatch, required: true },\r\n UserRef1: { displayName: \"UserRef1\", value: this.noMatch, required: false },\r\n UserRef2: { displayName: \"UserRef2\", value: this.noMatch, required: false },\r\n SalesWarrantyLength: { displayName: \"SalesWarrantyLength\", value: this.noMatch, required: false }\r\n };\r\n\r\n public get progressMessage(): Observable {\r\n if (this.remainingRows === 0) {\r\n return this.translateService.get(\"makemodel.import.uploading\");\r\n }\r\n return this.translateService.get(\"makemodel.import.inprogress\", { value: this.remainingRows });\r\n }\r\n\r\n public defaultMaps: { [key: string]: string } = {\r\n Make: \"Make\",\r\n make: \"Make\",\r\n Model: \"Model\",\r\n model: \"Model\",\r\n Description: \"Description\",\r\n description: \"Description\",\r\n Desc: \"Description\",\r\n desc: \"Description\",\r\n Category: \"Category\",\r\n Cat: \"Category\",\r\n equipcategory: \"Category\",\r\n category: \"Category\",\r\n cat: \"Category\",\r\n c: \"Category\",\r\n Type: \"Type\",\r\n equiptype: \"Type\",\r\n type: \"Type\",\r\n t: \"Type\",\r\n SubType: \"SubType\",\r\n Sub: \"SubType\",\r\n equipsubtype: \"SubType\",\r\n subtype: \"SubType\",\r\n sub: \"SubType\",\r\n st: \"SubType\",\r\n SalesWarrantyLength: \"SalesWarrantyLength\",\r\n SalesWarranty: \"SalesWarrantyLength\",\r\n Warranty: \"SalesWarrantyLength\",\r\n saleswarranty: \"SalesWarrantyLength\",\r\n warranty: \"SalesWarrantyLength\"\r\n };\r\n\r\n public preDefinedMaps: Array;\r\n\r\n public columnValidations: ImportValidationObject = {\r\n Make: (val) => val.toString().length <= 30,\r\n Model: (val) => val.toString().length <= 50,\r\n Description: (val) => val.toString().length <= 100,\r\n Category: (val) => val.toString().length <= 30,\r\n Type: (val) => val.toString().length <= 30,\r\n SubType: (val) => val.toString().length <= 30,\r\n SalesWarrantyLength: (val) => Number.isInteger(Number(val)),\r\n UserRef1: (val) => val.toString().length <= 50,\r\n UserRef2: (val) => val.toString().length <= 50\r\n };\r\n\r\n public makeModelMap: Map = new Map();\r\n\r\n public rowValidator: ImportValidationFunc = (row: MakeModel) => {\r\n const key = row.Make + \"|\" + row.Model;\r\n const isDuplicate = this.makeModelMap.has(key);\r\n const errors: string[] = [];\r\n if (!isDuplicate) {\r\n this.makeModelMap.set(key, true);\r\n } else {\r\n errors.push(this.translateService.instant(\"makemodel.import.error.duplicate\", { Make: row.Make, Model: row.Model}));\r\n }\r\n return {\r\n isValid: !isDuplicate,\r\n errors\r\n };\r\n };\r\n\r\n constructor(\r\n private toasterService: ToasterService,\r\n private makeModelService: MakeModelService,\r\n private userReferenceService: UserReferenceService,\r\n private translateService: TranslateService) {\r\n this.rowValidator = this.rowValidator.bind(this);\r\n }\r\n\r\n ngOnInit() {\r\n this.getRemainingCount();\r\n this.userRef1Label = this.userReferenceService.getLabel(UICustomisation.MAKE_MODEL_REF1);\r\n this.userRef2Label = this.userReferenceService.getLabel(UICustomisation.MAKE_MODEL_REF2);\r\n\r\n this.defaultMap.UserRef1.displayName = this.userRef1Label;\r\n this.defaultMap.UserRef2.displayName = this.userRef2Label;\r\n\r\n this.preDefinedMaps = [\r\n {\r\n columns: [\"Make\", \"Model\", \"Description\", \"Category\", \"Type\", \"SubType\", \"SalesWarranty\", \"UserRef1\", \"UserRef2\"],\r\n name: \"ServiceSight\",\r\n map: {\r\n Make: { displayName: \"Make\", value: 0 },\r\n Model: { displayName: \"Model\", value: 1 },\r\n Description: { displayName: \"Description\", value: 2 },\r\n Category: { displayName: \"Category\", value: 3 },\r\n Type: { displayName: \"Type\", value: 4 },\r\n SubType: { displayName: \"SubType\", value: 5 },\r\n SalesWarrantyLength: { displayName: \"SalesWarrantyLength\", value: 6 },\r\n UserRef1: { displayName: this.userRef1Label, value: 7 },\r\n UserRef2: { displayName: this.userRef2Label, value: 8 }\r\n }\r\n }\r\n ];\r\n }\r\n\r\n ngOnDestroy(): void {\r\n if (this.poll) {\r\n clearTimeout(this.poll);\r\n this.poll = null;\r\n }\r\n }\r\n\r\n getSample(): void {\r\n this.makeModelService.getSampleUpload()\r\n .subscribe((response: any) => {\r\n const contentType = \"text/csv\";\r\n const blob = new Blob([response.body], { type: contentType });\r\n const data = window.URL.createObjectURL(blob);\r\n const link = document.createElement(\"a\");\r\n link.hidden = true;\r\n link.href = data;\r\n link.download = \"make-model-sample.csv\";\r\n document.body.appendChild(link);\r\n link.click();\r\n document.body.removeChild(link);\r\n setTimeout(() => {\r\n // For Firefox it is necessary to delay revoking the ObjectURL\r\n window.URL.revokeObjectURL(data);\r\n }, 100);\r\n });\r\n }\r\n\r\n reset(): void {\r\n this.makeModelMap.clear();\r\n }\r\n\r\n upload(rows: MakeModel[]): void {\r\n this.remainingRows = 0;\r\n this.isProcessing = true;\r\n\r\n this.makeModelService.uploadRows(rows).subscribe(() => {\r\n this.getRemainingCount();\r\n });\r\n }\r\n\r\n getRemainingCount(): void {\r\n this.makeModelService.getImportProgress().subscribe(s => {\r\n this.remainingRows = s;\r\n if (s > 0) {\r\n this.isProcessing = true;\r\n this.poll = setTimeout(this.getRemainingCount.bind(this), 5000);\r\n } else {\r\n if (this.isProcessing) {\r\n this.toasterService.pop(\"makemodel.import.complete\", ToastType.medium);\r\n }\r\n\r\n this.isProcessing = false;\r\n if (this.poll) {\r\n clearTimeout(this.poll);\r\n this.poll = null;\r\n }\r\n }\r\n });\r\n }\r\n\r\n}\r\n","\r\n\r\n\r\n","import { CommonModule } from \"@angular/common\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { NgModule } from \"@angular/core\";\r\nimport { FormsModule } from \"@angular/forms\";\r\nimport { RouterModule } from \"@angular/router\";\r\nimport { TranslateLoader, TranslateModule } from \"@ngx-translate/core\";\r\nimport {\r\n DxAccordionModule,\r\n DxCheckBoxModule,\r\n DxDataGridModule,\r\n DxDateBoxModule,\r\n DxLoadPanelModule,\r\n DxNumberBoxModule,\r\n DxPopupModule,\r\n DxRadioGroupModule,\r\n DxSelectBoxModule,\r\n DxTabPanelModule,\r\n DxTemplateModule,\r\n DxTextAreaModule,\r\n DxTextBoxModule\r\n} from \"devextreme-angular\";\r\nimport { CanDeactivateGuard, HttpLoaderFactory, ServicesightSharedModule, SharedPipesModule } from \"servicesight-shared\";\r\nimport { PipesModule } from \"src/app/shared/pipes/pipes.module\";\r\nimport { AttributeSettingsComponent } from \"./attribute-settings.component\";\r\nimport { AttributesComponent } from \"./attributes/attributes.component\";\r\nimport { CategoryTypesComponent } from \"./category-types/category-types.component\";\r\nimport { NewAttributeComponent } from \"./new-attribute/new-attribute.component\";\r\nimport { AttributeListTypeComponent } from \"./new-attribute/types-components/attribute-list-type.component\";\r\nimport { AttributesCaptionPipe } from \"./pipes/attributes-caption.pipe\";\r\nimport { AttributesSubheadingPipe } from \"./pipes/attributes-subheading.pipe\";\r\nimport { SelectedTypePipe } from \"./pipes/selected-type.pipe\";\r\nimport { SharedComponentsModule } from \"../../shared/components/shared-components.module\";\r\nimport { SharedDirectivesModule } from \"../../shared/directives/shared-directives.module\";\r\nimport { MakeModelUploadComponent } from \"../equipment-settings/make-model-upload/make-model-upload.component\";\r\nimport { ServicingComponent } from \"../equipment-settings/servicing/servicing.component\";\r\n\r\nconst components = [\r\n AttributeSettingsComponent,\r\n CategoryTypesComponent,\r\n NewAttributeComponent,\r\n AttributeListTypeComponent,\r\n AttributesComponent,\r\n MakeModelUploadComponent,\r\n ServicingComponent\r\n];\r\n\r\nconst pipes = [\r\n SelectedTypePipe,\r\n AttributesCaptionPipe,\r\n AttributesSubheadingPipe\r\n];\r\n\r\n@NgModule({\r\n declarations: [...components, ...pipes],\r\n imports: [\r\n CommonModule,\r\n RouterModule,\r\n FormsModule,\r\n DxTabPanelModule,\r\n DxSelectBoxModule,\r\n DxDataGridModule,\r\n DxTextBoxModule,\r\n DxAccordionModule,\r\n DxTemplateModule,\r\n DxRadioGroupModule,\r\n DxNumberBoxModule,\r\n DxPopupModule,\r\n DxLoadPanelModule,\r\n PipesModule,\r\n SharedComponentsModule,\r\n PipesModule,\r\n SharedPipesModule,\r\n TranslateModule.forRoot({\r\n loader: {\r\n provide: TranslateLoader,\r\n useFactory: HttpLoaderFactory,\r\n deps: [HttpClient]\r\n }\r\n }),\r\n ServicesightSharedModule,\r\n DxTextAreaModule,\r\n DxDateBoxModule,\r\n SharedDirectivesModule,\r\n DxCheckBoxModule\r\n ],\r\n exports: [\r\n ServicingComponent\r\n ],\r\n providers: [\r\n CanDeactivateGuard\r\n ]\r\n})\r\nexport class AttributeSettingsModule { }\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { ImportServerSummary } from \"src/app/shared/models/import/import-server-summary.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class CustomerUploadService {\r\n constructor(\r\n @Inject(APP_CONFIG) private config: IAppConfig,\r\n private http: HttpClient\r\n ) { }\r\n\r\n public GetUploadMetaData(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}CustomersImport/GetMetaData`);\r\n }\r\n\r\n public GetSample(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}CustomersImport/DownloadSample`);\r\n }\r\n\r\n public GetRemainingCount(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}CustomersImport/Progress`);\r\n }\r\n\r\n public GetSummary(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}CustomersImport/Summary`);\r\n }\r\n\r\n public Upload(rows: any[]): Observable {\r\n return this.http.post(`${this.config.apiLocations.ServiceSight}CustomersImport/UploadCustomers`, rows);\r\n }\r\n}\r\n","import { AfterViewInit, Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { SettingId, SettingsService, ToasterService, ToastType } from \"servicesight-shared\";\r\nimport { ImporterComponent } from \"src/app/shared/components/importer/importer.component\";\r\nimport { ImportColumnDictionary } from \"src/app/shared/models/import/import-column-dictionary.model\";\r\nimport { ImportMap } from \"src/app/shared/models/import/import-map.model\";\r\nimport { ImportValidationObject } from \"src/app/shared/models/import/import-validation-object.model\";\r\nimport { ImportValidationFunc } from \"src/app/shared/models/import/import-validation.type\";\r\nimport { CustomerUpload } from \"../models/customer-upload.model\";\r\nimport { CustomerUploadService } from \"../services/customer-upload.service\";\r\n\r\n@Component({\r\n selector: \"app-customer-upload\",\r\n templateUrl: \"./customer-upload.component.html\",\r\n styleUrls: [\"./customer-upload.component.scss\"]\r\n})\r\nexport class CustomerUploadComponent implements OnInit, AfterViewInit {\r\n @ViewChild(\"importer\", { static: true }) importer: ImporterComponent;\r\n\r\n private poll: NodeJS.Timeout;\r\n private isUS: boolean = false;\r\n private isPro: boolean = false;\r\n private noMatch: number = -1;\r\n\r\n public isProcessing: boolean = false;\r\n public remainingRows: number = 0;\r\n\r\n public defaultMap: ImportColumnDictionary = {\r\n CustomerName: { displayName: \"Name\", value: this.noMatch, required: true },\r\n Alpha: { displayName: \"Alpha\", value: this.noMatch },\r\n InvoiceAlpha: { displayName: \"Invoice Alpha\", value: this.noMatch },\r\n Address1: { displayName: \"Street1\", value: this.noMatch },\r\n Address2: { displayName: \"Street2\", value: this.noMatch },\r\n Address3: { displayName: \"Town/City\", value: this.noMatch },\r\n Address4: { displayName: \"County\", value: this.noMatch, required: this.isUS },\r\n PostCode: { displayName: \"PostCode\", value: this.noMatch, required: this.isUS },\r\n Country: { displayName: \"Country\", value: this.noMatch },\r\n Phone: { displayName: \"Phone\", value: this.noMatch },\r\n Fax: { displayName: \"Fax\", value: this.noMatch },\r\n Email: { displayName: \"Email\", value: this.noMatch },\r\n Website: { displayName: \"Website\", value: this.noMatch },\r\n IsProspect: { displayName: \"IsProspect (Y/N)\", value: this.noMatch },\r\n ContactFirstName: { displayName: \"Contact First Name\", value: this.noMatch },\r\n ContactLastName: { displayName: \"Contact Last Name\", value: this.noMatch },\r\n ContactMobileNumber: { displayName: \"Contact Mobile Number\", value: this.noMatch },\r\n ContactPhoneNumber: { displayName: \"Contact Phone Number\", value: this.noMatch },\r\n ContactPhoneExtension: { displayName: \"Contact Phone Extension\", value: this.noMatch },\r\n ContactEmail: { displayName: \"Contact Email\", value: this.noMatch },\r\n GeneralNotes: { displayName: \"General notes\", value: this.noMatch },\r\n SiteNotes: { displayName: \"Engineer site notes\", value: this.noMatch },\r\n CurrencyCode: { displayName: \"Currency Code\", value: this.noMatch },\r\n InvoiceEmailAddress: { displayName: \"Invoice Email Address\", value: this.noMatch },\r\n PaymentTerms: { displayName: \"Payment Terms\", value: this.noMatch },\r\n PaymentTermDays: { displayName: \"Payment Term Days\", value: this.noMatch },\r\n TaxCode: { displayName: \"Tax Code\", value: this.noMatch },\r\n OrderNo: { displayName: \"Order No\", value: this.noMatch },\r\n UserRef1: { displayName: \"User Ref 1\", value: this.noMatch },\r\n UserRef2: { displayName: \"User Ref 2\", value: this.noMatch },\r\n WarningNotes: { displayName: \"Warning Notes\", value: this.noMatch },\r\n PriorityName: { displayName: \"Priority\", value: this.noMatch }\r\n };\r\n\r\n public defaultMaps: { [key: string]: string } = {\r\n Company: \"CustomerName\",\r\n CompanyName: \"CustomerName\",\r\n Name: \"CustomerName\",\r\n Contact: \"ContactFirstName\",\r\n ContactName: \"ContactFirstName\",\r\n AccountCode: \"Alpha\",\r\n AccountNumber: \"Alpha\",\r\n Alpha: \"Alpha\",\r\n InvoiceAlpha: \"InvoiceAlpha\",\r\n InvoiceAccountCode: \"InvoiceAlpha\",\r\n InvoiceAccountNumber: \"InvoiceAlpha\",\r\n ManagedByAccountCode: \"ManagingAlpha\",\r\n ManagedByAlpha: \"ManagingAlpha\",\r\n Email: \"Email\",\r\n Emails: \"Email\",\r\n EmailAddress: \"Email\",\r\n Phone: \"Phone\",\r\n MainPhone: \"Phone\",\r\n PhoneNumber: \"Phone\",\r\n Telephone: \"Phone\",\r\n ContactMobileNo: \"ContactMobileNumber\",\r\n Mobile: \"ContactMobileNumber\",\r\n MobileNumber: \"ContactMobileNumber\",\r\n Fax: \"Fax\",\r\n FaxPhone: \"Fax\",\r\n FaxNumber: \"Fax\",\r\n Website: \"Website\",\r\n Street: \"Address1\",\r\n Zip: \"PostCode\",\r\n PostCode: \"PostCode\",\r\n PostalCode: \"PostCode\",\r\n PoPostalCode: \"PostCode\",\r\n PoAddress1: \"Address1\",\r\n PoAddressLine1: \"Address1\",\r\n Address1: \"Address1\",\r\n PoAddress2: \"Address2\",\r\n PoAddressLine2: \"Address2\",\r\n Address2: \"Address2\",\r\n City: \"Address3\",\r\n TownCity: \"Address3\",\r\n PoCity: \"Address3\",\r\n Town: \"Address3\",\r\n Address3: \"Address3\",\r\n PoRegion: \"Address4\",\r\n State: \"Address4\",\r\n County: \"Address4\",\r\n Address4: \"Address4\",\r\n Country: \"Country\",\r\n Countryname: \"Country\",\r\n PoCountry: \"Country\",\r\n FirstName: \"ContactFirstName\",\r\n ContactFirstName: \"ContactFirstName\",\r\n LastName: \"ContactLastName\",\r\n ContactLastName: \"ContactLastName\",\r\n MobilePhone: \"ContactMobileNumber\",\r\n ContactMobileNumber: \"ContactMobileNumber\",\r\n Person1FirstName: \"ContactFirstName\",\r\n Person1LastName: \"ContactLastName\",\r\n Person1SecondName: \"ContactLastName\",\r\n Person1Phone: \"ContactPhoneNumber\",\r\n ContactPhoneNo: \"ContactPhoneNumber\",\r\n Person1Email: \"ContactEmail\",\r\n ContactEmail: \"ContactEmail\",\r\n ProspectYN: \"IsProspect\",\r\n ContactPhoneExt: \"ContactPhoneExtension\",\r\n GeneralNotes: \"GeneralNotes\",\r\n SiteNotes: \"SiteNotes\",\r\n CurrencyCode: \"CurrencyCode\",\r\n InvoiceEmailAddress: \"InvoiceEmailAddress\",\r\n PaymentTerms: \"PaymentTerms\",\r\n PaymentTermDays: \"PaymentTermDays\",\r\n TaxCode: \"TaxCode\",\r\n OrderNo: \"OrderNo\",\r\n UserRef1: \"UserRef1\",\r\n UserRef2: \"UserRef2\",\r\n WarningNotes: \"WarningNotes\",\r\n InvConsolidation: \"Invoice Consolidation Type\",\r\n PriorityName: \"PriorityName\"\r\n };\r\n\r\n public preDefinedMaps: Array = [\r\n {\r\n columns: [\"Account Code\", \"Invoice Account Code\", \"Company Name\", \"Address 1\", \"Address 2\", \"Town/City\",\r\n \"County\", \"PostCode\", \"Country\", \"Phone\", \"Fax\", \"Email\", \"Website\", \"Prospect (Y/N)\", \"Contact First Name\",\r\n \"Contact Last Name\", \"Contact Mobile No\", \"Contact Phone No\", \"Contact Phone Ext\", \"Contact Email\", \"General Notes\",\r\n \"Site Notes\", \"Currency Code\", \"Invoice Email Address\", \"Payment Terms\", \"Payment Term Days\", \"Tax Code\",\r\n \"Order No\", \"User Ref 1\", \"User Ref 2\", \"Warning Notes\"],\r\n name: \"ServiceSight UK\",\r\n map: {\r\n Address1: { displayName: \"Street1\", value: 3 },\r\n Address2: { displayName: \"Street2\", value: 4 },\r\n Address3: { displayName: \"Town/City\", value: 5 },\r\n Address4: { displayName: \"County\", value: 6 },\r\n Alpha: { displayName: \"Alpha\", value: 0 },\r\n InvoiceAlpha: { displayName: \"Invoice Alpha\", value: 1 },\r\n ContactEmail: { displayName: \"Contact Email\", value: 19 },\r\n ContactFirstName: { displayName: \"Contact First Name\", value: 14 },\r\n ContactLastName: { displayName: \"Contact Last Name\", value: 15 },\r\n ContactMobileNumber: { displayName: \"Contact Mobile Number\", value: 16 },\r\n ContactPhoneExtension: { displayName: \"Contact Phone Extension\", value: 18 },\r\n ContactPhoneNumber: { displayName: \"Contact Phone Number\", value: 17 },\r\n Country: { displayName: \"Country\", value: 8 },\r\n CustomerName: { displayName: \"Name\", value: 2 },\r\n Email: { displayName: \"Email\", value: 11 },\r\n Fax: { displayName: \"Fax\", value: 10 },\r\n Phone: { displayName: \"Phone\", value: 9 },\r\n PostCode: { displayName: \"PostCode\", value: 7 },\r\n IsProspect: { displayName: \"IsProspect\", value: 13 },\r\n Website: { displayName: \"Website\", value: 12 },\r\n GeneralNotes: { displayName: \"General notes\", value: 20 },\r\n SiteNotes: { displayName: \"Engineer site notes\", value: 21 },\r\n CurrencyCode: { displayName: \"Currency Code\", value: 22 },\r\n InvoiceEmailAddress: { displayName: \"Invoice Email Address\", value: 23 },\r\n PaymentTerms: { displayName: \"Payment Terms\", value: 24 },\r\n PaymentTermDays: { displayName: \"Payment Term Days\", value: 25 },\r\n TaxCode: { displayName: \"Tax Code\", value: 26 },\r\n OrderNo: { displayName: \"Order No\", value: 27 },\r\n UserRef1: { displayName: \"User Ref 1\", value: 28 },\r\n UserRef2: { displayName: \"User Ref 2\", value: 29 },\r\n WarningNotes: { displayName: \"Warning Notes\", value: 30 }\r\n }\r\n },\r\n {\r\n columns: [\"Account Code\", \"Invoice Account Code\", \"Company Name\", \"Address 1\", \"Address 2\", \"Town/City\",\r\n \"County\", \"EirCode\", \"Country\", \"Phone\", \"Fax\", \"Email\", \"Website\", \"Prospect (Y/N)\", \"Contact First Name\",\r\n \"Contact Last Name\", \"Contact Mobile No\", \"Contact Phone No\", \"Contact Phone Ext\", \"Contact Email\", \"General Notes\",\r\n \"Site Notes\", \"Currency Code\", \"Invoice Email Address\", \"Payment Terms\", \"Payment Term Days\", \"Tax Code\",\r\n \"Order No\", \"User Ref 1\", \"User Ref 2\", \"Warning Notes\"],\r\n name: \"ServiceSight Ireland\",\r\n map: {\r\n Address1: { displayName: \"Street1\", value: 3 },\r\n Address2: { displayName: \"Street2\", value: 4 },\r\n Address3: { displayName: \"Town/City\", value: 5 },\r\n Address4: { displayName: \"County\", value: 6 },\r\n Alpha: { displayName: \"Alpha\", value: 0 },\r\n InvoiceAlpha: { displayName: \"Invoice Alpha\", value: 1 },\r\n ContactEmail: { displayName: \"Contact Email\", value: 19 },\r\n ContactFirstName: { displayName: \"Contact First Name\", value: 14 },\r\n ContactLastName: { displayName: \"Contact Last Name\", value: 15 },\r\n ContactMobileNumber: { displayName: \"Contact Mobile Number\", value: 16 },\r\n ContactPhoneExtension: { displayName: \"Contact Phone Extension\", value: 18 },\r\n ContactPhoneNumber: { displayName: \"Contact Phone Number\", value: 17 },\r\n Country: { displayName: \"Country\", value: 8 },\r\n CustomerName: { displayName: \"Name\", value: 2 },\r\n Email: { displayName: \"Email\", value: 11 },\r\n Fax: { displayName: \"Fax\", value: 10 },\r\n Phone: { displayName: \"Phone\", value: 9 },\r\n PostCode: { displayName: \"PostCode\", value: 7 },\r\n IsProspect: { displayName: \"IsProspect\", value: 13 },\r\n Website: { displayName: \"Website\", value: 12 },\r\n GeneralNotes: { displayName: \"General notes\", value: 20 },\r\n SiteNotes: { displayName: \"Engineer site notes\", value: 21 },\r\n CurrencyCode: { displayName: \"Currency Code\", value: 22 },\r\n InvoiceEmailAddress: { displayName: \"Invoice Email Address\", value: 23 },\r\n PaymentTerms: { displayName: \"Payment Terms\", value: 24 },\r\n PaymentTermDays: { displayName: \"Payment Term Days\", value: 25 },\r\n TaxCode: { displayName: \"Tax Code\", value: 26 },\r\n OrderNo: { displayName: \"Order No\", value: 27 },\r\n UserRef1: { displayName: \"User Ref 1\", value: 28 },\r\n UserRef2: { displayName: \"User Ref 2\", value: 29 },\r\n WarningNotes: { displayName: \"Warning Notes\", value: 30 }\r\n }\r\n }, {\r\n columns: [\"Account Code\", \"Invoice Account Code\", \"Company Name\", \"Address 1\", \"Address 2\", \"Town/City\",\r\n \"State\", \"Zip Code\", \"Country\", \"Phone\", \"Fax\", \"Email\", \"Website\", \"Prospect (Y/N)\", \"Contact First Name\",\r\n \"Contact Last Name\", \"Contact Cell Phone No\", \"Contact Phone No\", \"Contact Phone Ext\", \"Contact Email\", \"General Notes\",\r\n \"Site Notes\", \"Currency Code\", \"Invoice Email Address\", \"Payment Terms\", \"Payment Term Days\",\r\n \"Order No\", \"User Ref 1\", \"User Ref 2\", \"Warning Notes\"],\r\n name: \"ServiceSight US\",\r\n map: {\r\n Address1: { displayName: \"Street1\", value: 3 },\r\n Address2: { displayName: \"Street2\", value: 4 },\r\n Address3: { displayName: \"Town/City\", value: 5 },\r\n Address4: { displayName: \"County\", value: 6 },\r\n Alpha: { displayName: \"Alpha\", value: 0 },\r\n InvoiceAlpha: { displayName: \"Invoice Alpha\", value: 1 },\r\n ContactEmail: { displayName: \"Contact Email\", value: 19 },\r\n ContactFirstName: { displayName: \"Contact First Name\", value: 14 },\r\n ContactLastName: { displayName: \"Contact Last Name\", value: 15 },\r\n ContactMobileNumber: { displayName: \"Contact Mobile Number\", value: 16 },\r\n ContactPhoneExtension: { displayName: \"Contact Phone Extension\", value: 18 },\r\n ContactPhoneNumber: { displayName: \"Contact Phone Number\", value: 17 },\r\n Country: { displayName: \"Country\", value: 8 },\r\n CustomerName: { displayName: \"Name\", value: 2 },\r\n Email: { displayName: \"Email\", value: 11 },\r\n Fax: { displayName: \"Fax\", value: 10 },\r\n Phone: { displayName: \"Phone\", value: 9 },\r\n PostCode: { displayName: \"PostCode\", value: 7 },\r\n IsProspect: { displayName: \"IsProspect\", value: 13 },\r\n Website: { displayName: \"Website\", value: 12 },\r\n GeneralNotes: { displayName: \"General notes\", value: 20 },\r\n SiteNotes: { displayName: \"Engineer site notes\", value: 21 },\r\n CurrencyCode: { displayName: \"Currency Code\", value: 22 },\r\n InvoiceEmailAddress: { displayName: \"Invoice Email Address\", value: 23 },\r\n PaymentTerms: { displayName: \"Payment Terms\", value: 24 },\r\n PaymentTermDays: { displayName: \"Payment Term Days\", value: 25 },\r\n OrderNo: { displayName: \"Order No\", value: 27 },\r\n UserRef1: { displayName: \"User Ref 1\", value: 28 },\r\n UserRef2: { displayName: \"User Ref 2\", value: 29 },\r\n WarningNotes: { displayName: \"Warning Notes\", value: 30 }\r\n }\r\n }, {\r\n columns: [\"CustomerRecord.AccountReference\", \"CustomerRecord.AccountName\", \"CustomerRecord.AddressLine1\", \"CustomerRecord.AddressLine2\",\r\n \"CustomerRecord.AddressLine3\", \"CustomerRecord.AddressLine4\", \"CustomerRecord.AddressLine5\", \"CustomerRecord.ContactName\", \"CustomerRecord.Telephone\",\r\n \"CustomerRecord.Fax\", \"CustomerRecord.CustomField1\", \"CustomerRecord.CustomField2\", \"CustomerRecord.CustomField3\", \"CustomerRecord.DefaultDepartmentNumber\",\r\n \"CustomerRecord.VATRegistrationNumber\", \"CustomerRecord.TurnoverMonthToDate\", \"CustomerRecord.TurnoverYearToDate\", \"CustomerRecord.TurnoverPriorYear\",\r\n \"CustomerRecord.CreditLimit\", \"CustomerRecord.TradingTerms\", \"CustomerRecord.SettlementDueDays\", \"CustomerRecord.SettlementDiscountRate\",\r\n \"CustomerRecord.DefaultNominal\", \"CustomerRecord.DefaultVATCode\"],\r\n name: \"Sage 50\",\r\n map: {\r\n Address1: { displayName: \"Street1\", value: 2 },\r\n Address2: { displayName: \"Street2\", value: 3 },\r\n Address3: { displayName: \"Town/City\", value: 4 },\r\n Address4: { displayName: \"County\", value: 5 },\r\n Alpha: { displayName: \"Alpha\", value: 0 },\r\n InvoiceAlpha: { value: -1 },\r\n ContactEmail: { displayName: \"Contact Email\", value: -1 },\r\n ContactFirstName: { displayName: \"Contact First Name\", value: 7 },\r\n ContactLastName: { displayName: \"Contact Last Name\", value: -1 },\r\n ContactMobileNumber: { displayName: \"Contact Mobile Number\", value: -1 },\r\n ContactPhoneExtension: { displayName: \"Contact Phone Extension\", value: -1 },\r\n ContactPhoneNumber: { displayName: \"Contact Phone Number\", value: -1 },\r\n Country: { displayName: \"Country\", value: -1 },\r\n CustomerName: { displayName: \"Name\", value: 1 },\r\n Email: { displayName: \"Email\", value: -1 },\r\n Fax: { displayName: \"Fax\", value: 9 },\r\n Phone: { displayName: \"Phone\", value: 8 },\r\n PostCode: { displayName: \"PostCode\", value: 6 },\r\n IsProspect: { value: -1 },\r\n Website: { displayName: \"Website\", value: -1 },\r\n GeneralNotes: { displayName: \"General notes\", value: -1 },\r\n SiteNotes: { displayName: \"Engineer site notes\", value: -1 },\r\n CurrencyCode: { displayName: \"Currency Code\", value: -1 }\r\n }\r\n }, {\r\n columns: [\"Customer\", \"Company\", \"Street Address\", \"City\", \"County\", \"Country\", \"Postcode\", \"Phone\", \"Email\", \"Attachments\", \"Open Balance\", \"Notes\"],\r\n name: \"Quickbooks UK\",\r\n map: {\r\n CustomerName: { displayName: \"Name\", value: 0 },\r\n Address1: { displayName: \"Street1\", value: 2 },\r\n Address2: { displayName: \"Street2\", value: -1 },\r\n Address3: { displayName: \"Town/City\", value: 3 },\r\n Address4: { displayName: \"County\", value: 4 },\r\n PostCode: { displayName: \"PostCode\", value: 6 },\r\n Country: { displayName: \"Country\", value: 5 },\r\n Email: { displayName: \"Email\", value: 8 },\r\n Phone: { displayName: \"Phone\", value: 7 },\r\n ContactEmail: { displayName: \"Contact Email\", value: -1 },\r\n ContactFirstName: { displayName: \"Contact First Name\", value: -1 },\r\n ContactLastName: { displayName: \"Contact Last Name\", value: -1 },\r\n ContactMobileNumber: { displayName: \"Contact Mobile Number\", value: -1 },\r\n ContactPhoneExtension: { displayName: \"Contact Phone Extension\", value: -1 },\r\n ContactPhoneNumber: { displayName: \"Contact Phone Number\", value: -1 },\r\n Alpha: { displayName: \"Alpha\", value: -1 },\r\n Fax: { displayName: \"Fax\", value: -1 },\r\n InvoiceAlpha: { value: -1 },\r\n IsProspect: { displayName: \"IsProspect\", value: -1 },\r\n Website: { displayName: \"Website\", value: -1 },\r\n GeneralNotes: { displayName: \"General notes\", value: -1 },\r\n SiteNotes: { displayName: \"Engineer site notes\", value: -1 },\r\n CurrencyCode: { displayName: \"Currency Code\", value: -1 }\r\n }\r\n }\r\n ];\r\n\r\n public columnValidations: ImportValidationObject = {\r\n Alpha: (val) => !val || val.toString().length <= 19,\r\n InvoiceAlpha: (val) => !val || val.toString().length <= 19,\r\n ManagingAlpha: (val) => !val || val.toString().length <= 19,\r\n CustomerName: (val) => val.length > 0 && val.length <= 255,\r\n Email: (val) => !val || (val.toString().length <= 255 && val.match(/.+?@.+/g)),\r\n Phone: (val) => !val || val.toString().length <= 50,\r\n Fax: (val) => !val || val.toString().length <= 50,\r\n Website: (val) => !val || val.length <= 1000,\r\n Address1: (val) => !val || val.length <= 500,\r\n Address2: (val) => !val || val.length <= 500,\r\n Address3: (val) => !val || val.length <= 255,\r\n Address4: (val) => (this.isUS ? val && val.length > 0 : !val) || val.length <= 255,\r\n PostCode: (val) => !val || val.toString().length <= 255,\r\n ContactFirstName: (val) => !val || val.length <= 50,\r\n ContactLastName: (val) => !val || val.length <= 100,\r\n ContactEmail: (val) => !val || (val.toString().length <= 255 && val.match(/.+?@.+/g)),\r\n ContactMobileNumber: (val) => !val || val.toString().length <= 50,\r\n ContactPhoneExtension: (val) => !val || val.toString().length <= 50,\r\n ContactPhoneNumber: (val) => !val || val.toString().length <= 50,\r\n Empty: () => true,\r\n GeneralNotes: () => true,\r\n SiteNotes: () => true,\r\n CurrencyCode: (val) => !val || val.toString().length <= 3,\r\n InvoiceEmailAddress: (val) => !val || (val.toString().length <= 255 && val.match(/.+?@.+/g)),\r\n PaymentTerms: (val) => !val || val.toLowerCase() === \"invoice date\" ||\r\n val.toLowerCase() === \"end of month\",\r\n PaymentTermDays: (val) => !isNaN(val),\r\n TaxCode: () => true,\r\n OrderNo: (val) => !val || val.toLowerCase() === \"not required\" ||\r\n val.toLowerCase() === \"required before complete\" ||\r\n val.toLowerCase() === \"required before invoice\" ||\r\n val.toLowerCase() === \"required before job\",\r\n UserRef1: () => true,\r\n UserRef2: () => true,\r\n WarningNotes: () => true,\r\n InvConsolidation: (val) => !val || val.toLowerCase() === \"customer\" ||\r\n val.toLowerCase() === \"site\" ||\r\n val.toLowerCase() === \"order number\" ||\r\n val.toLowerCase() === \"none\",\r\n PriorityName: (val) => !val || val.length <= 50,\r\n };\r\n\r\n public customerMap: Map = new Map();\r\n\r\n public rowValidator: ImportValidationFunc = (row: CustomerUpload) => {\r\n const errors: string[] = [];\r\n const isDuplicateSupplier = this.customerMap.has(row.Alpha);\r\n\r\n if (!isDuplicateSupplier) {\r\n this.customerMap.set(row.Alpha, true);\r\n } else {\r\n errors.push(this.translateService.instant(\"customers.import.error.duplicate\", { Name: row.Alpha }));\r\n }\r\n\r\n return {\r\n isValid: !isDuplicateSupplier,\r\n errors\r\n };\r\n };\r\n\r\n constructor(\r\n private customerUploadService: CustomerUploadService,\r\n private translateService: TranslateService,\r\n private toasterService: ToasterService,\r\n private settingsService: SettingsService\r\n ) { }\r\n\r\n public ngOnInit(): void {\r\n this.customerUploadService.GetUploadMetaData().subscribe(data => {\r\n this.isUS = data.IsUs;\r\n this.isPro = data.IsPro;\r\n\r\n this.settingsService.getSetting(SettingId.CustomerManagingAgents).subscribe(res => {\r\n if (res.ValueBool) {\r\n this.addManagingAgents();\r\n }\r\n\r\n if (this.isPro) {\r\n this.addPro(res.ValueBool);\r\n }\r\n });\r\n });\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n this.getRemainingCount();\r\n }\r\n\r\n public getSample(): void {\r\n this.customerUploadService.GetSample().subscribe(response => {\r\n const contentType = \"text/csv\";\r\n const blob = new Blob([response], { type: contentType });\r\n const data = window.URL.createObjectURL(blob);\r\n const link = document.createElement(\"a\");\r\n link.hidden = true;\r\n link.href = data;\r\n link.download = \"customers-sample.csv\";\r\n document.body.appendChild(link);\r\n link.click();\r\n document.body.removeChild(link);\r\n setTimeout(() => {\r\n // For Firefox it is necessary to delay revoking the ObjectURL\r\n window.URL.revokeObjectURL(data);\r\n }, 100);\r\n });\r\n }\r\n\r\n public reset(): void {\r\n this.customerMap.clear();\r\n }\r\n\r\n public upload(rows: any[]): void {\r\n this.customerUploadService.Upload(rows).subscribe(() => {\r\n this.isProcessing = true;\r\n this.getRemainingCount();\r\n });\r\n }\r\n\r\n private addManagingAgents() {\r\n this.defaultMap = {\r\n CustomerName: { displayName: \"Name\", value: this.noMatch, required: true },\r\n Alpha: { displayName: \"Alpha\", value: this.noMatch },\r\n InvoiceAlpha: { displayName: \"Invoice Alpha\", value: this.noMatch },\r\n ManagingAlpha: { displayName: \"Managed by Account Code\", value: this.noMatch },\r\n Address1: { displayName: \"Street1\", value: this.noMatch },\r\n Address2: { displayName: \"Street2\", value: this.noMatch },\r\n Address3: { displayName: \"Town/City\", value: this.noMatch },\r\n Address4: { displayName: \"County\", value: this.noMatch, required: this.isUS },\r\n PostCode: { displayName: \"PostCode\", value: this.noMatch, required: this.isUS },\r\n Country: { displayName: \"Country\", value: this.noMatch },\r\n Phone: { displayName: \"Phone\", value: this.noMatch },\r\n Fax: { displayName: \"Fax\", value: this.noMatch },\r\n Email: { displayName: \"Email\", value: this.noMatch },\r\n Website: { displayName: \"Website\", value: this.noMatch },\r\n IsProspect: { displayName: \"IsProspect (Y/N)\", value: this.noMatch },\r\n IsManagingAgent: { displayName: \"Managing Agent (Y/N)\", value: this.noMatch },\r\n ContactFirstName: { displayName: \"Contact First Name\", value: this.noMatch },\r\n ContactLastName: { displayName: \"Contact Last Name\", value: this.noMatch },\r\n ContactMobileNumber: { displayName: \"Contact Mobile Number\", value: this.noMatch },\r\n ContactPhoneNumber: { displayName: \"Contact Phone Number\", value: this.noMatch },\r\n ContactPhoneExtension: { displayName: \"Contact Phone Extension\", value: this.noMatch },\r\n ContactEmail: { displayName: \"Contact Email\", value: this.noMatch },\r\n GeneralNotes: { displayName: \"General notes\", value: this.noMatch },\r\n SiteNotes: { displayName: \"Engineer site notes\", value: this.noMatch },\r\n CurrencyCode: { displayName: \"Currency Code\", value: this.noMatch },\r\n InvoiceEmailAddress: { displayName: \"Invoice Email Address\", value: this.noMatch },\r\n PaymentTerms: { displayName: \"Payment Terms\", value: this.noMatch },\r\n PaymentTermDays: { displayName: \"Payment Term Days\", value: this.noMatch },\r\n TaxCode: { displayName: \"Tax Code\", value: this.noMatch },\r\n OrderNo: { displayName: \"Order No\", value: this.noMatch },\r\n UserRef1: { displayName: \"User Ref 1\", value: this.noMatch },\r\n UserRef2: { displayName: \"User Ref 2\", value: this.noMatch },\r\n WarningNotes: { displayName: \"Warning Notes\", value: this.noMatch },\r\n PriorityName: { displayName: \"Priority\", value: this.noMatch }\r\n };\r\n\r\n this.preDefinedMaps = [\r\n {\r\n columns: [\"Account Code\", \"Invoice Account Code\", \"Managed by Account Code\", \"Company Name\",\r\n \"Address 1\", \"Address 2\", \"Town/City\", \"County\", \"PostCode\", \"Country\", \"Phone\", \"Fax\", \"Email\",\r\n \"Website\", \"Prospect (Y/N)\", \"Managing Agent (Y/N)\", \"Contact First Name\", \"Contact Last Name\",\r\n \"Contact Mobile No\", \"Contact Phone No\", \"Contact Phone Ext\", \"Contact Email\", \"General Notes\", \"Site Notes\", \"Currency Code\",\r\n \"Invoice Email Address\", \"Payment Terms\", \"Payment Term Days\", \"Tax Code\",\r\n \"Order No\", \"User Ref 1\", \"User Ref 2\", \"Warning Notes\"],\r\n name: \"ServiceSight UK\",\r\n map: {\r\n Address1: { displayName: \"Street1\", value: 4 },\r\n Address2: { displayName: \"Street2\", value: 5 },\r\n Address3: { displayName: \"Town/City\", value: 6 },\r\n Address4: { displayName: \"County\", value: 7 },\r\n Alpha: { displayName: \"Alpha\", value: 0 },\r\n InvoiceAlpha: { displayName: \"Invoice Alpha\", value: 1 },\r\n ManagingAlpha: { displayName: \"Managed by Account Code\", value: 2 },\r\n ContactEmail: { displayName: \"Contact Email\", value: 21 },\r\n ContactFirstName: { displayName: \"Contact First Name\", value: 16 },\r\n ContactLastName: { displayName: \"Contact Last Name\", value: 17 },\r\n ContactMobileNumber: { displayName: \"Contact Mobile Number\", value: 18 },\r\n ContactPhoneExtension: { displayName: \"Contact Phone Extension\", value: 20 },\r\n ContactPhoneNumber: { displayName: \"Contact Phone Number\", value: 19 },\r\n Country: { displayName: \"Country\", value: 9 },\r\n CustomerName: { displayName: \"Name\", value: 3 },\r\n Email: { displayName: \"Email\", value: 12 },\r\n Fax: { displayName: \"Fax\", value: 11 },\r\n Phone: { displayName: \"Phone\", value: 10 },\r\n PostCode: { displayName: \"PostCode\", value: 8 },\r\n IsProspect: { displayName: \"IsProspect\", value: 14 },\r\n IsManagingAgent: { displayName: \"IsManagingAgent\", value: 15 },\r\n Website: { displayName: \"Website\", value: 13 },\r\n GeneralNotes: { displayName: \"General notes\", value: 22 },\r\n SiteNotes: { displayName: \"Engineer site notes\", value: 23 },\r\n CurrencyCode: { displayName: \"Currency Code\", value: 24 },\r\n InvoiceEmailAddress: { displayName: \"Invoice Email Address\", value: 25 },\r\n PaymentTerms: { displayName: \"Payment Terms\", value: 26 },\r\n PaymentTermDays: { displayName: \"Payment Term Days\", value: 27 },\r\n TaxCode: { displayName: \"Tax Code\", value: 28 },\r\n OrderNo: { displayName: \"Order No\", value: 29 },\r\n UserRef1: { displayName: \"User Ref 1\", value: 30 },\r\n UserRef2: { displayName: \"User Ref 2\", value: 31 },\r\n WarningNotes: { displayName: \"Warning Notes\", value: 32 }\r\n }\r\n },\r\n {\r\n columns: [\"Account Code\", \"Invoice Account Code\", \"Managed by Account Code\", \"Company Name\",\r\n \"Address 1\", \"Address 2\", \"Town/City\", \"County\", \"EirCode\", \"Country\", \"Phone\", \"Fax\", \"Email\",\r\n \"Website\", \"Prospect (Y/N)\", \"Managing Agent (Y/N)\", \"Contact First Name\", \"Contact Last Name\",\r\n \"Contact Mobile No\", \"Contact Phone No\", \"Contact Phone Ext\", \"Contact Email\", \"General Notes\", \"Site Notes\", \"Currency Code\",\r\n \"Invoice Email Address\", \"Payment Terms\", \"Payment Term Days\", \"Tax Code\", \"Order No\", \"User Ref 1\", \"User Ref 2\", \"Warning Notes\"\r\n ],\r\n name: \"ServiceSight Ireland\",\r\n map: {\r\n Address1: { displayName: \"Street1\", value: 4 },\r\n Address2: { displayName: \"Street2\", value: 5 },\r\n Address3: { displayName: \"Town/City\", value: 6 },\r\n Address4: { displayName: \"County\", value: 7 },\r\n Alpha: { displayName: \"Alpha\", value: 0 },\r\n InvoiceAlpha: { displayName: \"Invoice Alpha\", value: 1 },\r\n ManagingAlpha: { displayName: \"Managed by Account Code\", value: 2 },\r\n ContactEmail: { displayName: \"Contact Email\", value: 21 },\r\n ContactFirstName: { displayName: \"Contact First Name\", value: 16 },\r\n ContactLastName: { displayName: \"Contact Last Name\", value: 17 },\r\n ContactMobileNumber: { displayName: \"Contact Mobile Number\", value: 18 },\r\n ContactPhoneExtension: { displayName: \"Contact Phone Extension\", value: 20 },\r\n ContactPhoneNumber: { displayName: \"Contact Phone Number\", value: 19 },\r\n Country: { displayName: \"Country\", value: 9 },\r\n CustomerName: { displayName: \"Name\", value: 3 },\r\n Email: { displayName: \"Email\", value: 12 },\r\n Fax: { displayName: \"Fax\", value: 11 },\r\n Phone: { displayName: \"Phone\", value: 10 },\r\n PostCode: { displayName: \"PostCode\", value: 8 },\r\n IsProspect: { displayName: \"IsProspect\", value: 14 },\r\n IsManagingAgent: { displayName: \"IsManagingAgent\", value: 15 },\r\n Website: { displayName: \"Website\", value: 13 },\r\n GeneralNotes: { displayName: \"General notes\", value: 22 },\r\n SiteNotes: { displayName: \"Engineer site notes\", value: 23 },\r\n CurrencyCode: { displayName: \"Currency Code\", value: 24 },\r\n InvoiceEmailAddress: { displayName: \"Invoice Email Address\", value: 25 },\r\n PaymentTerms: { displayName: \"Payment Terms\", value: 26 },\r\n PaymentTermDays: { displayName: \"Payment Term Days\", value: 27 },\r\n TaxCode: { displayName: \"Tax Code\", value: 28 },\r\n OrderNo: { displayName: \"Order No\", value: 29 },\r\n UserRef1: { displayName: \"User Ref 1\", value: 30 },\r\n UserRef2: { displayName: \"User Ref 2\", value: 31 },\r\n WarningNotes: { displayName: \"Warning Notes\", value: 32 }\r\n }\r\n }, {\r\n columns: [\"Account Code\", \"Invoice Account Code\", \"Managed by Account Code\", \"Company Name\",\r\n \"Address 1\", \"Address 2\", \"Town/City\", \"State\", \"Zip Code\", \"Country\", \"Phone\", \"Fax\", \"Email\",\r\n \"Website\", \"Prospect (Y/N)\", \"Managing Agent (Y/N)\", \"Contact First Name\", \"Contact Last Name\",\r\n \"Contact Cell Phone No\", \"Contact Phone No\", \"Contact Phone Ext\", \"Contact Email\", \"General Notes\", \"Site Notes\", \"Currency Code\",\r\n \"Invoice Email Address\", \"Payment Terms\", \"Payment Term Days\", \"Tax Code\", \"Order No\", \"User Ref 1\", \"User Ref 2\", \"Warning Notes\"\r\n ],\r\n name: \"ServiceSight US\",\r\n map: {\r\n Address1: { displayName: \"Street1\", value: 4 },\r\n Address2: { displayName: \"Street2\", value: 5 },\r\n Address3: { displayName: \"Town/City\", value: 6 },\r\n Address4: { displayName: \"County\", value: 7 },\r\n Alpha: { displayName: \"Alpha\", value: 0 },\r\n InvoiceAlpha: { displayName: \"Invoice Alpha\", value: 1 },\r\n ManagingAlpha: { displayName: \"Managed by Account Code\", value: 2 },\r\n ContactEmail: { displayName: \"Contact Email\", value: 21 },\r\n ContactFirstName: { displayName: \"Contact First Name\", value: 16 },\r\n ContactLastName: { displayName: \"Contact Last Name\", value: 17 },\r\n ContactMobileNumber: { displayName: \"Contact Mobile Number\", value: 18 },\r\n ContactPhoneExtension: { displayName: \"Contact Phone Extension\", value: 20 },\r\n ContactPhoneNumber: { displayName: \"Contact Phone Number\", value: 19 },\r\n Country: { displayName: \"Country\", value: 9 },\r\n CustomerName: { displayName: \"Name\", value: 3 },\r\n Email: { displayName: \"Email\", value: 12 },\r\n Fax: { displayName: \"Fax\", value: 11 },\r\n Phone: { displayName: \"Phone\", value: 10 },\r\n PostCode: { displayName: \"PostCode\", value: 8 },\r\n IsProspect: { displayName: \"IsProspect\", value: 14 },\r\n IsManagingAgent: { displayName: \"IsManagingAgent\", value: 15 },\r\n Website: { displayName: \"Website\", value: 13 },\r\n GeneralNotes: { displayName: \"General notes\", value: 22 },\r\n SiteNotes: { displayName: \"Engineer site notes\", value: 23 },\r\n CurrencyCode: { displayName: \"Currency Code\", value: 24 },\r\n InvoiceEmailAddress: { displayName: \"Invoice Email Address\", value: 25 },\r\n PaymentTerms: { displayName: \"Payment Terms\", value: 26 },\r\n PaymentTermDays: { displayName: \"Payment Term Days\", value: 27 },\r\n TaxCode: { displayName: \"Tax Code\", value: 28 },\r\n OrderNo: { displayName: \"Order No\", value: 29 },\r\n UserRef1: { displayName: \"User Ref 1\", value: 30 },\r\n UserRef2: { displayName: \"User Ref 2\", value: 31 },\r\n WarningNotes: { displayName: \"Warning Notes\", value: 32 },\r\n }\r\n }, {\r\n columns: [\"CustomerRecord.AccountReference\", \"CustomerRecord.AccountName\", \"CustomerRecord.AddressLine1\",\r\n \"CustomerRecord.AddressLine2\", \"CustomerRecord.AddressLine3\", \"CustomerRecord.AddressLine4\", \"CustomerRecord.AddressLine5\",\r\n \"CustomerRecord.ContactName\", \"CustomerRecord.Telephone\", \"CustomerRecord.Fax\", \"CustomerRecord.CustomField1\",\r\n \"CustomerRecord.CustomField2\", \"CustomerRecord.CustomField3\", \"CustomerRecord.DefaultDepartmentNumber\", \"CustomerRecord.VATRegistrationNumber\",\r\n \"CustomerRecord.TurnoverMonthToDate\", \"CustomerRecord.TurnoverYearToDate\", \"CustomerRecord.TurnoverPriorYear\", \"CustomerRecord.CreditLimit\",\r\n \"CustomerRecord.TradingTerms\", \"CustomerRecord.SettlementDueDays\", \"CustomerRecord.SettlementDiscountRate\", \"CustomerRecord.DefaultNominal\",\r\n \"CustomerRecord.DefaultVATCode\"],\r\n name: \"Sage 50\",\r\n map: {\r\n Address1: { displayName: \"Street1\", value: 2 },\r\n Address2: { displayName: \"Street2\", value: 3 },\r\n Address3: { displayName: \"Town/City\", value: 4 },\r\n Address4: { displayName: \"County\", value: 5 },\r\n Alpha: { displayName: \"Alpha\", value: 0 },\r\n InvoiceAlpha: { value: -1 },\r\n ContactEmail: { displayName: \"Contact Email\", value: -1 },\r\n ContactFirstName: { displayName: \"Contact First Name\", value: 7 },\r\n ContactLastName: { displayName: \"Contact Last Name\", value: -1 },\r\n ContactMobileNumber: { displayName: \"Contact Mobile Number\", value: -1 },\r\n ContactPhoneExtension: { displayName: \"Contact Phone Extension\", value: -1 },\r\n ContactPhoneNumber: { displayName: \"Contact Phone Number\", value: -1 },\r\n Country: { displayName: \"Country\", value: -1 },\r\n CustomerName: { displayName: \"Name\", value: 1 },\r\n Email: { displayName: \"Email\", value: -1 },\r\n Fax: { displayName: \"Fax\", value: 9 },\r\n Phone: { displayName: \"Phone\", value: 8 },\r\n PostCode: { displayName: \"PostCode\", value: 6 },\r\n IsProspect: { displayName: \"IsProspect\", value: -1 },\r\n IsManagingAgent: { value: -1 },\r\n ManagingAlpha: { value: -1 },\r\n Website: { displayName: \"Website\", value: -1 },\r\n GeneralNotes: { displayName: \"General notes\", value: -1 },\r\n SiteNotes: { displayName: \"Engineer site notes\", value: -1 }\r\n }\r\n }, {\r\n columns: [\"Customer\", \"Company\", \"Street Address\", \"City\", \"County\", \"Country\", \"Postcode\", \"Phone\", \"Email\", \"Attachments\", \"Open Balance\", \"Notes\"],\r\n name: \"Quickbooks UK\",\r\n map: {\r\n CustomerName: { displayName: \"Name\", value: 0 },\r\n Address1: { displayName: \"Street1\", value: 2 },\r\n Address2: { displayName: \"Street2\", value: -1 },\r\n Address3: { displayName: \"Town/City\", value: 3 },\r\n Address4: { displayName: \"County\", value: 4 },\r\n PostCode: { displayName: \"PostCode\", value: 6 },\r\n Country: { displayName: \"Country\", value: 5 },\r\n Email: { displayName: \"Email\", value: 8 },\r\n Phone: { displayName: \"Phone\", value: 7 },\r\n ContactEmail: { displayName: \"Contact Email\", value: -1 },\r\n ContactFirstName: { displayName: \"Contact First Name\", value: -1 },\r\n ContactLastName: { displayName: \"Contact Last Name\", value: -1 },\r\n ContactMobileNumber: { displayName: \"Contact Mobile Number\", value: -1 },\r\n ContactPhoneExtension: { displayName: \"Contact Phone Extension\", value: -1 },\r\n ContactPhoneNumber: { displayName: \"Contact Phone Number\", value: -1 },\r\n Alpha: { displayName: \"Alpha\", value: -1 },\r\n InvoiceAlpha: { value: -1 },\r\n Fax: { displayName: \"Fax\", value: -1 },\r\n IsProspect: { displayName: \"IsProspect\", value: -1 },\r\n IsManagingAgent: { value: -1 },\r\n ManagingAlpha: { value: -1 },\r\n Website: { displayName: \"Website\", value: -1 },\r\n GeneralNotes: { displayName: \"General notes\", value: -1 },\r\n SiteNotes: { displayName: \"Engineer site notes\", value: -1 }\r\n }\r\n }\r\n ];\r\n }\r\n\r\n private addPro(isManagingAgentEnabled: boolean) {\r\n const value: number = isManagingAgentEnabled ? 33 : 31;\r\n const muk = this.preDefinedMaps.find(m => m.name === \"ServiceSight UK\");\r\n if (muk) {\r\n muk.columns.push(\"Invoice Consolidation Type\");\r\n muk.columns.push(\"Priority\");\r\n muk.map.InvConsolidation = { displayName: \"Invoice Consolidation Type\", value };\r\n muk.map.PriorityName = { displayName: \"Priority\", value: value + 1 };\r\n }\r\n\r\n const mie = this.preDefinedMaps.find(m => m.name === \"ServiceSight Ireland\");\r\n if (mie) {\r\n mie.columns.push(\"Invoice Consolidation Type\");\r\n mie.columns.push(\"Priority\");\r\n mie.map.InvConsolidation = { displayName: \"Invoice Consolidation Type\", value };\r\n mie.map.PriorityName = { displayName: \"Priority\", value: value + 1 };\r\n }\r\n\r\n const mus = this.preDefinedMaps.find(m => m.name === \"ServiceSight US\");\r\n if (mus) {\r\n mus.columns.push(\"Invoice Consolidation Type\");\r\n mus.columns.push(\"Priority\");\r\n mus.map.InvConsolidation = { displayName: \"Invoice Consolidation Type\", value };\r\n mus.map.PriorityName = { displayName: \"Priority\", value: value + 1 };\r\n }\r\n\r\n this.defaultMap.InvConsolidation = { displayName: \"Invoice Consolidation Type\", value: this.noMatch };\r\n }\r\n\r\n private getRemainingCount(): void {\r\n this.customerUploadService.GetRemainingCount().subscribe(s => {\r\n this.remainingRows = s;\r\n if (s > 0) {\r\n this.isProcessing = true;\r\n this.poll = setTimeout(this.getRemainingCount.bind(this), 3000);\r\n } else {\r\n if (this.isProcessing) {\r\n this.getSummary();\r\n }\r\n\r\n this.isProcessing = false;\r\n if (this.poll) {\r\n clearTimeout(this.poll);\r\n this.poll = null;\r\n }\r\n }\r\n });\r\n }\r\n\r\n private getSummary(): void {\r\n this.customerUploadService.GetSummary().subscribe(res => {\r\n if (res.FailedRows === 0) {\r\n this.toasterService.pop(\"customer.import.complete\", ToastType.medium);\r\n location.href = \"#/customers/list\";\r\n } else {\r\n this.toasterService.pop(\"customer.import.completewitherrors\", ToastType.dark);\r\n this.importer.uploadError(res.FailedRows, res.Errors);\r\n }\r\n });\r\n }\r\n\r\n}\r\n","
\r\n \r\n

{{ 'customer.accounts.Invoicing' | translate }}

\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n {{ 'customer.accounts.days' | translate }}\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n {{ 'customer.accounts.days' | translate }}\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n\r\n\r\n\r\n
\r\n \r\n

{{ 'customer.accounts.sales-tax-certificate' | translate }}

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

{{ 'customer.accounts.jobs' | translate }}

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

{{ 'customer.accounts.credit-control' | translate }}

\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
","\r\n\r\n\r\n\r\n\r\n","import { Component, Inject, Input, OnChanges, OnInit, SimpleChanges } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { APP_CONFIG } from \"servicesight-shared\";\r\nimport { InvoiceGrouping } from \"src/app/invoices/enums/invoice-grouping.enum\";\r\nimport { WebAppConfig } from \"src/app/shared/models/web-app-config.model\";\r\n\r\n@Component({\r\n selector: \"app-customer-accounts\",\r\n templateUrl: \"./customer-accounts.component.html\",\r\n styleUrls: [\"./customer-accounts.component.scss\"]\r\n})\r\nexport class CustomerAccountsComponent implements OnInit, OnChanges {\r\n\r\n @Input() customer: any;\r\n @Input() rcvat: boolean;\r\n @Input() eori: boolean;\r\n @Input() allowedstock: boolean;\r\n @Input() allowedpro: boolean;\r\n\r\n public dueDatePlusDays: number = 0;\r\n public dueDatePlusMonth: number = 0;\r\n public invoiceGroupingLookup: any[];\r\n public sortedTaxCodes: any[] = [];\r\n public IsInvoiceConsolidationEnabled: boolean;\r\n\r\n public get duedatePlusDaysDisabled(): boolean {\r\n return Number(this.customer?.InvDueDateID) !== 2;\r\n }\r\n\r\n public get duedatePlusMonthDisabled(): boolean {\r\n return Number(this.customer?.InvDueDateID) !== 5;\r\n }\r\n\r\n constructor(\r\n private translateService: TranslateService,\r\n @Inject(APP_CONFIG) private appConfig: WebAppConfig\r\n ) { }\r\n\r\n public ngOnInit(): void {\r\n this.IsInvoiceConsolidationEnabled = (this.appConfig?.features?.InvoiceConsolidation || \"\").toLowerCase() === \"true\";\r\n this.invoiceGroupingLookup = this.InvoiceGroupingLookup();\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.customer && changes.customer.currentValue && !changes.customer.firstChange) {\r\n this.setInvDueDate();\r\n\r\n this.sortedTaxCodes = this.customer.CustomerTaxCodeList.sort((a, b) => {\r\n if (a.Name < b.Name)\r\n {\r\n return -1;\r\n }\r\n if (a.Name > b.Name)\r\n {\r\n return 1;\r\n }\r\n return 0;\r\n });\r\n }\r\n }\r\n\r\n public InvoiceGroupingLookup(): any[] {\r\n return [{\r\n Name: this.translateService.instant(\"batch-invoice.invoice-grouping.customer\"),\r\n Value: InvoiceGrouping.Customer\r\n }, {\r\n Name: this.translateService.instant(\"batch-invoice.invoice-grouping.site\"),\r\n Value: InvoiceGrouping.Site\r\n }, {\r\n Name: this.translateService.instant(\"batch-invoice.invoice-grouping.none\"),\r\n Value: InvoiceGrouping.Individual\r\n }, {\r\n Name: this.translateService.instant(\"batch-invoice.invoice-grouping.order-ref\"),\r\n Value: InvoiceGrouping.OrderRef\r\n }];\r\n }\r\n\r\n public setDirty(e: any = null): void {\r\n if (e === null || e.event) {\r\n this.customer.form.markAsDirty();\r\n }\r\n }\r\n\r\n public normalizeDuedate(e: any = null): void {\r\n if (Number(this.customer?.InvDueDateID) === 2) {\r\n this.customer.SettleDays1 = this.dueDatePlusDays;\r\n }\r\n else if (Number(this.customer?.InvDueDateID) === 5) {\r\n this.customer.SettleDays1 = this.dueDatePlusMonth;\r\n }\r\n\r\n this.setDirty(e);\r\n }\r\n\r\n private setInvDueDate(): void {\r\n if (Number(this.customer?.InvDueDateID) === 2) {\r\n this.dueDatePlusDays = this.customer.SettleDays1;\r\n }\r\n else if (Number(this.customer?.InvDueDateID) === 5) {\r\n this.dueDatePlusMonth = this.customer.SettleDays1;\r\n }\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { Observable, Subject } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { CustomerLayoutModel } from \"../models/customer-layout.model\";\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class CustomerLayoutService {\r\n\r\n private layoutSubject: Subject = new Subject();\r\n public saveSubscribe: Observable = this.layoutSubject.asObservable();\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private translateService: TranslateService,\r\n @Inject(APP_CONFIG) private config: IAppConfig) { }\r\n\r\n // for AngularJS communication\r\n public OnCustomerSave() {\r\n this.layoutSubject.next();\r\n }\r\n\r\n public GetCustomerLayouts(customerId: number): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Customer/GetLayouts?customerId=${customerId}`);\r\n }\r\n\r\n public SaveLayouts(customerId: number, layouts: CustomerLayoutModel[]): Observable {\r\n return this.http.post(`${this.config.apiLocations.ServiceSight}Customer/AddOrUpdateLayouts?customerId=${customerId}`, layouts);\r\n }\r\n\r\n public TemplateTypes(): Array {\r\n // Only a specific set of template types should be displayed\r\n return [{\r\n Name: this.translateService.instant(\"layout-template.type.job-invoice\"),\r\n Value: 1\r\n }, {\r\n Name: this.translateService.instant(\"layout-template.type.contract-invoice\"),\r\n Value: 2\r\n }, {\r\n Name: this.translateService.instant(\"layout-template.type.job-sheet\"),\r\n Value: 4\r\n }, {\r\n Name: this.translateService.instant(\"layout-template.type.quote-mixed\"),\r\n Value: 6\r\n }, {\r\n Name: this.translateService.instant(\"layout-template.type.service-contract\"),\r\n Value: 7\r\n }, {\r\n Name: this.translateService.instant(\"layout-template.type.credit-note\"),\r\n Value: 8\r\n }, {\r\n Name: this.translateService.instant(\"layout-template.type.service-contract-credit-note\"),\r\n Value: 11\r\n }, {\r\n Name: this.translateService.instant(\"layout-template.type.despatch-note\"),\r\n Value: 12\r\n }, {\r\n Name: this.translateService.instant(\"layout-template.type.quote-cover\"),\r\n Value: 15\r\n }];\r\n }\r\n\r\n public GetTemplateTypeName(templateTypeId: number): string {\r\n return this.TemplateTypes().find(t => t.Value === templateTypeId).Name;\r\n }\r\n\r\n}\r\n","
\r\n
\r\n \r\n \r\n
\r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n","import { Component, Inject, Input, OnInit, OnDestroy, ViewChild } from \"@angular/core\";\r\nimport { Subscription } from \"rxjs\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { CustomerLayoutService } from \"../services/customer-layout.service\";\r\nimport { Module } from \"servicesight-shared\";\r\nimport { CustomerLayoutModel } from \"../models/customer-layout.model\";\r\nimport { LayoutTemplateService } from \"src/app/settings/services/layout-template.service\";\r\nimport { LayoutTemplateModel } from \"src/app/settings/models/layout-template.model\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\n\r\n@Component({\r\n selector: \"app-customer-layouts\",\r\n templateUrl: \"./customer-layouts.component.html\",\r\n styleUrls: [\"./customer-layouts.component.scss\"]\r\n})\r\nexport class CustomerLayoutsComponent implements OnInit, OnDestroy {\r\n\r\n @Input() customerId: number;\r\n public selectedIds: number[] = [];\r\n public customerLayouts: Array = new Array();\r\n public layouts: LayoutTemplateModel[];\r\n public usedLayouts: LayoutTemplateModel[] = [];\r\n public usedTemplateTypes: Array = [];\r\n public templateTypes: Array;\r\n public proEnabled: boolean = false;\r\n public selectedTemplateTypeId: number;\r\n public selectedLayoutId: number;\r\n public layoutSelectPlaceholder: string = \"Select...\";\r\n\r\n private $rootScope = null;\r\n private subscription: Subscription = new Subscription();\r\n @ViewChild(\"grid\", { static: false }) dataGrid: DxDataGridComponent;\r\n\r\n constructor(\r\n private moduleService: LicenseService,\r\n private customerLayoutService: CustomerLayoutService,\r\n private layoutTemplateService: LayoutTemplateService,\r\n @Inject(\"$injector\") $injector) {\r\n this.$rootScope = $injector.get(\"$rootScope\");\r\n }\r\n\r\n // set 'dirty' on AngularJS site\r\n public FormSimulator = {\r\n markAsDirty: () => {\r\n this.$rootScope.$broadcast(\"form-changed\", { });\r\n }\r\n };\r\n\r\n ngOnInit(): void {\r\n this.moduleService.GetCompanyHasAccessToModule(Module.Pro).subscribe(proEnabled => {\r\n this.proEnabled = proEnabled;\r\n });\r\n\r\n const getLayoutsSubscription = this.customerLayoutService.GetCustomerLayouts(this.customerId).subscribe(x => {\r\n // Set a quick table key since we can't use the table PK and still allow editing of the layout type field.\r\n let tableKey = 1;\r\n x.forEach(y => {\r\n y.tableKey = tableKey;\r\n tableKey++;\r\n this.usedLayouts.push({\r\n TemplateId: y.LayoutId, Name: y.LayoutName,\r\n IsArchived: false,\r\n LayoutType: 0,\r\n LayoutTypeDescription: \"\"\r\n });\r\n this.usedTemplateTypes.push({Name: this.customerLayoutService.GetTemplateTypeName(y.LayoutTypeId), Value: y.LayoutTypeId});\r\n });\r\n this.customerLayouts = x;\r\n this.templateTypes = this.customerLayoutService.TemplateTypes();\r\n });\r\n this.subscription.add(getLayoutsSubscription);\r\n\r\n const saveSubscription = this.customerLayoutService.saveSubscribe.subscribe(() => {\r\n this.customerLayoutService.SaveLayouts(this.customerId, this.customerLayouts).subscribe();\r\n });\r\n this.subscription.add(saveSubscription);\r\n\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.subscription.unsubscribe();\r\n }\r\n\r\n removeLayouts(): void {\r\n if (!this.selectedIds.length){\r\n return;\r\n }\r\n const filtered = this.customerLayouts.filter(l => !this.selectedIds.includes(l.tableKey));\r\n this.customerLayouts = filtered;\r\n this.SetFormDirty();\r\n }\r\n\r\n addLayout(): void {\r\n this.dataGrid.instance.addRow();\r\n this.layoutSelectPlaceholder = \"Select...\";\r\n }\r\n\r\n getLayoutsOfType(layoutTypeId: number) {\r\n this.layoutSelectPlaceholder = \"Loading...\";\r\n this.layouts = [];\r\n const layoutSubscription = this.layoutTemplateService.GetLayouts(layoutTypeId).subscribe((result) => {\r\n this.layouts = result;\r\n this.usedLayouts.push(...result);\r\n if (result?.length) {\r\n this.layoutSelectPlaceholder = \"Select...\";\r\n } else {\r\n this.layoutSelectPlaceholder = \"No custom layouts created\";\r\n }\r\n });\r\n this.subscription.add(layoutSubscription);\r\n }\r\n\r\n public onInitNewRow(e) {\r\n // Set table key & customer id\r\n e.data.tableKey = this.customerLayouts?.length ? this.customerLayouts[this.customerLayouts.length-1].tableKey + 1 : 1;\r\n e.data.CustomerId = this.customerId;\r\n e.data.LayoutId = null;\r\n e.data.LayoutName = null;\r\n }\r\n\r\n public onRowInserted(e) {\r\n e.data.LayoutName = this.layouts.find(l => l.TemplateId === e.data.LayoutId).Name;\r\n this.usedTemplateTypes.push({Name: this.customerLayoutService.GetTemplateTypeName(e.data.LayoutTypeId), Value: e.data.LayoutTypeId});\r\n this.dataGrid.instance.refresh();\r\n this.SetFormDirty();\r\n }\r\n\r\n public onCustomerLayoutUpdated(layoutUpdated: CustomerLayoutModel) {\r\n this.SetFormDirty();\r\n this.usedTemplateTypes.push({Name: this.customerLayoutService.GetTemplateTypeName(layoutUpdated.LayoutTypeId), Value: layoutUpdated.LayoutTypeId});\r\n this.dataGrid.instance.refresh();\r\n }\r\n\r\n public onSetLayoutType(event, cellData) {\r\n cellData.setValue(event.value);\r\n this.getLayoutsOfType(event.value);\r\n }\r\n\r\n public onSetLayout(event, cellData) {\r\n cellData.setValue(event.value);\r\n }\r\n\r\n public onEditingStart(event) {\r\n this.getLayoutsOfType(event.data.LayoutTypeId);\r\n }\r\n\r\n public SetFormDirty(): void {\r\n this.FormSimulator.markAsDirty();\r\n }\r\n\r\n public onRowValidating(event) {\r\n if (this.customerLayouts.some(cl => cl.LayoutTypeId === event.newData.LayoutTypeId)) {\r\n event.isValid = false;\r\n event.errorText = \"You cannot select a document type more than once.\";\r\n }\r\n }\r\n\r\n}\r\n","export class PostcodeValidator {\r\n public static readonly regexes = {\r\n GB: /^([A-Z]){1}([0-9][0-9]|[0-9]|[A-Z][0-9][A-Z]|[A-Z][0-9][0-9]|[A-Z][0-9]|[0-9][A-Z]){1}([ ])?([0-9][A-z][A-z]){1}$/i,\r\n UK: /^([A-Z]){1}([0-9][0-9]|[0-9]|[A-Z][0-9][A-Z]|[A-Z][0-9][0-9]|[A-Z][0-9]|[0-9][A-Z]){1}([ ])?([0-9][A-z][A-z]){1}$/i,\r\n \"UNITED KINGDOM\": /^([A-Z]){1}([0-9][0-9]|[0-9]|[A-Z][0-9][A-Z]|[A-Z][0-9][0-9]|[A-Z][0-9]|[0-9][A-Z]){1}([ ])?([0-9][A-z][A-z]){1}$/i,\r\n JE: /^JE\\d[\\dA-Z]?[ ]?\\d[ABD-HJLN-UW-Z]{2}$/,\r\n GG: /^GY\\d[\\dA-Z]?[ ]?\\d[ABD-HJLN-UW-Z]{2}$/,\r\n IM: /^IM\\d[\\dA-Z]?[ ]?\\d[ABD-HJLN-UW-Z]{2}$/,\r\n US: /^([0-9]{5})(?:[-\\s]*([0-9]{4}))?$/,\r\n USA: /^([0-9]{5})(?:[-\\s]*([0-9]{4}))?$/,\r\n \"UNITED STATES\": /^([0-9]{5})(?:[-\\s]*([0-9]{4}))?$/,\r\n \"UNITED STATES OF AMERICA\": /^([0-9]{5})(?:[-\\s]*([0-9]{4}))?$/,\r\n CA: /^([A-Z][0-9][A-Z])\\s*([0-9][A-Z][0-9])$/i,\r\n DE: /^\\d{5}$/,\r\n JP: /^\\d{3}-\\d{4}$/,\r\n FR: /^\\d{2}[ ]?\\d{3}$/,\r\n AU: /^\\d{4}$/,\r\n IT: /^\\d{5}$/,\r\n CH: /^\\d{4}$/,\r\n AT: /^\\d{4}$/,\r\n ES: /^\\d{5}$/,\r\n NL: /^\\d{4}[ ]?[A-Z]{2}$/,\r\n BE: /^\\d{4}$/,\r\n DK: /^\\d{4}$/,\r\n SE: /^\\d{3}[ ]?\\d{2}$/,\r\n NO: /^\\d{4}$/,\r\n BR: /^\\d{5}[\\-]?\\d{3}$/,\r\n PT: /^\\d{4}([\\-]\\d{3})?$/,\r\n FI: /^\\d{5}$/,\r\n AX: /^22\\d{3}$/,\r\n KR: /^\\d{3}[\\-]\\d{3}$/,\r\n CN: /^\\d{6}$/,\r\n TW: /^\\d{3}(\\d{2})?$/,\r\n SG: /^\\d{6}$/,\r\n DZ: /^\\d{5}$/,\r\n AD: /^AD\\d{3}$/,\r\n AR: /^([A-HJ-NP-Z])?\\d{4}([A-Z]{3})?$/,\r\n AM: /^(37)?\\d{4}$/,\r\n AZ: /^\\d{4}$/,\r\n BH: /^((1[0-2]|[2-9])\\d{2})?$/,\r\n BD: /^\\d{4}$/,\r\n BB: /^(BB\\d{5})?$/,\r\n BY: /^\\d{6}$/,\r\n BM: /^[A-Z]{2}[ ]?[A-Z0-9]{2}$/,\r\n BA: /^\\d{5}$/,\r\n IO: /^BBND 1ZZ$/,\r\n BN: /^[A-Z]{2}[ ]?\\d{4}$/,\r\n BG: /^\\d{4}$/,\r\n KH: /^\\d{5}$/,\r\n CV: /^\\d{4}$/,\r\n CL: /^\\d{7}$/,\r\n CR: /^\\d{4,5}|\\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K: /^\\d{5}$/,\r\n PY: /^\\d{4}$/,\r\n PH: /^\\d{4}$/,\r\n PL: /^\\d{2}-\\d{3}$/,\r\n PR: /^00[679]\\d{2}([ \\-]\\d{4})?$/,\r\n RO: /^\\d{6}$/,\r\n RU: /^\\d{6}$/,\r\n SM: /^4789\\d$/,\r\n SA: /^\\d{5}$/,\r\n SN: /^\\d{5}$/,\r\n SK: /^\\d{3}[ ]?\\d{2}$/,\r\n SI: /^\\d{4}$/,\r\n ZA: /^\\d{4}$/,\r\n LK: /^\\d{5}$/,\r\n TJ: /^\\d{6}$/,\r\n TH: /^\\d{5}$/,\r\n TN: /^\\d{4}$/,\r\n TR: /^\\d{5}$/,\r\n TM: /^\\d{6}$/,\r\n UA: /^\\d{5}$/,\r\n UY: /^\\d{5}$/,\r\n UZ: /^\\d{6}$/,\r\n VA: /^00120$/,\r\n VE: /^\\d{4}$/,\r\n ZM: /^\\d{5}$/,\r\n AS: /^96799$/,\r\n CC: /^6799$/,\r\n CK: /^\\d{4}$/,\r\n RS: /^\\d{6}$/,\r\n ME: /^8\\d{4}$/,\r\n CS: /^\\d{5}$/,\r\n YU: /^\\d{5}$/,\r\n CX: /^6798$/,\r\n ET: /^\\d{4}$/,\r\n FK: /^FIQQ 1ZZ$/,\r\n NF: /^2899$/,\r\n FM: /^(9694[1-4])([ \\-]\\d{4})?$/,\r\n GF: /^9[78]3\\d{2}$/,\r\n GN: /^\\d{3}$/,\r\n GP: /^9[78][01]\\d{2}$/,\r\n GS: /^SIQQ 1ZZ$/,\r\n GU: /^969[123]\\d([ \\-]\\d{4})?$/,\r\n GW: /^\\d{4}$/,\r\n HM: /^\\d{4}$/,\r\n IQ: /^\\d{5}$/,\r\n KG: /^\\d{6}$/,\r\n LR: /^\\d{4}$/,\r\n LS: /^\\d{3}$/,\r\n MG: /^\\d{3}$/,\r\n MH: /^969[67]\\d([ \\-]\\d{4})?$/,\r\n MN: /^\\d{6}$/,\r\n MP: /^9695[012]([ \\-]\\d{4})?$/,\r\n MQ: /^9[78]2\\d{2}$/,\r\n NC: /^988\\d{2}$/,\r\n NE: /^\\d{4}$/,\r\n VI: /^008(([0-4]\\d)|(5[01]))([ \\-]\\d{4})?$/,\r\n PF: /^987\\d{2}$/,\r\n PG: /^\\d{3}$/,\r\n PM: /^9[78]5\\d{2}$/,\r\n PN: /^PCRN 1ZZ$/,\r\n PW: /^96940$/,\r\n RE: /^9[78]4\\d{2}$/,\r\n SH: /^(ASCN|STHL) 1ZZ$/,\r\n SJ: /^\\d{4}$/,\r\n SO: /^\\d{5}$/,\r\n SZ: /^[HLMS]\\d{3}$/,\r\n TC: /^TKCA 1ZZ$/,\r\n WF: /^986\\d{2}$/,\r\n XK: /^\\d{5}$/,\r\n YT: /^976\\d{2}$/\r\n };\r\n\r\n public static IsValid(postCode: string, countryCode: string) {\r\n const regex = PostcodeValidator.regexes[countryCode?.toUpperCase()];\r\n\r\n if (postCode && countryCode && regex) {\r\n return regex.test(postCode);\r\n } else {\r\n return true;\r\n }\r\n }\r\n}\r\n","\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n","import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { AccountType, CountryService, CustomerModel, CustomerService, FormMesssageService, ProteanResponse, Region } from \"servicesight-shared\";\r\nimport { PostcodeValidator } from \"src/app/shared/validators/postcode.validator\";\r\nimport { CountryCode, isValidPhoneNumber, AsYouType } from \"libphonenumber-js\";\r\n\r\n@Component({\r\n selector: \"app-new-customer-modal\",\r\n templateUrl: \"./new-customer-modal.component.html\",\r\n styleUrls: [\"./new-customer-modal.component.scss\"]\r\n})\r\nexport class NewCustomerModalComponent implements OnInit {\r\n @ViewChild(\"customerForm\", { static: true }) form: NgForm;\r\n @Input() accountType: AccountType;\r\n @Input() parentId: number = -1;\r\n @Output() customerCreated = new EventEmitter();\r\n public readonly formName: string = \"contractform\";\r\n public visible: boolean = false;\r\n public countryDataStore: ODataStore;\r\n public newCustomer: CustomerModel = new CustomerModel();\r\n public regions: Region[] = [];\r\n public countryCode: string;\r\n public accountTypeName: string;\r\n\r\n public get IsUSCountry(): boolean {\r\n return this.newCustomer.CountryID === 224;\r\n }\r\n\r\n public get accountNameMaxLength(): number {\r\n return this.accountType === AccountType.Site ? 52 : 50;\r\n }\r\n\r\n // if phone or email is provided\r\n // then user must provide a firstname or lastname\r\n public get contactInputRequired(): boolean {\r\n if (this.newCustomer.CustomerContactDetails.Telephone || this.newCustomer.CustomerContactDetails.Email) {\r\n return true;\r\n }\r\n }\r\n\r\n constructor(\r\n private customerService: CustomerService,\r\n private countryService: CountryService,\r\n private translate: TranslateService,\r\n private formMessageService: FormMesssageService) { }\r\n\r\n public ngOnInit(): void {\r\n this.SetAccountTypeName();\r\n }\r\n\r\n public Show(): void {\r\n this.countryDataStore = this.countryService.GetAllCountriesStore();\r\n this.customerService.GetNewCustomer(this.accountType, this.parentId)\r\n .subscribe(newCustomer => {\r\n this.newCustomer = newCustomer;\r\n if (this.IsUSCountry) {\r\n this.GetRegions();\r\n }\r\n this.visible = true;\r\n });\r\n }\r\n\r\n public Hide(): void {\r\n this.visible = false;\r\n this.formMessageService.ClearForm(this.formName);\r\n }\r\n\r\n public Save(): void {\r\n this.formMessageService\r\n .RegisterObservable(this.customerService.CreateCustomer(this.newCustomer), this.formName)\r\n .subscribe(response => {\r\n if (!response.HasFailed) {\r\n this.customerCreated.emit(response);\r\n this.Hide();\r\n }\r\n });\r\n }\r\n\r\n public CountryChanged(): void {\r\n this.newCustomer.Address4 = null;\r\n if (this.newCustomer.CountryID) {\r\n this.countryDataStore.byKey(this.newCustomer.CountryID).then(country => {\r\n this.countryCode = country.DataValue;\r\n });\r\n }\r\n\r\n if (this.IsUSCountry) {\r\n this.GetRegions();\r\n }\r\n }\r\n\r\n public GetRegions(): void {\r\n this.countryService.GetRegions(this.newCustomer.CountryID).subscribe(regions => this.regions = regions);\r\n }\r\n\r\n public ValidatePhoneNumber(): void {\r\n const isValidNumber = isValidPhoneNumber(this.newCustomer.CustomerContactDetails.Telephone, this.countryCode as CountryCode);\r\n const formattedNumber = new AsYouType(this.countryCode as CountryCode).input(this.newCustomer.CustomerContactDetails.Telephone);\r\n this.newCustomer.CustomerContactDetails.Telephone = formattedNumber;\r\n\r\n if (isValidNumber || !this.newCustomer.CustomerContactDetails.Telephone) {\r\n this.form.form.controls.ContactPhone.setErrors(null);\r\n } else {\r\n this.form.form.controls.ContactPhone.setErrors({ invalidPhoneNumber : true});\r\n }\r\n }\r\n\r\n public ValidatePostCode(postCode: string): void {\r\n if (PostcodeValidator.IsValid(postCode, this.countryCode)) {\r\n this.form.form.controls.PostCode.setErrors(null);\r\n } else {\r\n this.form.form.controls.PostCode.setErrors({ invalidPostcode : true});\r\n }\r\n }\r\n\r\n public W3Wchanged(data: string): void {\r\n this.newCustomer.WhatThreeWords = data;\r\n this.newCustomer.W3Wupdated = true;\r\n }\r\n\r\n private SetAccountTypeName(): void {\r\n switch(this.accountType) {\r\n case AccountType.Customer:\r\n this.accountTypeName = this.translate.instant(\"customer.sites.new.customer\");\r\n break;\r\n case AccountType.Site:\r\n this.accountTypeName = this.translate.instant(\"customer.sites.new.site\");\r\n break;\r\n case AccountType.ManagingAgent:\r\n this.accountTypeName = this.translate.instant(\"customer.sites.new.managing-agent\");\r\n break;\r\n case AccountType.Prospect:\r\n this.accountTypeName = this.translate.instant(\"customer.sites.new.prospect\");\r\n break;\r\n default:\r\n this.accountTypeName = \"\";\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n
\r\n\r\n","import { Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges, ViewChild } from \"@angular/core\";\r\nimport { CustomerService, CustomerSite, AccountType, PermissionsService } from \"servicesight-shared\";\r\nimport { Subscription } from \"rxjs\";\r\nimport { NewCustomerModalComponent } from \"../new-customer-modal/new-customer-modal.component\";\r\n\r\n@Component({\r\n selector: \"app-customer-sites\",\r\n templateUrl: \"./customer-sites.component.html\",\r\n styleUrls: [\"./customer-sites.component.scss\"]\r\n})\r\nexport class CustomerSitesComponent implements OnInit, OnChanges, OnDestroy {\r\n @ViewChild(\"newSiteModal\", { static: true }) newSiteModal: NewCustomerModalComponent;\r\n @Input() customerId: number;\r\n public customerSites: CustomerSite[] = [];\r\n public accountType = AccountType;\r\n public hasAddSitePermission: boolean = false;\r\n\r\n private subscription: Subscription = new Subscription();\r\n\r\n constructor(\r\n private permissionsService: PermissionsService,\r\n private customerService: CustomerService) { }\r\n\r\n public ngOnInit(): void {\r\n this.permissionsService.CurrentUserHasPermission(\"CustomerCreateSite\").subscribe(isAllowedAdd => {\r\n this.hasAddSitePermission = isAllowedAdd;\r\n });\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.subscription.unsubscribe();\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.customerId && changes.customerId.currentValue > 0) {\r\n this.Load();\r\n }\r\n }\r\n\r\n public NewSite(): void {\r\n this.newSiteModal.Show();\r\n }\r\n\r\n public OnSiteCreated(): void {\r\n this.Load();\r\n }\r\n\r\n private Load(): void {\r\n const getSubscription = this.customerService.GetCustomerSitesAsync(this.customerId)\r\n .subscribe(customerSites => this.customerSites = customerSites);\r\n this.subscription.add(getSubscription);\r\n }\r\n}\r\n","import { CommonModule } from \"@angular/common\";\r\nimport { HttpClient, HttpClientModule } from \"@angular/common/http\";\r\nimport { NgModule } from \"@angular/core\";\r\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\r\nimport { RouterModule } from \"@angular/router\";\r\nimport { TranslateLoader, TranslateModule } from \"@ngx-translate/core\";\r\nimport {\r\n DxCheckBoxModule,\r\n DxDataGridModule,\r\n DxDateBoxModule,\r\n DxDropDownButtonModule,\r\n DxLoadPanelModule,\r\n DxNumberBoxModule,\r\n DxPopupModule,\r\n DxSelectBoxModule,\r\n DxTabPanelModule,\r\n DxTextAreaModule,\r\n DxTooltipModule} from \"devextreme-angular\";\r\nimport { HttpLoaderFactory, ServicesightSharedModule, SharedPipesModule } from \"servicesight-shared\";\r\nimport { AssignEquipmentSystemComponent } from \"./assign-equipment-system/assign-equipment-system.component\";\r\nimport { CustomerAttributeComponent } from \"./customer-attribute/customer-attribute.component\";\r\nimport { CustomerEquipmentSystemsComponent } from \"./customer-equipment-systems/customer-equipment-systems.component\";\r\nimport { CustomerFileComponent } from \"./customer-file/customer-file.component\";\r\nimport { CustomerJobAlertsComponent } from \"./customer-job-alerts/customer-job-alerts.component\";\r\nimport { CustomerListComponent } from \"./customer-list/customer-list.component\";\r\nimport { CustomerSkillsComponent } from \"./customer-skills/customer-skills.component\";\r\nimport { ServiceGroupEquipmentsComponent } from \"./service-group-equipments/service-group-equipments.component\";\r\nimport { ServiceGroupsItemsAssignationComponent } from \"./service-groups-items-assignation/service-groups-items-assignation.component\";\r\nimport { ServiceGroupsComponent } from \"./service-groups/service-groups.component\";\r\nimport { AttributeSettingsModule } from \"../settings/attribute-settings/attribute-settings.module\";\r\nimport { SharedComponentsModule } from \"../shared/components/shared-components.module\";\r\nimport { CustomerStatusPipe } from \"../shared/pipes/enums/customer-status-pipe\";\r\nimport { PipesModule } from \"../shared/pipes/pipes.module\";\r\nimport { CustomerUploadComponent } from \"./customer-upload/customer-upload.component\";\r\nimport { ServicesightComponentsModule } from \"servicesight-components\";\r\nimport { CustomerAccountsComponent } from \"./customer-accounts/customer-accounts.component\";\r\nimport { CustomerLayoutsComponent } from \"./customer-layouts/customer-layouts.component\";\r\nimport { SharedDirectivesModule } from \"../shared/directives/shared-directives.module\";\r\nimport { CustomerSitesComponent } from \"./customer-sites/customer-sites.component\";\r\nimport { NewCustomerModalComponent } from \"./new-customer-modal/new-customer-modal.component\";\r\n\r\nconst components = [\r\n ServiceGroupsComponent,\r\n ServiceGroupsItemsAssignationComponent,\r\n ServiceGroupEquipmentsComponent,\r\n CustomerAttributeComponent,\r\n CustomerSkillsComponent,\r\n CustomerFileComponent,\r\n CustomerJobAlertsComponent,\r\n CustomerListComponent,\r\n CustomerEquipmentSystemsComponent,\r\n AssignEquipmentSystemComponent,\r\n CustomerUploadComponent,\r\n CustomerAccountsComponent,\r\n CustomerLayoutsComponent,\r\n CustomerSitesComponent,\r\n NewCustomerModalComponent\r\n];\r\n\r\n@NgModule({\r\n declarations: [...components, CustomerLayoutsComponent],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n HttpClientModule,\r\n PipesModule,\r\n ServicesightSharedModule,\r\n SharedComponentsModule,\r\n SharedDirectivesModule,\r\n DxDataGridModule,\r\n AttributeSettingsModule,\r\n TranslateModule.forChild({\r\n loader: {\r\n provide: TranslateLoader,\r\n useFactory: HttpLoaderFactory,\r\n deps: [HttpClient]\r\n }\r\n }),\r\n DxPopupModule,\r\n DxDropDownButtonModule,\r\n DxTextAreaModule,\r\n DxTabPanelModule,\r\n DxCheckBoxModule,\r\n DxLoadPanelModule,\r\n DxSelectBoxModule,\r\n DxNumberBoxModule,\r\n DxDateBoxModule,\r\n DxTooltipModule,\r\n RouterModule,\r\n SharedPipesModule,\r\n ServicesightComponentsModule\r\n ],\r\n exports: [],\r\n providers: [\r\n CustomerStatusPipe\r\n ]\r\n})\r\n\r\nexport class CustomersModule { }\r\n","import { CommonModule } from \"@angular/common\";\r\nimport { NgModule } from \"@angular/core\";\r\nimport { RouterModule } from \"@angular/router\";\r\nimport { TranslateModule } from \"@ngx-translate/core\";\r\nimport {\r\n DxButtonModule,\r\n DxChartModule,\r\n DxCircularGaugeModule,\r\n DxDataGridModule,\r\n DxFunnelModule,\r\n DxPieChartModule,\r\n DxTileViewModule\r\n} from \"devextreme-angular\";\r\nimport { ChartsModule, ServicesightSharedModule } from \"servicesight-shared\";\r\nimport { ActualLabourHoursVServiceBudgetHoursComponent } from \"./charts/actual-labour-hours-v-service-budget-hours/actual-labour-hours-v-service-budget-hours.component\";\r\nimport { AllocatedJobsForJobTypeStatusComponent } from \"./charts/allocated-jobs-for-job-type-status/allocated-jobs-for-job-type-status.component\";\r\nimport { AveragePurchaseOrderLeadTimeComponent } from \"./charts/average-purchase-order-lead-time/average-purchase-order-lead-time.component\";\r\nimport { AverageSalesOrderLeadTimeComponent } from \"./charts/average-sales-order-lead-time/average-sales-order-lead-time.component\";\r\nimport { ChartLoaderComponent } from \"./charts/chart-loader/chart-loader.component\";\r\nimport { EquipmentStatusComponent } from \"./charts/equipment-status/equipment-status.component\";\r\nimport { FieldTechnicianJobForMonthEngineerComponent } from \"./charts/field-technician-job-for-month-engineer/field-technician-job-for-month-engineer.component\";\r\nimport { FieldTechnicianJobForMonthComponent } from \"./charts/field-technician-job-for-month/field-technician-job-for-month.component\";\r\nimport { FieldTechnicianProductivityComponent } from \"./charts/field-technician-productivity/field-technician-productivity.component\";\r\nimport { FieldTechnicianUtilisationByDateComponent } from \"./charts/field-technician-utilisation-by-date/field-technician-utilisation-by-date.component\";\r\nimport { FieldTechnicianUtilisationComponent } from \"./charts/field-technician-utilisation/field-technician-utilisation.component\";\r\nimport { FirstTimeFixRateByPeriodComponent } from \"./charts/first-time-fix-rate-by-period/first-time-fix-rate-by-period.component\";\r\nimport { FirstTimeFixRateComponent } from \"./charts/first-time-fix-rate/first-time-fix-rate.component\";\r\nimport { JobProfitablityComponent } from \"./charts/job-profitablity/job-profitablity.component\";\r\nimport { JobsByStatusForJobTypeComponent } from \"./charts/jobs-by-status-for-job-type/jobs-by-status-for-job-type.component\";\r\nimport { MeanTimeToRepairByJobTypeForPeriodComponent } from \"./charts/mean-time-to-repair-by-job-type-for-period/mean-time-to-repair-by-job-type-for-period.component\";\r\nimport {\r\n MeanTimeToRepairByTechnicianForPeriodJobTypeComponent\r\n} from \"./charts/mean-time-to-repair-by-technician-for-period-job-type/mean-time-to-repair-by-technician-for-period-job-type.component\";\r\nimport {\r\n MeanTimeToRepairForPeriodJobTypeFirstTechnicianComponent\r\n} from \"./charts/mean-time-to-repair-for-period-job-type-first-technician/mean-time-to-repair-for-period-job-type-first-technician.component\";\r\nimport { MeanTimeToRepairComponent } from \"./charts/mean-time-to-repair/mean-time-to-repair.component\";\r\nimport { OnsiteResponseTimesComponent } from \"./charts/onsite-response-times/onsite-response-times.component\";\r\nimport { OpenPurchaseOrdersComponent } from \"./charts/open-purchase-orders/open-purchase-orders.component\";\r\nimport { OpenSalesOrdersComponent } from \"./charts/open-sales-orders/open-sales-orders.component\";\r\nimport { OutstandingJobsByJobTypeComponent } from \"./charts/outstanding-jobs-by-job-type/outstanding-jobs-by-job-type.component\";\r\nimport { SalesFunnelComponent } from \"./charts/sales-funnel/sales-funnel.component\";\r\nimport { ServiceContractRevenueComponent } from \"./charts/service-contract-revenue/service-contract-revenue.component\";\r\nimport {\r\n ServiceRevenueForFieldTechnicalPeriodJobTypeComponent\r\n} from \"./charts/service-revenue-for-field-technical-period-job-type/service-revenue-for-field-technical-period-job-type.component\";\r\nimport { ServiceRevenueForFieldTechnicianPeriodComponent } from \"./charts/service-revenue-for-field-technician-period/service-revenue-for-field-technician-period.component\";\r\nimport { ServiceRevenueForFieldTechnicianComponent } from \"./charts/service-revenue-for-field-technician/service-revenue-for-field-technician.component\";\r\nimport { ServiceRevenuePerFieldTechnicianComponent } from \"./charts/service-revenue-per-field-technician/service-revenue-per-field-technician.component\";\r\nimport { StockOutsComponent } from \"./charts/stock-outs/stock-outs.component\";\r\nimport { TotalServiceRevenueForPeriodComponent } from \"./charts/total-service-revenue-for-period/total-service-revenue-for-period.component\";\r\nimport { TotalServiceRevenueComponent } from \"./charts/total-service-revenue/total-service-revenue.component\";\r\nimport { ValueOfInvoicesRaisedComponent } from \"./charts/value-of-invoices-raised/value-of-invoices-raised.component\";\r\nimport { EngineerCarouselComponent } from \"./widgets/engineer-carousel/engineer-carousel.component\";\r\nimport { NewButtonsComponent } from \"./widgets/new-buttons/new-buttons.component\";\r\nimport { StartHereComponent } from \"./widgets/start-here/start-here.component\";\r\nimport { TilesComponent } from \"./widgets/tiles/tiles.component\";\r\nimport { WidgetLoaderComponent } from \"./widgets/widget-loader/widget-loader.component\";\r\nimport { SharedComponentsModule } from \"../shared/components/shared-components.module\";\r\n\r\n@NgModule({\r\n declarations: [\r\n ChartLoaderComponent,\r\n WidgetLoaderComponent,\r\n OutstandingJobsByJobTypeComponent,\r\n JobsByStatusForJobTypeComponent,\r\n AllocatedJobsForJobTypeStatusComponent,\r\n FieldTechnicianProductivityComponent,\r\n FieldTechnicianJobForMonthComponent,\r\n FieldTechnicianJobForMonthEngineerComponent,\r\n FieldTechnicianUtilisationComponent,\r\n FieldTechnicianUtilisationByDateComponent,\r\n FirstTimeFixRateByPeriodComponent,\r\n MeanTimeToRepairComponent,\r\n MeanTimeToRepairByJobTypeForPeriodComponent,\r\n MeanTimeToRepairByTechnicianForPeriodJobTypeComponent,\r\n MeanTimeToRepairForPeriodJobTypeFirstTechnicianComponent,\r\n OnsiteResponseTimesComponent,\r\n FirstTimeFixRateComponent,\r\n ServiceRevenuePerFieldTechnicianComponent,\r\n ServiceRevenueForFieldTechnicianComponent,\r\n ServiceRevenueForFieldTechnicianPeriodComponent,\r\n ServiceRevenueForFieldTechnicalPeriodJobTypeComponent,\r\n TotalServiceRevenueComponent,\r\n TotalServiceRevenueForPeriodComponent,\r\n ValueOfInvoicesRaisedComponent,\r\n EquipmentStatusComponent,\r\n ActualLabourHoursVServiceBudgetHoursComponent,\r\n ServiceContractRevenueComponent,\r\n StockOutsComponent,\r\n JobProfitablityComponent,\r\n AverageSalesOrderLeadTimeComponent,\r\n OpenSalesOrdersComponent,\r\n AveragePurchaseOrderLeadTimeComponent,\r\n OpenPurchaseOrdersComponent,\r\n SalesFunnelComponent,\r\n NewButtonsComponent,\r\n TilesComponent,\r\n EngineerCarouselComponent,\r\n StartHereComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n DxPieChartModule,\r\n DxDataGridModule,\r\n DxChartModule,\r\n DxCircularGaugeModule,\r\n DxButtonModule,\r\n TranslateModule,\r\n ChartsModule,\r\n DxFunnelModule,\r\n DxTileViewModule,\r\n RouterModule,\r\n SharedComponentsModule,\r\n ServicesightSharedModule\r\n ],\r\n exports: [\r\n ChartLoaderComponent,\r\n WidgetLoaderComponent,\r\n OutstandingJobsByJobTypeComponent,\r\n JobsByStatusForJobTypeComponent,\r\n AllocatedJobsForJobTypeStatusComponent,\r\n FieldTechnicianProductivityComponent,\r\n FieldTechnicianJobForMonthComponent,\r\n FieldTechnicianJobForMonthEngineerComponent,\r\n FieldTechnicianUtilisationComponent,\r\n FieldTechnicianUtilisationByDateComponent,\r\n FirstTimeFixRateByPeriodComponent,\r\n MeanTimeToRepairComponent,\r\n MeanTimeToRepairByJobTypeForPeriodComponent,\r\n MeanTimeToRepairByTechnicianForPeriodJobTypeComponent,\r\n MeanTimeToRepairForPeriodJobTypeFirstTechnicianComponent,\r\n OnsiteResponseTimesComponent,\r\n FirstTimeFixRateComponent,\r\n ServiceRevenuePerFieldTechnicianComponent,\r\n ServiceRevenueForFieldTechnicianComponent,\r\n ServiceRevenueForFieldTechnicianPeriodComponent,\r\n ServiceRevenueForFieldTechnicalPeriodJobTypeComponent,\r\n TotalServiceRevenueComponent,\r\n TotalServiceRevenueForPeriodComponent,\r\n ValueOfInvoicesRaisedComponent,\r\n EquipmentStatusComponent,\r\n StockOutsComponent,\r\n JobProfitablityComponent\r\n ]\r\n})\r\nexport class DashboardModule { }\r\n","import { Injectable } from \"@angular/core\";\r\nimport * as Elmahio from \"elmah.io.javascript\";\r\nimport { AppConfigWrapper } from \"../app.config\";\r\nimport { AuthService } from \"./auth/auth.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class LoggingService {\r\n private logger: Elmahio;\r\n private lastErrorMessage: string = null;\r\n\r\n constructor(\r\n private authService: AuthService) {\r\n }\r\n\r\n public Error(message: string, error: Error = null, data: any = null, appeandMessageToTitle: boolean = true): void {\r\n const logger = this.getLogger();\r\n\r\n if (!logger) {\r\n console.error(error);\r\n return;\r\n }\r\n\r\n const logMessage = logger.message();\r\n logMessage.title = message;\r\n logMessage.severity = \"Error\";\r\n logMessage.url = window.location.href;\r\n\r\n if (error) {\r\n if (appeandMessageToTitle) {\r\n logMessage.title += \" - \" + error.message;\r\n }\r\n logMessage.detail = error.stack;\r\n }\r\n\r\n if (data) {\r\n try {\r\n logMessage.data.push({\r\n key: \"data\",\r\n value: this.simpleStringify(data)\r\n });\r\n } catch (e) {\r\n logMessage.data.push({\r\n key: \"data\",\r\n value: \"Error while stringifying data\"\r\n });\r\n }\r\n }\r\n\r\n logger.log(logMessage);\r\n }\r\n\r\n private simpleStringify(object: any): string {\r\n const simpleObject = {};\r\n for (const prop in object) {\r\n if (!object.hasOwnProperty(prop)) {\r\n continue;\r\n }\r\n if (typeof (object[prop]) === \"object\") {\r\n continue;\r\n }\r\n if (typeof (object[prop]) === \"function\") {\r\n continue;\r\n }\r\n simpleObject[prop] = object[prop];\r\n }\r\n return JSON.stringify(simpleObject);\r\n }\r\n\r\n private getLogger(): Elmahio {\r\n if (!this.logger && AppConfigWrapper.settings && AppConfigWrapper.settings.elmahio) {\r\n this.logger = new Elmahio({\r\n apiKey: AppConfigWrapper.settings.elmahio.apiKey,\r\n logId: AppConfigWrapper.settings.elmahio.logId,\r\n application: \"com.servicesight.web\",\r\n filter: this.filter.bind(this)\r\n });\r\n\r\n this.logger.on(\"message\", msg => {\r\n msg.user = this.authService.Username;\r\n msg.version = AppConfigWrapper.settings.version;\r\n msg.application = this.authService.isPortalUser ? \"com.servicesight.portal\" : \"com.servicesight.web\";\r\n msg.data.push({\r\n key: \"CompanyId\",\r\n value: this.authService.CompanyId\r\n });\r\n });\r\n }\r\n\r\n return this.logger;\r\n }\r\n\r\n private filter(message: Elmahio.Message): boolean {\r\n const value = message.title === this.lastErrorMessage || message.title.includes(\"404\");\r\n this.lastErrorMessage = message.title;\r\n return value;\r\n }\r\n}\r\n","import { ErrorHandler, Injectable, Injector } from \"@angular/core\";\r\nimport { LoggingService } from \"src/app/shared/services/logging.service\";\r\nimport { AppConfigWrapper } from \"./shared/app.config\";\r\n\r\n@Injectable()\r\nexport class ElmahIoErrorHandler implements ErrorHandler {\r\n\r\n private initernalLoggingService: LoggingService = null;\r\n\r\n private get loggingService(): LoggingService {\r\n if (!this.initernalLoggingService) {\r\n this.initernalLoggingService = this.injector.get(LoggingService);\r\n }\r\n\r\n return this.initernalLoggingService;\r\n }\r\n\r\n constructor(private injector: Injector) {\r\n }\r\n\r\n handleError(error: Error) {\r\n if (AppConfigWrapper.settings.apiLocations.ServiceSight.includes(\"dev\")) {\r\n console.error(error);\r\n }\r\n\r\n if (error && error.message) {\r\n this.loggingService.Error(error.message, error);\r\n } else if (typeof error === \"string\") {\r\n this.loggingService.Error(\"Error in application - \" + error);\r\n } else {\r\n this.loggingService.Error(\"Error in application\", error);\r\n }\r\n }\r\n}\r\n","import { CommonModule } from \"@angular/common\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { NgModule } from \"@angular/core\";\r\nimport { FormsModule } from \"@angular/forms\";\r\nimport { RouterModule } from \"@angular/router\";\r\nimport { TranslateLoader, TranslateModule } from \"@ngx-translate/core\";\r\nimport {\r\n DxAccordionModule,\r\n DxDataGridModule,\r\n DxDateBoxModule,\r\n DxDropDownBoxModule,\r\n DxDropDownButtonModule,\r\n DxLinearGaugeModule,\r\n DxLoadPanelModule,\r\n DxNumberBoxModule,\r\n DxPopupModule,\r\n DxSelectBoxModule,\r\n DxTabPanelModule\r\n} from \"devextreme-angular\";\r\nimport { ServicesightComponentsModule } from \"servicesight-components\";\r\nimport { HttpLoaderFactory, PhraseBookModule, ServicesightSharedModule, SharedPipesModule } from \"servicesight-shared\";\r\nimport { CylinderDetailCopyComponent } from \"./cylinder-detail-copy/cylinder-detail-copy.component\";\r\nimport { CylinderDetailComponent } from \"./cylinder-detail/cylinder-detail.component\";\r\nimport { CylinderHistoryTabComponent } from \"./cylinder-history-tab/cylinder-history-tab.component\";\r\nimport { CylindersFilesTabComponent } from \"./cylinders-files-tab/cylinders-files-tab.component\";\r\nimport { CylindersUploadComponent } from \"./cylinders-upload/cylinders-upload.component\";\r\nimport { DecantComponent } from \"./decant/decant.component\";\r\nimport { FGasLogDetailComponent } from \"./f-gas-log-detail/f-gas-log-detail.component\";\r\nimport { CylinderStatusPipe } from \"./pipes/cylinder-status.enum\";\r\nimport { SharedComponentsModule } from \"../shared/components/shared-components.module\";\r\nimport { PipesModule } from \"../shared/pipes/pipes.module\";\r\nimport { FGasLogPreviewComponent } from \"./f-gas-log-preview/f-gas-log-preview.component\";\r\nimport { WasteTransferNotesListComponent } from \"./waste-transfer-notes-list/waste-transfer-notes-list.component\";\r\nimport { WasteTransferNotesPreviewComponent } from \"./waste-transfer-notes-preview/waste-transfer-notes-preview.component\";\r\nimport { SourceAccordionItemComponent } from \"./waste-transfer-notes-accordion/source-accordion-item/source-accordion-item.component\";\r\nimport { CylindersAccordionItemComponent } from \"./waste-transfer-notes-accordion/cylinders-accordion/cylinders-accordion-item.component\";\r\nimport { WasteTransferContactAccordionItemComponent } from \"./waste-transfer-notes-accordion/waste-transfer-contact-accordion/waste-transfer-contact-accordion-item.component\";\r\n\r\n@NgModule({\r\n declarations: [\r\n FGasLogDetailComponent,\r\n CylinderDetailComponent,\r\n CylinderStatusPipe,\r\n CylindersFilesTabComponent,\r\n CylinderHistoryTabComponent,\r\n CylinderDetailCopyComponent,\r\n CylindersUploadComponent,\r\n DecantComponent,\r\n FGasLogPreviewComponent,\r\n WasteTransferNotesListComponent,\r\n WasteTransferNotesPreviewComponent,\r\n SourceAccordionItemComponent,\r\n CylindersAccordionItemComponent,\r\n WasteTransferContactAccordionItemComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n RouterModule,\r\n FormsModule,\r\n DxDataGridModule,\r\n DxSelectBoxModule,\r\n DxDropDownBoxModule,\r\n DxDropDownButtonModule,\r\n DxTabPanelModule,\r\n DxDateBoxModule,\r\n DxAccordionModule,\r\n DxPopupModule,\r\n DxLoadPanelModule,\r\n DxLinearGaugeModule,\r\n DxNumberBoxModule,\r\n ServicesightSharedModule,\r\n ServicesightComponentsModule,\r\n SharedComponentsModule,\r\n SharedPipesModule,\r\n PipesModule,\r\n PhraseBookModule,\r\n TranslateModule.forRoot({\r\n loader: {\r\n provide: TranslateLoader,\r\n useFactory: HttpLoaderFactory,\r\n deps: [HttpClient]\r\n }\r\n })\r\n ]\r\n})\r\nexport class FGasModule { }\r\n","import { CommonModule } from \"@angular/common\";\r\nimport { HttpClient, HttpClientModule } from \"@angular/common/http\";\r\nimport { NgModule } from \"@angular/core\";\r\nimport { FormsModule } from \"@angular/forms\";\r\nimport { TranslateLoader, TranslateModule } from \"@ngx-translate/core\";\r\nimport { DxReportViewerModule } from \"devexpress-reporting-angular\";\r\nimport { DxAccordionModule, DxCheckBoxModule, DxDataGridModule, DxPopupModule, DxScrollViewModule, DxSelectBoxModule } from \"devextreme-angular\";\r\nimport { ServicesightSharedModule, SharedPipesModule } from \"servicesight-shared\";\r\nimport { InspectionsDetailComponent } from \"./inspections-detail/inspections-detail.component\";\r\nimport { InspectionsJobListComponent } from \"./inspections-job-list/inspections-job-list.component\";\r\nimport { InspectionsListComponent } from \"./inspections-list/inspections-list.component\";\r\nimport { InspectionsReportViewerComponent } from \"./inspections-report-viewer/inspections-report-viewer.component\";\r\nimport { InspectionsRoutingModule } from \"./inspections-routing.module\";\r\nimport { IssueCertificatePopupComponent } from \"./issue-certificate-popup/issue-certificate-popup.component\";\r\nimport { SharedComponentsModule } from \"../shared/components/shared-components.module\";\r\nimport { HttpLoaderFactory } from \"../shared/factory/http-loader.factory\";\r\nimport { PipesModule } from \"../shared/pipes/pipes.module\";\r\n\r\n@NgModule({\r\n declarations: [\r\n InspectionsListComponent,\r\n InspectionsDetailComponent,\r\n InspectionsJobListComponent,\r\n InspectionsReportViewerComponent,\r\n IssueCertificatePopupComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n InspectionsRoutingModule,\r\n HttpClientModule,\r\n PipesModule,\r\n ServicesightSharedModule,\r\n SharedComponentsModule,\r\n SharedPipesModule,\r\n DxAccordionModule,\r\n DxReportViewerModule,\r\n DxDataGridModule,\r\n DxSelectBoxModule,\r\n DxPopupModule,\r\n DxCheckBoxModule,\r\n DxScrollViewModule,\r\n TranslateModule.forRoot({\r\n loader: {\r\n provide: TranslateLoader,\r\n useFactory: HttpLoaderFactory,\r\n deps: [ HttpClient ]\r\n }\r\n })\r\n ],\r\n exports: [InspectionsJobListComponent]\r\n})\r\nexport class InspectionsModule { }\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

{{ 'batch-invoice.title' | translate }}

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n  \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport { EdmLiteral } from \"devextreme/data/odata/utils\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport {\r\n CurrencyPipe,\r\n DateOnlyService,\r\n DespatchNotesService,\r\n JobStatus,\r\n Module,\r\n ModuleService,\r\n ProteanSystem,\r\n ServiceContractsService,\r\n ServiceContractStatus\r\n} from \"servicesight-shared\";\r\nimport { JobService } from \"src/app/jobs/services/job.service\";\r\nimport { InvoiceGrouping } from \"../enums/invoice-grouping.enum\";\r\nimport { FilterDataSource } from \"../models/filter-data-source.model\";\r\nimport { BatchInvoiceService } from \"../services/batch-invoices.service\";\r\n\r\n@Component({\r\n selector: \"app-batch-invoice\",\r\n templateUrl: \"./batch-invoice.component.html\",\r\n styleUrls: [\"./batch-invoice.component.scss\"]\r\n})\r\nexport class BatchInvoiceComponent implements OnInit {\r\n\r\n @ViewChild(\"batchInvoice\", { static: true }) form: NgForm;\r\n @ViewChild(\"grid\") private grid: DxDataGridComponent;\r\n\r\n private readonly baseCurrencyCode: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencyCode\"));\r\n\r\n public filterValue: string = \"jobs\";\r\n public InvoiceDate: Date = new Date();\r\n public InvoiceToDate: Date;\r\n public contractEnabled: boolean = false;\r\n public showInvoiceWarning: boolean = false;\r\n public despatchEnabled: boolean = false;\r\n public showInfo: boolean = false;\r\n\r\n public currentFilterData: FilterDataSource;\r\n\r\n private allDataSources: Map = new Map();\r\n\r\n public get noRowsSelected(): boolean {\r\n if (!this.currentFilterData) {\r\n return true;\r\n }\r\n return this.currentFilterData.dataSource.totalCount() <= 0;\r\n }\r\n\r\n constructor(\r\n private moduleService: ModuleService,\r\n private jobService: JobService,\r\n private serviceContractsService: ServiceContractsService,\r\n private batchInvoiceService: BatchInvoiceService,\r\n private translateService: TranslateService,\r\n private currencyPipe: CurrencyPipe,\r\n private despatchNoteService: DespatchNotesService,\r\n private dateOnlyService: DateOnlyService) {\r\n\r\n this.customizeNet = this.customizeNet.bind(this);\r\n this.customizeCount = this.customizeCount.bind(this);\r\n this.calculateContractSummary = this.calculateContractSummary.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.moduleService.GetEnabledModules().subscribe(modules => {\r\n if (modules.includes(Module.ServiceContract)) {\r\n const contractDS = this.serviceContractsService.GetDataSource(true);\r\n contractDS.filter([[\"Status\", \"=\", ServiceContractStatus.Active], \"or\", [\"Status\", \"=\", ServiceContractStatus.Terminated]]);\r\n\r\n this.allDataSources.set(\"contracts\", {\r\n dataSource: contractDS,\r\n filter: [],\r\n fields: this.batchInvoiceService.GetContractFields(),\r\n columns: this.batchInvoiceService.GetContractColumns(),\r\n countColumn: \"Status\",\r\n totalColumn: undefined,\r\n totalColumnName: \"NetTotal\",\r\n totalShowInColumn: \"NetTotal\",\r\n totalColumnType: \"custom\"\r\n });\r\n this.contractEnabled = true;\r\n }\r\n\r\n if (modules.includes(Module.SalesOrders)) {\r\n const despatchDS = this.despatchNoteService.GetDataSource();\r\n despatchDS.filter([\"Status\", \"=\", new EdmLiteral(\"ServiceSight.Shared.Enums.DespatchStatus'Despatched'\")]);\r\n\r\n this.allDataSources.set(\"despatchnotes\", {\r\n dataSource: despatchDS,\r\n filter: [],\r\n fields: this.batchInvoiceService.GetDespatchFields(),\r\n columns: this.batchInvoiceService.GetDespatchColumns(),\r\n countColumn: \"CustomerRef\",\r\n totalColumn: \"Total\",\r\n totalColumnName: undefined,\r\n totalShowInColumn: undefined,\r\n totalColumnType: \"sum\"\r\n });\r\n\r\n this.despatchEnabled = true;\r\n }\r\n });\r\n\r\n const jobDS = this.jobService.GetDataSource(true);\r\n jobDS.filter([[\"Status\", \"=\", JobStatus.COMPLETED], \"and\", [\"Chargeable\", \"=\", true]]);\r\n this.jobService.GetJobTypes().subscribe(jobTypes => {\r\n this.allDataSources.set(\"jobs\", {\r\n dataSource: jobDS,\r\n filter: [],\r\n fields: this.batchInvoiceService.GetJobFields(jobTypes),\r\n columns: this.batchInvoiceService.GetJobColumns(),\r\n countColumn: \"OrderNo\",\r\n totalColumn: \"JobTotal\",\r\n totalColumnName: undefined,\r\n totalShowInColumn: undefined,\r\n totalColumnType: \"sum\"\r\n });\r\n\r\n this.currentFilterData = this.allDataSources.get(this.filterValue);\r\n });\r\n }\r\n\r\n public filterChanged($event) {\r\n this.filterValue = $event.currentTarget.value;\r\n this.currentFilterData = this.allDataSources.get($event.currentTarget.value);\r\n }\r\n\r\n public OnDiscard(): void {\r\n //reset the grid\r\n this.grid.instance.state(null);\r\n // Clear all filters\r\n const values = this.allDataSources.values();\r\n let next = values.next();\r\n while (!next.done) {\r\n next.value.filter = [];\r\n next = values.next();\r\n }\r\n this.form.form.reset();\r\n this.InvoiceDate = new Date();\r\n }\r\n\r\n public customizeNet(data): string {\r\n if (this.filterValue === \"contracts\") {\r\n return this.currencyPipe.transform(data.value, this.baseCurrencyCode);\r\n } else {\r\n return this.translateService.instant(\"batch-invoice.net-total\", { val: this.currencyPipe.transform(data.value, this.baseCurrencyCode) });\r\n }\r\n }\r\n\r\n public customizeCount(data): string {\r\n return this.translateService.instant(\"batch-invoice.invoice-count\", { val: data.value });\r\n }\r\n\r\n public allowRaisingBatch(): boolean {\r\n return this.form.valid && this.currentFilterData != null && this.currentFilterData.dataSource != null && this.currentFilterData.dataSource.totalCount() > 0;\r\n }\r\n\r\n public hasChanges(): boolean {\r\n return !this.form.pristine || (this.currentFilterData != null && this.currentFilterData.filter && this.currentFilterData.filter.length > 0);\r\n }\r\n\r\n public RaiseInvoices(): void {\r\n const filterExpr = this.grid.instance.getCombinedFilter();\r\n const gridDataSource = this.grid.instance.getDataSource().store() as ODataStore;\r\n\r\n gridDataSource.load({\r\n filter: filterExpr\r\n }).then((filteredData) => {\r\n let system;\r\n let ids;\r\n switch (this.filterValue) {\r\n case \"jobs\":\r\n system = ProteanSystem.Job;\r\n ids = filteredData.map(i => ({ Id: i.JobID, CustomerId: i.CustomerID, SiteId: i.SiteID, OrderNo: i.OrderNo, GroupingType: i.InvoiceGroupingId }));\r\n break;\r\n case \"contracts\":\r\n system = ProteanSystem.Service;\r\n ids = filteredData.map(i => ({\r\n Id: i.MaintContractId,\r\n From: i.InvoiceFromDate,\r\n CustomerId: i.CustomerId,\r\n OrderNo: i.Reference,\r\n GroupingType: i.InvoiceGroupingId === InvoiceGrouping.Site ? InvoiceGrouping.Individual : i.InvoiceGroupingId }));\r\n break;\r\n case \"despatchnotes\":\r\n system = ProteanSystem.SalesOrder;\r\n ids = filteredData.map(i => ({ Id: i.DespatchId, CustomerId: i.CustomerId, SiteId: i.DeliveryId, OrderNo: i.CustomerRef, GroupingType: i.InvoiceGroupingId }));\r\n break;\r\n }\r\n this.batchInvoiceService.RaiseInvoices({\r\n TaxPoint: this.dateOnlyService.RecalculateDateOnSave(new Date(this.InvoiceDate.setHours(0, 0, 0, 0))),\r\n Ids: ids,\r\n System: system,\r\n InvoiceToDate: this.InvoiceToDate ? this.dateOnlyService.RecalculateDateOnSave(new Date(this.InvoiceToDate.setHours(0, 0, 0, 0))) : null\r\n }).subscribe(() => {\r\n this.showInfo = true;\r\n });\r\n });\r\n }\r\n\r\n public ShowRaiseInvoicesWarning(): void {\r\n this.showInvoiceWarning = true;\r\n }\r\n\r\n public ConfirmRaiseInvoices(confirmed): void {\r\n if (confirmed) {\r\n this.RaiseInvoices();\r\n }\r\n this.showInvoiceWarning = false;\r\n }\r\n\r\n public OnCloseInfo(): void {\r\n location.href = \"#/invoices/batch-list\";\r\n }\r\n\r\n public InvoiceUpToChanged(): void {\r\n this.batchInvoiceService.invoiceUpToDate = this.InvoiceToDate;\r\n this.grid.instance.refresh(true);\r\n }\r\n\r\n // this will return the current calculated total contract value\r\n // options is a devexpress object https://js.devexpress.com/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/summary/#calculateCustomSummary\r\n public calculateContractSummary(options: { totalValue: number; name: string; summaryProcess: string; value: { Total: number } }): void {\r\n if (options.name === \"NetTotal\") {\r\n switch (options.summaryProcess) {\r\n case \"start\":\r\n options.totalValue = 0;\r\n break;\r\n case \"calculate\":\r\n const contractEndInformation = this.batchInvoiceService.CalculateContractEndInformation(options.value);\r\n options.totalValue += options.value.Total * contractEndInformation.noOfCycles ?? 0;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n public FilterChanged(): void {\r\n if (this.filterValue === \"contracts\") {\r\n // Update the total when the filter changes\r\n this.InvoiceUpToChanged();\r\n }\r\n }\r\n}\r\n","import { CommonModule } from \"@angular/common\";\r\nimport { HttpClientModule } from \"@angular/common/http\";\r\nimport { NgModule } from \"@angular/core\";\r\nimport { FormsModule } from \"@angular/forms\";\r\nimport { RouterModule } from \"@angular/router\";\r\nimport { TranslateModule } from \"@ngx-translate/core\";\r\nimport {\r\n DxAccordionModule,\r\n DxButtonModule,\r\n DxCheckBoxModule,\r\n DxDataGridModule,\r\n DxDateBoxModule,\r\n DxFilterBuilderModule,\r\n DxSelectBoxModule,\r\n DxTabPanelModule,\r\n DxTextAreaModule,\r\n DxTextBoxModule,\r\n DxValidationSummaryModule,\r\n DxValidatorModule\r\n} from \"devextreme-angular\";\r\nimport { CurrencyPipe, ServicesightSharedModule, SharedPipesModule } from \"servicesight-shared\";\r\nimport { BatchInvoiceListComponent } from \"./batch-invoice-list/batch-invoice-list.component\";\r\nimport { BatchInvoiceComponent } from \"./batch-invoice/batch-invoice.component\";\r\nimport { InvoiceDetailComponent } from \"./invoice-detail/invoice-detail.component\";\r\nimport { InvoicesRoutingModule } from \"./invoices-routing.module\";\r\nimport { BatchInvoiceStatusPipe } from \"./pipes/batch-invoice-status-pipe\";\r\nimport { InvoiceGroupingPipe } from \"./pipes/invoice-grouping.pipe\";\r\nimport { SharedComponentsModule } from \"../shared/components/shared-components.module\";\r\n\r\nconst components = [\r\n BatchInvoiceListComponent,\r\n BatchInvoiceComponent,\r\n BatchInvoiceStatusPipe,\r\n InvoiceGroupingPipe,\r\n InvoiceDetailComponent\r\n];\r\n\r\n@NgModule({\r\n declarations: components,\r\n exports: [],\r\n imports: [\r\n CommonModule,\r\n RouterModule,\r\n FormsModule,\r\n HttpClientModule,\r\n DxDataGridModule,\r\n DxTabPanelModule,\r\n DxAccordionModule,\r\n DxSelectBoxModule,\r\n DxDateBoxModule,\r\n DxCheckBoxModule,\r\n DxValidationSummaryModule,\r\n DxValidatorModule,\r\n ServicesightSharedModule,\r\n SharedComponentsModule,\r\n SharedPipesModule,\r\n InvoicesRoutingModule,\r\n TranslateModule.forChild(),\r\n DxTextBoxModule,\r\n DxTextAreaModule,\r\n DxButtonModule,\r\n DxFilterBuilderModule\r\n ],\r\n providers: [\r\n CurrencyPipe,\r\n InvoiceGroupingPipe\r\n ]\r\n})\r\nexport class InvoicesModule { }\r\n","import { CommonModule } from \"@angular/common\";\r\nimport { HttpClient, HttpClientModule } from \"@angular/common/http\";\r\nimport { NgModule } from \"@angular/core\";\r\nimport { FormsModule } from \"@angular/forms\";\r\nimport { TranslateLoader, TranslateModule } from \"@ngx-translate/core\";\r\nimport {\r\n DxAccordionModule,\r\n DxDataGridModule,\r\n DxDateBoxModule,\r\n DxFormModule,\r\n DxLoadPanelModule,\r\n DxNumberBoxModule,\r\n DxPopupModule,\r\n DxScrollViewModule,\r\n DxSelectBoxModule,\r\n DxTabPanelModule,\r\n DxTemplateModule,\r\n DxValidatorModule\r\n} from \"devextreme-angular\";\r\nimport { HttpLoaderFactory, ServicesightSharedModule, SharedPipesModule } from \"servicesight-shared\";\r\nimport { ContractCancellationDialogueComponent } from \"./contract-cancellation-dialogue/contract-cancellation-dialogue.component\";\r\nimport { ContractDetailComponent } from \"./contract-detail/contract-detail.component\";\r\nimport { ContractEquipmentComponent } from \"./contract-equipment/contract-equipment.component\";\r\nimport { ContractHeaderUploadComponent } from \"./contract-header-upload/contract-header-upload.component\";\r\nimport { ContractInvoicingDialogueComponent } from \"./contract-invoicing-dialogue/contract-invoicing-dialogue.component\";\r\nimport { ContractInvoicingComponent } from \"./contract-invoicing/contract-invoicing.component\";\r\nimport { ContractMarketingComponent } from \"./contract-marketing/contract-marketing.component\";\r\nimport { ContractSiteUploadComponent } from \"./contract-site-upload/contract-site-upload.component\";\r\nimport { ContractSitesComponent } from \"./contract-sites/contract-sites.component\";\r\nimport { ContractComponent } from \"./contract/contract.component\";\r\nimport { ImportContractEquipmentComponent } from \"./import-contract-equipment/import-contract-equipment.component\";\r\nimport { InvCyclePipe } from \"./pipes/inv-cycle.pipe\";\r\nimport { ServiceContractPreviewComponent } from \"./service-contract-preview/service-contract-preview.component\";\r\nimport { ServiceContractsRoutingModule } from \"./service-contracts-routing.module\";\r\nimport { SharedComponentsModule } from \"../shared/components/shared-components.module\";\r\nimport { PipesModule } from \"../shared/pipes/pipes.module\";\r\n\r\n@NgModule({\r\n declarations: [\r\n ContractComponent,\r\n ContractDetailComponent,\r\n ContractEquipmentComponent,\r\n ContractInvoicingComponent,\r\n InvCyclePipe,\r\n ContractSitesComponent,\r\n ContractCancellationDialogueComponent,\r\n ServiceContractPreviewComponent,\r\n ContractInvoicingDialogueComponent,\r\n ContractSiteUploadComponent,\r\n ImportContractEquipmentComponent,\r\n ContractHeaderUploadComponent,\r\n ContractMarketingComponent\r\n ],\r\n exports: [ ],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n HttpClientModule,\r\n PipesModule,\r\n ServicesightSharedModule,\r\n SharedComponentsModule,\r\n TranslateModule.forRoot({\r\n loader: {\r\n provide: TranslateLoader,\r\n useFactory: HttpLoaderFactory,\r\n deps: [HttpClient]\r\n }\r\n }),\r\n ServiceContractsRoutingModule,\r\n SharedPipesModule,\r\n DxDateBoxModule,\r\n DxDataGridModule,\r\n DxFormModule,\r\n DxNumberBoxModule,\r\n DxPopupModule,\r\n DxScrollViewModule,\r\n DxSelectBoxModule,\r\n DxTabPanelModule,\r\n DxTemplateModule,\r\n DxValidatorModule,\r\n DxAccordionModule,\r\n DxLoadPanelModule\r\n ]\r\n})\r\nexport class ServiceContractsModule { }\r\n","import { CommonModule } from \"@angular/common\";\r\nimport { HttpClient, HttpClientModule } from \"@angular/common/http\";\r\nimport { NgModule } from \"@angular/core\";\r\nimport { FormsModule } from \"@angular/forms\";\r\nimport { TranslateLoader, TranslateModule } from \"@ngx-translate/core\";\r\nimport {\r\n DxAccordionModule,\r\n DxButtonModule,\r\n DxChartModule,\r\n DxDataGridModule,\r\n DxDateBoxModule,\r\n DxDropDownBoxModule,\r\n DxDropDownButtonModule,\r\n DxLoadPanelModule,\r\n DxNumberBoxModule,\r\n DxPopupModule,\r\n DxSelectBoxModule,\r\n DxTabPanelModule,\r\n DxTextAreaModule,\r\n DxTextBoxModule,\r\n DxValidatorModule\r\n} from \"devextreme-angular\";\r\nimport { CanDeactivateGuard, HttpLoaderFactory, ServicesightSharedModule, SharedPipesModule } from \"servicesight-shared\";\r\nimport { EquipHistoryComponent } from \"./equipment-detail/equip-history/equip-history.component\";\r\nimport { EquipmentDetailComponent } from \"./equipment-detail/equipment-detail.component\";\r\nimport { EquipmentMarketingComponent } from \"./equipment-marketing/equipment-marketing.component\";\r\nimport { EquipmentRoutingModule } from \"./equipment-routing.module\";\r\nimport { EquipmentServiceUploadComponent } from \"./equipment-service-upload/equipment-service-upload.component\";\r\nimport { EquipmentUploadComponent } from \"./equipment-upload/equipment-upload.component\";\r\nimport { EquipmentStatusPipe } from \"./pipes/enums/equipment-status-pipe\";\r\nimport { ServiceContractsModule } from \"../service-contracts/service-contracts.module\";\r\nimport { AttributeSettingsModule } from \"../settings/attribute-settings/attribute-settings.module\";\r\nimport { SharedComponentsModule } from \"../shared/components/shared-components.module\";\r\nimport { SharedDirectivesModule } from \"../shared/directives/shared-directives.module\";\r\nimport { PipesModule } from \"../shared/pipes/pipes.module\";\r\nimport { ServicesightComponentsModule } from \"servicesight-components\";\r\nimport { DevicesListComponent } from \"./devices-list/devices-list.component\";\r\nimport { DeviceComponent } from \"./device/device.component\";\r\nimport { EquipmentStockListComponent } from \"./equipment-stock-list/equipment-stock-list.component\";\r\n\r\nconst components = [\r\n EquipmentDetailComponent,\r\n EquipHistoryComponent,\r\n EquipmentUploadComponent,\r\n EquipmentServiceUploadComponent,\r\n EquipmentMarketingComponent,\r\n DevicesListComponent,\r\n DeviceComponent,\r\n EquipmentStockListComponent\r\n];\r\nconst pipes = [ EquipmentStatusPipe ];\r\n\r\n@NgModule({\r\n declarations: [ ...components , ...pipes ],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n HttpClientModule,\r\n PipesModule,\r\n ServicesightSharedModule,\r\n SharedPipesModule,\r\n SharedComponentsModule,\r\n DxDataGridModule,\r\n DxSelectBoxModule,\r\n DxDateBoxModule,\r\n DxTabPanelModule,\r\n DxTextAreaModule,\r\n DxAccordionModule,\r\n DxPopupModule,\r\n DxDataGridModule,\r\n DxLoadPanelModule,\r\n DxNumberBoxModule,\r\n DxValidatorModule,\r\n DxChartModule,\r\n TranslateModule.forRoot({\r\n loader: {\r\n provide: TranslateLoader,\r\n useFactory: HttpLoaderFactory,\r\n deps: [HttpClient]\r\n }\r\n }),\r\n EquipmentRoutingModule,\r\n DxTextBoxModule,\r\n DxDropDownBoxModule,\r\n DxButtonModule,\r\n DxDropDownButtonModule,\r\n AttributeSettingsModule,\r\n ServiceContractsModule,\r\n SharedDirectivesModule,\r\n ServicesightComponentsModule\r\n ],\r\n exports: [ ],\r\n providers: [\r\n CanDeactivateGuard\r\n ]\r\n})\r\nexport class EquipmentModule { }\r\n","import { CommonModule } from \"@angular/common\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { NgModule } from \"@angular/core\";\r\nimport { FormsModule } from \"@angular/forms\";\r\nimport { RouterModule } from \"@angular/router\";\r\nimport { TranslateLoader, TranslateModule } from \"@ngx-translate/core\";\r\nimport {\r\n DxAccordionModule,\r\n DxCheckBoxModule,\r\n DxDataGridModule,\r\n DxDateBoxModule,\r\n DxDropDownButtonModule,\r\n DxFileUploaderModule,\r\n DxFilterBuilderModule,\r\n DxNumberBoxModule,\r\n DxPopupModule,\r\n DxScrollViewModule,\r\n DxSelectBoxModule,\r\n DxTabPanelModule,\r\n DxTextAreaModule,\r\n DxTextBoxModule,\r\n DxSortableModule\r\n} from \"devextreme-angular\";\r\nimport { ServicesightComponentsModule } from \"servicesight-components\";\r\nimport { CanDeactivateGuard, PhraseBookModule, ServicesightSharedModule, SharedPipesModule } from \"servicesight-shared\";\r\nimport { JobActivityDialogueComponent } from \"./job-activity-dialogue/job-activity-dialogue.component\";\r\nimport { JobActivityComponent } from \"./job-activity/job-activity.component\";\r\nimport { JobCancellationDialogueComponent } from \"./job-cancellation-dialogue/job-cancellation-dialogue.component\";\r\nimport { JobContractAccordionComponent } from \"./job-contract-accordion/job-contract-accordion.component\";\r\nimport { JobCreateComponent } from \"./job-create/job-create.component\";\r\nimport { JobDetailComponent } from \"./job-detail/job-detail.component\";\r\nimport { JobEquipmentAccordionComponent } from \"./job-equipment-accordion/job-equipment-accordion.component\";\r\nimport { JobEquipmentMarketingComponent } from \"./job-equipment-marketing/job-equipment-marketing.component\";\r\nimport { JobFurtherWorkComponent } from \"./job-further-work/job-further-work.component\";\r\nimport { JobInvoiceDialogueComponent } from \"./job-invoice-dialogue/job-invoice-dialogue.component\";\r\nimport { JobInvoicingComponent } from \"./job-invoicing/job-invoicing.component\";\r\nimport { JobLabourComponent } from \"./job-labour/job-labour.component\";\r\nimport { JobMaterialDialogueComponent } from \"./job-material-dialogue/job-material-dialogue.component\";\r\nimport { JobMaterialsComponent } from \"./job-materials/job-materials.component\";\r\nimport { JobPartsMarketingComponent } from \"./job-parts-marketing/job-parts-marketing.component\";\r\nimport { JobPartSerialNumberDialogueComponent } from \"./job-parts-serial-number-dialogue/job-parts-serial-number-dialogue.component\";\r\nimport { JobPartComponent } from \"./job-parts/job-parts.component\";\r\nimport { JobRefrigerantComponent } from \"./job-refrigerant/job-refrigerant.component\";\r\nimport { JobRoutingModule } from \"./job-routing.module\";\r\nimport { JobVisitDialogueComponent } from \"./job-visit-dialogue/job-visit-dialogue.component\";\r\nimport { JobComponent } from \"./job/job.component\";\r\nimport { JobSheetComponent } from \"./jobsheet/jobsheet.component\";\r\nimport { JobVisitStatusBarPipe } from \"./pipes/job-visit-status-bar.pipe\";\r\nimport { LabourTypePipe } from \"./pipes/labour-type.pipe\";\r\nimport { RecentJobsAccordionComponent } from \"./recent-jobs-accordion/recent-jobs-accordion.component\";\r\nimport { RecurringJobsComponent } from \"./recurring-jobs/recurring-jobs.component\";\r\nimport { JobService } from \"./services/job.service\";\r\nimport { EquipmentModule } from \"../equipment/equipment.module\";\r\nimport { InspectionsModule } from \"../inspections/inspections.module\";\r\nimport { SharedComponentsModule } from \"../shared/components/shared-components.module\";\r\nimport { HttpLoaderFactory } from \"../shared/factory/http-loader.factory\";\r\nimport { PipesModule } from \"../shared/pipes/pipes.module\";\r\n\r\n@NgModule({\r\n declarations: [\r\n JobCreateComponent,\r\n RecentJobsAccordionComponent,\r\n JobDetailComponent,\r\n JobLabourComponent,\r\n JobPartComponent,\r\n JobPartSerialNumberDialogueComponent,\r\n JobMaterialsComponent,\r\n JobInvoicingComponent,\r\n JobInvoiceDialogueComponent,\r\n JobMaterialDialogueComponent,\r\n JobComponent,\r\n JobCancellationDialogueComponent,\r\n JobEquipmentAccordionComponent,\r\n JobFurtherWorkComponent,\r\n JobCancellationDialogueComponent,\r\n JobVisitDialogueComponent,\r\n LabourTypePipe,\r\n JobSheetComponent,\r\n JobContractAccordionComponent,\r\n JobVisitStatusBarPipe,\r\n JobEquipmentMarketingComponent,\r\n JobPartsMarketingComponent,\r\n JobRefrigerantComponent,\r\n JobActivityComponent,\r\n RecurringJobsComponent,\r\n JobActivityDialogueComponent\r\n ],\r\n exports: [],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n DxDataGridModule,\r\n DxSelectBoxModule,\r\n DxPopupModule,\r\n DxAccordionModule,\r\n DxDateBoxModule,\r\n DxDropDownButtonModule,\r\n DxNumberBoxModule,\r\n DxFileUploaderModule,\r\n DxTextAreaModule,\r\n DxTabPanelModule,\r\n DxTextBoxModule,\r\n DxFilterBuilderModule,\r\n DxSortableModule,\r\n JobRoutingModule,\r\n InspectionsModule,\r\n EquipmentModule,\r\n PhraseBookModule,\r\n RouterModule,\r\n PipesModule,\r\n SharedPipesModule,\r\n SharedComponentsModule,\r\n ServicesightSharedModule,\r\n TranslateModule.forRoot({\r\n loader: {\r\n provide: TranslateLoader,\r\n useFactory: HttpLoaderFactory,\r\n deps: [ HttpClient ]\r\n }\r\n }),\r\n ServicesightSharedModule,\r\n DxScrollViewModule,\r\n DxCheckBoxModule,\r\n ServicesightComponentsModule\r\n ],\r\n providers: [\r\n JobService,\r\n CanDeactivateGuard\r\n ]\r\n})\r\nexport class JobsModule { }\r\n","import { NgModule } from \"@angular/core\";\r\nimport { CommonModule } from \"@angular/common\";\r\nimport { FormsModule } from \"@angular/forms\";\r\nimport { HttpClient, HttpClientModule } from \"@angular/common/http\";\r\nimport { TranslateLoader, TranslateModule } from \"@ngx-translate/core\";\r\nimport { HttpLoaderFactory } from \"../shared/factory/http-loader.factory\";\r\nimport { PipesModule } from \"../shared/pipes/pipes.module\";\r\nimport { DxReportViewerModule } from \"devexpress-reporting-angular\";\r\nimport {\r\n DxDataGridModule,\r\n DxSelectBoxModule,\r\n DxPopupModule,\r\n DxCheckBoxModule,\r\n DxAccordionModule,\r\n DxFileUploaderModule,\r\n DxTooltipModule\r\n} from \"devextreme-angular\";\r\nimport { SharedComponentsModule } from \"../shared/components/shared-components.module\";\r\nimport { JobsModule } from \"../jobs/jobs.module\";\r\nimport { MessageListComponent } from \"./components/message-list/message-list.component\";\r\nimport { MessagesNavigationComponent } from \"./components/messages-navigation/messages-navigation.component\";\r\nimport { NewMessagesComponent } from \"./components/new-messages/new-messages.component\";\r\nimport { RecipientsPickerComponent } from \"./components/recipients-picker/recipients-picker.component\";\r\nimport { MessagesComponent } from \"./components/messages/messages.component\";\r\nimport { MessagesRoutingModule } from \"./messages-routing.module\";\r\nimport { BypassSecurityTrustResourceUrlPipe, ServicesightSharedModule, SharedPipesModule } from \"servicesight-shared\";\r\nimport { CanDeactivateGuard } from \"servicesight-shared\";\r\n\r\n\r\n@NgModule({\r\n declarations: [\r\n MessageListComponent,\r\n MessagesNavigationComponent,\r\n NewMessagesComponent,\r\n RecipientsPickerComponent,\r\n MessagesComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n MessagesRoutingModule,\r\n HttpClientModule,\r\n PipesModule,\r\n JobsModule,\r\n SharedComponentsModule,\r\n DxAccordionModule,\r\n DxReportViewerModule,\r\n DxDataGridModule,\r\n DxSelectBoxModule,\r\n DxPopupModule,\r\n DxCheckBoxModule,\r\n TranslateModule.forRoot({\r\n loader: {\r\n provide: TranslateLoader,\r\n useFactory: HttpLoaderFactory,\r\n deps: [HttpClient]\r\n }\r\n }),\r\n DxFileUploaderModule,\r\n ServicesightSharedModule.forRoot(),\r\n DxTooltipModule,\r\n SharedPipesModule\r\n ],\r\n providers: [\r\n CanDeactivateGuard,\r\n BypassSecurityTrustResourceUrlPipe\r\n ]\r\n})\r\nexport class MessagesModule { }\r\n","import { CommonModule } from \"@angular/common\";\r\nimport { HttpClient, HttpClientModule } from \"@angular/common/http\";\r\nimport { NgModule } from \"@angular/core\";\r\nimport { FormsModule } from \"@angular/forms\";\r\nimport { TranslateLoader, TranslateModule } from \"@ngx-translate/core\";\r\nimport { DxAccordionModule, DxTextBoxModule } from \"devextreme-angular\";\r\nimport { ServicesightSharedModule } from \"servicesight-shared\";\r\nimport { ChangePasswordComponent } from \"./components/change-password/change-password.component\";\r\nimport { LayoutOptionsComponent } from \"./components/layout-options/layout-options.component\";\r\nimport { OutlookIntegrationComponent } from \"./components/outlook-integration/outlook-integration.component\";\r\nimport { MySettingsComponent } from \"./my-settings.component\";\r\nimport { MySettingsRoutingModule } from \"./my-settings.routing.module\";\r\nimport { SupportCodeComponent } from \"../settings/support-code/support-code.component\";\r\nimport { SharedComponentsModule } from \"../shared/components/shared-components.module\";\r\nimport { SharedDirectivesModule } from \"../shared/directives/shared-directives.module\";\r\nimport { HttpLoaderFactory } from \"../shared/factory/http-loader.factory\";\r\n\r\n@NgModule({\r\n declarations: [\r\n MySettingsComponent,\r\n LayoutOptionsComponent,\r\n ChangePasswordComponent,\r\n SupportCodeComponent,\r\n OutlookIntegrationComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n HttpClientModule,\r\n MySettingsRoutingModule,\r\n DxAccordionModule,\r\n DxTextBoxModule,\r\n SharedDirectivesModule,\r\n SharedComponentsModule,\r\n ServicesightSharedModule.forRoot(),\r\n TranslateModule.forRoot({\r\n loader: {\r\n provide: TranslateLoader,\r\n useFactory: HttpLoaderFactory,\r\n deps: [HttpClient]\r\n }\r\n })\r\n ]\r\n})\r\nexport class MySettingsModule { }\r\n","import { CommonModule } from \"@angular/common\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { NgModule } from \"@angular/core\";\r\nimport { FormsModule } from \"@angular/forms\";\r\nimport { BrowserModule } from \"@angular/platform-browser\";\r\nimport { RouterModule } from \"@angular/router\";\r\nimport { TranslateLoader, TranslateModule } from \"@ngx-translate/core\";\r\nimport { AngularSplitModule } from \"angular-split\";\r\nimport {\r\n DxButtonGroupModule,\r\n DxButtonModule,\r\n DxCheckBoxModule,\r\n DxContextMenuModule,\r\n DxDataGridModule,\r\n DxDateBoxModule,\r\n DxDraggableModule,\r\n DxDropDownBoxModule,\r\n DxDropDownButtonModule,\r\n DxMapModule,\r\n DxPopupModule,\r\n DxSchedulerModule,\r\n DxScrollViewModule,\r\n DxSelectBoxModule,\r\n DxSwitchModule,\r\n DxTemplateModule,\r\n DxTextBoxModule,\r\n DxToolbarModule,\r\n DxTreeViewModule,\r\n DxTooltipModule,\r\n DxValidatorModule,\r\n DxTextAreaModule\r\n} from \"devextreme-angular\";\r\nimport { HttpLoaderFactory, ServicesightSharedModule, SharedPipesModule, PhraseBookModule } from \"servicesight-shared\";\r\nimport { PlannerActivityFormComponent } from \"./planner-activity-form/planner-activity-form.component\";\r\nimport { PlannerAppointmentCardComponent } from \"./planner-appointment-card/planner-appointment-card.component\";\r\nimport { PlannerCalendarComponent } from \"./planner-calendar/planner-calendar.component\";\r\nimport { PlannerEngineerComponent } from \"./planner-engineer/planner-engineer.component\";\r\nimport { PlannerJobCardListComponent } from \"./planner-job-card-list/planner-job-card-list.component\";\r\nimport { PlannerJobPanelComponent } from \"./planner-job-panel/planner-job-panel.component\";\r\nimport { PlannerMapComponent } from \"./planner-map/planner-map.component\";\r\nimport { PlannerRoutingModule } from \"./planner-routing.module\";\r\nimport { PlannerShellComponent } from \"./planner-shell/planner-shell.component\";\r\nimport { PlannerViewBarComponent } from \"./planner-view-bar/planner-view-bar.component\";\r\nimport { PlannerJobWorkRequiredComponent } from \"./planner-job-work-required/planner-job-work-required.component\";\r\nimport { JobCategoryPipe } from \"../shared/pipes/job-category.pipe\";\r\nimport { JobVisitStatusPipe } from \"../shared/pipes/job-visit-status.pipe\";\r\nimport { PipesModule } from \"../shared/pipes/pipes.module\";\r\nimport { SharedComponentsModule } from \"../shared/components/shared-components.module\";\r\n\r\n@NgModule({\r\n declarations: [\r\n PlannerShellComponent,\r\n PlannerCalendarComponent,\r\n PlannerMapComponent,\r\n PlannerViewBarComponent,\r\n PlannerJobPanelComponent,\r\n PlannerEngineerComponent,\r\n PlannerAppointmentCardComponent,\r\n PlannerActivityFormComponent,\r\n PlannerJobCardListComponent,\r\n PlannerJobWorkRequiredComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n RouterModule,\r\n BrowserModule,\r\n DxSchedulerModule,\r\n DxToolbarModule,\r\n DxTemplateModule,\r\n DxDataGridModule,\r\n DxPopupModule,\r\n DxDateBoxModule,\r\n DxValidatorModule,\r\n DxSelectBoxModule,\r\n DxDropDownBoxModule,\r\n DxTreeViewModule,\r\n DxContextMenuModule,\r\n DxScrollViewModule,\r\n DxDraggableModule,\r\n DxSwitchModule,\r\n DxCheckBoxModule,\r\n DxButtonModule,\r\n DxButtonGroupModule,\r\n DxDropDownButtonModule,\r\n DxTextBoxModule,\r\n DxTextAreaModule,\r\n DxTooltipModule,\r\n DxMapModule,\r\n ServicesightSharedModule,\r\n SharedPipesModule,\r\n PipesModule,\r\n PlannerRoutingModule,\r\n PhraseBookModule,\r\n SharedComponentsModule,\r\n AngularSplitModule.forRoot(),\r\n TranslateModule.forRoot({\r\n loader: {\r\n provide: TranslateLoader,\r\n useFactory: HttpLoaderFactory,\r\n deps: [HttpClient]\r\n }\r\n }),\r\n ],\r\n providers: [\r\n JobVisitStatusPipe,\r\n JobCategoryPipe\r\n ]\r\n})\r\nexport class PlannerModule { }\r\n","import { CommonModule } from \"@angular/common\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { NgModule } from \"@angular/core\";\r\nimport { FormsModule } from \"@angular/forms\";\r\nimport { TranslateLoader, TranslateModule } from \"@ngx-translate/core\";\r\nimport {\r\n DxAccordionModule,\r\n DxButtonModule,\r\n DxCheckBoxModule,\r\n DxDataGridModule,\r\n DxDateBoxModule,\r\n DxDropDownBoxModule,\r\n DxDropDownButtonModule,\r\n DxFormModule,\r\n DxListModule,\r\n DxPopupModule,\r\n DxRadioGroupModule,\r\n DxResponsiveBoxModule,\r\n DxSelectBoxModule,\r\n DxTabPanelModule,\r\n DxTabsModule,\r\n DxTextAreaModule,\r\n DxTextBoxModule\r\n} from \"devextreme-angular\";\r\nimport { SharedPipesModule } from \"servicesight-shared\";\r\nimport { PortalContactsTabComponent } from \"./portal-contacts-tab/portal-contacts-tab.component\";\r\nimport { PortalRoutingModule } from \"./portal-routing.module\";\r\nimport { SettingsPortalActivityComponent } from \"./settings-portal-activity/settings-portal-activity.component\";\r\nimport { SharedComponentsModule } from \"../shared/components/shared-components.module\";\r\nimport { HttpLoaderFactory } from \"../shared/factory/http-loader.factory\";\r\n\r\n@NgModule({\r\n declarations: [\r\n PortalContactsTabComponent,\r\n SettingsPortalActivityComponent\r\n ],\r\n exports: [],\r\n imports: [\r\n CommonModule,\r\n DxTabPanelModule,\r\n DxTabsModule,\r\n DxFormModule,\r\n DxAccordionModule,\r\n DxResponsiveBoxModule,\r\n DxSelectBoxModule,\r\n DxDateBoxModule,\r\n DxButtonModule,\r\n DxCheckBoxModule,\r\n DxDropDownBoxModule,\r\n DxListModule,\r\n DxDropDownButtonModule,\r\n DxTextBoxModule,\r\n DxButtonModule,\r\n DxTextAreaModule,\r\n DxDataGridModule,\r\n DxPopupModule,\r\n DxRadioGroupModule,\r\n TranslateModule.forRoot({\r\n loader: {\r\n provide: TranslateLoader,\r\n useFactory: HttpLoaderFactory,\r\n deps: [HttpClient]\r\n }\r\n }),\r\n FormsModule,\r\n PortalRoutingModule,\r\n SharedComponentsModule,\r\n SharedPipesModule\r\n ]\r\n})\r\nexport class PortalModule { }\r\n","import { NgModule } from \"@angular/core\";\r\nimport { CommonModule } from \"@angular/common\";\r\nimport { RouterModule } from \"@angular/router\";\r\nimport { PowerBiRoutingModule } from \"./power-bi-routing.module\";\r\nimport { PowerBiDashboardComponent } from \"./components/power-bi-dashboard/power-bi-dashboard.component\";\r\nimport { PipesModule } from \"../shared/pipes/pipes.module\";\r\nimport { TranslateModule, TranslateLoader } from \"@ngx-translate/core\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { HttpLoaderFactory } from \"../shared/factory/http-loader.factory\";\r\nimport { DxSelectBoxModule } from \"devextreme-angular\";\r\nimport { ServicesightSharedModule } from \"servicesight-shared\";\r\n\r\nconst components = [\r\n PowerBiDashboardComponent\r\n];\r\n\r\nconst modules = [\r\n CommonModule,\r\n RouterModule,\r\n PowerBiRoutingModule,\r\n PipesModule,\r\n DxSelectBoxModule,\r\n ServicesightSharedModule,\r\n TranslateModule.forRoot({\r\n loader: {\r\n provide: TranslateLoader,\r\n useFactory: HttpLoaderFactory,\r\n deps: [HttpClient]\r\n }\r\n }),\r\n];\r\n\r\n@NgModule({\r\n declarations: [...components],\r\n imports: [\r\n ...modules\r\n ]\r\n})\r\n\r\nexport class PowerBiModule { }\r\n","import { Component, Input, OnChanges, OnInit, SimpleChanges } from \"@angular/core\";\r\nimport { DocumentTypeEnum, GenericAttribute } from \"servicesight-shared\";\r\nimport { CustomerAttributesService } from \"src/app/customers/services/customer-attributes.service\";\r\n\r\n@Component({\r\n selector: \"app-reminder-customer\",\r\n templateUrl: \"./reminder-customer.component.html\",\r\n styleUrls: [\"./reminder-customer.component.scss\"]\r\n})\r\nexport class ReminderCustomerComponent implements OnInit, OnChanges {\r\n @Input() customerId: number;\r\n @Input() selected: boolean = false;\r\n public docType: typeof DocumentTypeEnum = DocumentTypeEnum;\r\n public customerAttributes: GenericAttribute[] = [];\r\n\r\n constructor(\r\n private attributeService: CustomerAttributesService)\r\n { }\r\n\r\n public ngOnInit() {\r\n this.attributeService.saveSubscribe.subscribe(() => {\r\n this.attributeService.SaveAttributes(this.customerId, this.customerAttributes).subscribe();\r\n });\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.customerId && changes.customerId.currentValue > 0) {\r\n this.attributeService.GetAttributes(this.customerId).subscribe(attributes => this.customerAttributes = attributes);\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'reminder.attributes' | translate }}

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

{{ 'reminder.history' | translate }}

\r\n \r\n \r\n
\r\n
","import { Component, Input } from \"@angular/core\";\r\nimport { DocumentTypeEnum } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-reminder-files\",\r\n templateUrl: \"./reminder-files.component.html\",\r\n styleUrls: [\"./reminder-files.component.scss\"]\r\n})\r\nexport class ReminderFilesComponent {\r\n public docType = DocumentTypeEnum;\r\n @Input() reminderId: number;\r\n}\r\n","\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { IAppConfig, APP_CONFIG, PageableDatastoreService } from \"servicesight-shared\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class ReminderService extends PageableDatastoreService {\r\n\r\n private static readonly odataKey: string = \"TaskId\";\r\n\r\n constructor(\r\n private odataService: ODataService,\r\n @Inject(APP_CONFIG) private config: IAppConfig\r\n ) {\r\n super(ReminderService.odataKey);\r\n }\r\n\r\n protected GetDataSourceObject(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.config.apiLocations.ServiceSightOData}TaskOD`,\r\n key: ReminderService.odataKey,\r\n keyType: \"String\",\r\n paging: true,\r\n pageSize: 50\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'reminder.reminders' | translate }}

\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n {{ data.value | date:'short' }}\r\n
\r\n\r\n
\r\n {{ data.value | taskStatus | translate }}\r\n
\r\n\r\n
\r\n
\r\n {{ item.value }}\r\n
\r\n
\r\n \r\n
\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { forkJoin } from \"rxjs\";\r\nimport { GridExportService, GridKind, GridService, HelpItemTagEnum } from \"servicesight-shared\";\r\nimport { TaskStatus } from \"src/app/shared/pipes/enums/task-status.enum\";\r\nimport { EmployeeService } from \"src/app/shared/services/employee/employee.service\";\r\nimport { ReminderService } from \"../services/reminder.service\";\r\n\r\n@Component({\r\n selector: \"app-reminder-list\",\r\n templateUrl: \"./reminder-list.component.html\",\r\n styleUrls: [\"./reminder-list.component.scss\",\r\n \"../../../../projects/servicesight-shared/src/lib/styles/global.scss\",\r\n \"../../../../projects/servicesight-shared/src/lib/styles/backgrounds.scss\",\r\n \"../../../../projects/servicesight-shared/src/lib/styles/servicesight-shared.scss\"]\r\n})\r\nexport class ReminderListComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n\r\n public helpItemTagEnum = HelpItemTagEnum;\r\n public tasksDataSource: DataSource;\r\n public searchText: string = \"\";\r\n\r\n private filters: any = { };\r\n private gridState: any = { };\r\n\r\n constructor(\r\n private reminderService: ReminderService,\r\n private gridService: GridService,\r\n private employeeService: EmployeeService,\r\n private translateService: TranslateService,\r\n private gridExportService: GridExportService\r\n ) { }\r\n\r\n public ngOnInit(): void {\r\n forkJoin({\r\n employee: this.employeeService.GetEmployeeBySession(),\r\n gridLayout: this.gridService.GetLayout(GridKind.Reminders)\r\n })\r\n .subscribe(({employee, gridLayout}) => {\r\n if (gridLayout) {\r\n this.dataGrid.instance.state(gridLayout);\r\n }\r\n this.GetDataSources(employee.EmployeeId);\r\n this.SetUpFilters(employee.EmployeeId);\r\n }, () => this.GetDataSources());\r\n }\r\n\r\n private SetUpFilters(employeeId: number): void {\r\n this.filters = {\r\n 0: this.ActiveTasksForEmployee(employeeId),\r\n 2: [this.ActiveTasksForEmployee(employeeId), \"and\", [\"DaysDue\", \"<=\", 0]],\r\n 3: [this.ActiveTasksForEmployee(employeeId), \"and\", [\"DaysDue\", \"=\", 1]]\r\n };\r\n }\r\n\r\n private GetDataSources(employeeId?: number): void {\r\n if (employeeId) {\r\n const dataSource = this.reminderService.GetDataSource(true);\r\n dataSource.filter(this.ActiveTasksForEmployee(employeeId));\r\n this.tasksDataSource = dataSource;\r\n } else {\r\n this.tasksDataSource = this.reminderService.GetDataSource(true);\r\n }\r\n }\r\n\r\n private ActiveTasksForEmployee(employeeId: number): any[] {\r\n return [[\"CreatedForId\", \"=\", employeeId], \"and\", [\"Status\", \"=\", TaskStatus.Active]];\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.searchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public FilterChanged($event): void {\r\n const filterValue = $event.currentTarget.value;\r\n if (filterValue === \"1\") {\r\n this.dataGrid.instance.clearFilter();\r\n } else {\r\n this.dataGrid.instance.filter(this.filters[filterValue]);\r\n }\r\n }\r\n\r\n public SaveLayout(): void {\r\n const state = this.dataGrid.instance.state();\r\n this.gridService.SaveLayout(state, GridKind.Reminders);\r\n }\r\n\r\n public ResetLayout(): void {\r\n this.gridService.ResetLayout(GridKind.Reminders);\r\n this.dataGrid.instance.state(null);\r\n }\r\n\r\n public OpenColumnChooser(): void {\r\n this.dataGrid.instance.showColumnChooser();\r\n }\r\n\r\n public columnVisible(name: string, defaultValue: boolean): boolean {\r\n if (this.gridState && this.gridState.columns) {\r\n const column = this.gridState.columns.find(x => x.name === name);\r\n\r\n if (column) {\r\n return column.visible;\r\n }\r\n }\r\n\r\n return defaultValue;\r\n }\r\n\r\n public onExportItemClick(e: any): void {\r\n const title = this.translateService.instant(\"reminder.reminders\");\r\n switch (e.itemData.id) {\r\n case 1:\r\n this.gridExportService.exportGridAsXlsx(this.dataGrid.instance, title);\r\n break;\r\n case 2:\r\n this.gridExportService.exportGridAsCsv(this.dataGrid.instance, title);\r\n break;\r\n case 3:\r\n this.gridExportService.exportGridAsPdf(this.dataGrid.instance, title, { orientation: \"l\" });\r\n break;\r\n default:\r\n throw new Error(\"Unhandled export type: \" + e.itemData.id);\r\n }\r\n }\r\n\r\n public ViewDetails(event): void {\r\n window.location.href = `/#/tasks/task/${event.data.TaskId}`;\r\n }\r\n\r\n public PrioritySortValue(rowData: any): number {\r\n return rowData.PriorityId;\r\n }\r\n}\r\n","import { NgModule } from \"@angular/core\";\r\nimport { RouterModule, Routes } from \"@angular/router\";\r\nimport { ReminderListComponent } from \"./reminder-list/reminder-list.component\";\r\n\r\nconst routes: Routes = [\r\n { path: \"list\", component: ReminderListComponent},\r\n { path: \"\", redirectTo: \"list\", pathMatch: \"full\"},\r\n { path: \"**\", redirectTo: \"list\"}\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\n\r\nexport class ReminderRoutingModule {\r\n public static readonly Routes: Routes = routes;\r\n}\r\n","import { CommonModule } from \"@angular/common\";\r\nimport { HttpClient, HttpClientModule } from \"@angular/common/http\";\r\nimport { NgModule } from \"@angular/core\";\r\nimport { FormsModule } from \"@angular/forms\";\r\nimport { TranslateLoader, TranslateModule } from \"@ngx-translate/core\";\r\nimport {\r\n DxAccordionModule,\r\n DxButtonModule,\r\n DxDataGridModule,\r\n DxDateBoxModule,\r\n DxDropDownBoxModule,\r\n DxDropDownButtonModule,\r\n DxLoadPanelModule,\r\n DxNumberBoxModule,\r\n DxPopupModule,\r\n DxSelectBoxModule,\r\n DxTabPanelModule,\r\n DxTextAreaModule,\r\n DxTextBoxModule,\r\n DxValidatorModule\r\n} from \"devextreme-angular\";\r\nimport { CanDeactivateGuard, HttpLoaderFactory, ServicesightSharedModule, SharedPipesModule } from \"servicesight-shared\";\r\nimport { ServiceContractsModule } from \"../service-contracts/service-contracts.module\";\r\nimport { AttributeSettingsModule } from \"../settings/attribute-settings/attribute-settings.module\";\r\nimport { SharedComponentsModule } from \"../shared/components/shared-components.module\";\r\nimport { SharedDirectivesModule } from \"../shared/directives/shared-directives.module\";\r\nimport { PipesModule } from \"../shared/pipes/pipes.module\";\r\nimport { ReminderCustomerComponent } from \"./reminder-customer/reminder-customer.component\";\r\nimport { ReminderFilesComponent } from \"./reminder-files/reminder-files.component\";\r\nimport { ReminderListComponent } from \"./reminder-list/reminder-list.component\";\r\nimport { ReminderRoutingModule } from \"./reminders-routing.module\";\r\n\r\nconst components = [\r\n ReminderListComponent,\r\n ReminderFilesComponent,\r\n ReminderCustomerComponent\r\n];\r\n\r\n@NgModule({\r\n declarations: [...components],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n HttpClientModule,\r\n PipesModule,\r\n ServicesightSharedModule,\r\n SharedPipesModule,\r\n SharedComponentsModule,\r\n DxDataGridModule,\r\n DxSelectBoxModule,\r\n DxDateBoxModule,\r\n DxTabPanelModule,\r\n DxTextAreaModule,\r\n DxAccordionModule,\r\n DxPopupModule,\r\n DxDataGridModule,\r\n DxLoadPanelModule,\r\n DxNumberBoxModule,\r\n DxValidatorModule,\r\n TranslateModule.forRoot({\r\n loader: {\r\n provide: TranslateLoader,\r\n useFactory: HttpLoaderFactory,\r\n deps: [HttpClient]\r\n }\r\n }),\r\n ReminderRoutingModule,\r\n DxTextBoxModule,\r\n DxDropDownBoxModule,\r\n DxButtonModule,\r\n DxDropDownButtonModule,\r\n AttributeSettingsModule,\r\n ServiceContractsModule,\r\n SharedDirectivesModule\r\n ],\r\n exports: [],\r\n providers: [\r\n CanDeactivateGuard\r\n ]\r\n})\r\nexport class RemindersModule { }\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { ODataService } from \"../../../shared/services/odata/odata.service\";\r\nimport { AlertModel } from \"../models/alert\";\r\nimport { AlertAvailableRecipientModel } from \"../models/alert-available-recipient\";\r\nimport CustomStore from \"devextreme/data/custom_store\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class AlertService {\r\n private readonly serviceSightODataBaseUrl: string;\r\n private readonly serviceSightBaseUrl: string;\r\n\r\n constructor(\r\n private odataService: ODataService,\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) appConfig: IAppConfig) {\r\n this.serviceSightODataBaseUrl = appConfig.apiLocations.ServiceSightOData;\r\n this.serviceSightBaseUrl = appConfig.apiLocations.ServiceSight;\r\n }\r\n\r\n public ODataAlerts(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.serviceSightODataBaseUrl}AlertOD`,\r\n key: \"AlertId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetMessageRecipientsCollection(): Observable> {\r\n return this.http.get>(`${this.serviceSightBaseUrl}Alert/GetMessageRecipientsCollection`);\r\n }\r\n\r\n public GetEmailRecipientsCollection(): Observable> {\r\n return this.http.get>(`${this.serviceSightBaseUrl}Alert/GetEmailRecipientsCollection`);\r\n }\r\n\r\n public Get(alertId: number): Observable {\r\n return this.http.get(`${this.serviceSightBaseUrl}Alert/GetAlert?alertId=${alertId}`);\r\n }\r\n\r\n public UpdateReady(alertId: number, active: boolean): Observable {\r\n return this.http.put(`${this.serviceSightBaseUrl}alert/updateReady/${alertId}/${active}`, \"\");\r\n }\r\n\r\n public Update(alert: AlertModel): Observable {\r\n return this.http.put(`${this.serviceSightBaseUrl}Alert/UpdateAlert`, alert);\r\n }\r\n\r\n public RunAlerts(alertIds: number[]): Observable {\r\n return this.http.post(`${this.serviceSightBaseUrl}Alert/RunAlerts`, alertIds);\r\n }\r\n\r\n public Delete(alertIds: number[]): Observable {\r\n return this.http.request(\"delete\", `${this.serviceSightBaseUrl}Alert/Delete`, { body: alertIds });\r\n }\r\n\r\n public Copy(alertId: number): Observable {\r\n return this.http.put(`${this.serviceSightBaseUrl}alert/Copy/${alertId}`, \"\");\r\n }\r\n\r\n public GetColumns(alertViewId: number): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.serviceSightODataBaseUrl}AlertViewColumnOD`,\r\n key: \"AlertViewColumnId\",\r\n keyType: \"Int32\",\r\n queryStringParams: {\r\n alertViewId\r\n }\r\n });\r\n }\r\n\r\n public GetViews(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.serviceSightODataBaseUrl}AlertViewOD`,\r\n key: \"AlertViewId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetData(alertViewId: number, filter: string): CustomStore {\r\n return new CustomStore({\r\n loadMode: \"raw\", // omit in the DataGrid, TreeList, PivotGrid, and Scheduler\r\n load: () => {\r\n return this.http.get(`${this.serviceSightBaseUrl}Alert/GetAlertData?alertViewId=${alertViewId}&filter=${filter}`)\r\n .toPromise();\r\n }\r\n });\r\n }\r\n}\r\n\r\n","
\r\n
\r\n

{{ 'alert.list.header' | translate }}

\r\n \r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n -\r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n\r\n\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { ToasterService, ToastType } from \"servicesight-shared\";\r\nimport { AlertService } from \"../services/alert.service\";\r\nimport { FormMesssageService } from \"servicesight-shared\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\n\r\n@Component({\r\n selector: \"app-alert-list\",\r\n templateUrl: \"./alert-list.component.html\",\r\n styleUrls: [\"./alert-list.component.scss\"]\r\n})\r\nexport class AlertListComponent implements OnInit {\r\n public alertDataSource: ODataStore;\r\n public selected: number[] = [];\r\n public SearchText: string = \"\";\r\n public showDeleteWarning: boolean = false;\r\n public isProEnabled: boolean = false;\r\n\r\n public get AllowAddNew(): boolean {\r\n return this.isProEnabled;\r\n }\r\n\r\n private formName = \"alertForm\";\r\n private onlySystemAlertsSelected: boolean = false;\r\n\r\n @ViewChild(\"grid\") dataGrid: DxDataGridComponent;\r\n\r\n constructor(\r\n private alertService: AlertService,\r\n private toasterService: ToasterService,\r\n private formMessageService: FormMesssageService,\r\n private licenseService: LicenseService\r\n ) { }\r\n\r\n public ngOnInit(): void {\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(x => {\r\n this.isProEnabled = x.ProEnabled;\r\n });\r\n\r\n this.alertDataSource = this.alertService.ODataAlerts();\r\n }\r\n\r\n public OnSearchValueChange(): void {\r\n this.dataGrid.instance.filter([\r\n [ \"Name\", \"contains\", this.SearchText ],\r\n ]);\r\n }\r\n\r\n public onGridSelectionChanged() {\r\n this.onlySystemAlertsSelected = this.dataGrid.instance.getSelectedRowsData().every(r => r.IsSystem === true);\r\n }\r\n\r\n public DeleteButtonEnabled(): boolean {\r\n return this.selected.length > 0 && !this.onlySystemAlertsSelected;\r\n }\r\n\r\n public RunAlerts(): void {\r\n this.alertService.RunAlerts(this.selected).subscribe();\r\n }\r\n\r\n public ChangeAlertActivation(alert: any, e: any): void {\r\n this.alertService.UpdateReady(alert.AlertId, e.value)\r\n .subscribe(changeValid => {\r\n if (!changeValid) {\r\n this.toasterService.pop(\"alert.list.not-ready\", ToastType.burnt);\r\n alert.Ready = false;\r\n } else {\r\n this.Load();\r\n this.dataGrid.instance.refresh();\r\n }\r\n });\r\n }\r\n\r\n public OnDelete(): void {\r\n this.showDeleteWarning = true;\r\n }\r\n\r\n public OnConfirmDelete(confirmed: boolean): void {\r\n if (confirmed) {\r\n this.formMessageService.RegisterObservable(\r\n this.alertService.Delete(this.selected), this.formName)\r\n .subscribe((success: boolean) => {\r\n if (success) {\r\n this.dataGrid.instance.refresh();\r\n }\r\n });\r\n }\r\n this.showDeleteWarning = false;\r\n }\r\n\r\n private Load(): void {\r\n this.alertDataSource.load();\r\n }\r\n}\r\n","import { AlertParameter } from \"./alert-parameter\";\r\nimport { AlertRecipientModel } from \"./alert-recipient-model\";\r\n\r\nexport class AlertModel {\r\n AlertId: number;\r\n Name: string;\r\n Description: string;\r\n StartDate: Date;\r\n AlertUnits: number;\r\n AlertIntervalUnits: AlertInterval;\r\n IncludeSaturday: boolean;\r\n IncludeSunday: boolean;\r\n ReNotifyUnits: number;\r\n ReNotifyInterval: AlertInterval;\r\n\r\n EmailRecipientArray: Array;\r\n MessageRecipientArray: Array;\r\n\r\n CustomEmail: string;\r\n AlertHeader: string;\r\n AlertDetail: string;\r\n DisplayDetail: string;\r\n OutputColumns: string;\r\n Format: AlertFormat;\r\n TaskTypeId: number;\r\n ErrorRecipientGroupId: number;\r\n ReminderRecipientGroupId: number;\r\n AlertOutputType: AlertOutputType;\r\n\r\n Ready: boolean;\r\n NextRun: Date;\r\n IsSystem: boolean;\r\n IsDetailEditable: boolean;\r\n\r\n AlertParameter: AlertParameter;\r\n AlertViewId: number;\r\n\r\n AutoAddCustomersToEmail: boolean;\r\n AutoAddEngineerToEmail: boolean;\r\n AutoAddEmployeeToEmail: boolean;\r\n AutoAddEngineerToMessage: boolean;\r\n AutoAddEmployeeToMessage: boolean;\r\n\r\n FilterValue: string;\r\n UserSelectedColumns: string;\r\n}\r\n\r\nexport enum AlertInterval {\r\n Min = 1,\r\n Hr = 2,\r\n Day = 3,\r\n Week = 4,\r\n Month = 5,\r\n Year = 6\r\n}\r\n\r\nexport enum AlertFormat {\r\n Email = 1,\r\n Xls = 2,\r\n Pdf = 3\r\n}\r\n\r\nexport enum AlertOutputType {\r\n List = 1,\r\n Single = 2,\r\n SinglePerCustomer = 3\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { map } from \"rxjs/operators\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { TaskTypeModel } from \"../models/task-type\";\r\nimport { TaskTypeListModel } from \"../models/task-type-list\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class TaskTypeService {\r\n private readonly serviceSightBaseUrl: string;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) appConfig: IAppConfig) {\r\n this.serviceSightBaseUrl = appConfig.apiLocations.ServiceSight;\r\n }\r\n\r\n public GetTaskTypes(): Observable> {\r\n const url = `${this.serviceSightBaseUrl}TaskType/GetTaskTypes`;\r\n return this.http.get(url).pipe(map((res: TaskTypeListModel) => res.ModelCollection));\r\n }\r\n}\r\n","export class AlertRecipientModel {\r\n ItemId: number;\r\n Name: string;\r\n PhotoFace: string;\r\n RecipientItemType: AlertRecipientItemType;\r\n}\r\n\r\nexport enum AlertRecipientItemType {\r\n Employee = 1,\r\n Customer = 2\r\n}\r\n","
\r\n
\r\n \r\n
\r\n
\r\n
\r\n {{ 'alert.recipient.picker.select-from' | translate }}\r\n
\r\n
\r\n \r\n {{ 'alert.recipient.picker.engineers' | translate }}\r\n \r\n {{ 'alert.recipient.picker.employees' | translate }}\r\n \r\n {{ 'alert.recipient.picker.customers' | translate }}\r\n
\r\n
\r\n
\r\n
\r\n {{ 'alert.recipient.picker.include-future' | translate }}\r\n
\r\n
\r\n \r\n {{ 'alert.recipient.picker.engineers' | translate }}\r\n \r\n {{ 'alert.recipient.picker.employees' | translate }}\r\n \r\n {{ 'alert.recipient.picker.customers' | translate }}\r\n
\r\n
\r\n
\r\n \r\n {{ 'alert.recipient.picker.select-all' | translate }}\r\n
\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n","import { Component, EventEmitter, Input, Output, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport { AlertAvailableRecipientModel } from \"../models/alert-available-recipient\";\r\nimport { AlertRecipientSettingsModel } from \"../models/alert-recipient-settings-model\";\r\nimport { AlertRecipientItemType, AlertRecipientModel } from \"../models/alert-recipient-model\";\r\n\r\n@Component({\r\n selector: \"app-alert-recipients-picker\",\r\n templateUrl: \"./alert-recipients-picker.component.html\",\r\n styleUrls: [\"./alert-recipients-picker.component.scss\"]\r\n})\r\nexport class AlertRecipientsPickerComponent {\r\n @ViewChild(\"grid\") private dataGrid: DxDataGridComponent;\r\n @Output() showPopup = new EventEmitter();\r\n @Output() RecipientsChosen = new EventEmitter();\r\n @Input() RecipientCollection: Array;\r\n @Input() ShowCustomerFilter = true;\r\n @Input() IncludeFutureEngineers: boolean = true;\r\n @Input() IncludeFutureEmployees: boolean = true;\r\n @Input() IncludeFutureCustomers: boolean = true;\r\n\r\n public AllSelected: boolean = false;\r\n public EngineerSelected: boolean = true;\r\n public EmployeeSelected: boolean = true;\r\n public CustomerSelected: boolean = true;\r\n public SearchText: string = \"\";\r\n\r\n constructor() { }\r\n\r\n public SelectAll() {\r\n if (this.AllSelected) {\r\n this.EngineerSelected = true;\r\n this.EmployeeSelected = true;\r\n this.CustomerSelected = true;\r\n this.RecipientCollection.map((item) => {\r\n item.Selected = true;\r\n });\r\n } else {\r\n this.RecipientCollection.map((item) => {\r\n item.Selected = false;\r\n });\r\n }\r\n }\r\n\r\n public UpdateAvailable() {\r\n\r\n this.dataGrid.instance.clearFilter();\r\n\r\n const filter = [];\r\n if (this.CustomerSelected) {\r\n filter.push([ \"IsCustomer\", \"=\", true ]);\r\n filter.push( \"or\" );\r\n }\r\n if (this.EngineerSelected) {\r\n filter.push([ \"IsEngineer\", \"=\", true ]);\r\n filter.push( \"or\" );\r\n }\r\n if (this.EmployeeSelected) {\r\n filter.push([ \"IsEmployee\", \"=\", true ]);\r\n filter.push( \"or\" );\r\n }\r\n\r\n if (!this.CustomerSelected && !this.EmployeeSelected && !this.EngineerSelected)\r\n {\r\n filter.push([ \"ItemId\", \"=\", -1 ]);\r\n filter.push( \"or\" );\r\n }\r\n if (filter.length > 0) {\r\n filter.pop();\r\n this.dataGrid.instance.filter(filter);\r\n }\r\n if (this.SearchText) {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n }\r\n\r\n public Cancel() {\r\n this.showPopup.emit(false);\r\n }\r\n\r\n public SaveRecipients() {\r\n const recipients = this.RecipientCollection.filter(a => a.Selected).map(x => ({\r\n ItemId: x.ItemId,\r\n Name: x.Name,\r\n PhotoFace: x.PhotoFace,\r\n RecipientItemType: x.IsCustomer ? AlertRecipientItemType.Customer : AlertRecipientItemType.Employee\r\n }) as AlertRecipientModel);\r\n\r\n const recipientSettings: AlertRecipientSettingsModel =\r\n {\r\n AutoAddCustomers: this.IncludeFutureCustomers,\r\n AutoAddEngineer: this.IncludeFutureEngineers,\r\n AutoAddEmployee: this.IncludeFutureEmployees,\r\n Recipients: recipients\r\n };\r\n this.RecipientsChosen.emit(recipientSettings);\r\n this.showPopup.emit(false);\r\n }\r\n\r\n public SearchTextChanged() {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n}\r\n","
\r\n \r\n \r\n \r\n \r\n \r\n \r\n {{image.Name}}\r\n \r\n \r\n

0\">\r\n +{{NumberOfAdditionalRecipients}}\r\n

\r\n
\r\n\r\n\r\n\r\n \r\n \r\n\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnDestroy,\r\n OnInit,\r\n Output\r\n} from \"@angular/core\";\r\nimport { AlertAvailableRecipientModel } from \"../models/alert-available-recipient\";\r\nimport { AlertRecipientSettingsModel } from \"../models/alert-recipient-settings-model\";\r\nimport { AlertRecipientModel } from \"../models/alert-recipient-model\";\r\n\r\n@Component({\r\n selector: \"app-alert-recipients\",\r\n templateUrl: \"./alert-recipients.component.html\",\r\n styleUrls: [\"./alert-recipients.component.scss\"]\r\n})\r\nexport class AlertRecipientsComponent implements OnInit, OnDestroy, OnChanges {\r\n\r\n constructor() { }\r\n\r\n @Input() ButtonText: string;\r\n @Input() RecipientCollection: Array;\r\n @Input() ShowCustomerFilter = true;\r\n @Input() ImagePrefix: string;\r\n @Input() SelectedRecipientArray: Array;\r\n @Input() IncludeFutureEngineers: boolean;\r\n @Input() IncludeFutureEmployees: boolean;\r\n @Input() IncludeFutureCustomers: boolean;\r\n @Output() RecipientsChosen = new EventEmitter();\r\n\r\n public ShowRecipientsModal: boolean = false;\r\n public RecipientVisible: Array = [];\r\n private NumberOfRecipientsToDisplay: number = 10;\r\n\r\n public get VisibleRecipients(): Array {\r\n if (this.SelectedRecipientArray) {\r\n if (this.SelectedRecipientArray.length > this.NumberOfRecipientsToDisplay) {\r\n return this.SelectedRecipientArray.slice(0, this.NumberOfRecipientsToDisplay);\r\n } else {\r\n return this.SelectedRecipientArray;\r\n }\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n public get NumberOfAdditionalRecipients(): number {\r\n if (this.SelectedRecipientArray && this.SelectedRecipientArray.length > this.NumberOfRecipientsToDisplay) {\r\n return this.SelectedRecipientArray.length - this.NumberOfRecipientsToDisplay;\r\n } else {\r\n return 0;\r\n }\r\n }\r\n\r\n public ngOnInit(): void {\r\n document.getElementById(\"main\").classList.add(\"messages-details\");\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n document.getElementById(\"main\").classList.remove(\"messages-details\");\r\n }\r\n\r\n public ngOnChanges(): void {\r\n if (this.SelectedRecipientArray && this.RecipientCollection) {\r\n for (const selectedRecipient of this.SelectedRecipientArray) {\r\n const isEmployee = (selectedRecipient.RecipientItemType === 1);\r\n const itemToSelect = this.RecipientCollection.find(x => x.ItemId === selectedRecipient.ItemId && x.IsEmployee === isEmployee);\r\n if (itemToSelect != null) {\r\n itemToSelect.Selected = true;\r\n }\r\n }\r\n }\r\n }\r\n\r\n public OpenPicker(): void {\r\n this.ShowRecipientsModal = true;\r\n }\r\n\r\n public DialogClosed(): void {\r\n this.ShowRecipientsModal = false;\r\n }\r\n\r\n public HandlePopup(event: boolean): void {\r\n this.ShowRecipientsModal = event;\r\n }\r\n\r\n public HandleRecipients(event: AlertRecipientSettingsModel): void {\r\n this.SelectedRecipientArray = event.Recipients;\r\n this.RecipientsChosen.emit(event);\r\n }\r\n\r\n public ToggleTooltip(index: number): void {\r\n this.RecipientVisible[index] = !this.RecipientVisible[index];\r\n }\r\n}\r\n","import { Component, EventEmitter, Input, OnChanges, Output, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { AlertService } from \"../services/alert.service\";\r\n\r\n@Component({\r\n selector: \"app-alert-column-picker-modal\",\r\n templateUrl: \"./alert-column-picker-modal.component.html\",\r\n styleUrls: [\"./alert-column-picker-modal.component.scss\"]\r\n})\r\nexport class AlertColumnPickerModalComponent implements OnChanges {\r\n @ViewChild(\"columnsDataGrid\", { static: true }) grid: DxDataGridComponent;\r\n\r\n @Input() alertViewId: number;\r\n @Output() columns: EventEmitter = new EventEmitter();\r\n\r\n public columnDataSource: DataSource;\r\n public selectedColumns: string[] = [];\r\n public SearchText: string = \"\";\r\n public showWindow: boolean = false;\r\n\r\n public constructor(private alertService: AlertService) { }\r\n\r\n public ngOnChanges(): void {\r\n if (this.alertViewId && !this.columnDataSource) {\r\n this.columnDataSource = this.alertService.GetColumns(this.alertViewId);\r\n }\r\n }\r\n\r\n public Show(): void {\r\n this.showWindow = true;\r\n this.selectedColumns = [];\r\n this.SearchText = \"\";\r\n this.grid.instance.clearFilter();\r\n }\r\n\r\n public OnSearchChanged(): void {\r\n if (this.SearchText.length > 0) {\r\n const filter = [\r\n [ \"ColumnName\", \"contains\", this.SearchText ]\r\n ];\r\n this.grid.instance.filter(filter);\r\n } else {\r\n this.grid.instance.clearFilter();\r\n }\r\n }\r\n\r\n public OnSelectionChanged(): void {\r\n this.selectedColumns = this.grid.instance.getSelectedRowsData();\r\n }\r\n\r\n public OnSelectButtonClicked(): void {\r\n this.columns.emit(this.selectedColumns);\r\n this.grid.instance.clearSelection();\r\n this.showWindow = false;\r\n }\r\n\r\n public OnCancelButtonClicked(): void {\r\n this.grid.instance.clearSelection();\r\n this.showWindow = false;\r\n }\r\n}\r\n","\r\n\r\n
\r\n \r\n
\r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n","
\r\n \r\n
+[]
\r\n
\r\n\r\n","import { Component, ElementRef, EventEmitter, Input, OnChanges, Output, ViewChild } from \"@angular/core\";\r\nimport { AlertViewColumnModel } from \"../models/alert-view-column-model\";\r\nimport { AlertColumnPickerModalComponent } from \"../alert-column-picker-modal/alert-column-picker-modal.component\";\r\nimport { ControlContainer, NgForm } from \"@angular/forms\";\r\n\r\n@Component({\r\n selector: \"app-alert-textarea\",\r\n templateUrl: \"./alert-textarea.component.html\",\r\n styleUrls: [\"./alert-textarea.component.scss\"],\r\n viewProviders: [ { provide: ControlContainer, useExisting: NgForm } ]\r\n})\r\nexport class AlertTextAreaComponent implements OnChanges {\r\n @ViewChild(\"columnPickerModal\", { static: true }) columnPickerModal: AlertColumnPickerModalComponent;\r\n @ViewChild(\"textArea\") textArea: ElementRef;\r\n\r\n @Input() name: string;\r\n @Input() value: string;\r\n @Input() id: string;\r\n @Input() rows: number = 1;\r\n @Input() disabled: boolean = false;\r\n @Input() allowColumnSelection: boolean = true;\r\n @Input() alertViewId: number;\r\n @Input() maxLength: number = 524288;\r\n @Output() valueChange: EventEmitter = new EventEmitter();\r\n\r\n public text: string;\r\n\r\n public get buttonId(): string {\r\n return this.id + \"-alert-textarea-button\";\r\n }\r\n\r\n public get enableButton(): boolean {\r\n return !this.disabled && this.allowColumnSelection && this.alertViewId !== null;\r\n }\r\n\r\n public get allowWrapText(): string {\r\n return this.rows === 1 ? \"off\" : \"on\";\r\n }\r\n\r\n constructor() { }\r\n\r\n public ngOnChanges(): void {\r\n this.text = this.value;\r\n }\r\n\r\n public onValueChanged(): void {\r\n if (this.value !== this.text) {\r\n this.value = this.text;\r\n this.valueChange.emit(this.text);\r\n }\r\n }\r\n\r\n public applySelectedColumns(columns: AlertViewColumnModel[]): void {\r\n const combinedText = columns.map(x => \"[\" + x.ColumnName + \"]\").join(\" \");\r\n\r\n const cursorPosition = this.textArea.nativeElement.selectionStart;\r\n this.text = this.text.slice(0,cursorPosition) + combinedText + this.text.slice(cursorPosition);\r\n this.onValueChanged();\r\n this.textArea.nativeElement.focus();\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n
\r\n
\r\n
\r\n \r\n  \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
    \r\n
  • \r\n \r\n
  • \r\n
  • \r\n \r\n
  • \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n  \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n","import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, } from \"@angular/core\";\r\nimport { AlertFormat, AlertInterval, AlertModel, AlertOutputType } from \"../models/alert\";\r\nimport { AlertAvailableRecipientModel } from \"../models/alert-available-recipient\";\r\nimport { AlertService } from \"../services/alert.service\";\r\nimport { TaskTypeService } from \"../../services/task-type.service\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { AlertRecipientSettingsModel } from \"../models/alert-recipient-settings-model\";\r\nimport { ControlContainer, NgForm } from \"@angular/forms\";\r\n\r\n@Component({\r\n selector: \"app-alert-detail\",\r\n templateUrl: \"./alert-detail.component.html\",\r\n styleUrls: [\"./alert-detail.component.scss\"],\r\n viewProviders: [ { provide: ControlContainer, useExisting: NgForm } ]\r\n})\r\nexport class AlertDetailComponent implements OnInit, OnChanges {\r\n @Input() model: AlertModel;\r\n @Output() public changed = new EventEmitter();\r\n\r\n public FormatTypeList: any[] = [];\r\n public AlertIntervals: any[] = [];\r\n public TaskTypes: any[] = [];\r\n public MinStartDate: Date;\r\n public CanChangeFormat: boolean;\r\n public isProEnabled: boolean;\r\n\r\n public EmailRecipientCollection: Array;\r\n public MessageRecipientCollection: Array;\r\n public ReminderRecipientCollection: Array;\r\n public ErrorRecipientCollection: Array;\r\n\r\n public AllRecipients: string;\r\n\r\n public get AllowEdit(): boolean {\r\n return this.model.IsDetailEditable;\r\n }\r\n\r\n public get AllowColumnSelection(): boolean {\r\n return this.isProEnabled && this.model.IsDetailEditable && this.model.AlertOutputType !== AlertOutputType.List;\r\n }\r\n\r\n public get AllowAdvancedEdit(): boolean {\r\n return !this.model.IsSystem;\r\n }\r\n\r\n constructor(\r\n private alertService: AlertService,\r\n private taskTypeService: TaskTypeService,\r\n private licenseService: LicenseService) { }\r\n\r\n public ngOnInit(): void {\r\n this.LoadLookups();\r\n this.LoadEnumValues();\r\n\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(x => {\r\n this.isProEnabled = x.ProEnabled;\r\n });\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.model) {\r\n this.CanChangeFormat = this.model.AlertOutputType === AlertOutputType.List;\r\n this.UpdateRecipients(false);\r\n this.UpdateMinStartDate();\r\n }\r\n }\r\n\r\n public HandleEmailRecipients(event: AlertRecipientSettingsModel): void {\r\n this.model.AutoAddCustomersToEmail = event.AutoAddCustomers;\r\n this.model.AutoAddEmployeeToEmail = event.AutoAddEmployee;\r\n this.model.AutoAddEngineerToEmail = event.AutoAddEngineer;\r\n this.model.EmailRecipientArray = event.Recipients;\r\n this.UpdateRecipients(true);\r\n }\r\n\r\n public HandleMessageRecipients(event: AlertRecipientSettingsModel): void {\r\n this.model.AutoAddEmployeeToMessage = event.AutoAddEmployee;\r\n this.model.AutoAddEngineerToMessage = event.AutoAddEngineer;\r\n this.model.MessageRecipientArray = event.Recipients;\r\n this.UpdateRecipients(true);\r\n }\r\n\r\n public HandleReminderSelected(): void {\r\n this.UpdateRecipients(true);\r\n }\r\n\r\n public EmitChanged(): void {\r\n this.changed.emit();\r\n }\r\n\r\n private LoadLookups(): void {\r\n this.alertService.GetEmailRecipientsCollection().subscribe(x => {\r\n this.EmailRecipientCollection = x;\r\n });\r\n this.alertService.GetMessageRecipientsCollection().subscribe(x => {\r\n this.MessageRecipientCollection = x;\r\n });\r\n this.alertService.GetMessageRecipientsCollection().subscribe(x => {\r\n this.ReminderRecipientCollection = x;\r\n this.ErrorRecipientCollection = x;\r\n });\r\n this.taskTypeService.GetTaskTypes().subscribe(x => {\r\n this.TaskTypes = x;\r\n });\r\n }\r\n\r\n private LoadEnumValues(): void {\r\n this.AlertIntervals.push({ Id: AlertInterval.Min, Text: AlertInterval[AlertInterval.Min] });\r\n this.AlertIntervals.push({ Id: AlertInterval.Hr, Text: AlertInterval[AlertInterval.Hr] });\r\n this.AlertIntervals.push({ Id: AlertInterval.Day, Text: AlertInterval[AlertInterval.Day] });\r\n this.AlertIntervals.push({ Id: AlertInterval.Week, Text: AlertInterval[AlertInterval.Week] });\r\n this.AlertIntervals.push({ Id: AlertInterval.Month, Text: AlertInterval[AlertInterval.Month] });\r\n this.AlertIntervals.push({ Id: AlertInterval.Year, Text: AlertInterval[AlertInterval.Year] });\r\n\r\n this.FormatTypeList.push({ Id: AlertFormat.Email, Text: AlertFormat[AlertFormat.Email] });\r\n this.FormatTypeList.push({ Id: AlertFormat.Xls, Text: AlertFormat[AlertFormat.Xls] });\r\n this.FormatTypeList.push({ Id: AlertFormat.Pdf, Text: AlertFormat[AlertFormat.Pdf] });\r\n }\r\n\r\n private UpdateRecipients(raiseChanged: boolean): void {\r\n const allRecipients = [];\r\n if (this.model.EmailRecipientArray) {\r\n this.model.EmailRecipientArray.map((item) => {\r\n allRecipients.push(item.ItemId);\r\n });\r\n }\r\n if (this.model.MessageRecipientArray) {\r\n this.model.MessageRecipientArray.map((item) => {\r\n allRecipients.push(item.ItemId);\r\n });\r\n }\r\n if (this.model.ReminderRecipientGroupId) {\r\n allRecipients.push(this.model.ReminderRecipientGroupId);\r\n }\r\n this.AllRecipients = allRecipients.join(\"; \");\r\n if (raiseChanged) {\r\n this.EmitChanged();\r\n }\r\n }\r\n\r\n private UpdateMinStartDate() {\r\n let minStartDate = new Date();\r\n\r\n if (this.model.StartDate) {\r\n minStartDate = new Date(this.model.StartDate);\r\n if (minStartDate > new Date()) {\r\n minStartDate = new Date(); //if the start date is in the future then the min date is now\r\n }\r\n this.MinStartDate = minStartDate;\r\n } else {\r\n //If no date, make the min start date the last second of the minute before now\r\n this.MinStartDate = new Date(minStartDate.getTime() - ((minStartDate.getSeconds() + 1) * 1000));\r\n }\r\n }\r\n\r\n public DetailsValueChanged(eventData): void {\r\n this.model.DisplayDetail = eventData;\r\n this.EmitChanged();\r\n }\r\n\r\n public HeaderValueChanged(eventData): void {\r\n this.model.AlertHeader = eventData;\r\n this.EmitChanged();\r\n }\r\n}\r\n","
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
{{item.key}}
\r\n
\r\n
\r\n
{{ data.Name }}
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
{{ data.caption }}
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n {{ data.value | currency: baseCurrencySymbol }}\r\n
\r\n
\r\n {{ data.value | customDate: 'shortDate' }}\r\n
\r\n
\r\n {{ GetTime(data.value) }}\r\n
\r\n
\r\n {{ GetBooleanDisplayValue(data.value) }}\r\n
\r\n
\r\n {{ CreateTimeFromMinutes(data.value) }}\r\n
\r\n
\r\n {{ data.value }}\r\n
\r\n \r\n
\r\n","import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from \"@angular/core\";\r\nimport { ControlContainer, NgForm } from \"@angular/forms\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport ArrayStore from \"devextreme/data/array_store\";\r\nimport CustomStore from \"devextreme/data/custom_store\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { AlertModel } from \"../models/alert\";\r\nimport { AlertService } from \"../services/alert.service\";\r\n\r\n@Component({\r\n selector: \"app-alert-data-editor\",\r\n templateUrl: \"./alert-data-editor.component.html\",\r\n styleUrls: [\"./alert-data-editor.component.scss\"],\r\n viewProviders: [ { provide: ControlContainer, useExisting: NgForm } ]\r\n})\r\nexport class AlertDataEditorComponent implements OnInit, OnChanges {\r\n\r\n @Input() model: AlertModel;\r\n @Output() public changed = new EventEmitter();\r\n\r\n public groupedViewsDataSource: DataSource;\r\n public resultsCustomStore: CustomStore;\r\n public selectedViewIds: number[] = [];\r\n public selectedColumnIds: number[];\r\n public columns: any;\r\n public filterFields: any;\r\n public filter: Array = [];\r\n public groupOperations: string[] = [\"and\", \"or\"];\r\n public baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n\r\n constructor(\r\n private alertService: AlertService,\r\n private translateService: TranslateService\r\n ) {}\r\n\r\n public ngOnInit(): void {\r\n const viewDataSource = this.alertService.GetViews();\r\n viewDataSource.filter([\"IsUserSelectable\", \"=\", true]);\r\n viewDataSource.load().then((data) => {\r\n this.groupedViewsDataSource = new DataSource({\r\n store: new ArrayStore({\r\n key: \"AlertViewId\",\r\n data,\r\n }),\r\n group: \"AlertSystemName\",\r\n sort: \"Name\"\r\n });\r\n });\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.model) {\r\n this.selectedViewIds = [ this.model.AlertViewId ];\r\n this.PopulateColumnsFilterAndData(false, this.model.FilterValue, this.model.UserSelectedColumns);\r\n }\r\n }\r\n\r\n public viewListSelectionChanged(e: any): void {\r\n if (this.model.AlertViewId && e.removedItems.length === 0) {\r\n //No removed items means this is the initial load\r\n return;\r\n }\r\n\r\n this.model.AlertViewId = e.addedItems.length > 0 ? e.addedItems[0].AlertViewId : null;\r\n this.PopulateColumnsFilterAndData(true, null, null);\r\n this.EmitChanged();\r\n }\r\n\r\n public columnListSelectionChanged(): void {\r\n if (JSON.stringify(this.selectedColumnIds) !== this.model.UserSelectedColumns) {\r\n //Have to check for a difference because on intial load changed fires\r\n this.model.UserSelectedColumns = JSON.stringify(this.selectedColumnIds);\r\n this.EmitChanged();\r\n }\r\n }\r\n\r\n public IsColumnVisible(alertViewColumnId: number,): boolean {\r\n if (this.selectedColumnIds) {\r\n const column = this.selectedColumnIds.find(x => x === alertViewColumnId);\r\n\r\n if (column) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n public filterChanged(e: any): void {\r\n const hasFilterChanged = this.AreArraysDifferent(e.value, e.previousValue);\r\n if (hasFilterChanged) {\r\n this.model.FilterValue = this.filter ? JSON.stringify(this.filter) : \"[]\";\r\n this.EmitChanged();\r\n this.LoadData();\r\n }\r\n }\r\n\r\n public GetCellTemplate(alertDataType: string): string {\r\n if (alertDataType === \"Currency\") {\r\n return \"currencyTemplate\";\r\n } else if (alertDataType === \"Date\") {\r\n return \"dateTemplate\";\r\n } else if (alertDataType === \"Time\") {\r\n return \"timeTemplate\";\r\n } else if (alertDataType === \"Boolean\") {\r\n return \"booleanTemplate\";\r\n } else if (alertDataType === \"TimeDifferenceInMinutes\") {\r\n return \"timeInMinutesTemplate\";\r\n }\r\n return null;\r\n }\r\n\r\n public GetColumnMinWidth(alertDataType: string): number {\r\n if (alertDataType === \"String\") {\r\n return 150;\r\n } else if (alertDataType === \"Int\" || alertDataType === \"Decimal\" || alertDataType === \"Currency\") {\r\n return 100;\r\n } else if (alertDataType === \"Date\") {\r\n return 100;\r\n } else if (alertDataType === \"DateTime\") {\r\n return 150;\r\n } else if (alertDataType === \"Boolean\" || alertDataType === \"Time\" || alertDataType === \"TimeDifferenceInMinutes\") {\r\n return 60;\r\n }\r\n return 100;\r\n }\r\n\r\n public GetBooleanDisplayValue(booleanValue: boolean): string {\r\n if (booleanValue === undefined) {\r\n return \"\";\r\n } else {\r\n return booleanValue ? this.translateService.instant(\"generic.yes\") : this.translateService.instant(\"generic.no\");\r\n }\r\n }\r\n\r\n public CreateTimeFromMinutes(numberOfMinutes: number): string {\r\n if (!numberOfMinutes) {\r\n return null;\r\n }\r\n\r\n const hour = Math.floor(numberOfMinutes / 60);\r\n const minutes = numberOfMinutes - (hour * 60);\r\n return hour.toString().padStart(2, \"0\") + \":\" + minutes.toString().padStart(2, \"0\");\r\n }\r\n\r\n public GetTime(date: string): string {\r\n if (date) {\r\n const hours = new Date(date).getHours().toString();\r\n const minutes = new Date(date).getMinutes().toString();\r\n return hours.padStart(2, \"0\") + \":\" + minutes.padStart(2, \"0\");\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n private PopulateColumnsFilterAndData(changingView: boolean, filterValue: string, columnIds: string): void {\r\n let loadData = true;\r\n if (!changingView) {\r\n //initial load\r\n const filterArray = this.ParseArray(filterValue);\r\n if (filterArray.length !== 0) {\r\n loadData = false; // if filter value has some data then filterchange will trigger and load the data\r\n }\r\n } else {\r\n //if the filter was already blank, then a change wont trigger so we force loaddata\r\n loadData = (this.filter.length === 0);\r\n }\r\n\r\n this.resultsCustomStore = null;\r\n this.filter = [];\r\n this.columns = [];\r\n\r\n this.selectedColumnIds = this.ParseArray(columnIds);\r\n if (this.model.AlertViewId !== null) {\r\n const columnsDataSource = this.alertService.GetColumns(this.model.AlertViewId);\r\n columnsDataSource.load().then((data) => {\r\n this.columns = data.map(item => ({\r\n alertViewColumnId: item.AlertViewColumnId,\r\n caption: item.Caption,\r\n dataField: item.ColumnName,\r\n dataType: this.GetDataType(item.DataType),\r\n AlertDataType : item.DataType\r\n }));\r\n\r\n this.filterFields = this.columns.filter(x => this.CanFilterDataType(x.AlertDataType)).map(item => ({\r\n caption: item.caption,\r\n dataField: item.dataField,\r\n dataType: item.dataType,\r\n falseText: this.translateService.instant(\"generic.no\"),\r\n trueText: this.translateService.instant(\"generic.yes\")\r\n }));\r\n\r\n if (changingView) {\r\n this.selectedColumnIds = this.columns.map((column) => column.alertViewColumnId);\r\n }\r\n\r\n this.filter = this.ParseArray(filterValue);\r\n\r\n if (loadData) {\r\n this.LoadData();\r\n }\r\n });\r\n }\r\n }\r\n\r\n private CanFilterDataType(alertDataType: string): boolean {\r\n return alertDataType !== \"Time\" && alertDataType !== \"TimeDifferenceInMinutes\"; //Time cant be filtered, there may be others later\r\n //https://supportcenter.devexpress.com/ticket/details/t548517/dxdatebox-how-to-filter-a-time-column\r\n }\r\n\r\n private GetDataType(itemDataType: string): string\r\n {\r\n if (itemDataType === \"Int\" || itemDataType === \"Currency\" || itemDataType === \"Decimal\" || itemDataType === \"CalculatedTime\") {\r\n return \"number\";\r\n } else if (itemDataType === \"Date\") {\r\n return \"date\";\r\n } else if (itemDataType === \"Boolean\") {\r\n return \"boolean\";\r\n } else if (itemDataType === \"Time\") {\r\n return \"time\";\r\n } else if (itemDataType === \"DateTime\") {\r\n return \"datetime\";\r\n }\r\n return \"string\";\r\n }\r\n\r\n private ParseArray(value: string): any {\r\n return value ? JSON.parse(value) : [];\r\n }\r\n\r\n private EmitChanged(): void {\r\n this.changed.emit();\r\n }\r\n\r\n private AreArraysDifferent(firstArray: any, secondArray: any): boolean {\r\n if (firstArray && !secondArray) {\r\n return true;\r\n }\r\n if (!firstArray && secondArray) {\r\n return true;\r\n }\r\n if (!firstArray && !secondArray) {\r\n return false;\r\n }\r\n return JSON.stringify(firstArray) !== JSON.stringify(secondArray);\r\n }\r\n\r\n private LoadData(): void {\r\n if (this.model.AlertViewId) {\r\n this.resultsCustomStore = this.alertService.GetData(this.model.AlertViewId, JSON.stringify(this.filter));\r\n } else {\r\n this.resultsCustomStore = null;\r\n }\r\n }\r\n}\r\n","import { Component, OnInit } from \"@angular/core\";\r\n\r\n@Component({\r\n selector: \"app-alert-settings\",\r\n template: `\r\n \r\n
\r\n `\r\n})\r\nexport class AlertSettingsComponent implements OnInit {\r\n\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n

\r\n {{ 'alert.edit.header' | translate }} {{ model.Name }}\r\n

\r\n
\r\n

\r\n {{ 'alert.edit.header' | translate }}  \r\n

\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n\r\n\r\n","import { Location } from \"@angular/common\";\r\nimport { AfterViewInit, Component, Input, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { finalize } from \"rxjs/operators\";\r\nimport { FormMesssageService } from \"servicesight-shared\";\r\nimport { DateOnlyService } from \"servicesight-shared\";\r\nimport { ConfirmationMessageComponent } from \"../../../shared/components/confirmation-message/confirmation-message.component\";\r\nimport { AlertFormat, AlertModel, AlertOutputType } from \"../models/alert\";\r\nimport { AlertService } from \"../services/alert.service\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\n\r\n@Component({\r\n selector: \"app-alert\",\r\n templateUrl: \"./alert.component.html\",\r\n styleUrls: [\"./alert.component.scss\"]\r\n})\r\nexport class AlertComponent implements OnInit, AfterViewInit {\r\n @Input() id: number = null;\r\n\r\n @ViewChild(\"alertForm\", { static: true }) alertForm: NgForm;\r\n @ViewChild(\"ScheduleAlertMessage\", { static: true }) scheduleAlertMessage: ConfirmationMessageComponent;\r\n\r\n public isProEnabled: boolean;\r\n\r\n public model: AlertModel = new AlertModel();\r\n\r\n public isLoading: boolean = false;\r\n public showDiscardWarning: boolean = false;\r\n private isAlertViewUserSelectable: boolean = false;\r\n private viewDataStore: DataSource;\r\n\r\n public get AllowEditNameAndDescription(): boolean {\r\n return !this.model.IsSystem;\r\n }\r\n\r\n public get EnableDataEditor(): boolean {\r\n return this.isProEnabled && this.isAlertViewUserSelectable;\r\n }\r\n\r\n public get deferTabRendering(): boolean {\r\n //if its a new alert, we want the tabs to load all controls so that validation fires\r\n return this.id !== null;\r\n }\r\n\r\n constructor(\r\n private alertService: AlertService,\r\n private formMessageService: FormMesssageService,\r\n private dateOnlyService: DateOnlyService,\r\n private location: Location,\r\n private licenseService: LicenseService) { }\r\n\r\n public ngOnInit(): void {\r\n this.Load();\r\n\r\n this.viewDataStore = this.alertService.GetViews();\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(x => {\r\n this.isProEnabled = x.ProEnabled;\r\n });\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n // clear form will error unless the component has already been registered so needs to be done here\r\n this.formMessageService.ClearForm(\"alertForm\");\r\n }\r\n\r\n public OnCopy(): void {\r\n if (!this.alertForm.form.pristine) {\r\n this.isLoading = true;\r\n\r\n this.formMessageService.RegisterObservable(this.alertService.Update(this.model), \"alertForm\")\r\n .pipe(finalize(() => {\r\n // only called if an error is returned - not if success or error (which is the point of finalize)\r\n this.isLoading = false;\r\n }))\r\n .subscribe(() => {\r\n this.isLoading = false;\r\n this.PerformCopyAndGoToNewAlert();\r\n });\r\n } else {\r\n this.PerformCopyAndGoToNewAlert();\r\n }\r\n }\r\n\r\n private PerformCopyAndGoToNewAlert(): void {\r\n this.alertService.Copy(this.id).subscribe(newId => {\r\n this.location.go(`/proteansystem/systems/alert-settings/alert/${newId}`);\r\n });\r\n }\r\n\r\n public OnSaveAlert(): void {\r\n if (this.alertForm.valid) {\r\n this.isLoading = true;\r\n this.formMessageService.RegisterObservable(this.alertService.Update(this.model), \"alertForm\")\r\n .pipe(finalize(() => {\r\n // only called if an error is returned - not if success or error (which is the point of finalize)\r\n this.isLoading = false;\r\n }))\r\n .subscribe(() => {\r\n this.isLoading = false;\r\n this.model.StartDate = this.dateOnlyService.RecalculateDateOnLoad(this.model.StartDate);\r\n if (!this.model.Ready) {\r\n this.scheduleAlertMessage.show();\r\n } else {\r\n this.NavigateToList();\r\n }\r\n });\r\n }\r\n }\r\n\r\n public OnConfirmDiscard(confirmed: boolean): void {\r\n if (confirmed) {\r\n this.Load();\r\n }\r\n this.showDiscardWarning = false;\r\n }\r\n\r\n public OnDiscard(): void {\r\n this.showDiscardWarning = true;\r\n }\r\n\r\n public SetFormDirty(): void {\r\n if (!this.isLoading) {\r\n this.alertForm.form.markAsDirty();\r\n }\r\n }\r\n\r\n public ScheduleAlert(): void {\r\n this.alertService.UpdateReady(this.model.AlertId, true)\r\n .subscribe(changeValid => {\r\n if (changeValid) {\r\n this.NavigateToList();\r\n }\r\n });\r\n }\r\n\r\n public NavigateToList(): void {\r\n this.location.go(\"/proteansystem/systems/alert-settings/alert-list\");\r\n }\r\n\r\n private Load(): void {\r\n this.alertForm.form.reset();\r\n\r\n this.isLoading = true;\r\n\r\n if (this.id) {\r\n this.alertService.Get(this.id)\r\n .subscribe(data => {\r\n this.model = data;\r\n this.SetIsAlertViewUserSelectable();\r\n this.isLoading = false;\r\n });\r\n } else {\r\n this.model = this.CreateNewAlert();\r\n this.isAlertViewUserSelectable = true;\r\n this.isLoading = false;\r\n }\r\n }\r\n\r\n private SetIsAlertViewUserSelectable(): void {\r\n if (this.model.AlertViewId) {\r\n this.viewDataStore.store().byKey(this.model.AlertViewId).then((alertView: any) => {\r\n this.isAlertViewUserSelectable = alertView.IsUserSelectable;\r\n });\r\n } else {\r\n this.isAlertViewUserSelectable = true;\r\n }\r\n }\r\n\r\n public DetailsValueChanged(eventData): void {\r\n this.model.DisplayDetail = eventData;\r\n this.SetFormDirty();\r\n }\r\n\r\n public HeaderValueChanged(eventData): void {\r\n this.model.AlertHeader = eventData;\r\n this.SetFormDirty();\r\n }\r\n\r\n private CreateNewAlert(): AlertModel {\r\n return {\r\n AlertId: 0,\r\n Name: \"\",\r\n Description: \"\",\r\n StartDate: null,\r\n AlertUnits: 1,\r\n AlertIntervalUnits: 3, //Day\r\n IncludeSaturday: false,\r\n IncludeSunday: false,\r\n ReNotifyInterval: null,\r\n ReNotifyUnits: null,\r\n TaskTypeId: null,\r\n ErrorRecipientGroupId: null,\r\n ReminderRecipientGroupId: null,\r\n Ready: false,\r\n NextRun: null,\r\n CustomEmail: null,\r\n AlertHeader: \"\",\r\n AlertDetail: \"\",\r\n DisplayDetail: \"\",\r\n OutputColumns: null,\r\n Format: AlertFormat.Email,\r\n AlertOutputType: AlertOutputType.List,\r\n IsSystem: false,\r\n EmailRecipientArray: [],\r\n MessageRecipientArray: [],\r\n AutoAddCustomersToEmail: false,\r\n AutoAddEngineerToEmail: false,\r\n AutoAddEmployeeToEmail: false,\r\n AutoAddEngineerToMessage: false,\r\n AutoAddEmployeeToMessage: false,\r\n AlertViewId: null,\r\n AlertParameter: null,\r\n IsDetailEditable: true,\r\n FilterValue: \"[]\",\r\n UserSelectedColumns: \"[]\"\r\n };\r\n }\r\n}\r\n","import { CommonModule } from \"@angular/common\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { NgModule } from \"@angular/core\";\r\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\r\nimport { RouterModule } from \"@angular/router\";\r\nimport { TranslateLoader, TranslateModule } from \"@ngx-translate/core\";\r\nimport {\r\n DxAccordionModule,\r\n DxCheckBoxModule,\r\n DxDataGridModule,\r\n DxDateBoxModule,\r\n DxFilterBuilderModule,\r\n DxListModule,\r\n DxNumberBoxModule,\r\n DxPopupModule,\r\n DxSelectBoxModule,\r\n DxSwitchModule,\r\n DxTabPanelModule,\r\n DxTextBoxModule,\r\n DxTextAreaModule,\r\n DxTooltipModule,\r\n DxValidationSummaryModule,\r\n DxValidatorModule\r\n} from \"devextreme-angular\";\r\nimport { BypassSecurityTrustResourceUrlPipe, HttpLoaderFactory, ServicesightSharedModule, SharedPipesModule } from \"servicesight-shared\";\r\nimport { PipesModule } from \"src/app/shared/pipes/pipes.module\";\r\nimport { AlertListComponent } from \"./alert-list/alert-list.component\";\r\nimport { AlertDetailComponent } from \"./alert-detail/alert-detail.component\";\r\nimport { AlertDataEditorComponent } from \"./alert-data-editor/alert-data-editor.component\";\r\nimport { AlertRecipientsPickerComponent } from \"./alert-recipients-picker/alert-recipients-picker.component\";\r\nimport { AlertRecipientsComponent } from \"./alert-recipients/alert-recipients.component\";\r\nimport { AlertSettingsComponent } from \"./alert-settings.component\";\r\nimport { AlertComponent } from \"./alert/alert.component\";\r\nimport { AlertColumnPickerModalComponent } from \"./alert-column-picker-modal/alert-column-picker-modal.component\";\r\nimport { AlertTextAreaComponent } from \"./alert-textarea/alert-textarea.component\";\r\nimport { SharedComponentsModule } from \"../../shared/components/shared-components.module\";\r\nimport { SharedDirectivesModule } from \"../../shared/directives/shared-directives.module\";\r\n\r\n\r\nconst components = [\r\n AlertSettingsComponent,\r\n AlertListComponent,\r\n AlertComponent,\r\n AlertDetailComponent,\r\n AlertDataEditorComponent,\r\n AlertRecipientsComponent,\r\n AlertRecipientsPickerComponent,\r\n AlertColumnPickerModalComponent,\r\n AlertTextAreaComponent\r\n];\r\n\r\n@NgModule({\r\n declarations: [\r\n ...components\r\n ],\r\n imports: [\r\n CommonModule,\r\n RouterModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n PipesModule,\r\n DxAccordionModule,\r\n DxCheckBoxModule,\r\n DxDataGridModule,\r\n DxDateBoxModule,\r\n DxFilterBuilderModule,\r\n DxListModule,\r\n DxNumberBoxModule,\r\n DxPopupModule,\r\n DxSelectBoxModule,\r\n DxSwitchModule,\r\n DxTabPanelModule,\r\n DxTextAreaModule,\r\n DxTextBoxModule,\r\n DxTooltipModule,\r\n DxValidationSummaryModule,\r\n DxValidatorModule,\r\n SharedComponentsModule,\r\n PipesModule,\r\n TranslateModule.forRoot({\r\n loader: {\r\n provide: TranslateLoader,\r\n useFactory: HttpLoaderFactory,\r\n deps: [HttpClient]\r\n }\r\n }),\r\n ServicesightSharedModule,\r\n SharedDirectivesModule,\r\n SharedPipesModule\r\n ],\r\n providers: [\r\n BypassSecurityTrustResourceUrlPipe\r\n ]\r\n})\r\nexport class AlertSettingsModule { }\r\n","
\r\n
\r\n

{{ 'engineerSkillList.header' | translate }}\r\n
{{ 'engineerSkillList.subheader' | translate }}
\r\n

\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n 0\">\r\n {{ data.data.Name }}\r\n \r\n {{ data.data.Name }}\r\n
\r\n
\r\n ","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { EngineerSkillService } from \"../../services/engineer-skill.service\";\r\n\r\n@Component({\r\n selector: \"app-engineer-skill-list\",\r\n templateUrl: \"./engineer-skill-list.component.html\",\r\n styleUrls: [\"./engineer-skill-list.component.scss\"]\r\n})\r\nexport class EngineerSkillListComponent implements OnInit {\r\n public engineerSkillDataSource: ODataStore;\r\n\r\n @ViewChild(\"grid\", { static: true }) dataGrid: DxDataGridComponent;\r\n\r\n constructor(\r\n private engineerSkillService: EngineerSkillService) { }\r\n\r\n SearchText: string = \"\";\r\n\r\n OnSearchValueChange(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n ngOnInit(): void {\r\n this.engineerSkillDataSource = this.engineerSkillService.ODataEngineerSkills();\r\n this.engineerSkillDataSource.load();\r\n }\r\n}\r\n","import { Component, OnInit } from \"@angular/core\";\r\n\r\n@Component({\r\n selector: \"app-engineer-skill-settings\",\r\n template: `\r\n \r\n
\r\n `\r\n})\r\nexport class EngineerSkillSettingsComponent implements OnInit {\r\n\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n}\r\n","import { EngineerSkillTypeEnum } from \"./engineer-skill-type.enum\";\r\n\r\nexport class EngineerSkillModel {\r\n SkillID: number;\r\n Name: string;\r\n Description: string;\r\n SkillType: EngineerSkillTypeEnum;\r\n}\r\n","export enum EngineerSkillTypeEnum {\r\n Site = 1,\r\n Equipment = 2,\r\n Personal = 3\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n {{ 'engineerSkill.new.header' | translate }}\r\n \r\n {{ 'engineerSkill.edit.header' | translate }} {{ model.Name }}\r\n \r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n ","import { Location } from \"@angular/common\";\r\nimport { AfterViewInit, Component, Input, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { finalize } from \"rxjs/operators\";\r\nimport { FormMesssageService } from \"servicesight-shared\";\r\nimport { EngineerSkillModel } from \"../../models/engineer-skill\";\r\nimport { EngineerSkillTypeEnum } from \"../../models/engineer-skill-type.enum\";\r\nimport { EngineerSkillService } from \"../../services/engineer-skill.service\";\r\n\r\n@Component({\r\n selector: \"app-engineer-skill\",\r\n templateUrl: \"./engineer-skill.component.html\",\r\n styleUrls: [\"./engineer-skill.component.scss\"]\r\n})\r\nexport class EngineerSkillComponent implements OnInit, AfterViewInit {\r\n @Input() id: number = null;\r\n @Input() readonly: boolean = false;\r\n\r\n @ViewChild(\"engineerSkill\", { static: true }) form: NgForm;\r\n\r\n public EngineerSkillTypeEnum = EngineerSkillTypeEnum;\r\n\r\n model: EngineerSkillModel = new EngineerSkillModel();\r\n\r\n isLoading: boolean = false;\r\n\r\n showDeleteWarning: boolean = false;\r\n showDiscardWarning: boolean = false;\r\n\r\n get isNewRecord(): boolean {\r\n return this.id == null;\r\n }\r\n\r\n get isReadOnly(): boolean {\r\n return Boolean(this.readonly);\r\n }\r\n\r\n constructor(\r\n private engineerSkillService: EngineerSkillService,\r\n private formMessageService: FormMesssageService,\r\n private location: Location) { }\r\n\r\n ngOnInit(): void {\r\n this.Load();\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n // clear form will error unless the component has already been registered so needs to be done here\r\n this.formMessageService.ClearForm(\"engineerSkill\");\r\n }\r\n\r\n OnSaveEngineerSkill(): void {\r\n this.isLoading = true;\r\n\r\n if (this.isNewRecord) {\r\n this.formMessageService.RegisterObservable(this.engineerSkillService.Create(this.model), \"engineerSkill\")\r\n .pipe(finalize(() => {\r\n this.isLoading = false;\r\n }))\r\n .subscribe(newId => {\r\n this.model.SkillID = newId;\r\n this.id = newId;\r\n this.isLoading = false;\r\n });\r\n } else {\r\n this.formMessageService.RegisterObservable(this.engineerSkillService.Update(this.model), \"engineerSkill\")\r\n .pipe(finalize(() => {\r\n // only called if an error is returned - not if success or error (which is the point of finalize)\r\n this.isLoading = false;\r\n }))\r\n .subscribe(() => {\r\n this.isLoading = false;\r\n });\r\n }\r\n }\r\n\r\n OnDeleteEngineerSkill(): void {\r\n this.showDeleteWarning = true;\r\n }\r\n\r\n OnConfirmDeletion(confirmed: boolean): void {\r\n if (confirmed) {\r\n this.isLoading = true;\r\n\r\n this.formMessageService.RegisterObservable(this.engineerSkillService.Delete(this.id), \"engineerSkill\")\r\n .pipe(finalize(() => {\r\n this.showDeleteWarning = false;\r\n this.isLoading = false;\r\n }))\r\n .subscribe(() => {\r\n this.location.go(\"/proteansystem/systems/engineer-skill-settings/engineer-skill-list\");\r\n });\r\n }\r\n this.showDeleteWarning = false;\r\n }\r\n\r\n OnConfirmDiscard(confirmed: boolean): void {\r\n if (confirmed) {\r\n this.Load();\r\n }\r\n this.showDiscardWarning = false;\r\n }\r\n\r\n OnDiscard(): void {\r\n this.showDiscardWarning = true;\r\n }\r\n\r\n private Load(): void {\r\n this.form.form.reset();\r\n\r\n if (this.isNewRecord) {\r\n this.model = new EngineerSkillModel();\r\n this.model.Name = \"\";\r\n this.model.Description = \"\";\r\n this.model.SkillType = EngineerSkillTypeEnum.Personal;\r\n } else {\r\n this.isLoading = true;\r\n this.engineerSkillService.Get(this.id)\r\n .pipe(finalize(() => this.isLoading = false))\r\n .subscribe(data => {\r\n this.model = data;\r\n });\r\n }\r\n }\r\n}\r\n","import { CommonModule } from \"@angular/common\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { NgModule } from \"@angular/core\";\r\nimport { FormsModule } from \"@angular/forms\";\r\nimport { RouterModule } from \"@angular/router\";\r\nimport { TranslateLoader, TranslateModule } from \"@ngx-translate/core\";\r\nimport { DxAccordionModule, DxDataGridModule, DxSelectBoxModule, DxTextBoxModule } from \"devextreme-angular\";\r\nimport { HttpLoaderFactory, ServicesightSharedModule } from \"servicesight-shared\";\r\nimport { PipesModule } from \"src/app/shared/pipes/pipes.module\";\r\nimport { EngineerSkillListComponent } from \"./engineer-skill-list/engineer-skill-list.component\";\r\nimport { EngineerSkillSettingsComponent } from \"./engineer-skill-settings.component\";\r\nimport { EngineerSkillComponent } from \"./engineer-skill/engineer-skill.component\";\r\nimport { SharedComponentsModule } from \"../../shared/components/shared-components.module\";\r\nimport { SharedDirectivesModule } from \"../../shared/directives/shared-directives.module\";\r\n\r\nconst components = [\r\n EngineerSkillSettingsComponent,\r\n EngineerSkillListComponent,\r\n EngineerSkillComponent\r\n];\r\n\r\n@NgModule({\r\n declarations: [\r\n ...components\r\n ],\r\n imports: [\r\n CommonModule,\r\n RouterModule,\r\n FormsModule,\r\n PipesModule,\r\n DxTextBoxModule,\r\n DxAccordionModule,\r\n SharedComponentsModule,\r\n PipesModule,\r\n TranslateModule.forRoot({\r\n loader: {\r\n provide: TranslateLoader,\r\n useFactory: HttpLoaderFactory,\r\n deps: [HttpClient]\r\n }\r\n }),\r\n ServicesightSharedModule,\r\n SharedDirectivesModule,\r\n DxDataGridModule,\r\n DxSelectBoxModule\r\n ]\r\n})\r\nexport class EngineerSkillSettingsModule { }\r\n","export class LayoutTemplateModel {\r\n Name: string;\r\n IsArchived: boolean;\r\n LayoutType: number;\r\n LayoutTypeDescription: string;\r\n TemplateId: number;\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

{{ 'layout.templates.new.header' | translate }}\r\n
{{ 'layout.templates.new.subheader' | translate }}
\r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n ","import { Location } from \"@angular/common\";\r\nimport { AfterViewInit, Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { FormMesssageService } from \"servicesight-shared\";\r\nimport { LayoutTemplateModel } from \"../../models/layout-template.model\";\r\nimport { LayoutTemplateService } from \"../../services/layout-template.service\";\r\n\r\n@Component({\r\n selector: \"app-create-layout-template\",\r\n templateUrl: \"./create-layout-template.component.html\",\r\n styleUrls: [\"./create-layout-template.component.scss\"]\r\n})\r\nexport class CreateLayoutTemplateComponent implements OnInit, AfterViewInit {\r\n\r\n @ViewChild(\"layoutTemplateForm\", { static: true }) form: NgForm;\r\n\r\n public model: LayoutTemplateModel = new LayoutTemplateModel();\r\n public showDiscardWarning: boolean = false;\r\n public AvailableTemplates: any[] = [];\r\n public TemplateKey: string;\r\n\r\n constructor(\r\n private layoutTemplateService: LayoutTemplateService,\r\n private formMessageService: FormMesssageService,\r\n private location: Location) { }\r\n\r\n public ngOnInit(): void {\r\n this.form.form.reset();\r\n this.model.Name = \"\";\r\n this.layoutTemplateService.GetAll().subscribe((data) => {\r\n this.AvailableTemplates = data.map(i => ({\r\n Id: i.TemplateId + \"-\" + i.LayoutType,\r\n Text: i.LayoutTypeDescription + \" - \" + i.Name\r\n }));\r\n });\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n // clear form will error unless the component has already been registered so needs to be done here\r\n this.formMessageService.ClearForm(\"layoutTemplateForm\");\r\n }\r\n\r\n public OnSave(): void {\r\n const templateKeyParts = this.TemplateKey.split(\"-\", 2);\r\n this.model.TemplateId = Number(templateKeyParts[0]);\r\n this.model.LayoutType = Number(templateKeyParts[1]);\r\n this.formMessageService.RegisterObservable(this.layoutTemplateService.Create(this.model), \"layoutTemplateForm\")\r\n .subscribe((templateId) => {\r\n this.location.go(`/proteansystem/systems/layout-template-settings/layout-template/${templateId}`);\r\n });\r\n }\r\n\r\n public OnConfirmDiscard(confirmed: boolean): void {\r\n this.showDiscardWarning = false;\r\n if (confirmed) {\r\n this.location.go(\"/proteansystem/systems/layout-template-settings/layout-template-list\");\r\n }\r\n }\r\n\r\n public OnDiscard(): void {\r\n this.showDiscardWarning = true;\r\n }\r\n\r\n public SetFormDirty(): void {\r\n this.form.form.markAsDirty();\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'layout.templates.list.header' | translate }}\r\n
{{ 'layout.templates.list.subheader' | translate }}
\r\n

\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n \r\n","import { Location } from \"@angular/common\";\r\nimport { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { FormMesssageService, PermissionsService } from \"servicesight-shared\";\r\nimport { LayoutTemplateService } from \"../../services/layout-template.service\";\r\n\r\n@Component({\r\n selector: \"app-layout-template-list\",\r\n templateUrl: \"./layout-template-list.component.html\",\r\n styleUrls: [\"./layout-template-list.component.scss\"]\r\n})\r\nexport class LayoutTemplateListComponent implements OnInit {\r\n public layoutTemplateDataSource: ODataStore;\r\n public HasCreatePermission: boolean;\r\n public HasDeletePermission: boolean;\r\n public templateTypes: Array = [];\r\n public showDeleteConfirm: boolean = false;\r\n public templateNameToDelete: string;\r\n public readonly formName: string = \"layoutTemplatesForm\";\r\n\r\n private templateIdToDelete: number;\r\n @ViewChild(\"grid\") private dataGrid: DxDataGridComponent;\r\n\r\n constructor(\r\n private layoutTemplateService: LayoutTemplateService,\r\n private permissionsService: PermissionsService,\r\n private location: Location,\r\n private formMessageService: FormMesssageService) {\r\n this.deleteTemplate = this.deleteTemplate.bind(this);\r\n this.openTemplate = this.openTemplate.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.layoutTemplateDataSource = this.layoutTemplateService.ODataLayoutTemplates();\r\n this.layoutTemplateDataSource.load();\r\n this.permissionsService.CurrentUserHasPermission(\"LayoutDesignerCreate\").subscribe(hasPermissiion => {\r\n this.HasCreatePermission = hasPermissiion;\r\n });\r\n this.permissionsService.CurrentUserHasPermission(\"LayoutDesignerDelete\").subscribe(permission => {\r\n this.HasDeletePermission = permission;\r\n });\r\n this.templateTypes = this.layoutTemplateService.TemplateTypes();\r\n }\r\n\r\n public openTemplate(e): void {\r\n this.location.go(`/proteansystem/systems/layout-template-settings/layout-template/${e.row.data.TemplateId}`);\r\n }\r\n\r\n public deleteTemplate(e): void {\r\n this.templateIdToDelete = e.row.data.TemplateId;\r\n this.templateNameToDelete = e.row.data.Name;\r\n this.showDeleteConfirm = true;\r\n }\r\n\r\n public OnConfirmDelete(confirmed: boolean): void {\r\n this.showDeleteConfirm = false;\r\n if (confirmed) {\r\n this.formMessageService.RegisterObservable(this.layoutTemplateService.Delete(this.templateIdToDelete), this.formName)\r\n .subscribe(() => this.dataGrid.instance.refresh(true));\r\n }\r\n }\r\n}\r\n","import { Component, OnInit } from \"@angular/core\";\r\n\r\n@Component({\r\n selector: \"app-layout-template-settings\",\r\n template: `\r\n \r\n
\r\n `\r\n})\r\nexport class LayoutTemplateSettingsComponent implements OnInit {\r\n\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n}\r\n","import { Location } from \"@angular/common\";\r\nimport {\r\n Component,\r\n Inject,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n SimpleChanges,\r\n ViewEncapsulation\r\n} from \"@angular/core\";\r\nimport { ajaxSetup } from \"@devexpress/analytics-core/analytics-utils\";\r\nimport { ActionId } from \"devexpress-reporting/dx-reportdesigner\";\r\nimport { IAppConfig, APP_CONFIG, IAuthService } from \"servicesight-shared\";\r\nimport { LayoutTemplateService } from \"../../services/layout-template.service\";\r\n\r\n@Component({\r\n selector: \"app-layout-template\",\r\n templateUrl: \"./layout-template.component.html\",\r\n encapsulation: ViewEncapsulation.None,\r\n styleUrls: [\r\n \"./layout-template.component.scss\",\r\n \"../../../../../node_modules/devextreme/dist/css/dx.light.css\",\r\n \"../../../../../node_modules/devexpress-richedit/dist/dx.richedit.css\",\r\n \"../../../../../node_modules/@devexpress/analytics-core/dist/css/dx-analytics.common.css\",\r\n \"../../../../../node_modules/@devexpress/analytics-core/dist/css/dx-analytics.light.css\",\r\n \"../../../../../node_modules/@devexpress/analytics-core/dist/css/dx-querybuilder.css\",\r\n \"../../../../../node_modules/devexpress-reporting/dist/css/dx-webdocumentviewer.css\",\r\n \"../../../../../node_modules/devexpress-reporting/dist/css/dx-reportdesigner.css\"\r\n ]\r\n})\r\nexport class LayoutTemplateComponent implements OnInit, OnChanges {\r\n @Input() id: number = null;\r\n\r\n public getDesignerModelAction: string = \"api/LayoutTemplate/GetReportDesignerModel\";\r\n public reportId: string;\r\n public host: string;\r\n public templateName: string;\r\n\r\n constructor(\r\n @Inject(\"AuthService\") authService: IAuthService,\r\n @Inject(APP_CONFIG) private config: IAppConfig,\r\n private location: Location,\r\n private layoutTemplateService: LayoutTemplateService) {\r\n ajaxSetup.ajaxSettings = {\r\n headers: { Authorization: \"Bearer \" + authService.Token }\r\n };\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.host = this.config.apiLocations.TemplateDesigner.substr(0, this.config.apiLocations.TemplateDesigner.lastIndexOf(\"/api/\") + 1);\r\n this.reportId = this.id.toString();\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.id && changes.id.currentValue > 0) {\r\n this.layoutTemplateService.GetTemplateName(this.id).subscribe(data => { this.templateName = data; });\r\n }\r\n }\r\n\r\n public ExitDesigner(): void {\r\n this.location.go(\"/proteansystem/systems/layout-template-settings/layout-template-list\");\r\n }\r\n\r\n public CustomizeMenuActions(event: any): void {\r\n // Hide the menu items users dont need\r\n this.hideAction(event, ActionId.NewReport);\r\n this.hideAction(event, ActionId.NewReportViaWizard);\r\n this.hideAction(event, ActionId.AddDataSource);\r\n this.hideAction(event, ActionId.AddMultiQuerySqlDataSource);\r\n this.hideAction(event, ActionId.AddSqlDataSource);\r\n this.hideAction(event, ActionId.ReportWizard);\r\n this.hideAction(event, ActionId.ReportWizardFullScreen);\r\n this.hideAction(event, ActionId.Localization);\r\n this.hideAction(event, ActionId.Preview);\r\n this.hideAction(event, ActionId.OpenReport);\r\n this.hideAction(event, ActionId.SaveAs);\r\n this.hideAction(event, ActionId.ValidateBindings);\r\n }\r\n\r\n private hideAction(event: any, actionId: string): void {\r\n const action = event.args.GetById(actionId);\r\n if (action) {\r\n action.visible = false;\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n \r\n {{ 'layout.templates.edit.header' | translate }} {{ templateName }}\r\n \r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n","import { CommonModule } from \"@angular/common\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { NgModule } from \"@angular/core\";\r\nimport { FormsModule } from \"@angular/forms\";\r\nimport { BrowserModule } from \"@angular/platform-browser\";\r\nimport { RouterModule } from \"@angular/router\";\r\nimport { TranslateLoader, TranslateModule } from \"@ngx-translate/core\";\r\nimport { DxReportDesignerModule } from \"devexpress-reporting-angular\";\r\nimport { DxAccordionModule, DxDataGridModule, DxSelectBoxModule, DxTextBoxModule } from \"devextreme-angular\";\r\nimport { HttpLoaderFactory, ServicesightSharedModule } from \"servicesight-shared\";\r\nimport { PipesModule } from \"src/app/shared/pipes/pipes.module\";\r\nimport { CreateLayoutTemplateComponent } from \"./create-layout-template/create-layout-template.component\";\r\nimport { LayoutTemplateListComponent } from \"./layout-template-list/layout-template-list.component\";\r\nimport { LayoutTemplateSettingsComponent } from \"./layout-template-settings.component\";\r\nimport { LayoutTemplateComponent } from \"./layout-template/layout-template.component\";\r\nimport { SharedComponentsModule } from \"../../shared/components/shared-components.module\";\r\nimport { SharedDirectivesModule } from \"../../shared/directives/shared-directives.module\";\r\n\r\nconst components = [\r\n LayoutTemplateSettingsComponent,\r\n LayoutTemplateListComponent,\r\n LayoutTemplateComponent,\r\n CreateLayoutTemplateComponent\r\n];\r\n\r\n@NgModule({\r\n declarations: [\r\n ...components\r\n ],\r\n imports: [\r\n BrowserModule,\r\n CommonModule,\r\n RouterModule,\r\n FormsModule,\r\n PipesModule,\r\n DxTextBoxModule,\r\n DxAccordionModule,\r\n DxReportDesignerModule,\r\n SharedComponentsModule,\r\n PipesModule,\r\n TranslateModule.forRoot({\r\n loader: {\r\n provide: TranslateLoader,\r\n useFactory: HttpLoaderFactory,\r\n deps: [HttpClient]\r\n }\r\n }),\r\n ServicesightSharedModule,\r\n SharedDirectivesModule,\r\n DxDataGridModule,\r\n DxSelectBoxModule\r\n ]\r\n})\r\nexport class LayoutTemplateSettingsModule { }\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\nimport { Observable } from \"rxjs\";\r\nimport { NewContractTypeModel } from \"../models/new-contract-type.model\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { JobTypeModel } from \"../models/job-type-model\";\r\nimport { ContractTypeNominalCodesModel } from \"../models/contract-type-nominal-codes.model\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class ContractTypeService {\r\n private readonly baseUrl: string;\r\n private readonly baseApiUrl: string;\r\n private readonly baseODataUrl: string;\r\n private readonly contractTypeUrl: string;\r\n private readonly jobTypeUrl: string;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private odataService: ODataService,\r\n @Inject(APP_CONFIG) appConfig: IAppConfig\r\n ) {\r\n this.baseUrl = appConfig.apiLocations.ServiceSight;\r\n this.baseApiUrl = appConfig.apiLocations.ServiceContracts;\r\n this.baseODataUrl = appConfig.apiLocations.ServiceContractsOData;\r\n this.contractTypeUrl = `${this.baseApiUrl}ContractType`;\r\n this.jobTypeUrl = `${this.baseApiUrl}JobType`;\r\n }\r\n\r\n public GetContractTypesDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.baseODataUrl}ContractTypeOData`,\r\n key: \"ContractTypeId\",\r\n keyType: \"Single\"\r\n });\r\n }\r\n\r\n /**\r\n * Gets a contract type by its id\r\n * @param id The id of the contract type to get\r\n */\r\n public Get(id: number): Observable {\r\n return this.http.get(`${this.contractTypeUrl}/${id}`);\r\n }\r\n\r\n /**\r\n * Saves a new or updated Contract Type\r\n * @param model The model to POST/PUT\r\n */\r\n public Save(model: NewContractTypeModel): Observable {\r\n const contractTypeModel = Object.assign({ }, model);\r\n delete contractTypeModel.JobTypes;\r\n\r\n if (contractTypeModel.MaintContractTypeId == null) {\r\n return this.http.post(this.contractTypeUrl, contractTypeModel);\r\n }\r\n\r\n return this.http.put(this.contractTypeUrl, contractTypeModel);\r\n }\r\n\r\n /**\r\n * saves an association between the Job Type and the Contract Type\r\n * @param association The join table element\r\n */\r\n public SaveAssociation(association: JobTypeModel) {\r\n return this.http.post(this.jobTypeUrl, association);\r\n }\r\n\r\n // todo: push to ContractTypeJobType service\r\n public GetJobTypesByContractTypeId(id: number): Observable {\r\n return this.http.get(`${this.jobTypeUrl}/GetAllByContractId/${id}`);\r\n }\r\n\r\n public Delete(id: number): Observable {\r\n return this.http.delete(`${this.contractTypeUrl}/${id}`);\r\n }\r\n\r\n public DeleteAssociations(id: number) {\r\n return this.http.delete(`${this.jobTypeUrl}/DeleteAllFor/${id}`);\r\n }\r\n\r\n public GetNominalCodes(): Observable {\r\n return this.http.get(`${this.baseUrl}ServiceContractType/GetNominalCodes`);\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'service.contract.contract.types' | translate }}\r\n   
{{ 'service.contract.contract.types.subtitle' | translate }}
\r\n

\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { ServiceContractPermissionService } from \"servicesight-shared\";\r\nimport { ContractTypeService } from \"../services/contract-type.service\";\r\n\r\n@Component({\r\n selector: \"app-contract-type-list\",\r\n templateUrl: \"./contract-type-list.component.html\",\r\n styleUrls: [\"./contract-type-list.component.scss\"]\r\n})\r\nexport class ContractTypeListComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n\r\n public contractTypeDataSource: DataSource;\r\n public SearchText: string = \"\";\r\n public addPermission: boolean;\r\n\r\n constructor(\r\n private service: ContractTypeService,\r\n private permissionService: ServiceContractPermissionService) { }\r\n\r\n ngOnInit() {\r\n this.contractTypeDataSource = this.service.GetContractTypesDataSource();\r\n this.permissionService.Reload();\r\n this.permissionService.AddContractTypePermission.subscribe(p => this.addPermission = p);\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n}\r\n","export class JobTypeModel {\r\n public MaintContractTypeId: number;\r\n public JobTypeId: number;\r\n}\r\n","import IJobType from \"../../../shared/models/ijob-type\";\r\n\r\nexport class NewContractTypeModel {\r\n MaintContractTypeId: number;\r\n Name: string;\r\n Description: string;\r\n LabourProfileId: number;\r\n IncludeSalesTax?: boolean;\r\n JobTypes: IJobType[];\r\n AccountCode: string;\r\n DepartmentCode: string;\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n {{ 'label.newcontracttype' | translate }}\r\n

\r\n

\r\n {{ 'label.contracttype' | translate }}\r\n {{ model.Name }}\r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n {{data.Code}} - {{data.Description}}\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n {{data.Code}} - {{data.Description}}\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n","import { Location } from \"@angular/common\";\r\nimport { Component, HostListener, Inject, Input, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport { forkJoin, Observable } from \"rxjs\";\r\nimport { finalize, map, mergeMap, tap } from \"rxjs/operators\";\r\nimport { AccountingService, ComponentCanDeactivate, FormMesssageService, Module, ModuleService } from \"servicesight-shared\";\r\nimport { ILabourProfile } from \"src/app/shared/models/ilabour-profile.model\";\r\nimport { IServiceSightCollection } from \"../../../quotes/models/IServiceSightCollection\";\r\nimport IJobType from \"../../../shared/models/ijob-type\";\r\nimport { ISelectOption } from \"../../../shared/models/iselect-option.model\";\r\nimport { IJobTypeService } from \"../../../shared/services/interfaces/IJobTypeService\";\r\nimport { ILabourRateService } from \"../../../shared/services/interfaces/ILabourRateService\";\r\nimport { JobTypeService } from \"../../../shared/services/job-type/job-type.service\";\r\nimport { LabourRateService } from \"../../../shared/services/labour-rate/labour-rate.service\";\r\nimport { ContractTypeNominalCodesModel } from \"../models/contract-type-nominal-codes.model\";\r\nimport { JobTypeModel } from \"../models/job-type-model\";\r\nimport { NewContractTypeModel } from \"../models/new-contract-type.model\";\r\nimport { NominalCodeModel } from \"../models/nominal-code.model\";\r\nimport { ContractTypeService } from \"../services/contract-type.service\";\r\n\r\n@Component({\r\n selector: \"app-new-contract-type\",\r\n templateUrl: \"./new-contract-type.component.html\",\r\n styleUrls: [\"./new-contract-type.component.scss\"],\r\n providers: [\r\n { provide: \"ILabourRateService\", useClass: LabourRateService },\r\n { provide: \"IJobTypeService\", useClass: JobTypeService },\r\n ]\r\n})\r\nexport class NewContractTypeComponent implements OnInit, ComponentCanDeactivate {\r\n // The id of a contract type to change\r\n @Input() id: number;\r\n @Input() isNewlyCreated: boolean;\r\n @ViewChild(\"jobTypesContainer\", { static: true }) jobTypeDataGrid: DxDataGridComponent;\r\n @ViewChild(\"contractType\", { static: true }) form: NgForm;\r\n\r\n // This is doing change tracking at the moment.\r\n dxDataGridEdited: boolean = false;\r\n\r\n // For the form messages service\r\n formName: string = \"contractType\";\r\n\r\n // Bools for checking if we were on the new form, and anything is loading\r\n isLoading: boolean[] = [];\r\n\r\n // A basic view model to work with and send off\r\n model: NewContractTypeModel;\r\n\r\n // Data sources\r\n labourRates: ILabourProfile[];\r\n defaultJobTypes: IJobType[] = [];\r\n modifiedJobTypes: IJobType[] = [];\r\n jobCategories: ISelectOption[];\r\n nominalSalesAccount: NominalCodeModel[];\r\n nominalSalesDepartment: NominalCodeModel[];\r\n\r\n hasDeletePermission: boolean = true;\r\n showDeleteMessage: boolean = false;\r\n stockEnabled: boolean = false;\r\n isUsCompany: boolean = false; isProEnabled: boolean = false;\r\n isAccountLinked: boolean = false;\r\n\r\n listPath: string = \"/proteansystem/systems/service-contracts-settings/contract-type-list\";\r\n rootUrl: string;\r\n\r\n constructor(\r\n @Inject(\"ILabourRateService\") private labourRateService: ILabourRateService,\r\n @Inject(\"IJobTypeService\") private jobTypeService: IJobTypeService,\r\n private service: ContractTypeService,\r\n private formMessageService: FormMesssageService,\r\n private location: Location,\r\n private accountingService: AccountingService,\r\n private moduleService: ModuleService,\r\n private translate: TranslateService\r\n ) {\r\n this.GetJobCategory = this.GetJobCategory.bind(this);\r\n this.IsModified = this.IsModified.bind(this);\r\n }\r\n\r\n @HostListener(\"window:beforeunload\")\r\n public canDeactivate(): Observable | boolean {\r\n return !this.form.form.dirty;\r\n }\r\n\r\n /**\r\n * ngOnInit hook\r\n */\r\n ngOnInit() {\r\n this.getRootUrl();\r\n this.accountingService.GetAccountsInfo().subscribe(result => this.isUsCompany = result.IsUsaTaxSystem);\r\n\r\n this.moduleService.GetEnabledModules().subscribe(x => {\r\n this.isProEnabled = x.includes(Module.ServiceContract) && x.includes(Module.Pro);\r\n this.stockEnabled = x.includes(Module.Stock);\r\n });\r\n\r\n this.model = new NewContractTypeModel();\r\n this.model.IncludeSalesTax = true;\r\n this.isLoading.push(true);\r\n const observables = [\r\n this.LoadLabourRates(),\r\n this.LoadCategories(),\r\n this.LoadDefaultJobTypes(),\r\n this.LoadNLCodes()\r\n ];\r\n\r\n if (this.id) {\r\n observables.push(this.LoadContractType(this.id));\r\n }\r\n\r\n forkJoin(observables)\r\n .subscribe(() => this.isLoading.pop(), () => this.isLoading.pop());\r\n }\r\n\r\n /**\r\n * Loads Job Categories into this.jobCategories.\r\n * @return Observable of the categories.\r\n */\r\n private LoadCategories() {\r\n return this.jobTypeService\r\n .GetAllCategories()\r\n .pipe(tap((categories) => this.jobCategories = categories));\r\n }\r\n\r\n /**\r\n * Gets the job types that can be modified by this contract type\r\n * @return Observable of the defaultJobTypes\r\n */\r\n private LoadDefaultJobTypes() {\r\n return this.jobTypeService.GetAll()\r\n .pipe(map((res: IServiceSightCollection) => res.ModelCollection))\r\n .pipe(mergeMap(model => {\r\n const ids = model.map(jobType => jobType.JobTypeID);\r\n return this.jobTypeService.Get(ids);\r\n }))\r\n .pipe(tap(defaultJobTypes => this.defaultJobTypes = defaultJobTypes))\r\n .pipe(tap(() => this.MapJobTypesToModel()));\r\n }\r\n\r\n\r\n /**\r\n * Populates the select list options for Labour Rates\r\n * @return Observable containing the labour rates\r\n */\r\n private LoadLabourRates() {\r\n return this.labourRateService\r\n .GetAllLabourProfiles()\r\n .pipe(map((res: IServiceSightCollection) => res.ModelCollection))\r\n .pipe(tap(labourRates => this.labourRates = labourRates));\r\n }\r\n\r\n /**\r\n * Loads the Contract Type model\r\n */\r\n private LoadContractType(id) {\r\n return this.service\r\n .Get(id)\r\n .pipe(tap(model => this.model = model))\r\n .pipe(mergeMap(() => this.LoadJobTypes(id)));\r\n }\r\n\r\n /**\r\n * Load Nominal Codes and assign default if needed\r\n */\r\n private LoadNLCodes() {\r\n this.accountingService.GetAccountsInfo().subscribe((accountingInfo) => this.isAccountLinked = accountingInfo.LinkStatus.IsConnected);\r\n return this.service.GetNominalCodes()\r\n .pipe(tap((codes: ContractTypeNominalCodesModel) => {\r\n this.nominalSalesAccount = codes.AccountCodes;\r\n this.nominalSalesDepartment = codes.DepartmentCodes;\r\n if (!this.model.AccountCode || this.model.AccountCode === \"EmptyButNotNull\") {\r\n this.model.AccountCode = this.nominalSalesAccount.find(x => x.IsDefaultCode).Code;\r\n }\r\n }));\r\n }\r\n\r\n /**\r\n * Loads job types\r\n * @param id The Contract Type ID\r\n * @return Observable containing the model\r\n */\r\n private LoadJobTypes(id) {\r\n return this.service.GetJobTypesByContractTypeId(id)\r\n .pipe(mergeMap((jobTypes) => {\r\n if (jobTypes.length === 0) {\r\n return Promise.resolve([]);\r\n }\r\n\r\n const ids = jobTypes.map(jobType => jobType.JobTypeId);\r\n return this.jobTypeService.Get(ids);\r\n }))\r\n .pipe(tap(jobTypes => this.modifiedJobTypes = jobTypes))\r\n .pipe(tap(() => this.MapJobTypesToModel()));\r\n }\r\n\r\n /**\r\n * Maps Job Types onto the model\r\n */\r\n private MapJobTypesToModel() {\r\n this.model.JobTypes = this.defaultJobTypes\r\n .map((defaultJobType) => {\r\n const jt = this.modifiedJobTypes.find(mfjt => mfjt.DefaultTypeID === defaultJobType.JobTypeID)\r\n || Object.assign({ }, defaultJobType);\r\n // note: display the default job type's name\r\n return Object.assign({ }, jt, { Name: defaultJobType.Name });\r\n });\r\n }\r\n\r\n /**\r\n * OnFormSubmit called when the form is submitted\r\n */\r\n OnFormSubmit() {\r\n this.isLoading.push(true);\r\n this.formMessageService\r\n .RegisterObservable(this.Save(), this.formName)\r\n .pipe(mergeMap((id) => {\r\n if (!this.id) {\r\n this.id = id;\r\n this.model.MaintContractTypeId = id;\r\n this.location.go(`${this.rootUrl}/contract-type/${id}?isNew=true`);\r\n }\r\n return this.LoadContractType(id);\r\n }))\r\n .subscribe(() => this.isLoading.pop(), () => this.isLoading.pop());\r\n }\r\n\r\n /**\r\n * Allows the user to view the labour rate (modal/inline?)\r\n */\r\n OnViewLabourRate() {\r\n this.location.go(`/proteansystem/systems/labourrate/${this.model.LabourProfileId}`);\r\n }\r\n\r\n /**\r\n * Opens the delete confirmation message modal\r\n */\r\n OnDelete() {\r\n this.showDeleteMessage = true;\r\n }\r\n\r\n /**\r\n * Create copy of existing contract type\r\n */\r\n OnCopy() {\r\n this.model.Name += \" (\" + this.translate.instant(\"suffix.copy\") + \")\";\r\n delete this.model.MaintContractTypeId;\r\n this.id = null;\r\n this.model.JobTypes.forEach(x => {\r\n x.JobTypeID = x.DefaultTypeID;\r\n });\r\n this.OnFormSubmit();\r\n }\r\n\r\n /**\r\n * Runs when the modal has been confirmed\r\n * This one performs the deletion\r\n */\r\n OnConfirmDelete(confirmed: boolean) {\r\n if (confirmed) {\r\n this.isLoading.push(true);\r\n this.formMessageService.RegisterObservable(this.Delete(), this.formName)\r\n .pipe(finalize(() => {\r\n this.isLoading.pop();\r\n this.showDeleteMessage = false;\r\n }))\r\n // todo: can use redirectToChild once pluralization of service-contracts is corrected\r\n .subscribe(() => this.location.go(this.listPath));\r\n } else {\r\n this.showDeleteMessage = false;\r\n }\r\n }\r\n\r\n /**\r\n * Called when the row is updated to allow us to change the model ourselves\r\n * @param $event The event that caused an update, has .newData and .oldData\r\n */\r\n OnRowUpdating($event) {\r\n const { newData } = $event;\r\n\r\n this.dxDataGridEdited = true;\r\n\r\n if (newData.CreatesInvoice === false) {\r\n $event.newData.ChargeMisc = false;\r\n $event.newData.ChargeParts = false;\r\n $event.newData.ChargeLabour = false;\r\n }\r\n\r\n if (newData.ChargeMisc || newData.ChargeLabour || newData.ChargeParts) {\r\n $event.newData.CreatesInvoice = true;\r\n }\r\n }\r\n\r\n /**\r\n * Cancels changes to the contract type\r\n */\r\n OnCancel() {\r\n if (this.id && (this.form.dirty || this.dxDataGridEdited)) {\r\n this.form.resetForm();\r\n this.isLoading.push(true);\r\n this.LoadContractType(this.id).subscribe(() => this.isLoading.pop(), () => this.isLoading.pop());\r\n } else {\r\n this.location.go(this.listPath);\r\n }\r\n }\r\n\r\n /**\r\n * Are we loading something?\r\n * @return True if we're loading\r\n */\r\n IsLoading() {\r\n return this.isLoading.length !== 0;\r\n }\r\n\r\n /**\r\n * Determines if a Job Type has been modified\r\n * In this instance, a job type is modified if:\r\n * - It was based on the default job type (DefaultTypeID === JobTypeId)\r\n * - AND the row has been updated/is dirty\r\n * OR:\r\n * - The Row's Default job has different values for:\r\n * > CreatesInvoice\r\n * > ChargeLabour\r\n * > ChargeMisc\r\n * @param row The DX Grid Row\r\n * @return True if the Job Type has been modified for this Contract Type\r\n */\r\n IsModified(row: IJobType): boolean {\r\n const defaultJobType = this.defaultJobTypes.find((djt) => row.DefaultTypeID === djt.JobTypeID);\r\n\r\n if (!defaultJobType) {\r\n // todo: don't see a scenario in which this should happen but marking dirty would make sense.\r\n return true;\r\n }\r\n\r\n return !(\r\n row.CreatesInvoice === defaultJobType.CreatesInvoice\r\n && row.ChargeParts === defaultJobType.ChargeParts\r\n && row.ChargeMisc === defaultJobType.ChargeMisc\r\n && row.ChargeLabour === defaultJobType.ChargeLabour\r\n );\r\n }\r\n\r\n /**\r\n * Gets the display value of \"Category\" for the row\r\n * @param row The dx-grid row, has property CategoryID\r\n * @return The category display\r\n */\r\n GetJobCategory(row: IJobType) {\r\n if (!this.jobCategories) {\r\n return \"\";\r\n }\r\n\r\n const category = this.jobCategories\r\n .find(c => c.Id === row.CategoryID);\r\n\r\n return category ? category.Name : \"\";\r\n }\r\n\r\n /**\r\n * Sets this.rootUrl which is used in redirects after save and delete\r\n */\r\n private getRootUrl() {\r\n const path = this.location.path();\r\n this.rootUrl = `${path.substr(0, path.lastIndexOf(\"/\"))}`;\r\n }\r\n\r\n /**\r\n * Saves the model\r\n */\r\n private Save() {\r\n let newObjectId = null;\r\n return this.service\r\n .Save(this.model)\r\n .pipe(tap(id => newObjectId = id))\r\n .pipe(mergeMap(id => this.SaveJobTypes(id, this.model.JobTypes)))\r\n .pipe(map(() => newObjectId));\r\n }\r\n\r\n /**\r\n * Saves the associated job types and their associations\r\n * @param id The Model's ID\r\n * @param jobTypes The job types to save\r\n */\r\n private SaveJobTypes(id: number, jobTypes: IJobType[]): Observable {\r\n const models = jobTypes.map(jobType => {\r\n const isNew = jobType.JobTypeID === jobType.DefaultTypeID;\r\n const newJobType = Object.assign({ }, jobType);\r\n if (isNew) {\r\n newJobType.JobTypeID = null;\r\n }\r\n\r\n // note: this is a workaround for jobtype name Unique constraint\r\n newJobType.Name = `${id}${newJobType.Name}`;\r\n\r\n return newJobType;\r\n });\r\n\r\n return this.jobTypeService.Create(models).pipe(mergeMap(data => forkJoin(data.map(response => this.SaveAssociation(id, response.EntityId)))));\r\n }\r\n\r\n /**\r\n * Saves the association between the Model and it's child Job Types\r\n * @param contractTypeId The Model's ID\r\n * @param jobTypeId The Job type ID\r\n */\r\n private SaveAssociation(contractTypeId: number, jobTypeId: number): Observable {\r\n const association = new JobTypeModel();\r\n association.MaintContractTypeId = contractTypeId;\r\n association.JobTypeId = jobTypeId;\r\n\r\n return this.service\r\n .SaveAssociation(association);\r\n }\r\n\r\n /**\r\n * Deletes the associations, the Job Types and the Contract Type\r\n */\r\n private Delete(): Observable {\r\n // const jobTypeIds = this.model.JobTypes.map(model => model.JobTypeID);\r\n //\r\n // // Delete the associations\r\n // let observable: Observable = this.service.DeleteAssociations(this.id);\r\n //\r\n // // Delete the Job Types\r\n // observable = observable.pipe(mergeMap(() => {\r\n // const requests = jobTypeIds.map(id => this.jobTypeService.Delete(id));\r\n //\r\n // return forkJoin(concat(...requests));\r\n // }));\r\n //\r\n // // Finally delete the contract type\r\n // observable = observable.pipe(mergeMap(() => this.service.Delete(this.id)));\r\n\r\n // return observable;\r\n return this.service.Delete(this.id);\r\n }\r\n}\r\n","import { CommonModule } from \"@angular/common\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { NgModule } from \"@angular/core\";\r\nimport { FormsModule } from \"@angular/forms\";\r\nimport { RouterModule } from \"@angular/router\";\r\nimport { TranslateLoader, TranslateModule } from \"@ngx-translate/core\";\r\nimport { HttpLoaderFactory, ServicesightSharedModule } from \"servicesight-shared\";\r\nimport { ContractTypeListComponent } from \"./contract-type-list/contract-type-list.component\";\r\nimport { SharedComponentsModule } from \"../../shared/components/shared-components.module\";\r\nimport { NewContractTypeComponent } from \"./new-contract-type/new-contract-type.component\";\r\nimport {\r\n DxAccordionModule, DxButtonModule,\r\n DxDataGridModule, DxNumberBoxModule, DxPopupModule, DxRadioGroupModule,\r\n DxSelectBoxModule, DxSwitchModule,\r\n DxTabPanelModule, DxTemplateModule,\r\n DxTextAreaModule,\r\n DxTextBoxModule\r\n} from \"devextreme-angular\";\r\n\r\nconst components = [ContractTypeListComponent, NewContractTypeComponent];\r\n\r\nconst pipes = [ ];\r\n\r\n@NgModule({\r\n declarations: [...components, ...pipes],\r\n imports: [\r\n CommonModule,\r\n RouterModule,\r\n FormsModule,\r\n SharedComponentsModule,\r\n DxDataGridModule,\r\n TranslateModule.forRoot({\r\n loader: {\r\n provide: TranslateLoader,\r\n useFactory: HttpLoaderFactory,\r\n deps: [HttpClient]\r\n }\r\n }),\r\n DxTextAreaModule,\r\n DxTabPanelModule,\r\n DxSelectBoxModule,\r\n DxDataGridModule,\r\n DxTextBoxModule,\r\n DxAccordionModule,\r\n DxTemplateModule,\r\n DxRadioGroupModule,\r\n DxNumberBoxModule,\r\n DxPopupModule,\r\n DxSwitchModule,\r\n DxButtonModule,\r\n ServicesightSharedModule,\r\n ],\r\n exports: []\r\n})\r\nexport class ServiceContractsSettingsModule { }\r\n","import { Component, OnInit } from \"@angular/core\";\r\n\r\n@Component({\r\n selector: \"app-stock-settings\",\r\n template: `\r\n \r\n
\r\n `\r\n})\r\nexport class StockSettingsComponent implements OnInit {\r\n\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n}\r\n","
\r\n
\r\n

{{ 'stock.stockTypes.header' | translate }}\r\n
{{ 'stock.stockTypes.subheader' | translate }}
\r\n

\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { AccountingService } from \"servicesight-shared\";\r\nimport { StockPermissionsService } from \"./../../../stock/services/stock-permissions.service\";\r\nimport { StockTypesService } from \"../../services/stock-types.service\";\r\n\r\n@Component({\r\n selector: \"app-stock-types\",\r\n templateUrl: \"./stock-types.component.html\",\r\n styleUrls: [\"./stock-types.component.scss\"]\r\n})\r\nexport class StockTypesComponent implements OnInit {\r\n public SearchText = \"\";\r\n public stockTypesDataSource: ODataStore;\r\n public taxCodeDataSource: ODataStore;\r\n public isUsaCompany: boolean = true;\r\n public hasAddPermission: boolean;\r\n @ViewChild(\"grid\", { static: true }) dataGrid: DxDataGridComponent;\r\n\r\n constructor(\r\n private stockTypesService: StockTypesService,\r\n private accountingService: AccountingService,\r\n private permissionService: StockPermissionsService) { }\r\n\r\n ngOnInit() {\r\n this.permissionService.Reload();\r\n this.permissionService.HasAddStockTypePermission.subscribe(x => this.hasAddPermission = x);\r\n this.accountingService.GetAccountsInfo().subscribe(result => this.isUsaCompany = result.IsUsaTaxSystem);\r\n this.stockTypesDataSource = this.stockTypesService.ODataStockTypeServiceLevels();\r\n this.taxCodeDataSource = this.stockTypesService.ODataTaxCodeService();\r\n this.stockTypesDataSource.load();\r\n this.taxCodeDataSource.load();\r\n }\r\n\r\n public OnSearchValueChange() {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n}\r\n","export class StockTypeModel {\r\n public StockTypeId?: number;\r\n public Name: string;\r\n public JobProductTaxCodeId: number;\r\n public Timestamp?: number;\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n {{ 'stock.newStockType.label' | translate }}\r\n {{ stockTypeModel.Name }}\r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n","import { Location } from \"@angular/common\";\r\nimport { Component, HostListener, Input, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { Observable } from \"rxjs\";\r\nimport { AccountingService, ComponentCanDeactivate, FormMesssageService } from \"servicesight-shared\";\r\nimport { StockPermissionsService } from \"./../../../stock/services/stock-permissions.service\";\r\nimport { ConfirmationMessageComponent } from \"../../../shared/components/confirmation-message/confirmation-message.component\";\r\nimport { StockTypeModel } from \"../../../shared/models/stock-type.model\";\r\nimport { StockTypesService } from \"../../services/stock-types.service\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\n\r\n@Component({\r\n selector: \"app-new-stock-type\",\r\n templateUrl: \"./new-stock-type.component.html\",\r\n styleUrls: [\"./new-stock-type.component.scss\"]\r\n})\r\nexport class NewStockTypeComponent implements OnInit, ComponentCanDeactivate {\r\n public readonly formName: string = \"stockTypeForm\";\r\n public stockTypeModel: StockTypeModel = new StockTypeModel();\r\n public productTaxCodes: ODataStore;\r\n public IsUsaCompany: boolean;\r\n public hasDeletePermission: boolean;\r\n\r\n @Input() id: number;\r\n @ViewChild(\"confirmationMessage\", { static: true }) private confirmationMessage: ConfirmationMessageComponent;\r\n @ViewChild(\"newStockType\") form: NgForm;\r\n\r\n constructor(\r\n private formMessageService: FormMesssageService,\r\n private location: Location,\r\n private stockTypesService: StockTypesService,\r\n private accountsLinkService: AccountingService,\r\n private permissionService: StockPermissionsService) {\r\n }\r\n\r\n @HostListener(\"window:beforeunload\")\r\n public canDeactivate(): Observable | boolean {\r\n return !this.form.form.dirty;\r\n }\r\n\r\n ngOnInit() {\r\n this.permissionService.Reload();\r\n this.permissionService.HasDeleteStockTypePermission.subscribe(x => this.hasDeletePermission = x);\r\n this.productTaxCodes = this.stockTypesService.ODataTaxCodeService();\r\n this.accountsLinkService.GetAccountsInfo().subscribe(result => this.IsUsaCompany = result.IsUsaTaxSystem);\r\n\r\n if (this.id) {\r\n this.stockTypesService.Get(this.id).subscribe(x => this.stockTypeModel = x);\r\n } else {\r\n this.productTaxCodes.load().then(i => {\r\n this.stockTypeModel = new StockTypeModel();\r\n const taxCode = i.find(x => x.DisplayValue === \"Standard\");\r\n this.stockTypeModel.JobProductTaxCodeId = taxCode.Id;\r\n });\r\n }\r\n }\r\n\r\n public SaveStockType() {\r\n this.formMessageService.RegisterObservable(this.stockTypesService.CreateUpdate(this.stockTypeModel), this.formName)\r\n .subscribe(result => {\r\n if (!this.id || !this.stockTypeModel.StockTypeId) {\r\n this.location.go(`/proteansystem/systems/stock-settings/stock-type/${result}`);\r\n }\r\n\r\n if (result && this.stockTypeModel.StockTypeId) {\r\n this.stockTypesService.Get(this.id).subscribe(x => this.stockTypeModel = x);\r\n }\r\n });\r\n }\r\n\r\n public DeleteStockType() {\r\n this.confirmationMessage.show();\r\n }\r\n\r\n public OnDeleteAttribute() {\r\n this.formMessageService.RegisterObservable(this.stockTypesService.Delete(this.id), this.formName)\r\n .subscribe(result => {\r\n if (result) {\r\n this.location.go(\"/proteansystem/systems/stock-settings/stock-types-list\");\r\n }\r\n });\r\n }\r\n\r\n public OnDiscardStockType() {\r\n this.stockTypesService.Get(this.id).subscribe(x => this.stockTypeModel = x);\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'stock.adjustmentReasonList.header' | translate }}\r\n
{{ 'stock.adjustmentReasonList.subheader' | translate }}
\r\n

\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n
\r\n \r\n {{ data.data.Name }}\r\n \r\n \r\n {{ data.data.Name }}\r\n \r\n
\r\n
\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { StockPermissionsService } from \"./../../../stock/services/stock-permissions.service\";\r\nimport { AdjustmentReasonService } from \"../../services/adjustment-reason.service\";\r\n\r\n@Component({\r\n selector: \"app-stock-adjustment-reason-list\",\r\n templateUrl: \"./adjustment-reason-list.component.html\",\r\n styleUrls: [\"./adjustment-reason-list.component.scss\"]\r\n})\r\nexport class StockAdjustmentReasonListComponent implements OnInit {\r\n public adjustmentReasonDataSource: ODataStore;\r\n public hasAddPermission: boolean;\r\n\r\n @ViewChild(\"grid\", { static: true }) dataGrid: DxDataGridComponent;\r\n\r\n constructor(\r\n private adjustmentReasonService: AdjustmentReasonService,\r\n private permissionService: StockPermissionsService) { }\r\n\r\n SearchText: string = \"\";\r\n\r\n OnSearchValueChange(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n ngOnInit(): void {\r\n this.permissionService.Reload();\r\n this.permissionService.HasAddAdjustmentReasonPermission.subscribe(x => this.hasAddPermission = x);\r\n this.adjustmentReasonDataSource = this.adjustmentReasonService.ODataAdjustmentReasons();\r\n this.adjustmentReasonDataSource.load();\r\n }\r\n}\r\n","export enum AccountClass {\r\n Asset = 1,\r\n Equity = 2,\r\n Expense = 3,\r\n Liability = 4,\r\n Income = 5,\r\n SalesAnalysisCode = 6\r\n}\r\n","export class AdjustmentReasonModel {\r\n AdjustmentReasonID: number;\r\n Name: string;\r\n Description: string;\r\n AccountCode: string;\r\n DeptCode: string;\r\n IsReadOnly: boolean;\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { AccountClass } from \"../enums/account-class.enum\";\r\nimport { NominalAccount } from \"../models/nominal-account.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class NominalAccountService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private config: IAppConfig) { }\r\n\r\n\r\n public GetNominalAccounts(accountClass: AccountClass): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}NominalAccount/NominalAccounts?accountClass=${accountClass}`);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n {{ 'stock.adjustmentReason.new.header' | translate }}\r\n \r\n {{ 'stock.adjustmentReason.edit.header' | translate }} {{ model.Name }}\r\n \r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n ","import { Location } from \"@angular/common\";\r\nimport { AfterViewInit, Component, HostListener, Input, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { Observable } from \"rxjs\";\r\nimport { finalize } from \"rxjs/operators\";\r\nimport { AccountingService, ComponentCanDeactivate, FormMesssageService, Module } from \"servicesight-shared\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { StockPermissionsService } from \"./../../../stock/services/stock-permissions.service\";\r\nimport { AccountClass } from \"../../enums/account-class.enum\";\r\nimport { AdjustmentReasonModel } from \"../../models/adjustment-reason\";\r\nimport { NominalAccount } from \"../../models/nominal-account.model\";\r\nimport { AdjustmentReasonService } from \"../../services/adjustment-reason.service\";\r\nimport { NominalAccountService } from \"../../services/nominal-account.service\";\r\n\r\n\r\n@Component({\r\n selector: \"app-stock-adjustment-reason\",\r\n templateUrl: \"./adjustment-reason.component.html\"\r\n})\r\nexport class StockAdjustmentReasonComponent implements OnInit, AfterViewInit, ComponentCanDeactivate {\r\n @Input() id: number = null;\r\n\r\n @ViewChild(\"stockAdjustmentReason\", { static: true }) form: NgForm;\r\n\r\n public model: AdjustmentReasonModel = new AdjustmentReasonModel();\r\n public accountDataSource: NominalAccount[];\r\n public deptDataSource: [];\r\n\r\n public isLoading: boolean = false;\r\n public proEnabled: boolean = false;\r\n public isAccountLinked: boolean = false;\r\n\r\n public showDeleteWarning: boolean = false;\r\n public showDiscardWarning: boolean = false;\r\n\r\n public hasDeletePermission: boolean = true;\r\n\r\n public get isNewRecord(): boolean {\r\n return this.id == null;\r\n }\r\n\r\n constructor(\r\n private adjustmentReasonService: AdjustmentReasonService,\r\n private formMessageService: FormMesssageService,\r\n private location: Location,\r\n private permissionService: StockPermissionsService,\r\n private nominalAccountService: NominalAccountService,\r\n private licenseService: LicenseService,\r\n private accountingService: AccountingService) { }\r\n\r\n @HostListener(\"window:beforeunload\")\r\n public canDeactivate(): Observable | boolean {\r\n return !this.form.form.dirty;\r\n }\r\n\r\n ngOnInit(): void {\r\n this.permissionService.Reload();\r\n this.permissionService.HasDeleteAdjustmentReasonPermission.subscribe(x => this.hasDeletePermission = x);\r\n this.licenseService.GetCompanyHasAccessToModule(Module.Pro).subscribe(x => this.proEnabled = x);\r\n this.nominalAccountService.GetNominalAccounts(AccountClass.Expense).subscribe(x => this.accountDataSource = x);\r\n this.accountingService.GetAccountsInfo().subscribe((accountingInfo) => this.isAccountLinked = accountingInfo.LinkStatus.IsConnected);\r\n this.Load();\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n // clear form will error unless the component has already been registered so needs to be done here\r\n this.formMessageService.ClearForm(\"stockAdjustmentReason\");\r\n }\r\n\r\n OnSaveAdjustmentReason(): void {\r\n this.isLoading = true;\r\n\r\n if (this.isNewRecord) {\r\n this.formMessageService.RegisterObservable(this.adjustmentReasonService.Create(this.model), \"stockAdjustmentReason\")\r\n .pipe(finalize(() => {\r\n this.isLoading = false;\r\n }))\r\n .subscribe(newId => {\r\n this.model.AdjustmentReasonID = newId;\r\n this.id = newId;\r\n this.isLoading = false;\r\n });\r\n } else {\r\n this.formMessageService.RegisterObservable(this.adjustmentReasonService.Update(this.model), \"stockAdjustmentReason\")\r\n .pipe(finalize(() => {\r\n // only called if an error is returned - not if success or error (which is the point of finalize)\r\n this.isLoading = false;\r\n }))\r\n .subscribe(() => {\r\n this.isLoading = false;\r\n });\r\n }\r\n }\r\n\r\n OnDeleteAdjustmentReason(): void {\r\n this.showDeleteWarning = true;\r\n }\r\n\r\n OnConfirmDeletion(confirmed: boolean): void {\r\n if (confirmed) {\r\n this.isLoading = true;\r\n\r\n this.formMessageService.RegisterObservable(this.adjustmentReasonService.Delete(this.id), \"stockAdjustmentReason\")\r\n .pipe(finalize(() => {\r\n this.showDeleteWarning = false;\r\n this.isLoading = false;\r\n }))\r\n .subscribe(() => {\r\n this.location.go(\"/proteansystem/systems/stock-settings/adjustment-reason-list\");\r\n });\r\n }\r\n this.showDeleteWarning = false;\r\n }\r\n\r\n OnConfirmDiscard(confirmed: boolean): void {\r\n if (confirmed) {\r\n this.Load();\r\n }\r\n this.showDiscardWarning = false;\r\n }\r\n\r\n OnDiscard(): void {\r\n this.showDiscardWarning = true;\r\n }\r\n\r\n private Load(): void {\r\n this.form.form.reset();\r\n\r\n if (this.isNewRecord) {\r\n this.model = new AdjustmentReasonModel();\r\n this.model.Name = \"\";\r\n this.model.Description = \"\";\r\n this.adjustmentReasonService.GetDefaultAccount().subscribe(acc => this.model.AccountCode = acc);\r\n } else {\r\n this.isLoading = true;\r\n this.adjustmentReasonService.Get(this.id)\r\n .pipe(finalize(() => this.isLoading = false))\r\n .subscribe(reason => {\r\n this.model = reason;\r\n });\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'stock.manufacturersList.header' | translate }}\r\n
{{ 'stock.manufacturersList.subheader' | translate }}
\r\n

\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n \r\n \r\n\r\n \r\n \r\n
\r\n \r\n {{ data.data.Name }}\r\n \r\n \r\n {{ data.data.Name }}\r\n \r\n
\r\n
\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { StockPermissionsService } from \"../../../stock/services/stock-permissions.service\";\r\nimport { StockManufacturerService } from \"../../services/stock-manufacturer.service\";\r\n\r\n@Component({\r\n selector: \"app-stock-manufacturers-list\",\r\n templateUrl: \"./manufacturers-list.component.html\",\r\n styleUrls: [\"./manufacturers-list.component.scss\"]\r\n})\r\nexport class StockManufacturersListComponent implements OnInit {\r\n public manufacturerDataSource: ODataStore;\r\n public hasAddPermission: boolean;\r\n\r\n @ViewChild(\"grid\", { static: true }) dataGrid: DxDataGridComponent;\r\n\r\n constructor(\r\n private manufacturerService: StockManufacturerService,\r\n private permissionService: StockPermissionsService) { }\r\n\r\n SearchText: string = \"\";\r\n\r\n OnSearchValueChange(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n ngOnInit(): void {\r\n this.permissionService.Reload();\r\n this.permissionService.HasAddManufacturerPermission.subscribe(x => this.hasAddPermission = x);\r\n this.manufacturerDataSource = this.manufacturerService.StockManufacturerStore();\r\n this.manufacturerDataSource.load();\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n {{ 'stock.manufacturer.new.header' | translate }}\r\n \r\n {{ 'stock.manufacturer.edit.header' | translate }} {{ model.Name }}\r\n \r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n\r\n","import { Location } from \"@angular/common\";\r\nimport { AfterViewInit, Component, Input, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { finalize } from \"rxjs/operators\";\r\nimport { FormMesssageService } from \"servicesight-shared\";\r\nimport { StockManufacturerModel } from \"../../models/stock-manufacturer.model\";\r\nimport { StockManufacturerService } from \"../../services/stock-manufacturer.service\";\r\n\r\n@Component({\r\n selector: \"app-stock-manufacturer\",\r\n templateUrl: \"./manufacturer.component.html\",\r\n styleUrls: [\"./manufacturer.component.scss\"]\r\n})\r\nexport class StockManufacturerComponent implements OnInit, AfterViewInit {\r\n @Input() id: number = null;\r\n @Input() readonly: boolean = false;\r\n\r\n @ViewChild(\"manufacturerForm\", { static: true }) form: NgForm;\r\n\r\n model: StockManufacturerModel = { Name: \"\"};\r\n\r\n isLoading: boolean = false;\r\n\r\n showDeleteWarning: boolean = false;\r\n showDiscardWarning: boolean = false;\r\n\r\n get isNewRecord(): boolean {\r\n return this.id == null;\r\n }\r\n\r\n get isReadOnly(): boolean {\r\n return Boolean(this.readonly);\r\n }\r\n\r\n constructor(\r\n private stockManufacturerService: StockManufacturerService,\r\n private formMessageService: FormMesssageService,\r\n private location: Location) { }\r\n\r\n ngOnInit(): void {\r\n this.Load();\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n // clear form will error unless the component has already been registered so needs to be done here\r\n this.formMessageService.ClearForm(\"manufacturerForm\");\r\n }\r\n\r\n OnSaveManufacturer(): void {\r\n this.isLoading = true;\r\n\r\n if (this.isNewRecord) {\r\n this.formMessageService.RegisterObservable(this.stockManufacturerService.Create(this.model), \"manufacturerForm\")\r\n .pipe(finalize(() => {\r\n this.isLoading = false;\r\n }))\r\n .subscribe((newId: number) => {\r\n this.model.ManufacturerId = newId;\r\n this.id = newId;\r\n this.isLoading = false;\r\n });\r\n } else {\r\n this.formMessageService.RegisterObservable(this.stockManufacturerService.Update(this.model), \"manufacturerForm\")\r\n .pipe(finalize(() => {\r\n // only called if an error is returned - not if success or error (which is the point of finalize)\r\n this.isLoading = false;\r\n }))\r\n .subscribe(() => {\r\n this.isLoading = false;\r\n });\r\n }\r\n }\r\n\r\n OnDeleteManufacturer(): void {\r\n this.showDeleteWarning = true;\r\n }\r\n\r\n OnConfirmDeletion(confirmed: boolean): void {\r\n if (confirmed) {\r\n this.isLoading = true;\r\n\r\n this.formMessageService.RegisterObservable(this.stockManufacturerService.Delete(this.id), \"manufacturerForm\")\r\n .pipe(finalize(() => {\r\n this.showDeleteWarning = false;\r\n this.isLoading = false;\r\n }))\r\n .subscribe(() => {\r\n this.location.go(\"/proteansystem/systems/stock-settings/manufacturer-list\");\r\n });\r\n }\r\n this.showDeleteWarning = false;\r\n }\r\n\r\n OnConfirmDiscard(confirmed: boolean): void {\r\n if (confirmed) {\r\n this.Load();\r\n }\r\n this.showDiscardWarning = false;\r\n }\r\n\r\n OnDiscard(): void {\r\n this.showDiscardWarning = true;\r\n }\r\n\r\n private Load(): void {\r\n this.form.form.reset();\r\n\r\n if (this.isNewRecord) {\r\n this.model = { Name: \"\" };\r\n } else {\r\n this.isLoading = true;\r\n this.stockManufacturerService.Get(this.id)\r\n .pipe(finalize(() => this.isLoading = false))\r\n .subscribe(data => {\r\n this.model = data;\r\n });\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n \r\n {{ 'store.new-store' | translate }}\r\n \r\n \r\n {{ 'store.store'| translate }}\r\n {{ storeModel.StoreName }}\r\n \r\n

\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n","import { Location } from \"@angular/common\";\r\nimport { Component, ElementRef, Input, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { finalize } from \"rxjs/operators\";\r\nimport { CustomerService, CustomerStatus, FormMesssageService, StoreModel, StoreType } from \"servicesight-shared\";\r\nimport { StoreService } from \"../../services/store.service\";\r\n\r\n@Component({\r\n selector: \"app-store\",\r\n templateUrl: \"./store.component.html\",\r\n styleUrls: [\"./store.component.scss\"]\r\n})\r\nexport class StoreComponent implements OnInit {\r\n\r\n @Input() storeId: number = null;\r\n @Input() isNewlyCreated: boolean;\r\n @ViewChild(\"storeForm\", { static: true }) form: NgForm;\r\n @ViewChild(\"storeAddress\", { static: true }) storeAddress: ElementRef;\r\n\r\n public customerDataSource: DataSource;\r\n public readonly formName: string = \"storeForm\";\r\n public isLoading: boolean = false;\r\n public showDeleteMessage: boolean = false;\r\n public StoreType = StoreType;\r\n public storeModel: StoreModel = {\r\n StoreId: 0,\r\n StoreName: \"\",\r\n SiteId: 1,\r\n StoreType: StoreType.Store\r\n };\r\n\r\n public get isNew(): boolean {\r\n return this.storeId == null;\r\n }\r\n\r\n private rootUrl: string;\r\n private storeListPath: string = \"proteansystem/systems/stock-settings/store-list\";\r\n\r\n constructor(\r\n private storeService: StoreService,\r\n private customerService: CustomerService,\r\n private formMessageService: FormMesssageService,\r\n private location: Location\r\n ) { }\r\n\r\n public ngOnInit(): void {\r\n this.SetRootUrl();\r\n this.GetCustomerDataSource();\r\n this.Load();\r\n }\r\n\r\n public OnCustomerChanged(e: any): void {\r\n if (e.value && e.value.CustomerId) {\r\n this.storeModel.SiteId = e.value.CustomerId;\r\n this.storeAddress.nativeElement.value = e.value.Address;\r\n }\r\n }\r\n\r\n public OnVanChanged(e: any): void {\r\n this.form.form.markAsDirty();\r\n\r\n const isChecked = e.target.checked;\r\n if (isChecked) {\r\n this.storeModel.StoreType = StoreType.Van;\r\n }\r\n else {\r\n this.storeModel.StoreType = StoreType.Store;\r\n }\r\n }\r\n\r\n public OnConsignmentStoreChanged(e: any): void {\r\n this.form.form.markAsDirty();\r\n\r\n const isChecked = e.target.checked;\r\n if (isChecked) {\r\n this.storeModel.StoreType = StoreType.Consignment;\r\n }\r\n else {\r\n this.storeModel.StoreType = StoreType.Store;\r\n }\r\n }\r\n\r\n public OnSaveStore(): void {\r\n this.isLoading = true;\r\n\r\n if (this.isNew) {\r\n this.formMessageService.RegisterObservable(this.storeService.Create(this.storeModel), this.formName)\r\n .pipe(finalize(() => {\r\n this.isLoading = false;\r\n }))\r\n .subscribe(store => {\r\n this.location.go(`${this.rootUrl}/store/${store.StoreId}?isNewlyCreated=true`);\r\n });\r\n } else {\r\n this.formMessageService.RegisterObservable(this.storeService.Update(this.storeModel), this.formName)\r\n .pipe(finalize(() => {\r\n this.isLoading = false;\r\n }))\r\n .subscribe((store) => {\r\n this.isLoading = false;\r\n this.storeModel = store;\r\n });\r\n }\r\n }\r\n\r\n public OnDeleteStore(): void {\r\n this.showDeleteMessage = true;\r\n }\r\n\r\n public ConfirmDeleteAction(confirm: boolean): void {\r\n\r\n if (confirm) {\r\n this.isLoading = true;\r\n this.formMessageService.RegisterObservable(this.storeService.Delete(this.storeModel.StoreId), this.formName)\r\n .pipe(finalize(() => {\r\n this.isLoading = false;\r\n }))\r\n .subscribe(() => {\r\n this.location.go(this.storeListPath);\r\n });\r\n }\r\n this.showDeleteMessage = false;\r\n }\r\n\r\n public OnDiscardStore(): void {\r\n this.location.go(this.storeListPath);\r\n }\r\n\r\n private SetRootUrl(): void {\r\n const path = this.location.path();\r\n this.rootUrl = `${path.substr(0, path.lastIndexOf(\"/\"))}`;\r\n }\r\n\r\n private async Load(): Promise {\r\n this.form.form.reset();\r\n\r\n if (this.isNew) {\r\n this.storeAddress.nativeElement.value = await this.GetSiteAddress(this.storeModel.SiteId);\r\n } else {\r\n this.storeService.Get(this.storeId).subscribe(\r\n async (store) => {\r\n this.storeModel = store;\r\n this.storeAddress.nativeElement.value = await this.GetSiteAddress(store.SiteId);\r\n }\r\n );\r\n }\r\n }\r\n\r\n private GetCustomerDataSource(): void {\r\n const customerFilter = [[[\"Status\", \"=\", CustomerStatus.ACTIVE], \"or\", [\"Status\", \"=\", CustomerStatus.MANAGING_AGENT]], \"and\", [\"IsCustomer\", \"=\", true]];\r\n this.customerDataSource = this.customerService.GetCustomersDataSource();\r\n this.customerDataSource.filter(customerFilter);\r\n }\r\n\r\n private async GetSiteAddress(siteId: number): Promise {\r\n const customerDataStore = this.customerDataSource.store() as ODataStore;\r\n const storeSite = await customerDataStore.byKey(siteId);\r\n return storeSite.Address;\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'store.stores' | translate }}\r\n   
{{ 'store.list.subtitle' | translate }}
\r\n

\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n
\r\n \r\n
\r\n \r\n
","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { CustomerService, StoreType } from \"servicesight-shared\";\r\nimport { StoreService } from \"../../services/store.service\";\r\n\r\n@Component({\r\n selector: \"app-store-list\",\r\n templateUrl: \"./store-list.component.html\",\r\n styleUrls: [\"./store-list.component.scss\",\r\n \"../../../../../projects/servicesight-shared/src/lib/styles/servicesight-shared.scss\"]\r\n})\r\nexport class StoreListComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n\r\n public stores: ODataStore;\r\n public sitesDataStore: ODataStore;\r\n public searchText: string = \"\";\r\n\r\n constructor(\r\n private customerService: CustomerService,\r\n private storeService: StoreService) { }\r\n\r\n public ngOnInit(): void {\r\n this.stores = this.storeService.GetDataStore();\r\n this.sitesDataStore = this.customerService.GetCustomerDataStore();\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.searchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public SortNameColumn(rowData: any): any {\r\n const mainStoreId = 1;\r\n if (rowData.StoreId === mainStoreId) {\r\n const column = this as any;\r\n return column.sortOrder === \"asc\" ? \"aaa\" : \"zzz\";\r\n } else {\r\n return rowData.StoreName;\r\n }\r\n }\r\n\r\n public SetDisplayValue(item: any): string {\r\n let address = \"\";\r\n\r\n if (item.Address && item.CountryName) {\r\n address = item.Address + \", \" + item.CountryName;\r\n } else if (item.Address) {\r\n address = item.Address;\r\n } else if (item.CountryName) {\r\n address = item.CountryName;\r\n }\r\n\r\n return address;\r\n }\r\n\r\n public SetLogo(data: any): string {\r\n const mainStoreId = 1;\r\n const storeColour = data.data.StoreId === mainStoreId ? \"dark-green\" : \"navy\";\r\n\r\n let storeType;\r\n switch (data.data.StoreType) {\r\n case StoreType.Store:\r\n storeType = \"fa-inventory\";\r\n break;\r\n case StoreType.Van:\r\n storeType = \"fa-truck\";\r\n break;\r\n case StoreType.Consignment:\r\n storeType = \"fa-pallet\";\r\n break;\r\n }\r\n\r\n return `${storeColour} ${storeType}`;\r\n }\r\n\r\n public SortLocationColumn(rowData: any): any {\r\n const column = this as any;\r\n const value = column.calculateCellValue(rowData);\r\n return column.lookup.calculateCellValue(value);\r\n }\r\n}\r\n","import { CommonModule } from \"@angular/common\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { NgModule } from \"@angular/core\";\r\nimport { FormsModule } from \"@angular/forms\";\r\nimport { RouterModule } from \"@angular/router\";\r\nimport { TranslateLoader, TranslateModule } from \"@ngx-translate/core\";\r\nimport { CanDeactivateGuard, HttpLoaderFactory, ServicesightSharedModule } from \"servicesight-shared\";\r\nimport { PipesModule } from \"src/app/shared/pipes/pipes.module\";\r\nimport { SharedComponentsModule } from \"../../shared/components/shared-components.module\";\r\nimport { SharedDirectivesModule } from \"../../shared/directives/shared-directives.module\";\r\nimport { StockSettingsComponent } from \"./stock-settings.component\";\r\nimport { StockTypesComponent } from \"./stock-types/stock-types.component\";\r\nimport { DxAccordionModule, DxDataGridModule, DxSelectBoxModule, DxTextBoxModule } from \"devextreme-angular\";\r\nimport { NewStockTypeComponent } from \"./new-stock-type/new-stock-type.component\";\r\nimport { StockAdjustmentReasonListComponent } from \"./adjustment-reason-list/adjustment-reason-list.component\";\r\nimport { StockAdjustmentReasonComponent } from \"./adjustment-reason/adjustment-reason.component\";\r\nimport { StockManufacturersListComponent } from \"./manufacturers-list/manufacturers-list.component\";\r\nimport { StockManufacturerComponent } from \"./manufacturer/manufacturer.component\";\r\nimport { StoreComponent } from \"./store/store.component\";\r\nimport { StoreListComponent } from \"./store-list/store-list.component\";\r\n\r\nconst components = [\r\n StockSettingsComponent,\r\n StockTypesComponent,\r\n NewStockTypeComponent,\r\n StockAdjustmentReasonListComponent,\r\n StockAdjustmentReasonComponent,\r\n StockManufacturersListComponent,\r\n StockManufacturerComponent,\r\n StoreComponent,\r\n StoreListComponent\r\n];\r\n\r\n@NgModule({\r\n declarations: [\r\n ...components,\r\n NewStockTypeComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n RouterModule,\r\n FormsModule,\r\n PipesModule,\r\n DxTextBoxModule,\r\n DxAccordionModule,\r\n SharedComponentsModule,\r\n PipesModule,\r\n TranslateModule.forRoot({\r\n loader: {\r\n provide: TranslateLoader,\r\n useFactory: HttpLoaderFactory,\r\n deps: [HttpClient]\r\n }\r\n }),\r\n ServicesightSharedModule,\r\n SharedDirectivesModule,\r\n DxDataGridModule,\r\n DxSelectBoxModule\r\n ],\r\n providers: [\r\n CanDeactivateGuard\r\n ]\r\n})\r\nexport class StockSettingsModule { }\r\n","import { DragDropModule } from \"@angular/cdk/drag-drop\";\r\nimport { CommonModule } from \"@angular/common\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { NgModule } from \"@angular/core\";\r\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\r\nimport { RouterModule } from \"@angular/router\";\r\nimport { TranslateLoader, TranslateModule } from \"@ngx-translate/core\";\r\nimport {\r\n DxAccordionModule,\r\n DxCheckBoxModule,\r\n DxColorBoxModule,\r\n DxDataGridModule,\r\n DxDateBoxModule,\r\n DxDrawerModule,\r\n DxDropDownBoxModule,\r\n DxDropDownButtonModule,\r\n DxFilterBuilderModule,\r\n DxListModule,\r\n DxLoadPanelModule,\r\n DxMapModule,\r\n DxNumberBoxModule,\r\n DxPopupModule,\r\n DxScrollViewModule,\r\n DxSelectBoxModule,\r\n DxSwitchModule,\r\n DxTabPanelModule,\r\n DxTagBoxModule,\r\n DxTextAreaModule,\r\n DxTextBoxModule,\r\n DxTreeViewModule,\r\n DxValidationSummaryModule,\r\n DxValidatorModule\r\n} from \"devextreme-angular\";\r\nimport { ServicesightComponentsModule } from \"servicesight-components\";\r\nimport { CanDeactivateGuard, ServicesightSharedModule } from \"servicesight-shared\";\r\nimport { AccountsCommunicatorSetupComponent } from \"./accounts-communicator-setup/accounts-communicator-setup.component\";\r\nimport { AccountsCreateInvoicesComponent } from \"./accounts-create-invoices/accounts-create-invoices.component\";\r\nimport { AlertSettingsModule } from \"./alert-settings/alert-settings.module\";\r\nimport { AttributeSettingsModule } from \"./attribute-settings/attribute-settings.module\";\r\nimport { AuditLogComponent } from \"./audit-log/audit-log.component\";\r\nimport { CardDetailsComponent } from \"./billing/card-details/card-details.component\";\r\nimport { HistoryComponent } from \"./billing/history/history.component\";\r\nimport { ManageSubscriptionComponent } from \"./billing/manage-subscription/manage-subscription.component\";\r\nimport { CompetitorDetailComponent } from \"./crm-settings/competitor-detail/competitor-detail.component\";\r\nimport { CompetitorsListComponent } from \"./crm-settings/competitors-list/competitors-list.component\";\r\nimport { JobTitlesComponent } from \"./crm-settings/job-titles/job-titles.component\";\r\nimport { ReminderTypesDetailComponent } from \"./crm-settings/reminder-types-detail/reminder-types-detail.component\";\r\nimport { ReminderTypesListComponent } from \"./crm-settings/reminder-types-list/reminder-types-list.component\";\r\nimport { SalesBarrierDetailComponent } from \"./crm-settings/sales-barrier-detail/sales-barrier-detail.component\";\r\nimport { SalesBarrierListComponent } from \"./crm-settings/sales-barrier-list/sales-barrier-list.component\";\r\nimport { SalesOpportunityStatusDetailComponent } from \"./crm-settings/sales-opportunity-status-detail/sales-opportunity-status-detail.component\";\r\nimport { SalesOpportunityStatusListComponent } from \"./crm-settings/sales-opportunity-status-list/sales-opportunity-status-list.component\";\r\nimport { EmployeeEngineerSkillsComponent } from \"./employee-engineer-skills/employee-engineer-skills.component\";\r\nimport { EmployeeLimitsComponent } from \"./employee-limits/employee-limits.component\";\r\nimport { EngineerLocationComponent } from \"./engineer-location/engineer-location.component\";\r\nimport { EngineerSkillSettingsModule } from \"./engineer-skill-settings/engineer-skill-settings.module\";\r\nimport { EngineerTypeListComponent } from \"./engineer-type-settings/engineer-type-list/engineer-type-list.component\";\r\nimport { EngineerTypeComponent } from \"./engineer-type-settings/engineer-type/engineer-type.component\";\r\nimport { EquipmentConditionListComponent } from \"./equipment-settings/equipment-condition-list/equipment-condition-list.component\";\r\nimport { EquipmentConditionComponent } from \"./equipment-settings/equipment-condition/equipment-condition.component\";\r\nimport { MakeModelOptionDetailComponent } from \"./equipment-settings/make-model-option-detail/make-model-option-detail.component\";\r\nimport { MakeModelOptionMaterialsComponent } from \"./equipment-settings/make-model-option-materials/make-model-option-materials.component\";\r\nimport { MakeModelOptionPartsComponent } from \"./equipment-settings/make-model-option-parts/make-model-option-parts.component\";\r\nimport { MakeModelOptionComponent } from \"./equipment-settings/make-model-option/make-model-option.component\";\r\nimport { MakeModelOptionsDrawerComponent } from \"./equipment-settings/make-model-options-drawer/make-model-options-drawer.component\";\r\nimport { MakeModelOptionsComponent } from \"./equipment-settings/make-model-options/make-model-options.component\";\r\nimport { MakeModelPricingComponent } from \"./equipment-settings/make-model-pricing/make-model-pricing.component\";\r\nimport { MakeModelSkillsComponent } from \"./equipment-settings/make-model-skills/make-model-skills.component\";\r\nimport { MakeModelComponent } from \"./equipment-settings/make-model/make-model.component\";\r\nimport { ServiceScheduleUploadComponent } from \"./equipment-settings/service-schedule-upload/service-schedule-upload.component\";\r\nimport { FeedbackSurveyListComponent } from \"./feedback-survey-list/feedback-survey-list.component\";\r\nimport { CylinderTypesComponent } from \"./fgas-settings/cylinder-types/cylinder-types.component\";\r\nimport { NewCylinderTypeComponent } from \"./fgas-settings/new-cylinder-type/new-cylinder-type.component\";\r\nimport { RefrigerantTypeAccountsComponent } from \"./fgas-settings/refrigerant-type-accounts/refrigerant-type-accounts.component\";\r\nimport { RefrigerantTypeDetailComponent } from \"./fgas-settings/refrigerant-type-detail/refrigerant-type-detail.component\";\r\nimport { RefrigerantTypeListComponent } from \"./fgas-settings/refrigerant-type-list/refrigerant-type-list.component\";\r\nimport { RefrigerantTypePurchasingComponent } from \"./fgas-settings/refrigerant-type-purchasing/refrigerant-type-purchasing.component\";\r\nimport { InspectionReasonNotDoneComponent } from \"./inspection-reason-not-done/inspection-reason-not-done.component\";\r\nimport { InspectionReasonsNotDoneListComponent } from \"./inspection-reasons-not-done-list/inspection-reasons-not-done-list.component\";\r\nimport { InspectionTemplateListComponent } from \"./inspection-template-list/inspection-template-list.component\";\r\nimport { InspectionsDesignerComponent } from \"./inspections-designer/inspections-designer.component\";\r\nimport { InvalidAccountsComponent } from \"./invalid-accounts/invalid-accounts.component\";\r\nimport { ActivityTypesDetailComponent } from \"./job-settings/activity-types-detail/activity-types-detail.component\";\r\nimport { ActivityTypesListComponent } from \"./job-settings/activity-types-list/activity-types-list.component\";\r\nimport { JobGroupsDetailComponent } from \"./job-settings/job-groups-detail/job-groups-detail.component\";\r\nimport { JobGroupsListComponent } from \"./job-settings/job-groups-list/job-groups-list.component\";\r\nimport { JobTypesDetailChargesComponent } from \"./job-settings/job-types-detail/job-types-detail-charges/job-types-detail-charges.component\";\r\nimport { JobTypesDetailGeneralComponent } from \"./job-settings/job-types-detail/job-types-detail-general/job-types-detail-general.component\";\r\nimport { JobTypesDetailMaterialsComponent } from \"./job-settings/job-types-detail/job-types-detail-materials/job-types-detail-materials.component\";\r\nimport { JobTypesDetailNominalAccountComponent } from \"./job-settings/job-types-detail/job-types-detail-nominal-account/job-types-detail-nominal-account.component\";\r\nimport { JobTypesDetailTabsComponent } from \"./job-settings/job-types-detail/job-types-detail-sections/job-types-detail-sections.component\";\r\nimport { JobTypesDetailComponent } from \"./job-settings/job-types-detail/job-types-detail.component\";\r\nimport { JobTypesListComponent } from \"./job-settings/job-types-list/job-types-list.component\";\r\nimport { MaterialTypesDetailComponent } from \"./job-settings/material-types-detail/material-types-detail.component\";\r\nimport { MaterialTypesListComponent } from \"./job-settings/material-types-list/material-types-list.component\";\r\nimport { JobtypeInspectionsListComponent } from \"./jobtype-inspections-list/jobtype-inspections-list.component\";\r\nimport { LayoutTemplateSettingsModule } from \"./layout-template-settings/layout-template-settings.module\";\r\nimport { MailChimpLinkComponent } from \"./mail-chimp-link/mail-chimp-link.component\";\r\nimport { ModulesPipe } from \"./pipes/modules.pipe\";\r\nimport { RoleTypePipe } from \"./pipes/role-type.pipe\";\r\nimport { PlannedJobsReportComponent } from \"./planned-jobs-report/planned-jobs-report.component\";\r\nimport { PlannerCardComponent } from \"./planner-card/planner-card.component\";\r\nimport { PriceListCustomersComponent } from \"./price-list-customers/price-list-customers.component\";\r\nimport { PriceListDetailPartsTabComponent } from \"./price-list/price-list-detail-parts-tab/price-list-detail-parts-tab.component\";\r\nimport { PriceListDetailRefrigerantsTabComponent } from \"./price-list/price-list-detail-refrigerants-tab/price-list-detail-refrigerants-tab.component\";\r\nimport { PriceListDetailComponent } from \"./price-list/price-list-detail/price-list-detail.component\";\r\nimport { PriceListEquipmentTabComponent } from \"./price-list/price-list-equipment-tab/price-list-equipment-tab.component\";\r\nimport { PriceListMaterialsComponent } from \"./price-list/price-list-materials/price-list-materials.component\";\r\nimport { PriceListComponent } from \"./price-list/price-list.component\";\r\nimport { SelectStockTypeDialogueComponent } from \"./price-list/select-stock-type-dialogue/select-stock-type-dialogue.component\";\r\nimport { SecurityRolesDetailComponent } from \"./security-settings/security-roles-detail/security-roles-detail.component\";\r\nimport { SecurityRolesListComponent } from \"./security-settings/security-roles-list/security-roles-list.component\";\r\nimport { LicenceViewerComponent } from \"./security/licence-viewer/licence-viewer.component\";\r\nimport { ServiceContractsSettingsModule } from \"./service-contracts-settings/service-contracts-settings.module\";\r\nimport { StockSettingsModule } from \"./stock-settings/stock-settings.module\";\r\nimport { SurveyDesignerComponent } from \"./survey-designer/survey-designer.component\";\r\nimport { TwoFactorAuthenticationComponent } from \"./two-factor-authentication/two-factor-authentication.component\";\r\nimport { UserReferenceOptionsListComponent } from \"./user-reference-options-list/user-reference-options-list.component\";\r\nimport { SharedComponentsModule } from \"../shared/components/shared-components.module\";\r\nimport { HttpLoaderFactory } from \"../shared/factory/http-loader.factory\";\r\nimport { PipesModule } from \"../shared/pipes/pipes.module\";\r\nimport { EmployeesListComponent } from \"./employees/employees-list/employees-list.component\";\r\nimport { ProjectTypesListComponent } from \"./project-settings/project-types-list/project-types-list.component\";\r\nimport { ProjectTypeDetailComponent } from \"./project-settings/project-type-detail/project-type-detail.component\";\r\nimport { ProjectStatusesListComponent } from \"./project-settings/project-statuses-list/project-statuses-list.component\";\r\nimport { PriorityListComponent } from \"./job-settings/priority-list/priority-list.component\";\r\nimport { PriorityDetailComponent } from \"./job-settings/priority-detail/priority-detail.component\";\r\nimport { ProjectStatusDetailComponent } from \"./project-settings/project-status-detail/project-status-detail.component\";\r\n\r\n@NgModule({\r\n declarations: [\r\n InspectionTemplateListComponent,\r\n JobtypeInspectionsListComponent,\r\n InspectionsDesignerComponent,\r\n SurveyDesignerComponent,\r\n FeedbackSurveyListComponent,\r\n InspectionReasonsNotDoneListComponent,\r\n InspectionReasonNotDoneComponent,\r\n AccountsCreateInvoicesComponent,\r\n PlannedJobsReportComponent,\r\n PriceListComponent,\r\n PriceListDetailComponent,\r\n PriceListMaterialsComponent,\r\n PriceListDetailPartsTabComponent,\r\n SelectStockTypeDialogueComponent,\r\n PriceListCustomersComponent,\r\n EmployeeEngineerSkillsComponent,\r\n EmployeeLimitsComponent,\r\n TwoFactorAuthenticationComponent,\r\n PlannerCardComponent,\r\n AuditLogComponent,\r\n SalesBarrierListComponent,\r\n SalesBarrierDetailComponent,\r\n CompetitorsListComponent,\r\n SalesOpportunityStatusDetailComponent,\r\n ReminderTypesListComponent,\r\n ReminderTypesDetailComponent,\r\n JobTitlesComponent,\r\n CompetitorDetailComponent,\r\n LicenceViewerComponent,\r\n MailChimpLinkComponent,\r\n SalesOpportunityStatusListComponent,\r\n ActivityTypesListComponent,\r\n JobTypesListComponent,\r\n JobTypesDetailComponent,\r\n JobGroupsListComponent,\r\n JobGroupsDetailComponent,\r\n MaterialTypesListComponent,\r\n MaterialTypesDetailComponent,\r\n ActivityTypesDetailComponent,\r\n SecurityRolesDetailComponent,\r\n SecurityRolesListComponent,\r\n EngineerTypeListComponent,\r\n EngineerTypeComponent,\r\n AccountsCommunicatorSetupComponent,\r\n ServiceScheduleUploadComponent,\r\n EngineerLocationComponent,\r\n ModulesPipe,\r\n RoleTypePipe,\r\n UserReferenceOptionsListComponent,\r\n InvalidAccountsComponent,\r\n RefrigerantTypeListComponent,\r\n RefrigerantTypeDetailComponent,\r\n CylinderTypesComponent,\r\n NewCylinderTypeComponent,\r\n RefrigerantTypePurchasingComponent,\r\n RefrigerantTypeAccountsComponent,\r\n ManageSubscriptionComponent,\r\n CardDetailsComponent,\r\n HistoryComponent,\r\n PriceListDetailRefrigerantsTabComponent,\r\n MakeModelComponent,\r\n MakeModelSkillsComponent,\r\n MakeModelPricingComponent,\r\n MakeModelOptionsComponent,\r\n MakeModelOptionDetailComponent,\r\n MakeModelOptionComponent,\r\n MakeModelOptionPartsComponent,\r\n MakeModelOptionMaterialsComponent,\r\n MakeModelOptionsDrawerComponent,\r\n JobTypesDetailGeneralComponent,\r\n JobTypesDetailChargesComponent,\r\n JobTypesDetailNominalAccountComponent,\r\n EquipmentConditionListComponent,\r\n EquipmentConditionComponent,\r\n JobTypesDetailMaterialsComponent,\r\n JobTypesDetailTabsComponent,\r\n PriceListEquipmentTabComponent,\r\n EmployeesListComponent,\r\n ProjectTypesListComponent,\r\n ProjectTypeDetailComponent,\r\n ProjectStatusesListComponent,\r\n ProjectStatusDetailComponent,\r\n PriorityListComponent,\r\n PriorityDetailComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n PipesModule,\r\n SharedComponentsModule,\r\n DragDropModule,\r\n RouterModule,\r\n DxTabPanelModule,\r\n DxCheckBoxModule,\r\n DxPopupModule,\r\n DxSelectBoxModule,\r\n DxLoadPanelModule,\r\n DxMapModule,\r\n DxDropDownBoxModule,\r\n DxDropDownButtonModule,\r\n DxScrollViewModule,\r\n DxListModule,\r\n AttributeSettingsModule,\r\n StockSettingsModule,\r\n EngineerSkillSettingsModule,\r\n LayoutTemplateSettingsModule,\r\n AlertSettingsModule,\r\n ServiceContractsSettingsModule,\r\n TranslateModule.forRoot({\r\n loader: {\r\n provide: TranslateLoader,\r\n useFactory: HttpLoaderFactory,\r\n deps: [HttpClient]\r\n }\r\n }),\r\n ServicesightSharedModule,\r\n DxDataGridModule,\r\n DxDateBoxModule,\r\n DxAccordionModule,\r\n DxTextBoxModule,\r\n DxTextAreaModule,\r\n DxNumberBoxModule,\r\n DxValidatorModule,\r\n DxValidationSummaryModule,\r\n DxTagBoxModule,\r\n DxFilterBuilderModule,\r\n DxColorBoxModule,\r\n DxTreeViewModule,\r\n DxSwitchModule,\r\n DxDrawerModule,\r\n ServicesightComponentsModule\r\n ],\r\n providers: [\r\n CanDeactivateGuard\r\n ]\r\n})\r\nexport class SettingsModule {\r\n}\r\n","import { Injectable, Injector } from \"@angular/core\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class Ng1AuthInterceptorService {\r\n private $injector: any;\r\n\r\n private get $Injector(): any {\r\n if (!this.$injector) {\r\n this.$injector = this.injector.get(\"$injector\");\r\n }\r\n return this.$injector;\r\n }\r\n\r\n private get authInterceptorService(): any {\r\n return this.$Injector.get(\"authInterceptorService\");\r\n }\r\n\r\n constructor(private injector: Injector) { }\r\n\r\n public ShowLogin(): Promise {\r\n return this.authInterceptorService.showLogin();\r\n }\r\n}\r\n","import { HttpErrorResponse, HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from \"@angular/common/http\";\r\nimport { Injectable } from \"@angular/core\";\r\nimport { Observable, take, throwError } from \"rxjs\";\r\nimport { catchError, filter, finalize, mergeMap } from \"rxjs/operators\";\r\nimport { AuthService } from \"../services/auth/auth.service\";\r\nimport { Ng1AuthInterceptorService } from \"../services/ng1-auth-interceptor.service\";\r\n\r\n// eslint-disable-next-line no-var\r\ndeclare var window: any;\r\n\r\n@Injectable()\r\nexport class TokenInterceptor implements HttpInterceptor {\r\n private excludedUrls: string[] = [\r\n \"assets\",\r\n \"config\",\r\n \"/token\",\r\n \"VersionInfo\",\r\n \"ConfirmEmail\",\r\n \"ForgotPassword\",\r\n \"Account/ResetPassword\",\r\n \"GetUnauthorizedSettings\",\r\n \"AccountsLink/XeroSignIn\",\r\n \"i18nv2\",\r\n \"storage.googleapis.com\"\r\n ];\r\n\r\n constructor(\r\n public auth: AuthService,\r\n private ng1AuthInterceptor: Ng1AuthInterceptorService) {\r\n }\r\n\r\n intercept(request: HttpRequest, next: HttpHandler): Observable> {\r\n const showSpinner = !this.partMatchAnyUrl(request, \"EnabledModules\", \"GetSettingsAsync\", \"Permissions/MyList\", \"getnotifications\");\r\n if (showSpinner) {\r\n window.startStopSpinner(true);\r\n }\r\n\r\n const skipAuthHandling = this.partMatchAnyUrl(request, ...this.excludedUrls);\r\n\r\n const headers = {\r\n Authorization: null,\r\n };\r\n\r\n // headers[\"X-Page-Referrer\"] = window.location.href;\r\n\r\n if (skipAuthHandling) {\r\n return next.handle(request).pipe(finalize(() => {\r\n if (showSpinner) {\r\n window.startStopSpinner();\r\n }\r\n }));\r\n }\r\n\r\n if (!request.headers.has(\"Content-Type\") &&\r\n !this.partMatchAnyUrl(request, \"SendMessageAsync\", \"SaveDraftAsync\", \"UploadDocuments\", \"storage.googleapis.com\")) {\r\n headers[\"Content-Type\"] = \"application/json\";\r\n }\r\n\r\n return this.getTokenAndCall(this.auth.currentToken(), request, next, headers)\r\n .pipe(catchError((error: HttpErrorResponse) => {\r\n if (error.status === 401) {\r\n return this.getTokenAndCall(this.auth.getRefresh(), request, next, headers);\r\n }\r\n\r\n return throwError(() => error);\r\n })).pipe(catchError((error: HttpErrorResponse) => {\r\n if (error.status === 401 || (error.status === 400 && (error as any).isRefreshToken)) {\r\n this.ng1AuthInterceptor.ShowLogin();\r\n\r\n return this.auth.IsAuthenticated.pipe(filter(isAuthenticated => isAuthenticated), take(1), mergeMap(() => {\r\n return this.getTokenAndCall(this.auth.currentToken(), request, next, headers);\r\n }));\r\n }\r\n\r\n return throwError(() => error);\r\n }), finalize(() => {\r\n if (showSpinner) {\r\n window.startStopSpinner();\r\n }\r\n }));\r\n }\r\n\r\n private getTokenAndCall(\r\n tokenAccessor: Observable,\r\n request: HttpRequest,\r\n next: HttpHandler,\r\n headers: any): Observable> {\r\n return tokenAccessor\r\n .pipe(mergeMap(token => {\r\n if (token) {\r\n headers.Authorization = `Bearer ${token}`;\r\n }\r\n\r\n const withHeader = request.clone({\r\n setHeaders: headers\r\n });\r\n\r\n return next.handle(withHeader);\r\n }));\r\n }\r\n\r\n private partMatchAnyUrl(request: HttpRequest, ...strings: string[]): boolean {\r\n let value = false;\r\n strings.forEach(s => {\r\n value = value || request.url.indexOf(s) >= 0;\r\n });\r\n return value;\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { BehaviorSubject } from \"rxjs\";\r\nimport { IRouterLinkService } from \"servicesight-shared\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class RouterLinkService implements IRouterLinkService {\r\n\r\n public jobDetailBaseLink: BehaviorSubject;\r\n public inspectionDetailBaseLink: BehaviorSubject;\r\n public newJob: BehaviorSubject;\r\n public invoiceDetailBaseLink: BehaviorSubject;\r\n public serviceContractsBaseLink: BehaviorSubject;\r\n public serviceContractDetailsBaseLink: BehaviorSubject;\r\n public quoteDetailsBaseLink: BehaviorSubject;\r\n public quoteBaseLink: BehaviorSubject;\r\n public baseLink: BehaviorSubject;\r\n public creditNoteBaseLink: BehaviorSubject;\r\n public batchInvoicesBaseLink: BehaviorSubject;\r\n\r\n constructor() {\r\n this.jobDetailBaseLink = new BehaviorSubject(\"#/jobs/job/\");\r\n this.inspectionDetailBaseLink = new BehaviorSubject(\"/inspections/report/\");\r\n this.newJob = new BehaviorSubject(\"#/jobs/create\");\r\n this.quoteDetailsBaseLink = new BehaviorSubject(\"/quotes/details/\");\r\n this.invoiceDetailBaseLink = new BehaviorSubject(\"#/invoices/invoice/\");\r\n this.serviceContractsBaseLink = new BehaviorSubject(\"/contracts/list/\");\r\n this.serviceContractDetailsBaseLink = new BehaviorSubject(\"/contracts/detail/\");\r\n this.quoteBaseLink = new BehaviorSubject(\"\");\r\n this.baseLink = new BehaviorSubject(\"#/\");\r\n this.creditNoteBaseLink = new BehaviorSubject(\"/credit-notes/list\");\r\n this.batchInvoicesBaseLink = new BehaviorSubject(\"#/invoices/batch-list\");\r\n }\r\n jobsFilterLink?: BehaviorSubject;\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { of } from \"rxjs\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IShowCustomerName } from \"servicesight-shared\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class ShowCustomerNameService implements IShowCustomerName {\r\n\r\n constructor() { }\r\n\r\n public ShowCustomerName(): Observable {\r\n return of(true);\r\n }\r\n}\r\n","import { CommonModule } from \"@angular/common\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { NgModule } from \"@angular/core\";\r\nimport { FormsModule } from \"@angular/forms\";\r\nimport { RouterModule } from \"@angular/router\";\r\nimport { TranslateLoader, TranslateModule } from \"@ngx-translate/core\";\r\nimport {\r\n DxAccordionModule,\r\n DxCheckBoxModule,\r\n DxDataGridModule,\r\n DxDateBoxModule,\r\n DxFileUploaderModule,\r\n DxFilterBuilderModule,\r\n DxLoadPanelModule,\r\n DxNumberBoxModule,\r\n DxPopupModule,\r\n DxScrollViewModule,\r\n DxSelectBoxModule,\r\n DxSwitchModule,\r\n DxTabPanelModule,\r\n DxTextAreaModule,\r\n DxValidatorModule\r\n} from \"devextreme-angular\";\r\nimport { CanDeactivateGuard, ServicesightSharedModule, SharedPipesModule } from \"servicesight-shared\";\r\nimport { PickingNoteComponent } from \"./picking-note/picking-note.component\";\r\nimport { StockAdjustmentSerialNoStatusPipe } from \"./pipes/stock-adjustment-serial-no-status.pipe\";\r\nimport { StockAdjustmentStatusBarPipe } from \"./pipes/stock-adjustment-status-bar.pipe\";\r\nimport { StockAdjustmentStatusPipe } from \"./pipes/stock-adjustment-status.pipe\";\r\nimport { StockAdjustmentAutofillOptionsComponent } from \"./stock-adjustment-autofill-options/stock-adjustment-autofill-options.component\";\r\nimport { StockAdjustmentListComponent } from \"./stock-adjustment-list/stock-adjustment-list.component\";\r\nimport { StockAdjustmentSerailNoComponent } from \"./stock-adjustment-serail-no/stock-adjustment-serail-no.component\";\r\nimport { StockAdjustmentComponent } from \"./stock-adjustment/stock-adjustment.component\";\r\nimport { StockDetailComponent } from \"./stock-detail/stock-detail.component\";\r\nimport { StockFilesComponent } from \"./stock-files/stock-files.component\";\r\nimport { StockGeneralStoresComponent } from \"./stock-general-stores/stock-general-stores.component\";\r\nimport { StockGeneralComponent } from \"./stock-general/stock-general.component\";\r\nimport { StockHistoryComponent } from \"./stock-history/stock-history.component\";\r\nimport { StockMarketingComponent } from \"./stock-marketing/stock-marketing.component\";\r\nimport { StockPartUploadComponent } from \"./stock-part-upload/stock-part-upload.component\";\r\nimport { StockPreviewComponent } from \"./stock-preview/stock-preview.component\";\r\nimport { StockRoutingModule } from \"./stock-routing.module\";\r\nimport { StockSerialNosComponent } from \"./stock-serial-nos/stock-serial-nos.component\";\r\nimport { StockSupplierPricesUploadComponent } from \"./stock-supplier-prices-upload/stock-supplier-prices-upload.component\";\r\nimport { StockSuppliersComponent } from \"./stock-suppliers/stock-suppliers.component\";\r\nimport { StockTakePreviewComponent } from \"./stock-take-preview/stock-take-preview.component\";\r\nimport { StockTransferSerialNumberDialogueComponent } from \"./stock-transfer-serial-number-dialogue/stock-transfer-serial-number-dialogue.component\";\r\nimport { SharedComponentsModule } from \"../shared/components/shared-components.module\";\r\nimport { SharedDirectivesModule } from \"../shared/directives/shared-directives.module\";\r\nimport { HttpLoaderFactory } from \"../shared/factory/http-loader.factory\";\r\nimport { PipesModule } from \"../shared/pipes/pipes.module\";\r\nimport { StockEquivalencesComponent } from \"./stock-equivalences/stock-equivalences.component\";\r\n\r\n@NgModule({\r\n declarations: [\r\n StockDetailComponent,\r\n StockGeneralComponent,\r\n StockGeneralStoresComponent,\r\n StockAdjustmentComponent,\r\n StockAdjustmentListComponent,\r\n StockHistoryComponent,\r\n StockAdjustmentStatusPipe,\r\n StockAdjustmentStatusBarPipe,\r\n StockAdjustmentSerailNoComponent,\r\n StockAdjustmentSerialNoStatusPipe,\r\n StockPartUploadComponent,\r\n StockFilesComponent,\r\n StockAdjustmentSerialNoStatusPipe,\r\n StockSerialNosComponent,\r\n StockPreviewComponent,\r\n StockSuppliersComponent,\r\n StockAdjustmentAutofillOptionsComponent,\r\n StockTakePreviewComponent,\r\n StockTransferSerialNumberDialogueComponent,\r\n StockSupplierPricesUploadComponent,\r\n PickingNoteComponent,\r\n StockMarketingComponent,\r\n StockEquivalencesComponent\r\n ],\r\n imports: [\r\n FormsModule,\r\n DxDataGridModule,\r\n DxSelectBoxModule,\r\n DxPopupModule,\r\n DxAccordionModule,\r\n DxDateBoxModule,\r\n DxNumberBoxModule,\r\n DxFileUploaderModule,\r\n DxTextAreaModule,\r\n DxTabPanelModule,\r\n DxScrollViewModule,\r\n DxSwitchModule,\r\n DxLoadPanelModule,\r\n DxCheckBoxModule,\r\n DxValidatorModule,\r\n DxFilterBuilderModule,\r\n CommonModule,\r\n RouterModule,\r\n StockRoutingModule,\r\n ServicesightSharedModule,\r\n SharedComponentsModule,\r\n SharedDirectivesModule,\r\n SharedPipesModule,\r\n PipesModule,\r\n DxLoadPanelModule,\r\n TranslateModule.forRoot({\r\n loader: {\r\n provide: TranslateLoader,\r\n useFactory: HttpLoaderFactory,\r\n deps: [ HttpClient ]\r\n }\r\n }),\r\n ],\r\n providers: [\r\n CanDeactivateGuard\r\n ]\r\n})\r\nexport class StockModule { }\r\n","import { CommonModule, CurrencyPipe, DatePipe, DecimalPipe, PercentPipe } from \"@angular/common\";\r\nimport { HTTP_INTERCEPTORS, HttpClient, HttpClientModule } from \"@angular/common/http\";\r\nimport { APP_INITIALIZER, ErrorHandler, NgModule } from \"@angular/core\";\r\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\r\nimport { MatLegacyButtonModule as MatButtonModule } from \"@angular/material/legacy-button\";\r\nimport { MatLegacyDialogModule as MatDialogModule } from \"@angular/material/legacy-dialog\";\r\nimport { BrowserModule } from \"@angular/platform-browser\";\r\nimport { BrowserAnimationsModule } from \"@angular/platform-browser/animations\";\r\nimport { Router } from \"@angular/router\";\r\nimport { UpgradeModule } from \"@angular/upgrade/static\";\r\nimport { HttpCacheInterceptorModule, useHttpCacheLocalStorage } from \"@ngneat/cashew\";\r\nimport { TranslateLoader, TranslateModule } from \"@ngx-translate/core\";\r\nimport { DxTextAreaModule } from \"devextreme-angular\";\r\nimport { locale } from \"devextreme/localization\";\r\nimport { CookieService } from \"ngx-cookie-service\";\r\nimport { ServicesightComponentsModule } from \"servicesight-components\";\r\nimport { AppRoutingModule } from \"./app-routing.module\";\r\nimport { AppComponent } from \"./app.component\";\r\nimport { ContactsModule } from \"./contacts/contacts.module\";\r\nimport { CustomersModule } from \"./customers/customers.module\";\r\nimport { DashboardModule } from \"./dashboard/dashboard.module\";\r\nimport { ElmahIoErrorHandler } from \"./elmah-io-error.handler\";\r\nimport { FGasModule } from \"./f-gas/f-gas.module\";\r\nimport { InspectionsModule } from \"./inspections/inspections.module\";\r\nimport { InvoicesModule } from \"./invoices/invoices.module\";\r\nimport { MessagesModule } from \"./messages/messages.module\";\r\nimport { MySettingsModule } from \"./my-settings/my-settings.module\";\r\nimport { PlannerModule } from \"./planner/planner.module\";\r\nimport { PortalModule } from \"./portal/portal.module\";\r\nimport { PowerBiModule } from \"./power-bi/power-bi.module\";\r\nimport { RemindersModule } from \"./reminders/reminders.module\";\r\nimport { SettingsModule } from \"./settings/settings.module\";\r\nimport { AppConfigProvider, AppConfigWrapper } from \"./shared/app.config\";\r\nimport { JstranslateComponent } from \"./shared/components/jstranslate.component\";\r\nimport { SharedComponentsModule } from \"./shared/components/shared-components.module\";\r\nimport { EmptyComponentComponent } from \"./shared/empty-component/empty-component.component\";\r\nimport { HttpLoaderFactory } from \"./shared/factory/http-loader.factory\";\r\nimport { TokenInterceptor } from \"./shared/interceptor/auth.inertceptor\";\r\nimport { AuthService } from \"./shared/services/auth/auth.service\";\r\nimport { JstranslateService } from \"./shared/services/jstranslate/jstranslate.service\";\r\nimport { ODataService } from \"./shared/services/odata/odata.service\";\r\nimport { RouterLinkService } from \"./shared/services/router-link/router-link.service\";\r\nimport { ShowCustomerNameService } from \"./shared/services/show-customer-name.service\";\r\nimport { StockModule } from \"./stock/stock.module\";\r\nimport {\r\n JobEquipmentPipe,\r\n ServicesightSharedModule,\r\n} from \"servicesight-shared\";\r\nimport { ExternalSignInComponent } from \"./external-sign-in/external-sign-in.component\";\r\n\r\n// eslint-disable-next-line no-var\r\ndeclare var window: any;\r\n\r\n// eslint-disable-next-line prefer-arrow/prefer-arrow-functions\r\nexport function initializeApp(appConfig: AppConfigWrapper) {\r\n return () => appConfig.load();\r\n}\r\n\r\n@NgModule({\r\n declarations: [\r\n AppComponent,\r\n JstranslateComponent,\r\n EmptyComponentComponent,\r\n ExternalSignInComponent\r\n ],\r\n imports: [\r\n BrowserAnimationsModule,\r\n BrowserModule,\r\n CommonModule,\r\n UpgradeModule,\r\n AppRoutingModule,\r\n InspectionsModule,\r\n MessagesModule,\r\n MySettingsModule,\r\n DashboardModule,\r\n StockModule,\r\n InvoicesModule,\r\n SharedComponentsModule,\r\n SettingsModule,\r\n PortalModule,\r\n CustomersModule,\r\n HttpClientModule,\r\n HttpCacheInterceptorModule.forRoot({\r\n ttl: 60 * 1000,\r\n strategy: \"explicit\"\r\n }),\r\n MatDialogModule,\r\n MatButtonModule,\r\n TranslateModule.forRoot({\r\n loader: {\r\n provide: TranslateLoader,\r\n useFactory: HttpLoaderFactory,\r\n deps: [HttpClient]\r\n }\r\n }),\r\n FormsModule,\r\n DxTextAreaModule,\r\n ReactiveFormsModule,\r\n ServicesightSharedModule.forRoot(),\r\n PlannerModule,\r\n PowerBiModule,\r\n RemindersModule,\r\n ContactsModule,\r\n ServicesightComponentsModule,\r\n FGasModule\r\n ],\r\n providers: [\r\n JstranslateService,\r\n CookieService,\r\n AppConfigWrapper,\r\n {\r\n provide: HTTP_INTERCEPTORS,\r\n useClass: TokenInterceptor,\r\n multi: true\r\n },\r\n {\r\n provide: APP_INITIALIZER,\r\n useFactory: initializeApp,\r\n deps: [AppConfigWrapper],\r\n multi: true\r\n },\r\n {\r\n provide: \"ng1invoiceservice\",\r\n useFactory: ($injector: any) => $injector.get(\"ng1invoiceService\"),\r\n deps: [\"$injector\"]\r\n },\r\n {\r\n provide: \"IJstranslateService\",\r\n useClass: JstranslateService\r\n },\r\n {\r\n provide: \"AuthService\",\r\n useExisting: AuthService\r\n },\r\n {\r\n provide: \"ODataService\",\r\n useExisting: ODataService\r\n },\r\n {\r\n provide: \"RouterLinkService\",\r\n useExisting: RouterLinkService\r\n },\r\n AppConfigProvider,\r\n DatePipe,\r\n CurrencyPipe,\r\n DecimalPipe,\r\n PercentPipe,\r\n JobEquipmentPipe,\r\n {\r\n provide: \"ShowCustomerName\",\r\n useExisting: ShowCustomerNameService\r\n },\r\n {\r\n provide: ErrorHandler,\r\n useClass: ElmahIoErrorHandler\r\n },\r\n useHttpCacheLocalStorage\r\n ],\r\n bootstrap: [AppComponent]\r\n})\r\nexport class AppModule {\r\n\r\n constructor(private router: Router) {\r\n // expose this on the window for angularjs\r\n window.angular7Router = this.router;\r\n locale(navigator.language);\r\n }\r\n\r\n}\r\n","\r\n
\r\n
\r\n

{{ 'menu.contacts' | translate}}

\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n
\r\n \r\n {{ GetParentType(data.data.ContactParentType) | translate }}{{ data.data.ContactParentType ? \" - \" : \"\" }}{{ data.value | contactStatus | translate }}\r\n \r\n \r\n {{ data.value | contactStatus | translate }}\r\n \r\n
\r\n
\r\n
\r\n
\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport {\r\n ContactService,\r\n GridKind,\r\n GridService,\r\n HelpItemTagEnum,\r\n Module,\r\n ModuleService,\r\n PermissionsService,\r\n SettingId,\r\n SettingsService\r\n} from \"servicesight-shared\";\r\nimport { ContactStatus } from \"src/app/shared/enums/contact-status.eum\";\r\n\r\n@Component({\r\n selector: \"app-contact-list\",\r\n templateUrl: \"./contact-list.component.html\",\r\n styleUrls: [\r\n \"./contact-list.component.scss\",\r\n \"../../../../projects/servicesight-shared/src/lib/styles/global.scss\",\r\n \"../../../../projects/servicesight-shared/src/lib/styles/backgrounds.scss\",\r\n \"../../../../projects/servicesight-shared/src/lib/styles/servicesight-shared.scss\"\r\n ]\r\n})\r\nexport class ContactListComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) private grid: DxDataGridComponent;\r\n\r\n public helpItemTagEnum = HelpItemTagEnum;\r\n public salesCampaignsEnabled: boolean = false;\r\n public salesOpportunityEnabled: boolean = false;\r\n public hasQuotesEnabled: boolean = false;\r\n\r\n public mailchimpServer: string = null;\r\n\r\n public suppliersEnabled: boolean = false;\r\n public contactsDataSource: DataSource;\r\n public searchText: string = \"\";\r\n\r\n public contactStatus = ContactStatus;\r\n public filters: any = {\r\n 1: [\"Status\", \"=\", ContactStatus.ACTIVE],\r\n 2: [\"Status\", \"=\", ContactStatus.INACTIVE]\r\n };\r\n\r\n public get customerColumnLabel(): string {\r\n return this.suppliersEnabled ? \"label.company\" : \"label.customer\";\r\n }\r\n\r\n constructor(\r\n private moduleService: ModuleService,\r\n private contactService: ContactService,\r\n private gridService: GridService,\r\n private permissionsService: PermissionsService,\r\n private settingsService: SettingsService\r\n ) { }\r\n\r\n public ngOnInit(): void {\r\n this.moduleService.GetEnabledModules().subscribe(enabledModules => {\r\n this.suppliersEnabled = enabledModules.includes(Module.PurchaseOrders);\r\n this.salesOpportunityEnabled = enabledModules.includes(Module.SalesOpportunity);\r\n this.salesCampaignsEnabled = enabledModules.includes(Module.SalesCampaigns);\r\n });\r\n\r\n this.settingsService.getSetting(SettingId.MailchimpUserServer).subscribe(setting => {\r\n this.mailchimpServer = setting.ValueText;\r\n });\r\n\r\n this.permissionsService.CurrentUserHasPermission(\"QuoteView\").subscribe(permission => {\r\n this.hasQuotesEnabled = permission;\r\n });\r\n\r\n this.gridService.GetLayout(GridKind.Contacts).subscribe(value => {\r\n if (value) {\r\n this.grid.instance.state(value);\r\n }\r\n this.GetDataSources();\r\n }, () => this.GetDataSources());\r\n }\r\n\r\n public GetParentType(type: number): string {\r\n switch (type) {\r\n case 1:\r\n return \"label.customer\";\r\n case 2:\r\n return \"label.supplier\";\r\n default:\r\n return \"\";\r\n }\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.grid.instance.pageIndex(0);\r\n this.grid.instance.searchByText(encodeURI(this.searchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public FilterChanged($event): void {\r\n const filterValue = $event.currentTarget.value;\r\n if (filterValue === \"0\") {\r\n this.grid.instance.clearFilter(\"dataSource\");\r\n } else {\r\n this.grid.instance.filter(this.filters[filterValue]);\r\n }\r\n }\r\n\r\n public SaveLayout(): void {\r\n const state = this.grid.instance.state();\r\n this.gridService.SaveLayout(state, GridKind.Contacts);\r\n }\r\n\r\n public ResetLayout(): void {\r\n this.gridService.ResetLayout(GridKind.Contacts);\r\n this.grid.instance.state(null);\r\n }\r\n\r\n public ViewDetails(event): void {\r\n window.location.href = `/#/contacts/contact/${event.data.ContactId}`;\r\n }\r\n\r\n public SortStatus(rowData: any): string {\r\n return `${rowData.ContactParentType} / ${rowData.Status}`;\r\n }\r\n\r\n private GetDataSources(): void {\r\n this.contactsDataSource = this.contactService.GetAllContactsDataSource();\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class ContactUploadService {\r\n\r\n constructor(\r\n @Inject(APP_CONFIG) private config: IAppConfig,\r\n private http: HttpClient\r\n ) { }\r\n\r\n public GetSample(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}ContactUpload/DownloadSample`);\r\n }\r\n\r\n public Upload(rows: any[]): Observable {\r\n return this.http.post(`${this.config.apiLocations.ServiceSight}ContactUpload/UploadContacts`, rows);\r\n }\r\n}\r\n","import { Component, ViewChild } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { ContactUploadService } from \"../services/contact-upload.service\";\r\nimport { IContactUploadData } from \"../models/contact-upload-data\";\r\nimport { ImportColumnDictionary } from \"../../shared/models/import/import-column-dictionary.model\";\r\nimport { ImportMap } from \"../../shared/models/import/import-map.model\";\r\nimport { ImportValidationObject } from \"../../shared/models/import/import-validation-object.model\";\r\nimport { ImportValidationFunc } from \"../../shared/models/import/import-validation.type\";\r\nimport { ToasterService, ToastType } from \"servicesight-shared\";\r\nimport { ImporterComponent } from \"../../shared/components/importer/importer.component\";\r\nimport { ImportSummary } from \"src/app/shared/components/importer/models/import-summary\";\r\n\r\n@Component({\r\n selector: \"app-contact-upload\",\r\n templateUrl: \"./contact-upload.component.html\"\r\n})\r\nexport class ContactUploadComponent {\r\n\r\n private titles: string[] = [\"mr\", \"ms\", \"mrs\", \"miss\", \"sir\", \"dame\", \"dr\"];\r\n private contactTypes: string[] = [\"customer\", \"supplier\", \"vendor\"];\r\n\r\n private rePhoneNumber: RegExp = /^[ \\d]*$/;\r\n private reEmail: RegExp = /.+?@.+/;\r\n\r\n private existingRows: IContactUploadData[] = [];\r\n\r\n @ViewChild(\"importer\", { static: true }) importer: ImporterComponent;\r\n\r\n public noMatch: number = -1;\r\n\r\n public isProcessing: boolean = false;\r\n\r\n public remainingRows: number = 0;\r\n\r\n public defaultMap: ImportColumnDictionary = {\r\n FirstName: { displayName: \"Contact First Name\", value: this.noMatch, required: true },\r\n LastName: { displayName: \"Contact Last Name\", value: this.noMatch, required: false },\r\n Title: { displayName: \"Title\", value: this.noMatch, required: false },\r\n Initials: { displayName: \"Initials\", value: this.noMatch, required: false },\r\n JobTitle: { displayName: \"Job Title\", value: this.noMatch, required: false },\r\n Type: { displayName: \"Type\", value: this.noMatch, required: true },\r\n AccountCode: { displayName: \"Account Code\", value: this.noMatch, required: true },\r\n MobileNumber: { displayName: \"Contact Mobile No\", value: this.noMatch, required: false },\r\n PhoneNumber: { displayName: \"Contact Phone No\", value: this.noMatch, required: false },\r\n PhoneExtension: { displayName: \"Contact Phone Ext\", value: this.noMatch, required: false },\r\n Email: { displayName: \"Contact Email\", value: this.noMatch, required: false },\r\n UserRef1: { displayName: \"Contact User Ref 1\", value: this.noMatch, required: false },\r\n UserRef2: { displayName: \"Contact User Ref 2\", value: this.noMatch, required: false },\r\n Notes: { displayName: \"Notes\", value: this.noMatch, required: false },\r\n ContactType: { displayName: \"Contact Type\", value: this.noMatch, required: false }\r\n };\r\n\r\n public defaultMapper: { [key: string]: string } = {\r\n Surname: \"LastName\",\r\n JobDescription: \"JobTitle\",\r\n AccountCode: \"Alpha\",\r\n Mobile: \"MoblieNumber\",\r\n MobilePhone: \"MobileNumber\",\r\n MobilePhoneNumber: \"MobileNumber\",\r\n Cell: \"MobileNumber\",\r\n CellNo: \"MobileNumber\",\r\n CellNumber: \"MobileNumber\",\r\n CellPhone: \"MobileNumber\",\r\n CellPhoneNo: \"MobileNumber\",\r\n CellPhoneNumber: \"MobileNumber\",\r\n Phone: \"PhoneNumber\",\r\n PhoneNo: \"PhoneNumber\",\r\n Telephone: \"PhoneNumber\",\r\n TelephoneNumber: \"PhoneNumber\",\r\n TelephoneNo: \"PhoneNumber\",\r\n Tel: \"PhoneNumber\",\r\n TelNo: \"PhoneNumber\",\r\n TelNumber: \"PhoneNumber\",\r\n Extension: \"PhoneExtension\",\r\n Ext: \"PhoneExtension\",\r\n PhoneExt: \"PhoneExtension\",\r\n TelephoneExt: \"PhoneExtension\",\r\n TelephoneExtension: \"PhoneExtension\",\r\n EmailAddress: \"Email\",\r\n UserReference1: \"UserRef1\",\r\n UserReference2: \"UserRef2\",\r\n Notes: \"Notes\",\r\n ContactType: \"ContactType\",\r\n contactType: \"ContactType\",\r\n contacttype: \"ContactType\",\r\n };\r\n\r\n public preDefinedMaps: Array = [\r\n {\r\n columns: [\r\n \"Contact First Name\",\r\n \"Contact Last Name\",\r\n \"Title\",\r\n \"Initials\",\r\n \"Job Title\",\r\n \"Type\",\r\n \"Account Code\",\r\n \"Contact Mobile No\",\r\n \"Contact Phone No\",\r\n \"Contact Phone Ext\",\r\n \"Contact Email\",\r\n \"Contact User Ref 1\",\r\n \"Contact User Ref 2\",\r\n \"Notes\",\r\n \"Contact Type\"\r\n ],\r\n name: \"ServiceSight\",\r\n map: {\r\n FirstName: { displayName: \"Contact First Name\", value: 0},\r\n LastName: { displayName: \"Contact Last Name\", value: 1 },\r\n Title: { displayName: \"Title\", value: 2 },\r\n Initials: { displayName: \"Initials\", value: 3 },\r\n JobTitle: { displayName: \"Job Title\", value: 4 },\r\n Type: { displayName: \"Type\", value: 5 },\r\n AccountCode: { displayName: \"Account Code\", value: 6 },\r\n MobileNumber: { displayName: \"Contact Mobile No\", value: 7 },\r\n PhoneNumber: { displayName: \"Contact Phone No\", value: 8 },\r\n PhoneExtension: { displayName: \"Contact Phone Ext\", value: 9 },\r\n Email: { displayName: \"Contact Email\", value: 10 },\r\n UserRef1: { displayName: \"Contact User Ref 1\", value: 11 },\r\n UserRef2: { displayName: \"Contact User Ref 2\", value: 12 },\r\n Notes: { displayName: \"Notes\", value: 13 },\r\n ContactType: { displayName: \"Contact Type\", value: 14 }\r\n }\r\n }\r\n ];\r\n\r\n public columnValidations: ImportValidationObject = {\r\n FirstName: (val) => val && val.toString().length <= 50,\r\n LastName: (val) => !val || val.toString().length <= 50,\r\n Title: (val) => !val || this.titles.indexOf(val.toLowerCase()) >= 0,\r\n Initials: (val) => !val || val.toString().length <= 50,\r\n JobTitle: (val) => !val || val.toString().length <= 50,\r\n Type: (val) => val && (this.contactTypes.indexOf(val.toString().trim().toLowerCase()) >= 0),\r\n AccountCode: (val) => val && val && val.toString().length <= 50,\r\n MobileNumber: (val) => !val || (val.toString().replace(/\\s/g, \"\").length <= 11 && this.rePhoneNumber.test(val)),\r\n PhoneNumber: (val) => !val || (val.toString().replace(/\\s/g, \"\").length <= 11 && this.rePhoneNumber.test(val)),\r\n PhoneExtension: (val) => !val || (val.toString().replace(/\\s/g, \"\").length <= 11 && this.rePhoneNumber.test(val)),\r\n Email: (val) => !val || (val.toString().length <= 255 && this.reEmail.test(val)),\r\n UserRef1: (val) => !val || val.toString().length <= 50,\r\n UserRef2: (val) => !val || val.toString().length <= 50,\r\n Notes: () => true,\r\n ContactType: (val) => !val ||\r\n val.toLowerCase() === \"accounts\" ||\r\n val.toLowerCase() === \"service\"\r\n };\r\n\r\n constructor(\r\n private contactUploadService: ContactUploadService,\r\n private toasterService: ToasterService,\r\n private translateService: TranslateService) {\r\n this.rowValidator = this.rowValidator.bind(this);\r\n }\r\n\r\n public getSample(): void {\r\n this.contactUploadService.GetSample().subscribe(response => {\r\n const contentType = \"text/csv\";\r\n const blob = new Blob([response], { type: contentType });\r\n const data = window.URL.createObjectURL(blob);\r\n const link = document.createElement(\"a\");\r\n link.hidden = true;\r\n link.href = data;\r\n link.download = \"contact-sample.csv\";\r\n document.body.appendChild(link);\r\n link.click();\r\n document.body.removeChild(link);\r\n setTimeout(() => {\r\n // For Firefox it is necessary to delay revoking the ObjectURL\r\n window.URL.revokeObjectURL(data);\r\n }, 100);\r\n });\r\n }\r\n\r\n public reset(): void {\r\n this.existingRows = [];\r\n }\r\n\r\n public rowValidator: ImportValidationFunc = (row: IContactUploadData) => {\r\n const errors: string[] = [];\r\n const duplicateContact: boolean = this.existingRows.some(existingRow =>\r\n existingRow.FirstName === row.FirstName &&\r\n existingRow.LastName === row.LastName &&\r\n existingRow.AccountCode === row.AccountCode);\r\n\r\n if (duplicateContact) {\r\n errors.push(this.translateService.instant(\"contact.import.duplicate\", { FirstName: row.FirstName, LastName: row.LastName, AccountCode: row.AccountCode }));\r\n } else {\r\n this.existingRows.push(row);\r\n }\r\n\r\n return {\r\n isValid: !duplicateContact,\r\n errors\r\n };\r\n };\r\n\r\n public upload(rows: IContactUploadData[]): void {\r\n this.contactUploadService.Upload(rows).subscribe(summary => {\r\n if (summary.NumberOfInvalidRows === 0) {\r\n this.toasterService.pop(\"contact.import.complete\", ToastType.medium);\r\n // can't use the router to navigate to an angular js route\r\n location.href = \"/#/contacts/list\";\r\n } else {\r\n const importSummary = ImportSummary.FromUploadSummary(summary);\r\n\r\n this.toasterService.pop(\"contact.import.completewitherrors\", ToastType.dark);\r\n this.importer.uploadError(importSummary.FailedRows, importSummary.Errors);\r\n }\r\n });\r\n }\r\n}\r\n","","import { Injectable } from \"@angular/core\";\r\nimport { ComponentRef, Input, Output } from \"@angular/core\";\r\nimport { BehaviorSubject } from \"rxjs\";\r\n\r\n@Injectable()\r\nexport abstract class BaseChartComponent {\r\n @Input() height: number;\r\n @Output() changeChart: BehaviorSubject> = new BehaviorSubject>(null);\r\n public datasource: T[];\r\n}\r\n","export enum Month {\r\n \"January\" = 1,\r\n \"February\" = 2,\r\n \"March\" = 3,\r\n \"April\" = 4,\r\n \"May\" = 5,\r\n \"June\" = 6,\r\n \"July\" = 7,\r\n \"August\" = 8,\r\n \"September\" = 9,\r\n \"October\" = 10,\r\n \"November\" = 11,\r\n \"December\" = 12\r\n}\r\n","import { Component, Inject, Input, OnInit } from \"@angular/core\";\r\nimport { BaseChartComponent } from \"../chart-loader/base-chart.component\";\r\nimport { FieldTechnicianJobForMonthEngineerModel } from \"../field-technician-job-for-month-engineer/field-technician-job-for-month-engineer.model\";\r\nimport { ActualLabourHoursVServiceHours } from \"./actual-labour-hours-v-service-hours.model\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { Month } from \"./month.enum\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-actual-labour-hours-v-service-budget-hours\",\r\n templateUrl: \"./actual-labour-hours-v-service-budget-hours.component.html\",\r\n styleUrls: [\"./actual-labour-hours-v-service-budget-hours.component.scss\"]\r\n})\r\nexport class ActualLabourHoursVServiceBudgetHoursComponent extends BaseChartComponent implements OnInit {\r\n @Input() period: string;\r\n @Input() engineer: string;\r\n public legendPosition: string = \"center\";\r\n public actualLabourHoursVServiceHours: ActualLabourHoursVServiceHours[];\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private config: IAppConfig) {\r\n super();\r\n }\r\n\r\n public ngOnInit(): void {\r\n const smallHeight = 200;\r\n this.http.get>(this.config.apiLocations.ServiceSight + \"Job/GetChartActualLabourHoursVServiceBudgetHours\")\r\n .subscribe(result => {\r\n this.actualLabourHoursVServiceHours = result;\r\n if (this.height > smallHeight) {\r\n this.legendPosition = \"center\";\r\n } else {\r\n this.legendPosition = \"right\";\r\n }\r\n });\r\n }\r\n\r\n public customizeText(e) {\r\n return Month[e.value];\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Component, Inject, OnInit } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { BaseChartComponent } from \"../chart-loader/base-chart.component\";\r\nimport { AveragePurchaseOrderLeadTimeModel } from \"./average-purchase-order-lead-time.model\";\r\n\r\n@Component({\r\n selector: \"app-average-purchase-order-lead-time\",\r\n templateUrl: \"./average-purchase-order-lead-time.component.html\",\r\n styleUrls: [\"./average-purchase-order-lead-time.component.scss\"]\r\n})\r\nexport class AveragePurchaseOrderLeadTimeComponent extends BaseChartComponent implements OnInit {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n public translate: TranslateService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig\r\n ) {\r\n super();\r\n this.customizeText = this.customizeText.bind(this);\r\n }\r\n\r\n ngOnInit() {\r\n this.http.get(this.appConfig.apiLocations.ServiceSight + \"Dashboard/AveragePurchaseOrderLeadTimeByMonth\")\r\n .subscribe(data => {\r\n this.datasource = data;\r\n });\r\n }\r\n\r\n customizeText(e) {\r\n const abbrMonths = [\"jan\", \"feb\", \"mar\", \"apr\", \"may\", \"jun\", \"jul\", \"aug\", \"sep\", \"oct\", \"nov\", \"dec\"];\r\n const translationPrefix = \"short.\";\r\n return this.translate.instant(translationPrefix + abbrMonths[e.value - 1]);\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Component, Inject, OnInit } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { BaseChartComponent } from \"../chart-loader/base-chart.component\";\r\nimport { AverageSalesOrderLeadTimeModel } from \"./average-sales-order-lead-time.model\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-average-sales-order-lead-time\",\r\n templateUrl: \"./average-sales-order-lead-time.component.html\",\r\n styleUrls: [\"./average-sales-order-lead-time.component.scss\"]\r\n})\r\nexport class AverageSalesOrderLeadTimeComponent extends BaseChartComponent implements OnInit {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n public translate: TranslateService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig\r\n ) {\r\n super();\r\n this.customizeText = this.customizeText.bind(this);\r\n }\r\n\r\n ngOnInit() {\r\n this.http.get(this.appConfig.apiLocations.ServiceSight + \"Dashboard/AverageSalesOrderLeadTimeByMonth\")\r\n .subscribe(data => {\r\n this.datasource = data;\r\n });\r\n }\r\n\r\n customizeText(e) {\r\n const abbrMonths = [\"jan\", \"feb\", \"mar\", \"apr\", \"may\", \"jun\", \"jul\", \"aug\", \"sep\", \"oct\", \"nov\", \"dec\"];\r\n const translationPrefix = \"short.\";\r\n return this.translate.instant(translationPrefix + abbrMonths[e.value - 1]);\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n","import { Component, Inject, OnInit } from \"@angular/core\";\r\nimport { EquipmentStatusChart } from \"./equipment-status-chart.model\";\r\nimport { BaseChartComponent } from \"../chart-loader/base-chart.component\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-equipment-status\",\r\n templateUrl: \"./equipment-status.component.html\",\r\n styleUrls: [\"./equipment-status.component.scss\"]\r\n})\r\n\r\nexport class EquipmentStatusComponent extends BaseChartComponent implements OnInit {\r\n public equipmentStatuses: Array;\r\n public showChart: boolean = false;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) {\r\n super();\r\n }\r\n\r\n ngOnInit() {\r\n this.http.get>(this.appConfig.apiLocations.Equipment + \"EquipmentChart\")\r\n .subscribe(x => {\r\n this.equipmentStatuses = x.map(item => ({\r\n Status: item.Status.replace(/([A-Z])/g, \" $1\"),\r\n // eslint-disable-next-line id-blacklist\r\n Number: item.Number\r\n }));\r\n this.showChart = this.equipmentStatuses && this.equipmentStatuses.length > 0;\r\n });\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Component, Inject, Input, OnInit } from \"@angular/core\";\r\nimport { FieldTechnicianJobForMonthEngineerModel } from \"./field-technician-job-for-month-engineer.model\";\r\nimport { ChartLoaderService, IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { BaseChartComponent } from \"../chart-loader/base-chart.component\";\r\n\r\n@Component({\r\n selector: \"app-field-technician-job-for-month-engineer\",\r\n templateUrl: \"./field-technician-job-for-month-engineer.component.html\",\r\n styleUrls: [\"./field-technician-job-for-month-engineer.component.scss\"]\r\n})\r\nexport class FieldTechnicianJobForMonthEngineerComponent extends BaseChartComponent implements OnInit {\r\n @Input() period: string;\r\n @Input() engineer: string;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private chartLoader: ChartLoaderService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig\r\n ) {\r\n super();\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.http.get(\r\n `${this.appConfig.apiLocations.ServiceSight}Dashboard/FieldTechnicianJobForMonthEngineer?month=${this.period}&engineer=${this.engineer}`)\r\n .subscribe(data => this.datasource = data);\r\n }\r\n\r\n public onButtonClick(): void {\r\n const component = this.chartLoader.getChartComponent(\r\n FieldTechnicianJobForMonthEngineerComponent,\r\n {\r\n period: this.period,\r\n height: this.height\r\n });\r\n this.changeChart.next(component);\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n","import { Component, OnInit, Input, Inject } from \"@angular/core\";\r\nimport { FieldTechnicianJobForMonthModel } from \"./field-technician-job-for-month.model\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { ChartLoaderService, IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { BaseChartComponent } from \"../chart-loader/base-chart.component\";\r\nimport { FieldTechnicianProductivityComponent } from \"../field-technician-productivity/field-technician-productivity.component\";\r\nimport { FieldTechnicianJobForMonthEngineerComponent } from \"../field-technician-job-for-month-engineer/field-technician-job-for-month-engineer.component\";\r\n\r\n@Component({\r\n selector: \"app-field-technician-job-for-month\",\r\n templateUrl: \"./field-technician-job-for-month.component.html\",\r\n styleUrls: [\"./field-technician-job-for-month.component.scss\"]\r\n})\r\nexport class FieldTechnicianJobForMonthComponent extends BaseChartComponent implements OnInit {\r\n @Input() period: string;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private chartLoader: ChartLoaderService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig\r\n ) {\r\n super();\r\n }\r\n\r\n pointClickHandler(arg) {\r\n const component = this.chartLoader.getChartComponent(FieldTechnicianJobForMonthEngineerComponent, {\r\n period: this.period,\r\n engineer: arg.target.argument,\r\n height: this.height\r\n });\r\n this.changeChart.next(component);\r\n }\r\n\r\n ngOnInit() {\r\n this.http.get(this.appConfig.apiLocations.ServiceSight + \"Dashboard/FieldTechnicianJobForMonth?month=\" + this.period)\r\n .subscribe(data => this.datasource = data);\r\n }\r\n\r\n onButtonClick() {\r\n const component = this.chartLoader.getChartComponent(FieldTechnicianProductivityComponent, { height: this.height });\r\n this.changeChart.next(component);\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n","import { Component, Inject, OnInit } from \"@angular/core\";\r\nimport { FieldTechnicianProductivityModel } from \"./field-technician-productivity.model\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { ChartLoaderService, IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { BaseChartComponent } from \"../chart-loader/base-chart.component\";\r\nimport { FieldTechnicianJobForMonthComponent } from \"../field-technician-job-for-month/field-technician-job-for-month.component\";\r\n\r\n@Component({\r\n selector: \"app-field-technician-productivity\",\r\n templateUrl: \"./field-technician-productivity.component.html\",\r\n styleUrls: [\"./field-technician-productivity.component.scss\"]\r\n})\r\nexport class FieldTechnicianProductivityComponent extends BaseChartComponent implements OnInit {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private chartLoader: ChartLoaderService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig\r\n ) {\r\n super();\r\n }\r\n\r\n pointClickHandler(arg) {\r\n const component = this.chartLoader.getChartComponent(FieldTechnicianJobForMonthComponent, {\r\n period: arg.target.argument,\r\n height: this.height\r\n });\r\n this.changeChart.next(component);\r\n }\r\n\r\n ngOnInit() {\r\n this.http.get(this.appConfig.apiLocations.ServiceSight + \"Dashboard/FieldTechnicianProductivity\")\r\n .subscribe(data => this.datasource = data);\r\n }\r\n\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Component, Inject, OnInit } from \"@angular/core\";\r\nimport { FieldTechnicianUtilisationByDateModel } from \"./field-technician-utilisation-by-date.model\";\r\nimport { ChartLoaderService, IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { BaseChartComponent } from \"../chart-loader/base-chart.component\";\r\nimport { FieldTechnicianUtilisationComponent } from \"../field-technician-utilisation/field-technician-utilisation.component\";\r\n\r\n@Component({\r\n selector: \"app-field-technician-utilisation-by-date\",\r\n templateUrl: \"./field-technician-utilisation-by-date.component.html\",\r\n styleUrls: [\"./field-technician-utilisation-by-date.component.scss\"]\r\n})\r\nexport class FieldTechnicianUtilisationByDateComponent extends BaseChartComponent implements OnInit {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private chartLoader: ChartLoaderService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) {\r\n super();\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/naming-convention, no-underscore-dangle, id-blacklist, id-match\r\n pointClickHandler(_arg) {\r\n // const factory = this.factoryResolver.resolveComponentFactory(AllocatedJobsForJobTypeStatusComponent);\r\n // const component = factory.create(this.injector);\r\n // component.instance.jobType = this.jobType;\r\n // component.instance.jobStatus = arg.target.argument;\r\n // this.changeChart.next(component);\r\n }\r\n\r\n onButtonClick() {\r\n const component = this.chartLoader.getChartComponent(FieldTechnicianUtilisationComponent, { height: this.height });\r\n this.changeChart.next(component);\r\n }\r\n\r\n ngOnInit(): void {\r\n this.http.get(this.appConfig.apiLocations.ServiceSight + \"Dashboard/FieldTechnicianUtilisationByDate\")\r\n .subscribe(data => this.datasource = data);\r\n }\r\n\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n","import { Component, OnInit, HostListener, Inject } from \"@angular/core\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { ChartLoaderService, IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { BaseChartComponent } from \"../chart-loader/base-chart.component\";\r\nimport { FieldTechnicianUtilisationByDateComponent } from \"../field-technician-utilisation-by-date/field-technician-utilisation-by-date.component\";\r\n\r\n@Component({\r\n selector: \"app-field-technician-utilisation\",\r\n templateUrl: \"./field-technician-utilisation.component.html\",\r\n styleUrls: [\"./field-technician-utilisation.component.scss\"]\r\n})\r\nexport class FieldTechnicianUtilisationComponent extends BaseChartComponent implements OnInit {\r\n public datasourceAlt: number = 0;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private chartLoader: ChartLoaderService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) {\r\n super();\r\n }\r\n\r\n @HostListener(\"click\") onClick() {\r\n const component = this.chartLoader.getChartComponent(FieldTechnicianUtilisationByDateComponent, { height: this.height });\r\n this.changeChart.next(component);\r\n }\r\n\r\n ngOnInit(): void {\r\n this.http.get(this.appConfig.apiLocations.ServiceSight + \"Dashboard/FieldTechnicianUtilisation\")\r\n .subscribe(data => this.datasourceAlt = data);\r\n }\r\n\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n","import { Component, Inject, OnInit } from \"@angular/core\";\r\nimport { FirstTimeFixRateByPeriodModel } from \"./first-time-fix-rate-by-period.model\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { BaseChartComponent } from \"../chart-loader/base-chart.component\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-first-time-fix-rate-by-period\",\r\n templateUrl: \"./first-time-fix-rate-by-period.component.html\",\r\n styleUrls: [\"./first-time-fix-rate-by-period.component.scss\"]\r\n})\r\nexport class FirstTimeFixRateByPeriodComponent extends BaseChartComponent implements OnInit {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) {\r\n super();\r\n }\r\n\r\n ngOnInit(): void {\r\n this.http.get(this.appConfig.apiLocations.ServiceSight + \"Dashboard/FirstTimeFixRateByPeriod\")\r\n .subscribe(data => this.datasource = data);\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n","import { Component, Inject, OnInit } from \"@angular/core\";\r\nimport { BaseChartComponent } from \"../chart-loader/base-chart.component\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-first-time-fix-rate\",\r\n templateUrl: \"./first-time-fix-rate.component.html\",\r\n styleUrls: [\"./first-time-fix-rate.component.scss\"]\r\n})\r\nexport class FirstTimeFixRateComponent extends BaseChartComponent implements OnInit {\r\n public datasourceAlt: number = 0;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) {\r\n super();\r\n }\r\n\r\n ngOnInit(): void {\r\n this.http.get(this.appConfig.apiLocations.ServiceSight + \"Dashboard/FirstTimeFixRate\")\r\n .subscribe(data => this.datasourceAlt = data);\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Component, Inject, OnInit } from \"@angular/core\";\r\nimport { IAppConfig, APP_CONFIG, Module } from \"servicesight-shared\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { JobProfitabilityMonth } from \"./job-profitability-month.model\";\r\nimport { BaseChartComponent } from \"../chart-loader/base-chart.component\";\r\n\r\n@Component({\r\n selector: \"app-job-profitablity\",\r\n templateUrl: \"./job-profitablity.component.html\",\r\n styleUrls: [\"./job-profitablity.component.scss\"]\r\n})\r\nexport class JobProfitablityComponent extends BaseChartComponent implements OnInit {\r\n\r\n public stockEnabled: boolean;\r\n\r\n constructor(\r\n @Inject(APP_CONFIG) protected config: IAppConfig,\r\n private http: HttpClient,\r\n private licenseService: LicenseService) {\r\n super();\r\n }\r\n\r\n ngOnInit() {\r\n this.http.get(this.config.apiLocations.ServiceSight + \"Dashboard/JobProfitability\")\r\n .subscribe(data => this.datasource = data);\r\n this.licenseService.GetCompanyHasAccessToModule(Module.Stock).subscribe(isEnabled => this.stockEnabled = isEnabled);\r\n }\r\n\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Component, Inject, Input, OnInit } from \"@angular/core\";\r\nimport { MeanTimeToRepairForPeriodJobTypeFirstTechnicianModel } from \"./mean-time-to-repair-for-period-job-type-first-technician.model\";\r\nimport { ChartLoaderService, IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { BaseChartComponent } from \"../chart-loader/base-chart.component\";\r\nimport { MeanTimeToRepairByTechnicianForPeriodJobTypeComponent }\r\n from \"../mean-time-to-repair-by-technician-for-period-job-type/mean-time-to-repair-by-technician-for-period-job-type.component\";\r\n\r\n@Component({\r\n selector: \"app-mean-time-to-repair-for-period-job-type-first-technician\",\r\n templateUrl: \"./mean-time-to-repair-for-period-job-type-first-technician.component.html\",\r\n styleUrls: [\"./mean-time-to-repair-for-period-job-type-first-technician.component.scss\"]\r\n})\r\nexport class MeanTimeToRepairForPeriodJobTypeFirstTechnicianComponent extends BaseChartComponent implements OnInit {\r\n @Input() period: string;\r\n @Input() jobType: string;\r\n @Input() firstTechnician: string;\r\n\r\n public get correctedHight(): number {\r\n return this.height - 36;\r\n }\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private chartLoader: ChartLoaderService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig\r\n ) {\r\n super();\r\n }\r\n\r\n onButtonClick() {\r\n const component = this.chartLoader.getChartComponent(MeanTimeToRepairByTechnicianForPeriodJobTypeComponent, {\r\n period: this.period,\r\n jobType: this.jobType,\r\n height: this.height\r\n });\r\n this.changeChart.next(component);\r\n }\r\n\r\n ngOnInit() {\r\n // eslint-disable-next-line max-len\r\n const url = `${this.appConfig.apiLocations.ServiceSight}Dashboard/MeanTimeToRepairForPeriodJobTypeFirstTechnician?period=${this.period}&jobType=${this.jobType}&technician=${this.firstTechnician}`;\r\n this.http.get(url)\r\n .subscribe(data => this.datasource = data);\r\n }\r\n}\r\n","\r\n\r\n\r\n \r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Component, Inject, Input, OnInit } from \"@angular/core\";\r\nimport { MeanTimeToRepairByTechnicianForPeriodJobTypeModel } from \"./mean-time-to-repair-by-technician-for-period-job-type.model\";\r\nimport { ChartLoaderService, IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { BaseChartComponent } from \"../chart-loader/base-chart.component\";\r\nimport { MeanTimeToRepairByJobTypeForPeriodComponent }\r\n from \"../mean-time-to-repair-by-job-type-for-period/mean-time-to-repair-by-job-type-for-period.component\";\r\nimport { MeanTimeToRepairForPeriodJobTypeFirstTechnicianComponent }\r\n from \"../mean-time-to-repair-for-period-job-type-first-technician/mean-time-to-repair-for-period-job-type-first-technician.component\";\r\n\r\n@Component({\r\n selector: \"app-mean-time-to-repair-by-technician-for-period-job-type\",\r\n templateUrl: \"./mean-time-to-repair-by-technician-for-period-job-type.component.html\",\r\n styleUrls: [\"./mean-time-to-repair-by-technician-for-period-job-type.component.scss\"]\r\n})\r\nexport class MeanTimeToRepairByTechnicianForPeriodJobTypeComponent extends BaseChartComponent implements OnInit {\r\n @Input() period: string;\r\n @Input() jobType: string;\r\n public title: string;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private chartLoader: ChartLoaderService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig\r\n ) {\r\n super();\r\n }\r\n\r\n pointClickHandler(arg) {\r\n const component = this.chartLoader.getChartComponent(MeanTimeToRepairForPeriodJobTypeFirstTechnicianComponent, {\r\n period: this.period,\r\n jobType: this.jobType,\r\n firstTechnician: arg.target.argument,\r\n height: this.height\r\n });\r\n this.changeChart.next(component);\r\n }\r\n\r\n onButtonClick() {\r\n const component = this.chartLoader.getChartComponent(MeanTimeToRepairByJobTypeForPeriodComponent, {\r\n period: this.period,\r\n height: this.height\r\n });\r\n this.changeChart.next(component);\r\n }\r\n\r\n ngOnInit() {\r\n this.title = `Mean time to repair by Technician for ${this.period} and Job Type: ${this.jobType}`;\r\n this.http.get(\r\n `${this.appConfig.apiLocations.ServiceSight}Dashboard/MeanTimeToRepairByTechnicianForPeriodJobType?period=${this.period}&jobType=${this.jobType}`)\r\n .subscribe(data => this.datasource = data);\r\n }\r\n\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Component, Inject, Input, OnInit } from \"@angular/core\";\r\nimport { MeanTimeToRepairByJobTypeForPeriodModel } from \"./mean-time-to-repair-by-job-type-for-period.model\";\r\nimport { ChartLoaderService, IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { BaseChartComponent } from \"../chart-loader/base-chart.component\";\r\nimport { MeanTimeToRepairComponent } from \"../mean-time-to-repair/mean-time-to-repair.component\";\r\nimport { MeanTimeToRepairByTechnicianForPeriodJobTypeComponent }\r\n from \"../mean-time-to-repair-by-technician-for-period-job-type/mean-time-to-repair-by-technician-for-period-job-type.component\";\r\n\r\n@Component({\r\n selector: \"app-mean-time-to-repair-by-job-type-for-period\",\r\n templateUrl: \"./mean-time-to-repair-by-job-type-for-period.component.html\",\r\n styleUrls: [\"./mean-time-to-repair-by-job-type-for-period.component.scss\"]\r\n})\r\nexport class MeanTimeToRepairByJobTypeForPeriodComponent extends BaseChartComponent implements OnInit {\r\n @Input() period: string;\r\n public title: string;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private chartLoader: ChartLoaderService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig\r\n ) {\r\n super();\r\n }\r\n\r\n pointClickHandler(arg) {\r\n const component = this.chartLoader.getChartComponent(MeanTimeToRepairByTechnicianForPeriodJobTypeComponent, {\r\n period: this.period,\r\n jobType: arg.target.argument,\r\n height: this.height\r\n });\r\n this.changeChart.next(component);\r\n }\r\n\r\n onButtonClick() {\r\n const component = this.chartLoader.getChartComponent(MeanTimeToRepairComponent, { height: this.height });\r\n this.changeChart.next(component);\r\n }\r\n\r\n ngOnInit() {\r\n this.title = `Mean time to repair by Job Type for ${this.period}`;\r\n this.http.get(\r\n `${this.appConfig.apiLocations.ServiceSight}Dashboard/MeanTimeToRepairByJobTypeForPeriod?period=${this.period}`)\r\n .subscribe(data => this.datasource = data);\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n","import { Component, Inject, OnInit } from \"@angular/core\";\r\nimport { MeanTimeToRepairModel } from \"./mean-time-to-repair.model\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { ChartLoaderService, IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { BaseChartComponent } from \"../chart-loader/base-chart.component\";\r\nimport { MeanTimeToRepairByJobTypeForPeriodComponent }\r\n from \"../mean-time-to-repair-by-job-type-for-period/mean-time-to-repair-by-job-type-for-period.component\";\r\n\r\n@Component({\r\n selector: \"app-mean-time-to-repair\",\r\n templateUrl: \"./mean-time-to-repair.component.html\",\r\n styleUrls: [\"./mean-time-to-repair.component.scss\"]\r\n})\r\nexport class MeanTimeToRepairComponent extends BaseChartComponent implements OnInit {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private chartLoader: ChartLoaderService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig\r\n ) {\r\n super();\r\n }\r\n\r\n pointClickHandler(arg) {\r\n const component = this.chartLoader.getChartComponent(MeanTimeToRepairByJobTypeForPeriodComponent, {\r\n period: arg.target.argument,\r\n height: this.height\r\n });\r\n this.changeChart.next(component);\r\n }\r\n\r\n ngOnInit() {\r\n this.http.get(this.appConfig.apiLocations.ServiceSight + \"Dashboard/MeanTimeToRepair\")\r\n .subscribe(data => this.datasource = data);\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n","export enum OrderType {\r\n Parts = 1,\r\n Equipment = 2,\r\n Materials = 3,\r\n Refrigerants = 4\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {{purchaseOrderQuantity}}\r\n {{baseCurrencySymbol}}{{purchaseOrderTotalValue}}\r\n \r\n \r\n ","import { HttpClient } from \"@angular/common/http\";\r\nimport { Component, Inject, OnInit } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { BaseChartComponent } from \"../chart-loader/base-chart.component\";\r\nimport { OrderType } from \"../open-sales-orders/order-type.enum\";\r\nimport { OpenPurchaseOrderModel } from \"./open-purchase-order-model\";\r\nimport { PurchaseOrderChart } from \"./purchase-order-chart.model\";\r\nimport { PurchaseOrderType } from \"./purchase-order-type.model\";\r\n\r\n@Component({\r\n selector: \"app-open-purchase-orders\",\r\n templateUrl: \"./open-purchase-orders.component.html\",\r\n styleUrls: [\"./open-purchase-orders.component.scss\"]\r\n})\r\nexport class OpenPurchaseOrdersComponent extends BaseChartComponent implements OnInit {\r\n public baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n public purchaseOrderQuantity: number;\r\n public purchaseOrderTotalValue: number;\r\n\r\n constructor(\r\n @Inject(APP_CONFIG) private config: IAppConfig,\r\n private http: HttpClient,\r\n private translate: TranslateService\r\n ) {\r\n super();\r\n this.customizeLabel = this.customizeLabel.bind(this);\r\n }\r\n\r\n ngOnInit(): void {\r\n this.http.get(this.config.apiLocations.ServiceSight + \"Dashboard/OpenPurchaseOrders\")\r\n .subscribe(data => {\r\n this.purchaseOrderQuantity = data.PurchaseOrdersQuantity;\r\n this.purchaseOrderTotalValue = data.PurchaseOrdersValue;\r\n this.datasource = this.convertToChartModel(data.PurchaseOrderTypes);\r\n });\r\n }\r\n\r\n public customizeLabel(e): string {\r\n return `${e.argumentText}\\n${e.valueText}\\n${this.baseCurrencySymbol}${this.getValueByOrderType(e.argumentText)}`;\r\n }\r\n\r\n private getValueByOrderType(orderType: string) {\r\n return this.datasource.find(x => x.OrderType === orderType).Value;\r\n }\r\n\r\n private convertToChartModel(PurchaseOrderTypes: PurchaseOrderType[]): PurchaseOrderChart[] {\r\n return PurchaseOrderTypes.map(x => ({\r\n Quantity: x.Quantity,\r\n Value: x.Value,\r\n OrderType: this.getTranslation(x.OrderType),\r\n }) as PurchaseOrderChart);\r\n }\r\n\r\n private getTranslation(orderType: OrderType): string {\r\n switch (orderType) {\r\n case OrderType.Parts:\r\n return this.translate.instant(\"purchase-orders.parts\");\r\n case OrderType.Equipment:\r\n return this.translate.instant(\"purchase-orders.equipment\");\r\n case OrderType.Materials:\r\n return this.translate.instant(\"purchase-orders.materials\");\r\n case OrderType.Refrigerants:\r\n return this.translate.instant(\"purchase-orders.fgas\");\r\n }\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {{salesOrderQuantity}}\r\n {{baseCurrencySymbol}}{{salesOrderTotalValue}}\r\n \r\n \r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Component, Inject, OnInit } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { BaseChartComponent } from \"../chart-loader/base-chart.component\";\r\nimport { OpenSalesOrderModel } from \"./open-sales-orders-model.model\";\r\nimport { OrderType } from \"./order-type.enum\";\r\nimport { SalesOrderChart } from \"./sales-order-chart.model\";\r\nimport { SalesOrderType } from \"./sales-order-type.model\";\r\n\r\n@Component({\r\n selector: \"app-open-sales-orders\",\r\n templateUrl: \"./open-sales-orders.component.html\",\r\n styleUrls: [\"./open-sales-orders.component.scss\"]\r\n})\r\nexport class OpenSalesOrdersComponent extends BaseChartComponent implements OnInit {\r\n public baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n public salesOrderQuantity: number;\r\n public salesOrderTotalValue: number;\r\n\r\n constructor(\r\n @Inject(APP_CONFIG) private config: IAppConfig,\r\n private http: HttpClient,\r\n private translate: TranslateService\r\n ) {\r\n super();\r\n this.customizeLabel = this.customizeLabel.bind(this);\r\n }\r\n\r\n ngOnInit(): void {\r\n this.http.get(this.config.apiLocations.ServiceSight + \"Dashboard/OpenSalesOrders\")\r\n .subscribe(data => {\r\n this.salesOrderQuantity = data.SalesOrdersQuantity;\r\n this.salesOrderTotalValue = data.SalesOrdersValue;\r\n this.datasource = this.convertToChartModel(data.SalesOrderTypes);\r\n });\r\n }\r\n\r\n public customizeLabel(e): string {\r\n return `${e.argumentText}\\n${e.valueText}\\n${this.baseCurrencySymbol}${this.getValueByOrderType(e.argumentText)}`;\r\n }\r\n\r\n private getValueByOrderType(orderType: string) {\r\n return this.datasource.find(x => x.OrderType === orderType).Value;\r\n }\r\n\r\n private convertToChartModel(SalesOrderTypes: SalesOrderType[]): SalesOrderChart[] {\r\n return SalesOrderTypes.map(x => ({\r\n Quantity: x.Quantity,\r\n Value: x.Value,\r\n OrderType: this.getTranslation(x.OrderType),\r\n }) as SalesOrderChart);\r\n }\r\n\r\n private getTranslation(orderType: OrderType): string {\r\n switch (orderType) {\r\n case OrderType.Parts:\r\n return this.translate.instant(\"salesorder.detail.parts\");\r\n case OrderType.Equipment:\r\n return this.translate.instant(\"salesorder.detail.equipment\");\r\n case OrderType.Materials:\r\n return this.translate.instant(\"salesorder.detail.materials\");\r\n }\r\n }\r\n}\r\n","import { Component, OnInit, Input, Inject } from \"@angular/core\";\r\nimport { AllocatedJobsForJobTypeStatusModel } from \"./allocated-jobs-for-job-type-status.model\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { ChartLoaderService, IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { BaseChartComponent } from \"../chart-loader/base-chart.component\";\r\nimport { JobsByStatusForJobTypeComponent } from \"../jobs-by-status-for-job-type/jobs-by-status-for-job-type.component\";\r\n\r\n@Component({\r\n selector: \"app-allocated-jobs-for-job-type-status\",\r\n templateUrl: \"./allocated-jobs-for-job-type-status.component.html\",\r\n styleUrls: [\"./allocated-jobs-for-job-type-status.component.scss\"]\r\n})\r\nexport class AllocatedJobsForJobTypeStatusComponent extends BaseChartComponent implements OnInit {\r\n @Input() jobType: string;\r\n @Input() jobStatus: string;\r\n\r\n public get correctedHight(): number {\r\n return this.height - 36;\r\n }\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private chartLoader: ChartLoaderService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) {\r\n super();\r\n }\r\n\r\n ngOnInit() {\r\n this.http.get(\r\n `${this.appConfig.apiLocations.ServiceSight}Dashboard/AllocatedJobsForJobTypeStatus?jobType=${this.jobType}&jobStatus=${this.jobStatus}`)\r\n .subscribe(data => this.datasource = data);\r\n }\r\n\r\n onButtonClick() {\r\n const component = this.chartLoader.getChartComponent(JobsByStatusForJobTypeComponent, {\r\n jobType: this.jobType,\r\n height: this.height\r\n });\r\n this.changeChart.next(component);\r\n }\r\n}\r\n","\r\n\r\n\r\n \r\n","import { Component, Inject, Input, OnInit } from \"@angular/core\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { JobsByStatusForJobTypeModel } from \"./jobs-by-status-for-job-type.model\";\r\nimport { ChartLoaderService, IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { BaseChartComponent } from \"../chart-loader/base-chart.component\";\r\nimport { AllocatedJobsForJobTypeStatusComponent } from \"../allocated-jobs-for-job-type-status/allocated-jobs-for-job-type-status.component\";\r\nimport { OutstandingJobsByJobTypeComponent } from \"../outstanding-jobs-by-job-type/outstanding-jobs-by-job-type.component\";\r\n\r\n@Component({\r\n selector: \"app-jobs-by-status-for-job-type\",\r\n templateUrl: \"./jobs-by-status-for-job-type.component.html\",\r\n styleUrls: [\"./jobs-by-status-for-job-type.component.scss\"]\r\n})\r\nexport class JobsByStatusForJobTypeComponent extends BaseChartComponent implements OnInit {\r\n @Input() jobType: string;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private chartLoader: ChartLoaderService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig\r\n ) {\r\n super();\r\n }\r\n\r\n public customizeTooltip(arg): any {\r\n return {\r\n text: arg.argument + \" (No of Jobs): \" + arg.valueText + \" - \" + arg.percentText\r\n };\r\n }\r\n\r\n public pointClickHandler(arg): void {\r\n const component = this.chartLoader.getChartComponent(AllocatedJobsForJobTypeStatusComponent, {\r\n jobType: this.jobType,\r\n jobStatus: arg.target.argument,\r\n height: this.height\r\n });\r\n this.changeChart.next(component);\r\n }\r\n\r\n public onButtonClick(): void {\r\n const component = this.chartLoader.getChartComponent(OutstandingJobsByJobTypeComponent, {\r\n height: this.height\r\n });\r\n this.changeChart.next(component);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.http.get(this.appConfig.apiLocations.ServiceSight + \"Dashboard/JobsByStatusForJobType?jobType=\" + this.jobType)\r\n .subscribe(data => this.datasource = data);\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n","import { Component, Inject, OnInit } from \"@angular/core\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { OutstandingJobsByJobTypeModel } from \"./outstanding-jobs-by-job-type.model\";\r\nimport { ChartLoaderService, IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { BaseChartComponent } from \"../chart-loader/base-chart.component\";\r\nimport { JobsByStatusForJobTypeComponent } from \"../jobs-by-status-for-job-type/jobs-by-status-for-job-type.component\";\r\n\r\n@Component({\r\n selector: \"app-outstanding-jobs-by-job-type\",\r\n templateUrl: \"./outstanding-jobs-by-job-type.component.html\",\r\n styleUrls: [\"./outstanding-jobs-by-job-type.component.scss\"]\r\n})\r\nexport class OutstandingJobsByJobTypeComponent extends BaseChartComponent implements OnInit {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private chartLoader: ChartLoaderService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) {\r\n super();\r\n }\r\n\r\n public customizeTooltip(arg): any {\r\n return {\r\n text: arg.argument + \" (No of Jobs): \" + arg.valueText + \" - \" + arg.percentText\r\n };\r\n }\r\n\r\n public pointClickHandler(arg): void {\r\n const component = this.chartLoader.getChartComponent(\r\n JobsByStatusForJobTypeComponent,\r\n {\r\n jobType: arg.target.argument,\r\n height: this.height\r\n });\r\n this.changeChart.next(component);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.http.get(this.appConfig.apiLocations.ServiceSight + \"Dashboard/OutstandingJobsByJobType\")\r\n .subscribe(data => this.datasource = data);\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Component, Inject, OnInit } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { BaseChartComponent } from \"../chart-loader/base-chart.component\";\r\nimport { SalesFunnel } from \"./sales-funnel.model\";\r\n\r\n@Component({\r\n selector: \"app-sales-funnel\",\r\n templateUrl: \"./sales-funnel.component.html\",\r\n styleUrls: [\"./sales-funnel.component.scss\"]\r\n})\r\nexport class SalesFunnelComponent extends BaseChartComponent implements OnInit {\r\n public baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n public showChart: boolean = false;\r\n\r\n constructor(\r\n @Inject(APP_CONFIG) private config: IAppConfig,\r\n private http: HttpClient,\r\n private translate: TranslateService) {\r\n super();\r\n this.customizeLabelText = this.customizeLabelText.bind(this);\r\n this.customizeTooltipText = this.customizeTooltipText.bind(this);\r\n }\r\n\r\n ngOnInit(): void {\r\n this.http.get(this.config.apiLocations.ServiceSight + \"Dashboard/SalesFunnel\")\r\n .subscribe(data => {\r\n this.datasource = data;\r\n this.showChart = this.datasource.length > 0;\r\n });\r\n }\r\n\r\n public customizeTooltipText(arg: any): object {\r\n return { text: this.translate.instant(\"sales-opp.chart.opps-at-quote-req\", { status: arg.item.data.Name, quanitity: arg.item.data.Quantity })};\r\n }\r\n\r\n public customizeLabelText(arg: any): string {\r\n const heightOfSmallChart = 200;\r\n\r\n if (this.height <= heightOfSmallChart) {\r\n return \"
\" +\r\n this.baseCurrencySymbol + arg.value +\r\n \" - \" +\r\n arg.item.data.Name +\r\n \"
\";\r\n }\r\n\r\n return \"\" +\r\n this.baseCurrencySymbol + arg.value +\r\n \"
\" +\r\n \"\" +\r\n arg.item.data.Name +\r\n \"\";\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Component, Inject, OnInit } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { forkJoin } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG, Module, ModuleService } from \"servicesight-shared\";\r\nimport { BaseChartComponent } from \"../chart-loader/base-chart.component\";\r\nimport { TotalServiceRevenueModel } from \"../total-service-revenue/total-service-revenue.model\";\r\n\r\n@Component({\r\n selector: \"app-service-contract-revenue\",\r\n templateUrl: \"./service-contract-revenue.component.html\",\r\n styleUrls: [\"./service-contract-revenue.component.scss\"]\r\n})\r\nexport class ServiceContractRevenueComponent extends BaseChartComponent implements OnInit {\r\n public isProEnabled: boolean = false;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n public translate: TranslateService,\r\n public moduleService: ModuleService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig\r\n ) {\r\n super();\r\n this.customizeText = this.customizeText.bind(this);\r\n }\r\n\r\n ngOnInit() {\r\n forkJoin([\r\n this.http.get(this.appConfig.apiLocations.ServiceSight + \"Dashboard/ServiceContractsRevenueByMonth\"),\r\n this.moduleService.GetEnabledModules()\r\n ]).subscribe(([data, modules]) => {\r\n this.datasource = data;\r\n this.isProEnabled = modules.includes(Module.Pro);\r\n });\r\n }\r\n\r\n customizeText(e) {\r\n const abbrMonths = [\"jan\", \"feb\", \"mar\", \"apr\", \"may\", \"jun\", \"jul\", \"aug\", \"sep\", \"oct\", \"nov\", \"dec\"];\r\n const translationPrefix = \"short.\";\r\n return this.translate.instant(translationPrefix + abbrMonths[e.value - 1]);\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Component, Inject, Input, OnInit } from \"@angular/core\";\r\nimport { ServiceRevenueForFieldTechnicalPeriodJobTypeModel } from \"./service-revenue-for-field-technical-period-job-type.model\";\r\nimport { ChartLoaderService, IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { BaseChartComponent } from \"../chart-loader/base-chart.component\";\r\nimport { ServiceRevenueForFieldTechnicianPeriodComponent } from \"../service-revenue-for-field-technician-period/service-revenue-for-field-technician-period.component\";\r\n\r\n@Component({\r\n selector: \"app-service-revenue-for-field-technical-period-job-type\",\r\n templateUrl: \"./service-revenue-for-field-technical-period-job-type.component.html\",\r\n styleUrls: [\"./service-revenue-for-field-technical-period-job-type.component.scss\"]\r\n})\r\nexport class ServiceRevenueForFieldTechnicalPeriodJobTypeComponent extends BaseChartComponent implements OnInit {\r\n @Input() technician: string;\r\n @Input() period: string;\r\n @Input() jobType: string;\r\n\r\n public get correctedHight(): number {\r\n return this.height - 36;\r\n }\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private chartLoader: ChartLoaderService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig\r\n ) {\r\n super();\r\n }\r\n\r\n onButtonClick() {\r\n const component = this.chartLoader.getChartComponent(ServiceRevenueForFieldTechnicianPeriodComponent, {\r\n technician: this.technician,\r\n period: this.period,\r\n height: this.height\r\n });\r\n this.changeChart.next(component);\r\n }\r\n\r\n ngOnInit() {\r\n // eslint-disable-next-line max-len\r\n const url = `${this.appConfig.apiLocations.ServiceSight}Dashboard/ServiceRevenueForFieldTechnicalPeriodJobTypeModel?technician=${this.technician}&period=${this.period}&jobType=${this.jobType}`;\r\n this.http.get(url)\r\n .subscribe(data => this.datasource = data);\r\n }\r\n}\r\n","\r\n\r\n\r\n \r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Component, Inject, Input, OnInit } from \"@angular/core\";\r\nimport { ServiceRevenueForFieldTechnicianPeriodModel } from \"./service-revenue-for-field-technician-period.model\";\r\nimport { ChartLoaderService, IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { BaseChartComponent } from \"../chart-loader/base-chart.component\";\r\nimport { ServiceRevenueForFieldTechnicalPeriodJobTypeComponent }\r\n from \"../service-revenue-for-field-technical-period-job-type/service-revenue-for-field-technical-period-job-type.component\";\r\nimport { ServiceRevenueForFieldTechnicianComponent } from \"../service-revenue-for-field-technician/service-revenue-for-field-technician.component\";\r\n\r\n@Component({\r\n selector: \"app-service-revenue-for-field-technician-period\",\r\n templateUrl: \"./service-revenue-for-field-technician-period.component.html\",\r\n styleUrls: [\"./service-revenue-for-field-technician-period.component.scss\"]\r\n})\r\nexport class ServiceRevenueForFieldTechnicianPeriodComponent extends BaseChartComponent implements OnInit {\r\n @Input() technician: string;\r\n @Input() period: string;\r\n public title: string;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private chartLoader: ChartLoaderService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig\r\n ) {\r\n super();\r\n }\r\n\r\n pointClickHandler(arg) {\r\n const component = this.chartLoader.getChartComponent(ServiceRevenueForFieldTechnicalPeriodJobTypeComponent, {\r\n technician: this.technician,\r\n period: this.period,\r\n jobType: arg.target.argument,\r\n height: this.height\r\n });\r\n this.changeChart.next(component);\r\n }\r\n\r\n onButtonClick() {\r\n const component = this.chartLoader.getChartComponent(ServiceRevenueForFieldTechnicianComponent, {\r\n technician: this.technician,\r\n height: this.height\r\n });\r\n this.changeChart.next(component);\r\n }\r\n\r\n ngOnInit() {\r\n this.title = `Service Revenue for ${this.technician} and ${this.period}`;\r\n this.http.get(\r\n `${this.appConfig.apiLocations.ServiceSight}Dashboard/ServiceRevenueForFieldTechnicianPeriod?technician=${this.technician}&period=${this.period}`)\r\n .subscribe(data => this.datasource = data);\r\n }\r\n\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Component, Inject, Input, OnInit } from \"@angular/core\";\r\nimport { ServiceRevenueForFieldTechnicianModel } from \"./service-revenue-for-field-technician.model\";\r\nimport { ChartLoaderService, IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { BaseChartComponent } from \"../chart-loader/base-chart.component\";\r\nimport { ServiceRevenueForFieldTechnicianPeriodComponent }\r\n from \"../service-revenue-for-field-technician-period/service-revenue-for-field-technician-period.component\";\r\nimport { ServiceRevenuePerFieldTechnicianComponent }\r\n from \"../service-revenue-per-field-technician/service-revenue-per-field-technician.component\";\r\n\r\n@Component({\r\n selector: \"app-service-revenue-for-field-technician\",\r\n templateUrl: \"./service-revenue-for-field-technician.component.html\",\r\n styleUrls: [\"./service-revenue-for-field-technician.component.scss\"]\r\n})\r\nexport class ServiceRevenueForFieldTechnicianComponent extends BaseChartComponent implements OnInit {\r\n @Input() technician: string;\r\n public title: string;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private chartLoader: ChartLoaderService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig\r\n ) {\r\n super();\r\n }\r\n\r\n pointClickHandler(arg) {\r\n const component = this.chartLoader.getChartComponent(ServiceRevenueForFieldTechnicianPeriodComponent,\r\n {\r\n technician: this.technician,\r\n period: arg.target.argument,\r\n height: this.height\r\n });\r\n this.changeChart.next(component);\r\n }\r\n\r\n onButtonClick() {\r\n const component = this.chartLoader.getChartComponent(ServiceRevenuePerFieldTechnicianComponent, {\r\n height: this.height\r\n });\r\n this.changeChart.next(component);\r\n }\r\n\r\n ngOnInit() {\r\n this.title = `Service Revenue for ${this.technician}`;\r\n this.http.get(\r\n `${this.appConfig.apiLocations.ServiceSight}Dashboard/ServiceRevenueForFieldTechnician?technician=${this.technician}`)\r\n .subscribe(data => this.datasource = data);\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n","import { Component, Inject, OnInit } from \"@angular/core\";\r\nimport { BaseChartComponent } from \"../chart-loader/base-chart.component\";\r\nimport { ServiceRevenuePerFieldTechnicianModel } from \"./service-revenue-per-field-technician.model\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { ChartLoaderService, IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { ServiceRevenueForFieldTechnicianComponent } from \"../service-revenue-for-field-technician/service-revenue-for-field-technician.component\";\r\n\r\n@Component({\r\n selector: \"app-service-revenue-per-field-technician\",\r\n templateUrl: \"./service-revenue-per-field-technician.component.html\",\r\n styleUrls: [\"./service-revenue-per-field-technician.component.scss\"]\r\n})\r\nexport class ServiceRevenuePerFieldTechnicianComponent extends BaseChartComponent implements OnInit {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private chartLoader: ChartLoaderService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig\r\n ) {\r\n super();\r\n }\r\n\r\n pointClickHandler(arg) {\r\n const component = this.chartLoader.getChartComponent(ServiceRevenueForFieldTechnicianComponent, {\r\n technician: arg.target.argument,\r\n height: this.height\r\n });\r\n this.changeChart.next(component);\r\n }\r\n\r\n ngOnInit() {\r\n this.http.get(this.appConfig.apiLocations.ServiceSight + \"Dashboard/ServiceRevenuePerFieldTechnician\")\r\n .subscribe(data => this.datasource = data);\r\n }\r\n\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n","export class StockOutsModel {\r\n constructor(\r\n public Name: string,\r\n public Value: number = 0) { }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {{jobsOutstandingPercentage}}%\r\n \r\n \r\n","import { Component, Inject, OnInit } from \"@angular/core\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { ChartLoaderService, IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { BaseChartComponent } from \"../chart-loader/base-chart.component\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { StockOutsModel } from \"./stock-outs.model\";\r\n\r\n@Component({\r\n selector: \"app-stock-outs\",\r\n templateUrl: \"./stock-outs.component.html\",\r\n styleUrls: [\"./stock-outs.component.scss\"]\r\n})\r\nexport class StockOutsComponent extends BaseChartComponent implements OnInit {\r\n\r\n public jobsOutstandingPercentage: number = 0;\r\n public centerTextFontSize: number;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private chartLoader: ChartLoaderService,\r\n private translate: TranslateService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) {\r\n super();\r\n }\r\n\r\n customizeTooltip(arg) {\r\n return {\r\n text: arg.argument + \" (No of Jobs): \" + arg.valueText\r\n };\r\n }\r\n\r\n pointClickHandler() {\r\n const component = this.chartLoader.getChartComponent(StockOutsComponent, {\r\n height: this.height\r\n });\r\n this.changeChart.next(component);\r\n }\r\n\r\n ngOnInit(): void {\r\n this.http.get(this.appConfig.apiLocations.ServiceSight + \"Dashboard/StockOuts\")\r\n .subscribe(data => {\r\n this.datasource = [\r\n new StockOutsModel(this.translate.instant(\"stock.charts.no.stock.outs\"), data.AllActiveJobs),\r\n new StockOutsModel(this.translate.instant(\"stock.charts.stock.outs\"), data.JobsWithOutstandingParts)\r\n ];\r\n if (data.AllActiveJobs > 0 || data.JobsWithOutstandingParts > 0) {\r\n this.jobsOutstandingPercentage = Math.round(data.JobsWithOutstandingParts / (data.JobsWithOutstandingParts + data.AllActiveJobs) * 100);\r\n }\r\n });\r\n }\r\n\r\n}\r\n","import { Component, OnInit, Input, Inject } from \"@angular/core\";\r\nimport { TotalServiceRevenueForPeriodModel } from \"./total-service-revenue-for-period.model\";\r\nimport { BaseChartComponent } from \"../chart-loader/base-chart.component\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { ChartLoaderService, IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { TotalServiceRevenueComponent } from \"../total-service-revenue/total-service-revenue.component\";\r\n\r\n@Component({\r\n selector: \"app-total-service-revenue-for-period\",\r\n templateUrl: \"./total-service-revenue-for-period.component.html\",\r\n styleUrls: [\"./total-service-revenue-for-period.component.scss\"]\r\n})\r\nexport class TotalServiceRevenueForPeriodComponent extends BaseChartComponent implements OnInit {\r\n @Input() month: string;\r\n @Input() year: string;\r\n\r\n public get correctedHight(): number {\r\n return this.height - 36;\r\n }\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private chartLoader: ChartLoaderService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig\r\n ) {\r\n super();\r\n }\r\n\r\n onButtonClick() {\r\n const component = this.chartLoader.getChartComponent(TotalServiceRevenueComponent, {\r\n height: this.height\r\n });\r\n this.changeChart.next(component);\r\n }\r\n\r\n ngOnInit() {\r\n this.http.get(\r\n `${this.appConfig.apiLocations.ServiceSight}Dashboard/TotalServiceRevenueForPeriod?period=${this.month}&year=${this.year}`)\r\n .subscribe(data => this.datasource = data);\r\n }\r\n\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n","\r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Component, Inject, OnInit } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { forkJoin } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG, Module, ModuleService } from \"servicesight-shared\";\r\nimport { TotalServiceRevenueModel } from \"./total-service-revenue.model\";\r\nimport { ChartLoaderService } from \"servicesight-shared\";\r\nimport { BaseChartComponent } from \"../chart-loader/base-chart.component\";\r\nimport { TotalServiceRevenueForPeriodComponent } from \"../total-service-revenue-for-period/total-service-revenue-for-period.component\";\r\n\r\n@Component({\r\n selector: \"app-total-service-revenue\",\r\n templateUrl: \"./total-service-revenue.component.html\",\r\n styleUrls: [\"./total-service-revenue.component.scss\"]\r\n})\r\nexport class TotalServiceRevenueComponent extends BaseChartComponent implements OnInit {\r\n public isProEnabled: boolean = false;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private chartLoader: ChartLoaderService,\r\n public translate: TranslateService,\r\n public moduleService: ModuleService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig\r\n ) {\r\n super();\r\n this.customizeText = this.customizeText.bind(this);\r\n }\r\n\r\n ngOnInit() {\r\n forkJoin([\r\n this.http.get(this.appConfig.apiLocations.ServiceSight + \"Dashboard/TotalServiceRevenue\"),\r\n this.moduleService.GetEnabledModules()\r\n ]).subscribe(([data, modules]) => {\r\n this.datasource = data;\r\n this.isProEnabled = modules.includes(Module.Pro);\r\n });\r\n }\r\n\r\n pointClickHandler(arg) {\r\n const component = this.chartLoader.getChartComponent(TotalServiceRevenueForPeriodComponent, {\r\n month: arg.target.data.Month,\r\n year: arg.target.data.Year,\r\n height: this.height\r\n });\r\n this.changeChart.next(component);\r\n }\r\n\r\n customizeText(e) {\r\n const abbrMonths = [\"jan\", \"feb\", \"mar\", \"apr\", \"may\", \"jun\", \"jul\", \"aug\", \"sep\", \"oct\", \"nov\", \"dec\"];\r\n const translationPrefix = \"short.\";\r\n return this.translate.instant(translationPrefix + abbrMonths[e.value - 1]);\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Component, Inject, OnInit } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { forkJoin } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG, Module, ModuleService } from \"servicesight-shared\";\r\nimport { ValueOfInvoicesRaisedModel } from \"./value-of-invoices-raised.model\";\r\nimport { BaseChartComponent } from \"../chart-loader/base-chart.component\";\r\n\r\n@Component({\r\n selector: \"app-value-of-invoices-raised\",\r\n templateUrl: \"./value-of-invoices-raised.component.html\",\r\n styleUrls: [\"./value-of-invoices-raised.component.scss\"]\r\n})\r\nexport class ValueOfInvoicesRaisedComponent extends BaseChartComponent implements OnInit {\r\n public isProEnabled: boolean = false;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n public translate: TranslateService,\r\n public moduleService: ModuleService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) {\r\n super();\r\n this.customizeText = this.customizeText.bind(this);\r\n }\r\n\r\n ngOnInit(): void {\r\n forkJoin([\r\n this.http.get(this.appConfig.apiLocations.ServiceSight + \"Dashboard/ValueOfInvoicesRaised\"),\r\n this.moduleService.GetEnabledModules()\r\n ]).subscribe(([data, modules]) => {\r\n this.datasource = data;\r\n this.isProEnabled = modules.includes(Module.Pro);\r\n });\r\n }\r\n\r\n customizeText(e) {\r\n const abbrMonths = [\"jan\", \"feb\", \"mar\", \"apr\", \"may\", \"jun\", \"jul\", \"aug\", \"sep\", \"oct\", \"nov\", \"dec\"];\r\n const translationPrefix = \"short.\";\r\n return this.translate.instant(translationPrefix + abbrMonths[e.value - 1]);\r\n }\r\n}\r\n","import { Component, ComponentRef, Input, OnInit, ViewChild, ViewContainerRef } from \"@angular/core\";\r\nimport {\r\n EquipmentUpTimeComponent,\r\n EquipmentWatchListComponent,\r\n Module,\r\n ModuleService,\r\n ChartLoaderService,\r\n OnsiteResponseTimesComponent\r\n} from \"servicesight-shared\";\r\nimport { ActualLabourHoursVServiceBudgetHoursComponent } from \"../actual-labour-hours-v-service-budget-hours/actual-labour-hours-v-service-budget-hours.component\";\r\nimport { AveragePurchaseOrderLeadTimeComponent } from \"../average-purchase-order-lead-time/average-purchase-order-lead-time.component\";\r\nimport { AverageSalesOrderLeadTimeComponent } from \"../average-sales-order-lead-time/average-sales-order-lead-time.component\";\r\nimport { EquipmentStatusComponent } from \"../equipment-status/equipment-status.component\";\r\nimport { FieldTechnicianProductivityComponent } from \"../field-technician-productivity/field-technician-productivity.component\";\r\nimport { FieldTechnicianUtilisationComponent } from \"../field-technician-utilisation/field-technician-utilisation.component\";\r\nimport { FirstTimeFixRateByPeriodComponent } from \"../first-time-fix-rate-by-period/first-time-fix-rate-by-period.component\";\r\nimport { FirstTimeFixRateComponent } from \"../first-time-fix-rate/first-time-fix-rate.component\";\r\nimport { JobProfitablityComponent } from \"../job-profitablity/job-profitablity.component\";\r\nimport { MeanTimeToRepairComponent } from \"../mean-time-to-repair/mean-time-to-repair.component\";\r\nimport { OpenPurchaseOrdersComponent } from \"../open-purchase-orders/open-purchase-orders.component\";\r\nimport { OpenSalesOrdersComponent } from \"../open-sales-orders/open-sales-orders.component\";\r\nimport { OutstandingJobsByJobTypeComponent } from \"../outstanding-jobs-by-job-type/outstanding-jobs-by-job-type.component\";\r\nimport { SalesFunnelComponent } from \"../sales-funnel/sales-funnel.component\";\r\nimport { ServiceContractRevenueComponent } from \"../service-contract-revenue/service-contract-revenue.component\";\r\nimport { ServiceRevenuePerFieldTechnicianComponent } from \"../service-revenue-per-field-technician/service-revenue-per-field-technician.component\";\r\nimport { StockOutsComponent } from \"../stock-outs/stock-outs.component\";\r\nimport { TotalServiceRevenueComponent } from \"../total-service-revenue/total-service-revenue.component\";\r\nimport { ValueOfInvoicesRaisedComponent } from \"../value-of-invoices-raised/value-of-invoices-raised.component\";\r\n\r\n@Component({\r\n selector: \"app-chart-loader\",\r\n templateUrl: \"./chart-loader.component.html\",\r\n styleUrls: [\"./chart-loader.component.scss\"]\r\n})\r\nexport class ChartLoaderComponent implements OnInit {\r\n @ViewChild(\"dynamic\", { read: ViewContainerRef, static: true }) viewContainerRef: ViewContainerRef;\r\n @Input() chartName: string;\r\n @Input() height: string;\r\n private isEquipmentEnabled: boolean;\r\n private isRecurringJob: boolean;\r\n private isServiceContractEnabled: boolean;\r\n private isStockEnabled: boolean;\r\n private isProEnabled: boolean;\r\n private isPurchaseOrderEnabled: boolean = false;\r\n private isSalesOrderEnabled: boolean = false;\r\n private isSalesOpportunityEnabled: boolean = false;\r\n private component: ComponentRef = null;\r\n private chartHeight: number;\r\n\r\n constructor(\r\n private chartLoader: ChartLoaderService,\r\n private moduleService: ModuleService) { }\r\n\r\n ngOnInit() {\r\n this.moduleService.GetEnabledModules()\r\n .subscribe(x => {\r\n this.isEquipmentEnabled = x.includes(Module.Equipment);\r\n this.isRecurringJob = x.includes(Module.RecurringJobs);\r\n this.isServiceContractEnabled = x.includes(Module.ServiceContract);\r\n this.isStockEnabled = x.includes(Module.Stock);\r\n this.isProEnabled = x.includes(Module.Pro);\r\n this.isPurchaseOrderEnabled = x.includes(Module.PurchaseOrders);\r\n this.isSalesOrderEnabled = x.includes(Module.SalesOrders);\r\n this.isSalesOpportunityEnabled = x.includes(Module.SalesOpportunity);\r\n this.chartHeight = parseInt(this.height, 10);\r\n this.loadComponent();\r\n });\r\n }\r\n\r\n changeChart(component: ComponentRef) {\r\n if (component !== null) {\r\n this.viewContainerRef.clear();\r\n component.instance.changeChart.subscribe(x => this.changeChart(x));\r\n this.viewContainerRef.insert(component.hostView);\r\n }\r\n }\r\n\r\n loadComponent() {\r\n if (this.chartName === \"Outstanding Jobs by Job Type\") {\r\n this.component = this.chartLoader.getChartComponent(OutstandingJobsByJobTypeComponent, { height: this.chartHeight });\r\n } else if (this.chartName === \"Field Technician Productivity\") {\r\n this.component = this.chartLoader.getChartComponent(FieldTechnicianProductivityComponent, { height: this.chartHeight });\r\n } else if (this.chartName === \"Field Technician Utilisation\") {\r\n this.component = this.chartLoader.getChartComponent(FieldTechnicianUtilisationComponent, { height: this.chartHeight });\r\n } else if (this.chartName === \"First Time Fix Rate by Period\") {\r\n this.component = this.chartLoader.getChartComponent(FirstTimeFixRateByPeriodComponent, { height: this.chartHeight });\r\n } else if (this.chartName === \"First Time Fix Rate\") {\r\n this.component = this.chartLoader.getChartComponent(FirstTimeFixRateComponent, { height: this.chartHeight });\r\n } else if (this.chartName === \"Mean time to repair\") {\r\n this.component = this.chartLoader.getChartComponent(MeanTimeToRepairComponent, { height: this.chartHeight });\r\n } else if (this.chartName === \"On-site Response Times\") {\r\n this.component = this.chartLoader.getChartComponent(OnsiteResponseTimesComponent, { height: this.chartHeight });\r\n } else if (this.chartName === \"Service Revenue per Field Technician\") {\r\n this.component = this.chartLoader.getChartComponent(ServiceRevenuePerFieldTechnicianComponent, { height: this.chartHeight });\r\n } else if (this.chartName === \"Total Service Revenue\") {\r\n this.component = this.chartLoader.getChartComponent(TotalServiceRevenueComponent, { height: this.chartHeight });\r\n } else if (this.chartName === \"Value of Invoices Raised\") {\r\n this.component = this.chartLoader.getChartComponent(ValueOfInvoicesRaisedComponent, { height: this.chartHeight });\r\n } else if (this.chartName === \"Equipment by Status\" && this.isEquipmentEnabled) {\r\n this.component = this.chartLoader.getChartComponent(EquipmentStatusComponent, { height: this.chartHeight });\r\n } else if (this.chartName === \"Equipment Watch List\" && this.isEquipmentEnabled) {\r\n this.component = this.chartLoader.getChartComponent(EquipmentWatchListComponent, { height: this.chartHeight });\r\n } else if (this.chartName === \"Equipment Up Time\" && this.isEquipmentEnabled) {\r\n this.component = this.chartLoader.getChartComponent(EquipmentUpTimeComponent, { height: this.chartHeight });\r\n } else if (this.chartName === \"Actual Labour Hours v Service Budget Hours\" && this.isRecurringJob) {\r\n this.component = this.chartLoader.getChartComponent(ActualLabourHoursVServiceBudgetHoursComponent, { height: this.chartHeight });\r\n } else if (this.chartName === \"Contract Revenue\" && this.isServiceContractEnabled) {\r\n this.component = this.chartLoader.getChartComponent(ServiceContractRevenueComponent, { height: this.chartHeight });\r\n } else if (this.chartName === \"Stock Outs\" && this.isStockEnabled) {\r\n this.component = this.chartLoader.getChartComponent(StockOutsComponent, { height: this.chartHeight });\r\n } else if (this.chartName === \"Job Profitability\" && this.isProEnabled) {\r\n this.component = this.chartLoader.getChartComponent(JobProfitablityComponent, { height: this.chartHeight });\r\n } else if (this.chartName === \"Average Sales Order Lead Time\" && this.isSalesOrderEnabled) {\r\n this.component = this.chartLoader.getChartComponent(AverageSalesOrderLeadTimeComponent, { height: this.chartHeight });\r\n } else if (this.chartName === \"Open Sales Orders\" && this.isSalesOrderEnabled) {\r\n this.component = this.chartLoader.getChartComponent(OpenSalesOrdersComponent, { height: this.chartHeight });\r\n } else if (this.chartName === \"Average Purchase Order Lead Time\" && this.isPurchaseOrderEnabled) {\r\n this.component = this.chartLoader.getChartComponent(AveragePurchaseOrderLeadTimeComponent, { height: this.chartHeight });\r\n } else if (this.chartName === \"Open Purchase Orders\" && this.isPurchaseOrderEnabled) {\r\n this.component = this.chartLoader.getChartComponent(OpenPurchaseOrdersComponent, { height: this.chartHeight });\r\n } else if (this.chartName === \"Sales Funnel\" && this.isSalesOpportunityEnabled) {\r\n this.component = this.chartLoader.getChartComponent(SalesFunnelComponent, { height: this.chartHeight });\r\n }\r\n\r\n if (this.component !== null) {\r\n this.changeChart(this.component);\r\n }\r\n }\r\n}\r\n","
\r\n \r\n
\r\n","export enum WidgetType {\r\n NewButtons = 1,\r\n Tiles = 2,\r\n EngineerCarousel = 3,\r\n StartHere = 4\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { ComponentRef, Output } from \"@angular/core\";\r\nimport { BehaviorSubject } from \"rxjs\";\r\n\r\n@Injectable()\r\nexport abstract class BaseWidgetComponent {\r\n @Output() changeWidget: BehaviorSubject> = new BehaviorSubject>(null);\r\n public isAllowedView: boolean = false;\r\n public isLoading: boolean = true;\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { Observable } from \"rxjs\";\r\nimport { JobStatusTile } from \"./../models/job-status-tile.model\";\r\nimport { EngineerCarousel } from \"../models/engineer-carousel.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class WidgetService {\r\n\r\n constructor(\r\n @Inject(APP_CONFIG) protected config: IAppConfig,\r\n private http: HttpClient) { }\r\n\r\n public GetJobStatuses(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}job/GetJobsStatusActionResult`);\r\n }\r\n\r\n public GetEngineerCarouselList(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Employee/GetCarouselEngineerDetailsList`);\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n\r\n","import { BaseWidgetComponent } from \"./../widget-loader/base-widget.component\";\r\nimport { Component, OnInit } from \"@angular/core\";\r\nimport { DomSanitizer, SafeResourceUrl } from \"@angular/platform-browser\";\r\nimport { WidgetService } from \"../../services/widget.service\";\r\nimport { PermissionsService } from \"servicesight-shared\";\r\nimport { EngineerCarousel } from \"../../models/engineer-carousel.model\";\r\nimport { takeWhile } from \"rxjs/operators\";\r\n\r\n@Component({\r\n selector: \"app-engineer-carousel\",\r\n templateUrl: \"./engineer-carousel.component.html\",\r\n styleUrls: [\"./engineer-carousel.component.scss\"]\r\n})\r\nexport class EngineerCarouselComponent extends BaseWidgetComponent implements OnInit {\r\n public engineers: EngineerCarousel[];\r\n\r\n constructor(\r\n private widgetService: WidgetService,\r\n private permissionService: PermissionsService,\r\n private sanitizer: DomSanitizer) {\r\n super();\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.permissionService.ArePermissionsLoaded()\r\n .pipe(takeWhile(x => x === false, true))\r\n .subscribe(loaded => {\r\n if (loaded) {\r\n this.permissionService.CurrentUserHasPermission(\"EngineerCarousel\")\r\n .subscribe(result => {\r\n this.isAllowedView = result;\r\n\r\n this.widgetService.GetEngineerCarouselList()\r\n .subscribe(data => {\r\n this.engineers = data;\r\n this.isLoading = false;\r\n });\r\n });\r\n }\r\n });\r\n }\r\n\r\n public GetImage(data: string): SafeResourceUrl {\r\n return this.sanitizer.bypassSecurityTrustResourceUrl(\"data:image/bmp;charset=utf-8;base64,\" + data);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n

\r\n {{jobStatuses.UnassignedJobs}}\r\n

\r\n

{{ \"widget.tiles.unassigned-jobs\" | translate }}

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

\r\n {{jobStatuses.ActiveJobs}}\r\n

\r\n

{{ \"widget.tiles.active-jobs\" | translate }}

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

\r\n {{jobStatuses.IncompleteJobs}}\r\n

\r\n

{{ \"widget.tiles.ready-to-complete\" | translate }}

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

\r\n {{jobStatuses.OutstandingInvoices}}\r\n

\r\n

{{ \"widget.tiles.ready-to-invoice\" | translate }}

\r\n
\r\n
\r\n
\r\n
\r\n","import { Component, OnInit } from \"@angular/core\";\r\nimport { JobStatusTile } from \"../../models/job-status-tile.model\";\r\nimport { WidgetService } from \"./../../services/widget.service\";\r\nimport { BaseWidgetComponent } from \"./../widget-loader/base-widget.component\";\r\nimport { PermissionsService } from \"servicesight-shared\";\r\nimport { takeWhile } from \"rxjs/operators\";\r\n\r\n@Component({\r\n selector: \"app-tiles\",\r\n templateUrl: \"./tiles.component.html\",\r\n styleUrls: [\"./tiles.component.scss\"]\r\n})\r\nexport class TilesComponent extends BaseWidgetComponent implements OnInit {\r\n public jobStatuses: JobStatusTile;\r\n public jobListUrl: string = \"/jobs/list\";\r\n\r\n constructor(\r\n private permissionService: PermissionsService,\r\n private widgetService: WidgetService) {\r\n super();\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.permissionService.ArePermissionsLoaded()\r\n .pipe(takeWhile(x => x === false, true))\r\n .subscribe(loaded => {\r\n if (loaded) {\r\n this.permissionService.CurrentUserHasPermission(\"JobStatus\")\r\n .subscribe(result => {\r\n this.isAllowedView = result;\r\n\r\n this.widgetService.GetJobStatuses()\r\n .subscribe(data => {\r\n this.jobStatuses = data;\r\n this.isLoading = false;\r\n });\r\n });\r\n }\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n","import { Component, OnInit } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { combineLatest } from \"rxjs\";\r\nimport { takeWhile } from \"rxjs/operators\";\r\nimport { ButtonCreatePermissions, PermissionsService, SettingId, SettingsService } from \"servicesight-shared\";\r\nimport { ModuleAccessModel } from \"src/app/shared/models/module-access.model\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { Ng1CustomerService } from \"src/app/shared/services/ng1-customer.service\";\r\nimport { BaseWidgetComponent } from \"./../widget-loader/base-widget.component\";\r\n\r\n@Component({\r\n selector: \"app-new-buttons\",\r\n templateUrl: \"./new-buttons.component.html\",\r\n styleUrls: [\"./new-buttons.component.scss\"]\r\n})\r\nexport class NewButtonsComponent extends BaseWidgetComponent implements OnInit {\r\n public modulesAccess: ModuleAccessModel = new ModuleAccessModel();\r\n public buttonsPermissions: ButtonCreatePermissions;\r\n public isJobWizardEnabled: boolean = false;\r\n\r\n constructor(\r\n private customerService: Ng1CustomerService,\r\n private router: Router,\r\n private licenseService: LicenseService,\r\n private permissionService: PermissionsService,\r\n private settingService: SettingsService) {\r\n super();\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.permissionService.ArePermissionsLoaded()\r\n .pipe(takeWhile(x => x === false, true))\r\n .subscribe(loaded => {\r\n if (loaded) {\r\n this.permissionService.CurrentUserHasPermission(\"ButtonsWidget\")\r\n .subscribe(result => {\r\n this.isAllowedView = result;\r\n\r\n const modules = this.licenseService.GetCompanyHasAccessToModules();\r\n const settings = this.settingService.getSetting(SettingId.JobCreationWizard);\r\n const permissions = this.permissionService.GetButtonsCreatePermissions();\r\n\r\n combineLatest([\r\n modules,\r\n settings,\r\n permissions\r\n ]).subscribe(joinedResult => {\r\n this.modulesAccess = joinedResult[0];\r\n this.isJobWizardEnabled = joinedResult[1].ValueBool;\r\n this.buttonsPermissions = joinedResult[2];\r\n this.isLoading = false;\r\n });\r\n });\r\n }\r\n });\r\n }\r\n\r\n public openJob(): void {\r\n const url = this.isJobWizardEnabled ? \"create\" : \"add-job\";\r\n this.router.navigate([\"jobs\", url]);\r\n }\r\n\r\n public openReminder(): void {\r\n // TODO: Remove that and use routerLink when migration to angular is finished\r\n location.href = \"#/tasks/task/\";\r\n }\r\n\r\n public createCustomer(): void {\r\n this.customerService.openCustomerModal(\"customer\")\r\n .then((customerId: number) => {\r\n if (customerId) {\r\n // TODO: Remove that and use routerLink when migration to angular is finished\r\n location.href = \"#/customers/customer/\" + customerId;\r\n }\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n \"{{\r\n
\r\n
\r\n
\r\n
\r\n \"{{\r\n
\r\n
\r\n

{{ 'dashboard.start-here.getting-started' | translate }}

\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
{{ 'dashboard.start-here.missing-permission' | translate }}
\r\n
\r\n","import { Component, OnInit } from \"@angular/core\";\r\nimport { takeWhile } from \"rxjs/operators\";\r\nimport { HelpItemTagEnum, PermissionsService } from \"servicesight-shared\";\r\nimport { BaseWidgetComponent } from \"./../widget-loader/base-widget.component\";\r\n\r\n@Component({\r\n selector: \"app-start-here\",\r\n templateUrl: \"./start-here.component.html\",\r\n styleUrls: [\"./start-here.component.scss\"]\r\n})\r\nexport class StartHereComponent extends BaseWidgetComponent implements OnInit {\r\n public helpItemTagEnum = HelpItemTagEnum;\r\n\r\n constructor(\r\n private permissionService: PermissionsService) {\r\n super();\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.permissionService.ArePermissionsLoaded()\r\n .pipe(takeWhile(x => x === false, true))\r\n .subscribe(loaded => {\r\n if (loaded) {\r\n this.permissionService.CurrentUserHasPermission(\"CustomerHelper\")\r\n .subscribe(result => {\r\n this.isAllowedView = result;\r\n this.isLoading = false;\r\n });\r\n }\r\n });\r\n }\r\n\r\n public getMobileApp(): void {\r\n window.open(\"https://qrco.de/ServiceSightMobileApp\");\r\n }\r\n}\r\n","import { ComponentFactoryResolver, ComponentRef, Injectable, Injector } from \"@angular/core\";\r\nimport { EngineerCarouselComponent } from \"./../widgets/engineer-carousel/engineer-carousel.component\";\r\nimport { TilesComponent } from \"./../widgets/tiles/tiles.component\";\r\nimport { NewButtonsComponent } from \"../widgets/new-buttons/new-buttons.component\";\r\nimport { StartHereComponent } from \"../widgets/start-here/start-here.component\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class WidgetLoaderService {\r\n\r\n constructor(\r\n private injector: Injector,\r\n private factoryResolver: ComponentFactoryResolver) { }\r\n\r\n public GetNewButtonsWidgetComponent(): ComponentRef {\r\n const factory = this.factoryResolver.resolveComponentFactory(NewButtonsComponent);\r\n const component = factory.create(this.injector);\r\n return component;\r\n }\r\n\r\n public GetTilesWidgetComponent(): ComponentRef {\r\n const factory = this.factoryResolver.resolveComponentFactory(TilesComponent);\r\n const component = factory.create(this.injector);\r\n return component;\r\n }\r\n\r\n public GetEngineerCarouselWidgetComponent(): ComponentRef {\r\n const factory = this.factoryResolver.resolveComponentFactory(EngineerCarouselComponent);\r\n const component = factory.create(this.injector);\r\n return component;\r\n }\r\n\r\n public GetStartHereWidgetComponent(): ComponentRef {\r\n const factory = this.factoryResolver.resolveComponentFactory(StartHereComponent);\r\n const component = factory.create(this.injector);\r\n return component;\r\n }\r\n}\r\n","
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
{{ \"widget.no-permission\" | translate }}
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
{{ \"widget.loading-widget\" | translate }}
\r\n
\r\n
\r\n
","import { Component, ComponentRef, Input, OnInit, ViewChild, ViewContainerRef } from \"@angular/core\";\r\nimport { WidgetType } from \"./../../enums/widget-type.enum\";\r\nimport { WidgetLoaderService } from \"../../services/widget-loader.service\";\r\n\r\n@Component({\r\n selector: \"app-widget-loader\",\r\n templateUrl: \"./widget-loader.component.html\",\r\n styleUrls: [\"./widget-loader.component.scss\"]\r\n})\r\nexport class WidgetLoaderComponent implements OnInit {\r\n @ViewChild(\"dynamic\", { read: ViewContainerRef, static: true }) viewContainerRef: ViewContainerRef;\r\n @Input() widgetType: WidgetType;\r\n private component: ComponentRef = null;\r\n\r\n constructor(\r\n private widgetLoader: WidgetLoaderService) { }\r\n\r\n public get isLoading(): boolean {\r\n return this.component?.instance.isLoading ?? true;\r\n }\r\n\r\n public get isAllowedView(): boolean {\r\n return this.component?.instance.isAllowedView ?? true;\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.LoadComponent();\r\n }\r\n\r\n public LoadComponent(): void {\r\n switch (this.widgetType) {\r\n case WidgetType.NewButtons:\r\n this.component = this.widgetLoader.GetNewButtonsWidgetComponent();\r\n break;\r\n case WidgetType.Tiles:\r\n this.component = this.widgetLoader.GetTilesWidgetComponent();\r\n break;\r\n case WidgetType.EngineerCarousel:\r\n this.component = this.widgetLoader.GetEngineerCarouselWidgetComponent();\r\n break;\r\n case WidgetType.StartHere:\r\n this.component = this.widgetLoader.GetStartHereWidgetComponent();\r\n break;\r\n }\r\n\r\n if (this.component !== null) {\r\n this.ChangeWidget(this.component);\r\n }\r\n }\r\n\r\n public ChangeWidget(component: ComponentRef): void {\r\n if (component !== null) {\r\n this.viewContainerRef.clear();\r\n component.instance.changeWidget.subscribe(x => this.ChangeWidget(x));\r\n this.viewContainerRef.insert(component.hostView);\r\n }\r\n }\r\n}\r\n","import { CurrencyPipe, DatePipe, DecimalPipe, PercentPipe } from \"@angular/common\";\r\nimport { ApplicationRef, Injectable, PipeTransform } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class DynamicLocaleService {\r\n\r\n private i18nPipes: PipeTransform[];\r\n\r\n constructor(\r\n datePipe: DatePipe,\r\n currencyPipe: CurrencyPipe,\r\n decimalPipe: DecimalPipe,\r\n percentPipe: PercentPipe,\r\n private applicationRef: ApplicationRef,\r\n private translate: TranslateService\r\n ) {\r\n this.i18nPipes = [\r\n datePipe,\r\n currencyPipe,\r\n decimalPipe,\r\n percentPipe,\r\n ];\r\n }\r\n\r\n public setLocale(lang: string): void {\r\n this.translate.use(lang);\r\n this.i18nPipes.forEach(pipe => {\r\n if (pipe.hasOwnProperty(\"locale\")) {\r\n // eslint-disable-next-line @typescript-eslint/dot-notation\r\n pipe[\"locale\"] = lang;\r\n } else if (pipe.hasOwnProperty(\"_locale\")) {\r\n // eslint-disable-next-line @typescript-eslint/dot-notation\r\n pipe[\"_locale\"] = lang;\r\n }\r\n });\r\n\r\n try {\r\n this.applicationRef.tick();\r\n } catch { }\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n

{{ 'settings.activity' | translate }}\r\n

{{ 'settings.activity.subheader' | translate }}

\r\n

\r\n
\r\n
\r\n
\r\n {{CustomersStats.WithAccessToPortal / CustomersStats.Total | percent}}\r\n {{CustomersStats.WithAccessToPortal}}/{{CustomersStats.Total}}\r\n
\r\n

{{ 'settings.activity.customerWithAccess' | translate }}

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n
\r\n {{ data.value | date: 'short' }}\r\n
\r\n\r\n
\r\n
{{ 'settings.activity.loginsLastDays' | translate }}
\r\n
\r\n
{{CustomersStats.LastLogged / CustomersStats.Total | percent}}
\r\n
{{CustomersStats.LastLogged}}/{{CustomersStats.Total}}
\r\n
\r\n
\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport { ActivityCustomerList } from \"../../shared/models/activity-customer-list.model\";\r\nimport { ActivityStats } from \"../../shared/models/activity-stats.model\";\r\nimport { PortalService } from \"../services/portal.service\";\r\n\r\n@Component({\r\n selector: \"app-settings-portal-activity\",\r\n templateUrl: \"./settings-portal-activity.component.html\",\r\n styleUrls: [\"./settings-portal-activity.component.scss\"]\r\n})\r\nexport class SettingsPortalActivityComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n\r\n public CustomersList: Array;\r\n public CustomersStats: ActivityStats;\r\n public SearchText: string = \"\";\r\n\r\n constructor(private portalService: PortalService) {\r\n }\r\n\r\n ngOnInit() {\r\n this.portalService.GetActivityListFromLastDays(30).subscribe(x => {\r\n this.CustomersList = x;\r\n });\r\n this.portalService.GetActivityStats().subscribe(x => {\r\n this.CustomersStats = x;\r\n });\r\n }\r\n\r\n public SearchTextChanged() {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { APP_CONFIG } from \"servicesight-shared\";\r\nimport { AccountsCommunicatorModel } from \"../models/accounts-communicator-settings.model\";\r\nimport { WebAppConfig } from \"src/app/shared/models/web-app-config.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class AccountsCommunicatorService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private appConfig: WebAppConfig) { }\r\n\r\n public GetExistingLinkSettings(): Observable {\r\n return this.http.get(`${this.appConfig.apiLocations.GateKeeper}Company/ApiKeys`);\r\n }\r\n\r\n public GenerateLinkSettings(): Observable {\r\n return this.http.post(`${this.appConfig.apiLocations.GateKeeper}Company/GenerateApiKeys`, null);\r\n }\r\n\r\n public Download(): Observable {\r\n return this.http.get(`${this.appConfig.apiLocations.ServiceSight}AccountsLink/DownloadCommunicator`, { observe: \"response\", responseType: \"blob\" as \"json\" });\r\n }\r\n}\r\n","import { Component, OnInit } from \"@angular/core\";\r\nimport { AccountsCommunicatorModel } from \"../models/accounts-communicator-settings.model\";\r\nimport { AccountsCommunicatorService } from \"../services/accounts-communicator.service\";\r\n\r\n@Component({\r\n selector: \"app-accounts-communicator-setup\",\r\n templateUrl: \"./accounts-communicator-setup.component.html\",\r\n styleUrls: [\"./accounts-communicator-setup.component.scss\"]\r\n})\r\nexport class AccountsCommunicatorSetupComponent implements OnInit {\r\n\r\n public model: AccountsCommunicatorModel = {\r\n PublicKey: null,\r\n SecretKey: null\r\n };\r\n\r\n constructor(\r\n private accountsCommunicatorService: AccountsCommunicatorService\r\n ) { }\r\n\r\n public ngOnInit(): void {\r\n this.accountsCommunicatorService.GetExistingLinkSettings().subscribe(model => {\r\n this.model = model;\r\n });\r\n }\r\n\r\n public Generate(): void {\r\n this.accountsCommunicatorService.GenerateLinkSettings().subscribe(model => {\r\n this.model = model;\r\n });\r\n }\r\n\r\n public Download(): void {\r\n this.accountsCommunicatorService.Download().subscribe((response) => {\r\n const downloadLink = document.createElement(\"a\");\r\n downloadLink.href = URL.createObjectURL(new Blob([response.body], { type: response.type }));\r\n downloadLink.setAttribute(\"download\", \"ServiceSight.AccountsCommunicator.zip\");\r\n document.body.appendChild(downloadLink);\r\n downloadLink.click();\r\n downloadLink.remove();\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'accounts-communicator.setup.title' | translate }}

\r\n

Setup 1: Download our on premise sync service and install on the same server as Sage50c

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

Step 2: Generate encryption keys and secure your on premise sync service

\r\n\r\n \r\n \r\n\r\n \r\n This key is only visible once, if you leave and come back you will not be able to retreive it.\r\n Treat this key like a password for your account and only transfer it to the on premise sync service\r\n \r\n\r\n \r\n\r\n

Step 3: Extract the zip and run the installer script passing all values (when updating you only need to provide installDirectory)

\r\n
\r\n\r\n
\r\n","export enum InvoiceOptionsEnum {\r\n InvEquipCategory = 1,\r\n InvEquipGroup = 2,\r\n InvEquipList\r\n}\r\n","
\r\n \r\n\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n","import { Component, EventEmitter, Input, OnInit, Output, AfterContentChecked } from \"@angular/core\";\r\nimport { InvoiceOptionsEnum } from \"../models/invoice-options.enum\";\r\nimport { ModuleService, Module } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-accounts-create-invoices\",\r\n templateUrl: \"./accounts-create-invoices.component.html\",\r\n styleUrls: [\"./accounts-create-invoices.component.scss\"]\r\n})\r\nexport class AccountsCreateInvoicesComponent implements OnInit, AfterContentChecked {\r\n\r\n public EquipmentInformationAppearsOnInvoice: InvoiceOptionsEnum;\r\n public InvoiceOptionsEnum = InvoiceOptionsEnum;\r\n public equipmentModuleEnabled: boolean = false;\r\n public stockModuleEnabled: boolean = false;\r\n\r\n @Input() invSummariseParts: boolean;\r\n @Input() invEquipCategory: boolean;\r\n @Input() invEquipGroup: boolean;\r\n @Input() invEquipList: boolean;\r\n\r\n @Output() invEquipCategoryOut = new EventEmitter();\r\n @Output() invEquipGroupOut = new EventEmitter();\r\n @Output() invEquipListOut = new EventEmitter();\r\n @Output() invSummarisePartsOut = new EventEmitter();\r\n\r\n public invoiceOptionsChange(event: any, value: InvoiceOptionsEnum) {\r\n this.invEquipCategoryOut.emit(false);\r\n this.invEquipGroupOut.emit(false);\r\n this.invEquipListOut.emit(false);\r\n if (value === InvoiceOptionsEnum.InvEquipCategory) {\r\n this.invEquipCategoryOut.emit(event.target.checked);\r\n }\r\n\r\n if (value === InvoiceOptionsEnum.InvEquipGroup) {\r\n this.invEquipGroupOut.emit(event.target.checked);\r\n }\r\n\r\n if (value === InvoiceOptionsEnum.InvEquipList) {\r\n this.invEquipListOut.emit(event.target.checked);\r\n }\r\n }\r\n\r\n constructor(private moduleService: ModuleService) {\r\n }\r\n\r\n get summariseParts(): boolean {\r\n return this.invSummariseParts;\r\n }\r\n\r\n set summariseParts(value: boolean) {\r\n this.invSummariseParts = value;\r\n this.invSummarisePartsOut.emit(value);\r\n }\r\n\r\n ngAfterContentChecked() {\r\n if (this.invEquipCategory) {\r\n this.EquipmentInformationAppearsOnInvoice = InvoiceOptionsEnum.InvEquipCategory;\r\n }\r\n\r\n if (this.invEquipGroup) {\r\n this.EquipmentInformationAppearsOnInvoice = InvoiceOptionsEnum.InvEquipGroup;\r\n }\r\n\r\n if (this.invEquipList) {\r\n this.EquipmentInformationAppearsOnInvoice = InvoiceOptionsEnum.InvEquipList;\r\n }\r\n }\r\n\r\n ngOnInit() {\r\n this.moduleService.GetEnabledModules().subscribe(o => {\r\n this.equipmentModuleEnabled = o.includes(Module.Equipment);\r\n this.stockModuleEnabled = o.includes(Module.Stock);\r\n });\r\n }\r\n\r\n}\r\n","export enum AuditType {\r\n Create = 1,\r\n Update = 2,\r\n Delete = 3,\r\n Unknown = -1\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable } from \"rxjs\";\r\n\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { ODataService } from \"../../shared/services/odata/odata.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class AuditLogService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig,\r\n private odataService: ODataService) { }\r\n\r\n public GetAuditLogDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.appConfig.apiLocations.ServiceSightOData}AuditLogOD`,\r\n key: \"LogId\",\r\n keyType: \"Guid\",\r\n pageSize: 50,\r\n paging: true\r\n });\r\n }\r\n\r\n public GetAuditArchiveDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: `${this.appConfig.apiLocations.ServiceSightOData}AuditArchiveOD`,\r\n key: \"FileName\",\r\n keyType: \"string\",\r\n pageSize: 50,\r\n paging: true\r\n });\r\n }\r\n\r\n public GetDatabaseTableDataStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.appConfig.apiLocations.ServiceSightOData}DatabaseTablesOD`,\r\n key: \"TableName\",\r\n keyType: \"String\"\r\n });\r\n }\r\n\r\n public DownloadDocument(fileName: string): Observable {\r\n const url = `${this.appConfig.apiLocations.ServiceSight}AuditArchive/DownloadAsync?fileName=${fileName}`;\r\n return this.http.get(url, { observe: \"response\", responseType: \"blob\" as \"json\" });\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'audit-log.header' | translate }}\r\n
{{ 'audit-log.subheader' | translate }}
\r\n

\r\n
\r\n
\r\n\r\n \r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n
\r\n {{ data.data.System | translate }}\r\n
\r\n\r\n
\r\n
{{ \"audit-log.labels.changes\" | translate}}
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n","import { Component, OnDestroy, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport ArrayStore from \"devextreme/data/array_store\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { Subject, Subscription } from \"rxjs\";\r\nimport { debounceTime, distinctUntilChanged } from \"rxjs/operators\";\r\nimport { AuditType } from \"../enums/audit-type.enum\";\r\nimport { AuditLogChangeDetail } from \"../models/audit-log-change-detail\";\r\nimport { AuditLogEntry } from \"../models/audit-log-entry\";\r\nimport { AuditLogService } from \"../services/audit-log.service\";\r\n\r\n@Component({\r\n selector: \"app-audit-log\",\r\n templateUrl: \"./audit-log.component.html\",\r\n styleUrls: [\"./audit-log.component.scss\"],\r\n})\r\nexport class AuditLogComponent implements OnInit, OnDestroy {\r\n @ViewChild(DxDataGridComponent, { static: false }) dataGrid: DxDataGridComponent;\r\n\r\n public AuditLogDataSource: DataSource;\r\n public AuditArchiveDataSource: DataSource;\r\n public AuditTypeDataStore: ArrayStore;\r\n public SearchText: string = \"\";\r\n\r\n private changeDetailsStorage: any[] = [];\r\n private searchChanged: Subject = new Subject();\r\n private subscriptions: Subscription = new Subscription();\r\n\r\n constructor(\r\n private auditLogService: AuditLogService) { }\r\n\r\n public ngOnInit(): void {\r\n this.AuditLogDataSource = this.auditLogService.GetAuditLogDataSource();\r\n this.AuditArchiveDataSource = this.auditLogService.GetAuditArchiveDataSource();\r\n this.AuditTypeDataStore = new ArrayStore({\r\n key: \"AuditType\",\r\n data: [\r\n { AuditType: Number(AuditType.Create), Name: \"Create\" },\r\n { AuditType: Number(AuditType.Delete), Name: \"Delete\" },\r\n { AuditType: Number(AuditType.Update), Name: \"Update\" },\r\n { AuditType: Number(AuditType.Unknown), Name: \"Unknown\" }\r\n ]\r\n });\r\n\r\n this.subscriptions.add(\r\n this.searchChanged.pipe(\r\n debounceTime(1000),\r\n distinctUntilChanged()\r\n ).subscribe(value => this.UpdateGridSearch(value))\r\n );\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.subscriptions.unsubscribe();\r\n }\r\n\r\n public GetChangeDetails(rowData: any): AuditLogChangeDetail[] {\r\n const logEntry: AuditLogEntry = rowData.data;\r\n\r\n let item = this.changeDetailsStorage.find((i) => i.key === rowData.key);\r\n if (!item) {\r\n item = {\r\n key: rowData.key,\r\n dataSourceInstance: new DataSource({\r\n store: new ArrayStore({\r\n data: this.GetChangeDetailsForLogEntry(logEntry),\r\n key: \"LogId\",\r\n }),\r\n filter: [\"LogId\", \"=\", rowData.key],\r\n }),\r\n };\r\n this.changeDetailsStorage.push(item);\r\n }\r\n\r\n return item.dataSourceInstance;\r\n }\r\n\r\n public HandleSearchValueChange(): void {\r\n this.searchChanged.next(this.SearchText);\r\n }\r\n\r\n public downloadFile(fileName: string, displayName: string): boolean {\r\n this.auditLogService.DownloadDocument(fileName).subscribe(response => {\r\n const downloadLink = document.createElement(\"a\");\r\n downloadLink.href = URL.createObjectURL(new Blob([response.body], { type: response.type }));\r\n downloadLink.setAttribute(\"download\", displayName + \".csv\");\r\n document.body.appendChild(downloadLink);\r\n downloadLink.click();\r\n downloadLink.remove();\r\n });\r\n return false;\r\n }\r\n\r\n private UpdateGridSearch(searchText: string): void {\r\n this.dataGrid.instance.searchByText(encodeURI(searchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n private CreateChangeDetails(logEntry: AuditLogEntry, keySource: any, originalData: any, newData: any, auditType: AuditType, isArray: boolean): AuditLogChangeDetail[] {\r\n if (isArray) {\r\n return this.CreateChangeDetailsFromArray(keySource, originalData, newData, logEntry, auditType);\r\n }\r\n return this.CreateChangeDetailsFromObjects(keySource, originalData, newData, auditType, logEntry);\r\n }\r\n\r\n private CreateChangeDetailsFromArray(keySource: any, originalData: any, newData: any, logEntry: AuditLogEntry, auditType: AuditType): AuditLogChangeDetail[] {\r\n const result: AuditLogChangeDetail[] = [];\r\n const checkDifference = auditType === AuditType.Update || auditType === AuditType.Unknown;\r\n Object.keys(keySource).forEach((key: string) => {\r\n if (keySource[key].Name !== \"Timestamp\") {\r\n const originalChange = originalData[key];\r\n const newChange = newData[key];\r\n\r\n if (!checkDifference || originalChange.Value !== newChange.Value) {\r\n result.push({\r\n Field: keySource[key].Name,\r\n LogId: logEntry.LogId,\r\n NewValue: checkDifference || auditType === AuditType.Create ? newChange.Value : null,\r\n OriginalValue: checkDifference || auditType === AuditType.Delete ? originalChange.Value : null,\r\n });\r\n }\r\n }\r\n });\r\n\r\n return result;\r\n }\r\n\r\n private CreateChangeDetailsFromObjects(keySource: any, originalData: any, newData: any, auditType: AuditType, logEntry: AuditLogEntry) {\r\n const result: AuditLogChangeDetail[] = [];\r\n const checkDifference = auditType === AuditType.Update || auditType === AuditType.Unknown;\r\n Object.keys(keySource).forEach((key: string) => {\r\n if (key !== \"Timestamp\") {\r\n const originalValue = originalData ? originalData[key] : null;\r\n const newVaule = newData ? newData[key] : null;\r\n\r\n if (!checkDifference || originalValue !== newVaule) {\r\n result.push({\r\n Field: key,\r\n LogId: logEntry.LogId,\r\n NewValue: newVaule,\r\n OriginalValue: originalValue,\r\n });\r\n }\r\n }\r\n });\r\n\r\n return result;\r\n }\r\n\r\n private GetChangeDetailsForCreate(logEntry: AuditLogEntry, newData: any): AuditLogChangeDetail[] {\r\n return this.CreateChangeDetails(logEntry, newData, {}, newData, AuditType.Create, Array.isArray(newData));\r\n }\r\n\r\n private GetChangeDetailsForDelete(logEntry: AuditLogEntry, originalData: any): AuditLogChangeDetail[] {\r\n return this.CreateChangeDetails(logEntry, originalData, originalData, {}, AuditType.Delete, Array.isArray(originalData));\r\n }\r\n\r\n private GetChangeDetailsForLogEntry(logEntry: AuditLogEntry): AuditLogChangeDetail[] {\r\n const originalData = JSON.parse(logEntry.OriginalData);\r\n const newData = JSON.parse(logEntry.NewData);\r\n\r\n switch (logEntry.AuditType) {\r\n case AuditType.Create:\r\n return this.GetChangeDetailsForCreate(logEntry, newData);\r\n case AuditType.Delete:\r\n return this.GetChangeDetailsForDelete(logEntry, originalData);\r\n default:\r\n return this.GetChangeDetailsForUpdateOrUnknown(logEntry, originalData, newData, logEntry.AuditType);\r\n }\r\n }\r\n\r\n private GetChangeDetailsForUpdateOrUnknown(\r\n logEntry: AuditLogEntry,\r\n originalData: any,\r\n newData: any,\r\n auditType: AuditType): AuditLogChangeDetail[] {\r\n if (originalData || newData) {\r\n if (originalData) {\r\n return this.CreateChangeDetails(logEntry, originalData, originalData, newData, auditType, Array.isArray(originalData));\r\n } else if (newData) {\r\n return this.CreateChangeDetails(logEntry, newData, originalData, newData, auditType, Array.isArray(newData));\r\n }\r\n }\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { BillingAccount } from \"../models/billing-account.model\";\r\nimport { Billing } from \"../models/billing/billing.model\";\r\nimport { InvoiceItem } from \"../models/billing/invoice-item.model\";\r\nimport { SelectedSubscriptionItem } from \"../models/selected-subscription-item.model\";\r\nimport { SubscriptionCreateResponse } from \"../models/subscription-create-response.model\";\r\nimport { SubscriptionUpdateResponse } from \"../models/subscription-update-response.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class BillingService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private config: IAppConfig\r\n ) { }\r\n\r\n public GetHistory(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Billing/History`);\r\n }\r\n\r\n public Get(): Observable {\r\n return this.http.get(`${this.config.apiLocations.ServiceSight}Billing/Get`);\r\n }\r\n\r\n public SetupAccount(billingAccount: BillingAccount): Observable {\r\n return this.http.post(`${this.config.apiLocations.ServiceSight}Billing/CreateAccount`, billingAccount);\r\n }\r\n\r\n public CreateSubscription(items: SelectedSubscriptionItem[]): Observable {\r\n return this.http.post(`${this.config.apiLocations.ServiceSight}Billing/CreateSubscription`, {\r\n Items: items\r\n });\r\n }\r\n\r\n public UpdateSubscription(subscriptionId: string, items: SelectedSubscriptionItem[]): Observable {\r\n return this.http.put(`${this.config.apiLocations.ServiceSight}Billing/UpdateSubscription`, {\r\n SubscriptionId: subscriptionId,\r\n Items: items\r\n });\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { CurrencyPipe } from \"servicesight-shared\";\r\n\r\n@Pipe({\r\n name: \"billingAmount\"\r\n})\r\nexport class BillingAmountPipe implements PipeTransform {\r\n\r\n constructor(private currencyPipe: CurrencyPipe) { }\r\n\r\n public transform(value: number, showFreeLabel: boolean = false): string {\r\n if (value === 0 && showFreeLabel) {\r\n return \"free\";\r\n }\r\n\r\n const decimal = value / 100;\r\n\r\n return this.currencyPipe.transform(decimal, \"GBP\");\r\n }\r\n\r\n}\r\n","
\r\n
\r\n {{ item.InvoiceDate | date: 'shortDate' }} - {{ item.Amount | billingAmount }} - {{ item.CardLast4 }} - {{ item.CardBrand }} - {{ item.Status }}\r\n
\r\n
","import { Component, OnInit } from \"@angular/core\";\r\nimport { InvoiceItem } from \"../../models/billing/invoice-item.model\";\r\nimport { BillingService } from \"../../services/billing.service\";\r\n\r\n@Component({\r\n selector: \"app-history\",\r\n templateUrl: \"./history.component.html\",\r\n styleUrls: [\"./history.component.scss\"]\r\n})\r\nexport class HistoryComponent implements OnInit {\r\n public items: InvoiceItem[] = [];\r\n\r\n constructor(\r\n private billingService: BillingService) { }\r\n\r\n public ngOnInit(): void {\r\n this.billingService.GetHistory().subscribe(invoices => {\r\n this.items = invoices;\r\n });\r\n }\r\n\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { Observable } from \"rxjs\";\r\nimport { LicenceViewerDataModel } from \"../security/models/licence-viewer-data.model\";\r\nimport { APP_CONFIG } from \"servicesight-shared\";\r\nimport { WebAppConfig } from \"src/app/shared/models/web-app-config.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class LicenceViewerService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private appConfig: WebAppConfig) {\r\n }\r\n\r\n public GetLicenceData(): Observable {\r\n return this.http.get(`${this.appConfig.apiLocations.GateKeeper}License`);\r\n }\r\n}\r\n","import { Component, Input, OnInit, ViewChild } from \"@angular/core\";\r\nimport { IPaymentForm } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-card-details\",\r\n templateUrl: \"./card-details.component.html\",\r\n styleUrls: [\"./card-details.component.scss\"]\r\n})\r\nexport class CardDetailsComponent implements OnInit {\r\n @ViewChild(\"stripeForm\") stripeForm: IPaymentForm;\r\n\r\n @Input() public clientSecret: string = null;\r\n\r\n public name: string = null;\r\n\r\n public ngOnInit(): void {\r\n }\r\n\r\n public showError(e: string): void {\r\n alert(e);\r\n }\r\n\r\n public paymentSuccessful(): void {\r\n alert(\"success\");\r\n }\r\n\r\n public setupSubscription(): void {\r\n this.stripeForm.billingAddress = {\r\n FirstName: this.name,\r\n LastName: null,\r\n AddressLine1: null,\r\n AddressLine2: null,\r\n City: null,\r\n Country: null,\r\n PostCode: null,\r\n State: null,\r\n Email: null\r\n };\r\n\r\n this.stripeForm.MakePayment();\r\n }\r\n\r\n}\r\n","
\r\n
\r\n
\r\n

\r\n {{ 'billing.settings.subscription' | translate }}\r\n \r\n
\r\n {{ 'billing.settings.subscription.subtitle' | translate }}\r\n
\r\n

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

Before you can manage your subscription you need to setup a billing account.

\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n Setup account\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{ item.Name }}\r\n \r\n {{ Subtotal(item) | billingAmount }}
\r\n Lite free users\r\n \r\n {{ -5000 | billingAmount }}
Total{{ GetTotal() | billingAmount:true }}{{ GetTotal() > 0 ? \"/mo\" : \"\" }}
\r\n
selectedMobileLicenses\">\r\n You cannot reduce mobile licenses below what you have assigned to users.\r\n
\r\n
selectedWebLicenses\">\r\n You cannot reduce web licenses below what you have assigned to users.\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
","
\r\n
\r\n
\r\n

Card details

\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n Setup subscription\r\n \r\n
\r\n
\r\n
","import { Component, OnInit } from \"@angular/core\";\r\nimport { CustomerService, Module, ModuleService, ToasterService, ToastType } from \"servicesight-shared\";\r\nimport { BillingAccount } from \"../../models/billing-account.model\";\r\nimport { SubscriptionOption } from \"../../models/billing/subscription-option.model\";\r\nimport { SelectedSubscriptionItem } from \"../../models/selected-subscription-item.model\";\r\nimport { BillingService } from \"../../services/billing.service\";\r\nimport { LicenceViewerService } from \"../../services/licence-viewer.service\";\r\n\r\n@Component({\r\n selector: \"app-manage-subscription\",\r\n templateUrl: \"./manage-subscription.component.html\",\r\n styleUrls: [\"./manage-subscription.component.scss\"]\r\n})\r\nexport class ManageSubscriptionComponent implements OnInit {\r\n private isStripeLinkConfigured: boolean = false;\r\n private assignedWebLicenses: number = 0;\r\n private assignedMobileLicenses: number = 0;\r\n private activeSubscriptionId: string = null;\r\n\r\n public proEnabled: boolean = true;\r\n public hasExistingSubscription: boolean = false;\r\n public paymentSecret: string = \"\";\r\n public isLoading: boolean = true;\r\n public setupAccount: BillingAccount = {\r\n CompanyName: \"\",\r\n BillingEmail: \"\",\r\n AddressLine1: \"\",\r\n AddressLine2: \"\",\r\n TownCity: \"\",\r\n StateCounty: \"\",\r\n PostCode: \"\",\r\n CountryId: null,\r\n TaxNumber: \"\"\r\n };\r\n\r\n public countries: { Id: number; Name: string }[] = [];\r\n public options: SubscriptionOption[] = [];\r\n\r\n public get showSetupPage(): boolean {\r\n return !this.isLoading && !this.isStripeLinkConfigured && !this.showCardDetailsPage;\r\n }\r\n\r\n public get showSubscriptionPage(): boolean {\r\n return !this.isLoading && this.isStripeLinkConfigured && !this.showCardDetailsPage;\r\n }\r\n\r\n public get showCardDetailsPage(): boolean {\r\n return !this.isLoading && this.paymentSecret.length > 0;\r\n }\r\n\r\n public get allowedToCheckout(): boolean {\r\n return this.assignedWebLicenses <= this.selectedWebLicenses &&\r\n this.assignedMobileLicenses <= this.selectedMobileLicenses;\r\n }\r\n\r\n public get selectedWebLicenses(): number {\r\n return this.options.find(x => x.Name.includes(\"web user\"))\r\n .SelectedUpTo;\r\n }\r\n\r\n public get selectedMobileLicenses(): number {\r\n return this.options.find(x => x.Name.includes(\"mobile user\"))\r\n .SelectedUpTo;\r\n }\r\n\r\n constructor(\r\n private billingService: BillingService,\r\n private licenceViewerService: LicenceViewerService,\r\n private toasterService: ToasterService,\r\n private customerService: CustomerService,\r\n private moduleService: ModuleService\r\n ) { }\r\n\r\n public ngOnInit(): void {\r\n const email = JSON.parse(localStorage.getItem(\"ls.authorizationData\")).userName;\r\n const companyName = JSON.parse(localStorage.getItem(\"ls.defaultcompanyname\"));\r\n\r\n this.setupAccount.CompanyName = companyName;\r\n this.setupAccount.BillingEmail = email;\r\n\r\n this.moduleService.GetEnabledModules().subscribe(modules => {\r\n this.proEnabled = modules.includes(Module.Pro);\r\n });\r\n\r\n this.billingService.Get().subscribe(config => {\r\n this.isLoading = false;\r\n this.isStripeLinkConfigured = config.IsStripeLinkConfigured;\r\n this.options = config.Options;\r\n\r\n if (config.ActiveSubscription) {\r\n this.hasExistingSubscription = true;\r\n this.activeSubscriptionId = config.ActiveSubscription.SubscriptionId;\r\n }\r\n\r\n this.options.forEach(o => {\r\n if (config.ActiveSubscription) {\r\n const activeSub = config.ActiveSubscription.Items.find(a => a.Id === o.Id);\r\n o.SelectedUpTo = activeSub ? activeSub.Quantity : (o.Tiers ? o.Tiers[0].UpTo : 0);\r\n o.SubscriptionItemId = activeSub ? activeSub.SubscriptionItemId : null;\r\n } else {\r\n o.SelectedUpTo = o.Tiers ? o.Tiers[0].UpTo : 0;\r\n }\r\n });\r\n }, () => {\r\n this.toasterService.pop(\"An error occured loading billing profile\", ToastType.burnt);\r\n });\r\n\r\n this.customerService.Get(1).subscribe(customer => {\r\n this.setupAccount.AddressLine1 = customer.Address1;\r\n this.setupAccount.AddressLine2 = customer.Address2;\r\n this.setupAccount.TownCity = customer.Address3;\r\n this.setupAccount.StateCounty = customer.Address4;\r\n this.setupAccount.PostCode = customer.PostCode;\r\n this.setupAccount.CountryId = customer.CountryID;\r\n this.countries = customer.CountryList;\r\n });\r\n\r\n this.licenceViewerService.GetLicenceData().subscribe(data => {\r\n this.assignedWebLicenses = data.TotalWebAssigned;\r\n this.assignedMobileLicenses = data.TotalMobileAssigned;\r\n });\r\n }\r\n\r\n public createAccount(): void {\r\n this.billingService.SetupAccount(this.setupAccount).subscribe(data => {\r\n this.isStripeLinkConfigured = data.IsStripeLinkConfigured;\r\n });\r\n }\r\n\r\n public GetSteps(option: SubscriptionOption): number[] {\r\n if (option.Tiers) {\r\n return option.Tiers.map(x => x.UpTo);\r\n }\r\n\r\n return [];\r\n }\r\n\r\n public GetTotal(): number {\r\n let total = 0;\r\n this.options.forEach(o => {\r\n total += this.Subtotal(o);\r\n });\r\n\r\n if (!this.proEnabled) {\r\n total -= 5000;\r\n }\r\n\r\n if (total < 0) {\r\n total = 0;\r\n }\r\n\r\n return total;\r\n }\r\n\r\n public Subtotal(option: SubscriptionOption): number {\r\n if (option.BillingScheme !== \"tiered\") {\r\n return option.SelectedUpTo * option.UnitAmount;\r\n } else {\r\n const tier = option.Tiers.find(t => t.UpTo === option.SelectedUpTo);\r\n if (tier) {\r\n return tier.FlatAmount + (tier.UnitAmount * option.SelectedUpTo);\r\n } else {\r\n const last = option.Tiers[option.Tiers.length - 1];\r\n return option.SelectedUpTo * last.UnitAmount;\r\n }\r\n }\r\n }\r\n\r\n public SetupSubscription(): void {\r\n const items: SelectedSubscriptionItem[] = this.options.map(o => {\r\n return {\r\n PriceId: o.Id, // this could be incorrect\r\n Quantity: o.SelectedUpTo,\r\n SubscriptionItemId: o.SubscriptionItemId\r\n } as SelectedSubscriptionItem;\r\n });\r\n\r\n if (this.hasExistingSubscription) {\r\n this.billingService.UpdateSubscription(this.activeSubscriptionId, items).subscribe(x => {\r\n if (x.Error) {\r\n alert(\"Error: \" + x.Error);\r\n }\r\n });\r\n } else {\r\n this.billingService.CreateSubscription(items).subscribe(x => {\r\n if (x.Error) {\r\n alert(\"Error: \" + x.Error);\r\n } else {\r\n this.paymentSecret = x.ClientSecret;\r\n }\r\n });\r\n }\r\n }\r\n\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { CompetitorModel } from \"../models/competitor.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class CompetitorService {\r\n private readonly competitorBaseUrl: string;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig\r\n ) {\r\n this.competitorBaseUrl = this.appConfig.apiLocations.SalesOpportunity + \"Competitor\";\r\n }\r\n\r\n public Get(id: number): Observable {\r\n return this.http.get(`${this.competitorBaseUrl}/${id}`);\r\n }\r\n\r\n public Create(competitor: CompetitorModel): Observable {\r\n return this.http.post(`${this.competitorBaseUrl}`, competitor);\r\n }\r\n\r\n public Update(competitor: CompetitorModel): Observable {\r\n return this.http.put(`${this.competitorBaseUrl}`, competitor);\r\n }\r\n\r\n public Delete(id: number): Observable {\r\n return this.http.delete(`${this.competitorBaseUrl}/${id}`);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n \r\n {{ 'sales-opportunity.competitors.new-competitor' | translate }}\r\n \r\n \r\n {{ 'sales-opportunity.competitor.edit.header'| translate }}\r\n {{ competitorModel.Name }}\r\n \r\n

\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { Location } from \"@angular/common\";\r\nimport { Component, Input, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { finalize } from \"rxjs/operators\";\r\nimport { FormMesssageService } from \"servicesight-shared\";\r\nimport { CompetitorModel } from \"../models/competitor.model\";\r\nimport { CompetitorService } from \"../services/competitor.service\";\r\n\r\n@Component({\r\n selector: \"app-competitor-detail\",\r\n templateUrl: \"./competitor-detail.component.html\",\r\n styleUrls: [\"./competitor-detail.component.scss\"]\r\n})\r\nexport class CompetitorDetailComponent implements OnInit {\r\n @Input() competitorId: number = null;\r\n @Input() isNewlyCreated: boolean;\r\n @ViewChild(\"competitorForm\", { static: true }) form: NgForm;\r\n\r\n public readonly formName: string = \"competitorForm\";\r\n public competitorModel: CompetitorModel = new Object() as CompetitorModel;\r\n public isLoading: boolean = false;\r\n\r\n public get isNew(): boolean {\r\n return this.competitorId == null;\r\n }\r\n\r\n private rootUrl: string;\r\n private competitorlistPath: string = \"/proteansystem/systems/competitors/list\";\r\n\r\n constructor(\r\n private competitorService: CompetitorService,\r\n private formMessageService: FormMesssageService,\r\n private location: Location\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.SetRootUrl();\r\n this.Load();\r\n }\r\n\r\n public OnSaveCompetitor(): void {\r\n this.isLoading = true;\r\n\r\n if (this.isNew) {\r\n this.formMessageService.RegisterObservable(this.competitorService.Create(this.competitorModel), this.formName)\r\n .pipe(finalize(() => {\r\n this.isLoading = false;\r\n }))\r\n .subscribe(competitor => {\r\n this.location.go(`${this.rootUrl}/competitor/${competitor.Id}?isNew=true`);\r\n });\r\n } else {\r\n this.formMessageService.RegisterObservable(this.competitorService.Update(this.competitorModel), this.formName)\r\n .pipe(finalize(() => {\r\n this.isLoading = false;\r\n }))\r\n .subscribe((competitor) => {\r\n this.isLoading = false;\r\n this.competitorModel = competitor;\r\n });\r\n }\r\n }\r\n\r\n public OnDeleteCompetitor(): void {\r\n this.isLoading = true;\r\n\r\n this.formMessageService.RegisterObservable(this.competitorService.Delete(this.competitorModel.Id), this.formName)\r\n .pipe(finalize(() => {\r\n this.isLoading = false;\r\n }))\r\n .subscribe(() => {\r\n this.location.go(this.competitorlistPath);\r\n });\r\n }\r\n\r\n public OnDiscardCompetitor(): void {\r\n this.location.go(this.competitorlistPath);\r\n }\r\n\r\n private Load(): void {\r\n this.form.form.reset();\r\n\r\n if (!this.isNew) {\r\n this.competitorService.Get(this.competitorId).subscribe(\r\n (competitor) => {\r\n this.competitorModel = competitor;\r\n }\r\n );\r\n }\r\n }\r\n\r\n private SetRootUrl(): void {\r\n const path = this.location.path();\r\n this.rootUrl = `${path.substr(0, path.lastIndexOf(\"/\"))}`;\r\n }\r\n\r\n}\r\n","
\r\n
\r\n

{{ 'sales-opportunity.competitors' | translate }}\r\n   
{{ 'sales-opportunity.competitors.subtitle' | translate }}
\r\n

\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n
\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { SalesOpportunityService } from \"src/app/sales-opportunity/services/sales-opportunity.service\";\r\n\r\n\r\n@Component({\r\n selector: \"app-competitors-list\",\r\n templateUrl: \"./competitors-list.component.html\"\r\n})\r\nexport class CompetitorsListComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n public competitors: ODataStore;\r\n public searchText: string = \"\";\r\n\r\n constructor(private salesOpportunityService: SalesOpportunityService) { }\r\n\r\n public SearchTextChanged(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.searchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n ngOnInit(): void {\r\n this.competitors = this.salesOpportunityService.GetCompetitorsStore();\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class DirtyFormService {\r\n public isFormDirty: boolean = false;\r\n public canNavigate: boolean = true;\r\n\r\n constructor() { }\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { IServiceSightCollection } from \"../../../quotes/models/IServiceSightCollection\";\r\nimport { JobTitlesItemModel } from \"../models/job-titles-item.model\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class JobTitlesService {\r\n private readonly serviceSightBaseUrl: string;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) appConfig: IAppConfig) {\r\n this.serviceSightBaseUrl = appConfig.apiLocations.ServiceSight;\r\n }\r\n\r\n public GetAll(): Observable> {\r\n return this.http.get>(this.serviceSightBaseUrl + \"JobTitle/GetAllAsync\");\r\n }\r\n\r\n public UpdateItem(model): Observable> {\r\n return this.http.post>(this.serviceSightBaseUrl + \"JobTitle/UpdateAsync\", model);\r\n }\r\n}\r\n","
\r\n
\r\n

\r\n {{ 'customer.job-titles.header' | translate }}\r\n
{{ 'customer.job-titles.subheading' | translate }}
\r\n

\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n {{ 'buttons.delete' | translate }}\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n {{ 'buttons.cancel' | translate }}\r\n \r\n \r\n {{ 'buttons.save' | translate }}\r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n\r\n \r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n","import { Location } from \"@angular/common\";\r\nimport { AfterViewChecked, Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { FormMesssageService, HelpItemTagEnum } from \"servicesight-shared\";\r\nimport { IServiceSightCollection } from \"../../../quotes/models/IServiceSightCollection\";\r\nimport { DirtyFormService } from \"../../services/dirty-form.service\";\r\nimport { JobTitlesItemModel } from \"../models/job-titles-item.model\";\r\nimport { JobTitlesService } from \"../services/job-titles.service\";\r\n\r\n@Component({\r\n selector: \"app-job-titles\",\r\n templateUrl: \"./job-titles.component.html\",\r\n styleUrls: [\"./job-titles.component.scss\"]\r\n})\r\nexport class JobTitlesComponent implements OnInit, AfterViewChecked {\r\n @ViewChild(\"jobTitlesForm\", { static: true }) form: NgForm;\r\n\r\n public helpItemTagEnum = HelpItemTagEnum;\r\n public readonly formName: string = \"jobTitlesForm\";\r\n public titles: Array = [];\r\n public showDeleteMessage: boolean = false;\r\n\r\n public Permissions = {\r\n IsAllowedEdit: false,\r\n IsAllowedAdd: false,\r\n IsAllowedDelete: false,\r\n IsAllowedView: false\r\n };\r\n\r\n public newJobTitle: () => void = () => {\r\n const availableId = this.findAvailableId();\r\n this.titles.push({\r\n ListItem: \"\",\r\n i: -1,\r\n id: availableId,\r\n value: \"\",\r\n IsNew: true,\r\n IsDeleted: false\r\n });\r\n this.form.form.markAsDirty();\r\n };\r\n\r\n private deleteIndex: number;\r\n\r\n constructor(\r\n private jobTitlesService: JobTitlesService,\r\n private formMessageService: FormMesssageService,\r\n private location: Location,\r\n private dirtyFormService: DirtyFormService) { }\r\n\r\n public ngOnInit(): void {\r\n this.jobTitlesService.GetAll().subscribe(x => {\r\n this.titles = x.ModelCollection;\r\n this.Permissions = {\r\n IsAllowedAdd: x.IsAllowedAdd,\r\n IsAllowedDelete: x.IsAllowedDelete,\r\n IsAllowedEdit: x.IsAllowedEdit,\r\n IsAllowedView: x.IsAllowedView\r\n };\r\n });\r\n this.dirtyFormService.canNavigate = false;\r\n }\r\n\r\n public ngAfterViewChecked(): void {\r\n if (this.form.dirty && !this.dirtyFormService.isFormDirty) {\r\n this.dirtyFormService.isFormDirty = true;\r\n }\r\n }\r\n\r\n public OnDeleteJobTitle(index: number): void {\r\n if (this.titles[index].ListItem) {\r\n this.showDeleteMessage = true;\r\n this.deleteIndex = index;\r\n } else {\r\n this.titles.splice(index, 1);\r\n }\r\n }\r\n\r\n public OnDiscardJobTitles(): void {\r\n this.location.go(\"/proteansystem/systems\");\r\n }\r\n\r\n public OnSaveJobTitles(): void {\r\n const newItem: IServiceSightCollection = {\r\n ModelCollection: this.titles,\r\n IsAllowedAdd: this.Permissions.IsAllowedAdd,\r\n IsAllowedDelete: this.Permissions.IsAllowedDelete,\r\n IsAllowedEdit: this.Permissions.IsAllowedEdit,\r\n IsAllowedView: this.Permissions.IsAllowedView\r\n };\r\n\r\n this.formMessageService.RegisterObservable(this.jobTitlesService.UpdateItem(newItem), this.formName).subscribe(\r\n () => this.jobTitlesService.GetAll().subscribe(x => {\r\n this.dirtyFormService.isFormDirty = false;\r\n this.titles = x.ModelCollection;\r\n })\r\n );\r\n }\r\n\r\n public ConfirmDeleteAction($event: boolean) {\r\n if ($event && this.deleteIndex != null) {\r\n this.titles[this.deleteIndex].IsDeleted = true;\r\n }\r\n this.showDeleteMessage = false;\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public SetToEditMode(index: number) {\r\n this.titles[index].IsEdited = true;\r\n }\r\n\r\n private findAvailableId(): number {\r\n if (this.titles.length) {\r\n return this.titles.reduce((max, titles) => (titles.ListItemID > max ? titles.ListItemID : max),\r\n this.titles[0].ListItemID) + 1;\r\n }\r\n return 1;\r\n }\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { IServiceSightCollection } from \"../../../quotes/models/IServiceSightCollection\";\r\nimport { ReminderTypeItemModel } from \"../models/reminder-type-item.model\";\r\nimport { IAppConfig, APP_CONFIG, IProteanResponse } from \"servicesight-shared\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class ReminderTypesService {\r\n private readonly serviceSightBaseUrl: string;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) appConfig: IAppConfig) {\r\n this.serviceSightBaseUrl = appConfig.apiLocations.ServiceSight;\r\n }\r\n\r\n public GetAll(): Observable> {\r\n return this.http.get>(this.serviceSightBaseUrl + \"TaskType/GetTaskTypes\");\r\n }\r\n\r\n public GetTaskTypeById(taskTypeId: number): Observable {\r\n return this.http.get(`${this.serviceSightBaseUrl}TaskType/GetTaskType?taskTypeID=${taskTypeId}`);\r\n }\r\n\r\n public DeleteTaskType(taskTypeId: number): Observable {\r\n return this.http.post(`${this.serviceSightBaseUrl}TaskType/DeleteTaskType?taskTypeID=${taskTypeId}`, taskTypeId);\r\n }\r\n\r\n public UpdateTaskType(taskType: ReminderTypeItemModel): Observable {\r\n return this.http.post(`${this.serviceSightBaseUrl}TaskType/UpsertTaskType`, taskType);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n \r\n {{ 'customer.reminder-types.new-reminder-type' | translate }}\r\n \r\n \r\n {{ 'customer.reminder-types.reminder-type' | translate }}\r\n {{ reminderType.TaskType | translate }}\r\n \r\n

\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n \r\n\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n {{ 'buttons.delete' | translate }}\r\n \r\n \r\n {{ 'buttons.discard' | translate }}\r\n \r\n \r\n {{ 'buttons.save' | translate }}\r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n\r\n \r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import { AfterViewChecked, Component, Input, OnInit, ViewChild } from \"@angular/core\";\r\nimport { ReminderTypesService } from \"../services/reminder-types.service\";\r\nimport { ReminderTypeItemModel } from \"../models/reminder-type-item.model\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { Location } from \"@angular/common\";\r\nimport { FormMesssageService } from \"servicesight-shared\";\r\nimport { DirtyFormService } from \"../../services/dirty-form.service\";\r\n\r\n@Component({\r\n selector: \"app-reminder-types-detail\",\r\n templateUrl: \"./reminder-types-detail.component.html\",\r\n styleUrls: [\"./reminder-types-detail.component.scss\"]\r\n})\r\nexport class ReminderTypesDetailComponent implements OnInit, AfterViewChecked {\r\n @Input() reminderTypeId: number;\r\n @Input() isNewlyCreated: boolean;\r\n @ViewChild(\"reminderTypeForm\", { static: true }) form: NgForm;\r\n\r\n public readonly formName: string = \"reminderTypeForm\";\r\n public isNew: boolean;\r\n public reminderType: ReminderTypeItemModel = new Object() as ReminderTypeItemModel;\r\n public showDeleteMessage: boolean = false;\r\n public showCancelMessage: boolean = false;\r\n\r\n constructor(\r\n private reminderTypeService: ReminderTypesService,\r\n private formMessageService: FormMesssageService,\r\n private location: Location,\r\n private dirtyFormService: DirtyFormService\r\n ) { }\r\n\r\n public ngOnInit(): void {\r\n this.isNew = !this.reminderTypeId;\r\n if (this.reminderTypeId) {\r\n this.reminderTypeService.GetTaskTypeById(this.reminderTypeId).subscribe(x => this.reminderType = x);\r\n } else {\r\n this.reminderType.IncludeOnSalesTask = false;\r\n }\r\n this.dirtyFormService.canNavigate = false;\r\n }\r\n\r\n public ngAfterViewChecked(): void {\r\n if (this.form.dirty && !this.dirtyFormService.isFormDirty) {\r\n this.dirtyFormService.isFormDirty = true;\r\n }\r\n }\r\n\r\n public OnSaveReminderType(): void {\r\n this.formMessageService.RegisterObservable(this.reminderTypeService.UpdateTaskType(this.reminderType), this.formName)\r\n .subscribe(x => {\r\n this.dirtyFormService.isFormDirty = false;\r\n this.location.go(`proteansystem/systems/reminder-type/${x.EntityId}?isNewlyCreated=true`);\r\n });\r\n }\r\n\r\n public OnDeleteReminderType(): void {\r\n this.showDeleteMessage = true;\r\n }\r\n\r\n public ConfirmDeleteAction($event: boolean): void {\r\n if ($event) {\r\n this.reminderTypeService.DeleteTaskType(this.reminderTypeId).subscribe(\r\n () => this.location.go(\"/proteansystem/systems/reminder-types-list\")\r\n );\r\n }\r\n this.showDeleteMessage = false;\r\n }\r\n\r\n public OnDiscardReminderType(): void {\r\n if (this.form.dirty) {\r\n this.showCancelMessage = true;\r\n } else {\r\n this.location.go(\"/proteansystem/systems/reminder-types-list\");\r\n }\r\n }\r\n\r\n public CheckboxChanged(): void {\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public ConfirmCancelAction($event: boolean): void {\r\n if ($event) {\r\n this.location.go(\"/proteansystem/systems/reminder-types-list\");\r\n }\r\n this.showCancelMessage = false;\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'customer.reminder-types.header' | translate }}\r\n
{{ 'customer.reminder-types.subheading' | translate }}
\r\n

\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n
\r\n \r\n -\r\n
\r\n \r\n
\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport { HelpItemTagEnum } from \"servicesight-shared\";\r\nimport { ReminderTypeItemModel } from \"../models/reminder-type-item.model\";\r\nimport { ReminderTypesService } from \"../services/reminder-types.service\";\r\n\r\n@Component({\r\n selector: \"app-reminder-types-list\",\r\n templateUrl: \"./reminder-types-list.component.html\",\r\n styleUrls: [\"./reminder-types-list.component.scss\"]\r\n})\r\nexport class ReminderTypesListComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n public helpItemTagEnum = HelpItemTagEnum;\r\n public reminderTypes: Array;\r\n public searchText: string = \"\";\r\n\r\n constructor(private reminderTypeService: ReminderTypesService) { }\r\n\r\n public ngOnInit(): void {\r\n this.reminderTypeService.GetAll().subscribe(x => {\r\n this.reminderTypes = x.ModelCollection;\r\n });\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.searchText).replace(/%20/g, \" \"));\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { BarrierModel } from \"../models/barrier.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class SalesBarrierService {\r\n private readonly salesBarrierBaseUrl: string = \"\";\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig\r\n ) {\r\n this.salesBarrierBaseUrl = this.appConfig.apiLocations.SalesOpportunity + \"Barrier\";\r\n }\r\n\r\n public Get(id: number): Observable {\r\n return this.http.get(`${this.salesBarrierBaseUrl}/${id}`);\r\n }\r\n\r\n public Create(salesBarrier: BarrierModel): Observable {\r\n return this.http.post(`${this.salesBarrierBaseUrl}`, salesBarrier);\r\n }\r\n\r\n public Update(salesBarrier: BarrierModel): Observable {\r\n return this.http.put(`${this.salesBarrierBaseUrl}`, salesBarrier);\r\n }\r\n\r\n public Delete(id: number): Observable {\r\n return this.http.delete(`${this.salesBarrierBaseUrl}/${id}`);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n \r\n {{ 'sales-opportunity.barrier.new.header' | translate }}\r\n \r\n \r\n {{ 'sales-opportunity.barrier.edit.header'| translate }}\r\n {{ barrierModel.Name }}\r\n \r\n

\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { Location } from \"@angular/common\";\r\nimport { Component, Input, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { finalize } from \"rxjs/operators\";\r\nimport { FormMesssageService } from \"servicesight-shared\";\r\nimport { BarrierModel } from \"../models/barrier.model\";\r\nimport { SalesBarrierService } from \"../services/sales-barrier.service\";\r\n\r\n@Component({\r\n selector: \"app-sales-barrier-detail\",\r\n templateUrl: \"./sales-barrier-detail.component.html\",\r\n styleUrls: [\"./sales-barrier-detail.component.scss\"]\r\n})\r\nexport class SalesBarrierDetailComponent implements OnInit {\r\n @Input() salesBarrierId: number = null;\r\n @Input() isNewlyCreated: boolean;\r\n @ViewChild(\"salesBarrierForm\", { static: true }) form: NgForm;\r\n\r\n public readonly formName: string = \"salesBarrierForm\";\r\n public isNew: boolean = false;\r\n public barrierModel: BarrierModel = new Object() as BarrierModel;\r\n public isLoading: boolean = false;\r\n\r\n private rootUrl: string;\r\n private salesBarrierlistPath: string = \"/proteansystem/systems/sales-barriers/list\";\r\n\r\n constructor(\r\n private salesBarrierService: SalesBarrierService,\r\n private formMessageService: FormMesssageService,\r\n private location: Location\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.isNew = !this.salesBarrierId;\r\n this.SetRootUrl();\r\n this.Load();\r\n }\r\n\r\n public OnSaveSalesBarrier(): void {\r\n this.isLoading = true;\r\n\r\n if (this.isNew) {\r\n this.formMessageService.RegisterObservable(this.salesBarrierService.Create(this.barrierModel), this.formName)\r\n .pipe(finalize(() => {\r\n this.isLoading = false;\r\n }))\r\n .subscribe(salesBarrier => {\r\n this.location.go(`${this.rootUrl}/sales-barrier/${salesBarrier.BarrierId}?isNew=true`);\r\n });\r\n } else {\r\n this.formMessageService.RegisterObservable(this.salesBarrierService.Update(this.barrierModel), this.formName)\r\n .pipe(finalize(() => {\r\n this.isLoading = false;\r\n }))\r\n .subscribe((salesBarrier) => {\r\n this.isLoading = false;\r\n this.barrierModel = salesBarrier;\r\n });\r\n }\r\n }\r\n\r\n public OnDeleteSalesBarrier(): void {\r\n this.isLoading = true;\r\n\r\n this.formMessageService.RegisterObservable(this.salesBarrierService.Delete(this.barrierModel.BarrierId), this.formName)\r\n .pipe(finalize(() => {\r\n this.isLoading = false;\r\n }))\r\n .subscribe(() => {\r\n this.location.go(this.salesBarrierlistPath);\r\n });\r\n }\r\n\r\n public OnDiscardSalesBarrier(): void {\r\n this.location.go(this.salesBarrierlistPath);\r\n }\r\n\r\n private Load(): void {\r\n this.form.form.reset();\r\n\r\n if (!this.isNew) {\r\n this.salesBarrierService.Get(this.salesBarrierId).subscribe(\r\n (salesBarrier) => {\r\n this.barrierModel = salesBarrier;\r\n }\r\n );\r\n }\r\n }\r\n\r\n private SetRootUrl(): void {\r\n const path = this.location.path();\r\n this.rootUrl = `${path.substr(0, path.lastIndexOf(\"/\"))}`;\r\n }\r\n}\r\n","
\r\n
\r\n

\r\n {{ 'sales-opportunity.barrier.list.title' | translate }}\r\n   
{{ 'sales-opportunity.barrier.list.subtitle' | translate }}
\r\n

\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { SalesOpportunityService } from \"src/app/sales-opportunity/services/sales-opportunity.service\";\r\n\r\n@Component({\r\n selector: \"app-sales-barrier-list\",\r\n templateUrl: \"./sales-barrier-list.component.html\"\r\n})\r\nexport class SalesBarrierListComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) grid: DxDataGridComponent;\r\n public salesBarrierOData: ODataStore;\r\n public searchText: string = \"\";\r\n\r\n constructor(private salesOpportunityService: SalesOpportunityService) { }\r\n\r\n ngOnInit(): void {\r\n this.salesBarrierOData = this.salesOpportunityService.GetBarriersStore();\r\n }\r\n\r\n public searchTextChanged(): void {\r\n this.grid.instance.searchByText(encodeURI(this.searchText).replace(/%20/g, \" \"));\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport SalesOpportunityStatus from \"../../../sales-opportunity/models/sales-opportunity-status.model\";\r\nimport { ODataService } from \"../../../shared/services/odata/odata.service\";\r\nimport { StatusSortModel } from \"../models/status-sort.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class SalesOpportunityStatusService {\r\n private readonly salesOpportunityStatusBaseUrl: string = \"\";\r\n private readonly salesOpportunityStatusODataBaseUrl: string = \"\";\r\n\r\n constructor(\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig,\r\n private http: HttpClient,\r\n private odataService: ODataService\r\n ) {\r\n this.salesOpportunityStatusODataBaseUrl = this.appConfig.apiLocations.SalesOpportunityOData + \"SalesOpportunityStatus\";\r\n this.salesOpportunityStatusBaseUrl = this.appConfig.apiLocations.SalesOpportunity + \"SalesOpportunityStatus\";\r\n }\r\n\r\n public Get(statusId: number): Observable {\r\n return this.http.get(`${this.salesOpportunityStatusBaseUrl}/${statusId}`);\r\n }\r\n\r\n public Create(salesOpportunityStatusData: SalesOpportunityStatus): Observable {\r\n return this.http.post(`${this.salesOpportunityStatusBaseUrl}`, salesOpportunityStatusData);\r\n }\r\n\r\n public Update(salesOpportunityStatusData: SalesOpportunityStatus): Observable {\r\n return this.http.put(`${this.salesOpportunityStatusBaseUrl}`, salesOpportunityStatusData);\r\n }\r\n\r\n public Delete(id: number): Observable {\r\n return this.http.delete(`${this.salesOpportunityStatusBaseUrl}/${id}`);\r\n }\r\n\r\n public UpdateStatusSortOrder(status: StatusSortModel): Observable {\r\n return this.http.put(`${this.appConfig.apiLocations.SalesOpportunity}SalesOpportunityStatus/UpdateStatusSortOrder`, status);\r\n }\r\n\r\n public GetPriceListsDataSource(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: this.salesOpportunityStatusODataBaseUrl,\r\n key: \"Status\",\r\n keyType: \"Int16\"\r\n });\r\n }\r\n}\r\n","import { SalesOpportunityStatusColourEnum } from \"../../settings/enums/sales-opportunity-status-colour.enum\";\r\n\r\nexport default class SalesOpportunityStatus {\r\n Status: number;\r\n Name: string;\r\n Description: string;\r\n Colour: SalesOpportunityStatusColourEnum;\r\n Probability: number;\r\n IsSystem: boolean;\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n \r\n {{ 'sales-opportunity.status.new-status' | translate }}\r\n \r\n \r\n {{ 'sales-opportunity.status'| translate }}\r\n {{ salesOpportunityStatusModel.Name }}\r\n \r\n

\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
{{'sales-opportunity.status.status-color.' + data.ColourName.toLowerCase() | translate}}
\r\n
\r\n
\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { Component, Input, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { FormMesssageService } from \"servicesight-shared\";\r\nimport { Location } from \"@angular/common\";\r\nimport { SalesOpportunityStatusService } from \"../services/sales-opportunity-status.service\";\r\nimport SalesOpportunityStatus from \"../../../sales-opportunity/models/sales-opportunity-status.model\";\r\nimport { SalesOpportunityStatusColourEnum } from \"../../enums/sales-opportunity-status-colour.enum\";\r\n\r\n@Component({\r\n selector: \"app-sales-opportunity-status-detail\",\r\n templateUrl: \"./sales-opportunity-status-detail.component.html\",\r\n styleUrls: [\"./sales-opportunity-status-detail.component.scss\"]\r\n})\r\nexport class SalesOpportunityStatusDetailComponent implements OnInit {\r\n @Input() statusId: number = null;\r\n @Input() isNewlyCreated: boolean;\r\n @ViewChild(\"salesOpportunityStatusForm\", { static: true }) form: NgForm;\r\n\r\n public readonly formName: string = \"salesOpportunityStatusForm\";\r\n public salesOpportunityStatusModel: SalesOpportunityStatus = new SalesOpportunityStatus();\r\n public statusColors: { Colour: number; ColourName: string }[] = this.getStatusColors();\r\n public get isNew() {\r\n return !this.statusId;\r\n }\r\n private rootUrl: string;\r\n private salesOpportunityStatusListPath: string = \"/proteansystem/systems/sales-opportunity-status-list\";\r\n\r\n constructor(\r\n private salesOpportunityStatusService: SalesOpportunityStatusService,\r\n private formMessageService: FormMesssageService,\r\n private location: Location\r\n ) { }\r\n\r\n public ngOnInit(): void {\r\n this.SetRootUrl();\r\n this.Load();\r\n }\r\n\r\n public Save(): void {\r\n if (this.isNew) {\r\n this.formMessageService.RegisterObservable(this.salesOpportunityStatusService.Create(this.salesOpportunityStatusModel), this.formName)\r\n .subscribe(statusData => {\r\n this.location.go(`${this.rootUrl}/sales-opportunity-status/${statusData.Status}?isNew=true`);\r\n });\r\n } else {\r\n this.formMessageService.RegisterObservable(this.salesOpportunityStatusService.Update(this.salesOpportunityStatusModel), this.formName)\r\n .subscribe((statusData) => {\r\n this.salesOpportunityStatusModel = statusData;\r\n });\r\n }\r\n }\r\n\r\n public Delete(): void {\r\n this.formMessageService.RegisterObservable(this.salesOpportunityStatusService.Delete(this.statusId), this.formName)\r\n .subscribe(() => {\r\n this.location.go(this.salesOpportunityStatusListPath);\r\n });\r\n }\r\n\r\n public Discard(): void {\r\n this.location.go(this.salesOpportunityStatusListPath);\r\n }\r\n\r\n public onValueChange() {\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n private Load(): void {\r\n this.salesOpportunityStatusModel.Colour = SalesOpportunityStatusColourEnum.Grey;\r\n this.salesOpportunityStatusModel.Probability = 0;\r\n\r\n if (!this.isNew) {\r\n this.salesOpportunityStatusService.Get(this.statusId).subscribe(\r\n (statusData) => {\r\n this.salesOpportunityStatusModel = statusData;\r\n }\r\n );\r\n }\r\n }\r\n\r\n private SetRootUrl(): void {\r\n const path = this.location.path();\r\n this.rootUrl = `${path.substr(0, path.lastIndexOf(\"/\"))}`;\r\n }\r\n\r\n private getStatusColors() {\r\n return Object.keys(SalesOpportunityStatusColourEnum)\r\n .map(key => ({ Colour: SalesOpportunityStatusColourEnum[key], ColourName: key }))\r\n .filter(x => Number(x.Colour));\r\n }\r\n}\r\n","
\r\n
\r\n

\r\n {{ 'sales-opportunity.status.list.header' | translate }}\r\n
{{ 'sales-opportunity.status.list.subheading' | translate }}
\r\n

\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n
\r\n
{{ item.data.Name }}
\r\n
\r\n\r\n
\r\n {{ item.data.Probability | percent }}\r\n
\r\n \r\n
\r\n
\r\n
\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport SalesOpportunityStatus from \"../../../sales-opportunity/models/sales-opportunity-status.model\";\r\nimport { SalesOpportunityService } from \"../../../sales-opportunity/services/sales-opportunity.service\";\r\nimport { SalesOpportunityStatusColourEnum } from \"../../enums/sales-opportunity-status-colour.enum\";\r\nimport { StatusSortModel } from \"../models/status-sort.model\";\r\nimport { SalesOpportunityStatusService } from \"../services/sales-opportunity-status.service\";\r\n\r\n@Component({\r\n selector: \"app-sales-opportunity-status-list\",\r\n templateUrl: \"./sales-opportunity-status-list.component.html\",\r\n styleUrls: [\"./sales-opportunity-status-list.component.scss\"]\r\n})\r\nexport class SalesOpportunityStatusListComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) grid: DxDataGridComponent;\r\n public searchText: string = \"\";\r\n public salesOpportunityStatusesOData: DataSource;\r\n public statusColourEnum = SalesOpportunityStatusColourEnum;\r\n private statusItems: SalesOpportunityStatus[] = [];\r\n\r\n constructor(private salesOpportunityStatusService: SalesOpportunityStatusService,\r\n private salesOpportunityService: SalesOpportunityService) {\r\n this.OnStatusReordered = this.OnStatusReordered.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.salesOpportunityStatusesOData = this.salesOpportunityService.StatusDataSource();\r\n }\r\n\r\n public searchTextChanged(): void {\r\n this.grid.instance.searchByText(encodeURI(this.searchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public OnStatusReordered(e): void {\r\n const systemItemIndexes = [];\r\n this.statusItems.map((el, index) => {\r\n if (el.IsSystem) {\r\n systemItemIndexes.push(index);\r\n }\r\n });\r\n\r\n if (!systemItemIndexes.includes(e.toIndex)) {\r\n const visibleRows = e.component.getVisibleRows();\r\n const status: StatusSortModel = {\r\n Status: visibleRows[e.fromIndex].data.Status,\r\n FromIndex: visibleRows[e.fromIndex].data.SortOrder,\r\n ToIndex: visibleRows[e.toIndex].data.SortOrder\r\n };\r\n this.salesOpportunityStatusService.UpdateStatusSortOrder(status).subscribe(() => {\r\n this.salesOpportunityStatusesOData.reload();\r\n this.grid.instance.refresh();\r\n });\r\n }\r\n }\r\n\r\n public handleDraggableItems(): void {\r\n this.statusItems = this.salesOpportunityStatusesOData.items();\r\n for (let i = 0; i < this.statusItems.length; i++) {\r\n if (this.statusItems[i].IsSystem) {\r\n this.grid.instance.getRowElement(i)[0].children[0].children[0].remove();\r\n this.grid.instance.getRowElement(i)[0].children[0].className = \"\";\r\n }\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n \r\n {{ 'employee.skill.remove' | translate }}\r\n \r\n
\r\n
\r\n \r\n {{ 'employee.skill.add-skill' | translate }}\r\n \r\n
\r\n
\r\n\r\n\r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n
\r\n 0\">\r\n {{ data.data.Skill }}\r\n \r\n {{ data.data.Skill }}\r\n
\r\n\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n\r\n\r\n\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { UntypedFormControl } from \"@angular/forms\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport ArrayStore from \"devextreme/data/array_store\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { DateOnlyService } from \"servicesight-shared\";\r\nimport { AddSkillDialogueComponent } from \"src/app/shared/components/add-skill-dialogue/add-skill-dialogue.component\";\r\nimport { EmployeeEngineerSkillModel } from \"../models/employee-engineer-skill\";\r\nimport { EngineerSkillService } from \"../services/engineer-skill.service\";\r\n\r\n@Component({\r\n selector: \"app-employee-engineer-skills\",\r\n templateUrl: \"./employee-engineer-skills.component.html\",\r\n styleUrls: [\"./employee-engineer-skills.component.scss\"]\r\n})\r\nexport class EmployeeEngineerSkillsComponent implements OnInit, OnChanges {\r\n @ViewChild(\"dataGrid\") dataGrid: DxDataGridComponent;\r\n @ViewChild(\"addSkill\", { static: true }) skillsPopup: AddSkillDialogueComponent;\r\n\r\n @Input() employeeId: number;\r\n @Input() engineerSkills: EmployeeEngineerSkillModel[];\r\n @Input() form: UntypedFormControl;\r\n @Output() startdatevalid: EventEmitter = new EventEmitter();\r\n @Output() enddatevalid: EventEmitter = new EventEmitter();\r\n\r\n public employeeSkillsDataSource: ArrayStore;\r\n public skillsDataStore: ODataStore;\r\n public skillsDataSource: DataSource;\r\n public selectedIds: any[] = [];\r\n private maxLineIds = null;\r\n\r\n constructor(\r\n private engineerSkillService: EngineerSkillService,\r\n private dateOnlyService: DateOnlyService) {\r\n }\r\n\r\n ngOnInit() {\r\n this.skillsDataStore = this.engineerSkillService.ODataEngineerSkills();\r\n this.skillsDataSource = this.engineerSkillService.GetEngineerSkills();\r\n }\r\n\r\n ngOnChanges() {\r\n if (this.engineerSkills) {\r\n this.employeeSkillsDataSource = new ArrayStore({\r\n key: [\"SkillID\", \"LineID\"],\r\n data: this.engineerSkills,\r\n });\r\n }\r\n }\r\n\r\n public SetFormDirty(evt: any): void {\r\n if (evt.event) {\r\n this.EmitChanged();\r\n }\r\n }\r\n\r\n public RemoveSkill(): void {\r\n for (const selectedKey of this.selectedIds) {\r\n this.employeeSkillsDataSource.remove(selectedKey);\r\n }\r\n this.dataGrid.instance.refresh();\r\n this.selectedIds = [];\r\n this.EmitChanged();\r\n }\r\n\r\n public OpenAddSkill(): void {\r\n this.skillsPopup.Show();\r\n }\r\n\r\n public async OnSkillIdsAdded(ids: number[]): Promise {\r\n //Get max line ids if we dont already have then\r\n if (!this.maxLineIds) {\r\n this.maxLineIds = { };\r\n this.engineerSkills.forEach(s => {\r\n this.maxLineIds[s.SkillID] = Math.max(this.maxLineIds[s.SkillID] || 1, s.LineID);\r\n });\r\n }\r\n\r\n const startDate = new Date();\r\n startDate.setHours(0, 0, 0, 0);\r\n\r\n for (const skillId of ids) {\r\n const selectedSkillData = await this.skillsDataStore.byKey(skillId);\r\n\r\n const nextLineId = Math.max(this.maxLineIds[skillId] + 1 || 1);\r\n this.maxLineIds[skillId] = nextLineId;\r\n\r\n const newSkill: EmployeeEngineerSkillModel = {\r\n EmployeeID: this.employeeId,\r\n SkillID: skillId,\r\n LineID: nextLineId,\r\n Skill: selectedSkillData.Name,\r\n StartDate: this.ConvertDate(startDate),\r\n EndDate: null,\r\n LicenseNo: null\r\n };\r\n this.engineerSkills.push(newSkill);\r\n }\r\n this.dataGrid.instance.refresh();\r\n this.EmitChanged();\r\n }\r\n\r\n public CalculateExpired(rowData: any): boolean {\r\n let result = false;\r\n if (rowData.EndDate) {\r\n const tomorrow = new Date();\r\n tomorrow.setHours(0, 0, 0, 0);\r\n tomorrow.setDate(tomorrow.getDate() + 1);\r\n result = new Date(rowData.EndDate) < tomorrow;\r\n }\r\n return result;\r\n }\r\n\r\n public GetDisplayDate(datetime: Date): Date {\r\n return this.dateOnlyService.RecalculateDateOnLoad(datetime);\r\n }\r\n\r\n public SetStartDate($event: any, current: any): void {\r\n current.StartDate = this.ConvertDate($event.value);\r\n this.SetFormDirty($event);\r\n }\r\n\r\n public SetEndDate($event: any, current: any): void {\r\n current.EndDate = this.ConvertDate($event.value);\r\n this.SetFormDirty($event);\r\n }\r\n\r\n public GetMinEndDate(ev: any): Date {\r\n return new Date((new Date(ev)).getTime() + 1000 * 60 * 60 * 24);\r\n }\r\n\r\n private ConvertDate(value: any): Date {\r\n if (value) {\r\n const d = new Date(value);\r\n const date = this.dateOnlyService.RecalculateDateOnSave(d);\r\n return date;\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n private EmitChanged(): void {\r\n //The two event emitters are here to work around a limitation with angular + angularjs and in grid validation,\r\n //this can be replaced with dx validation when the entire employee form is angular\r\n let areStartDatesValid: string = \"valid\";\r\n let areEndDatesValid: string = \"valid\";\r\n for (let i = 0, len = this.engineerSkills.length; i < len; i++) {\r\n if (!this.engineerSkills[i].StartDate) {\r\n areStartDatesValid = \"\";\r\n break;\r\n }\r\n if (this.engineerSkills[i].EndDate && new Date(this.engineerSkills[i].EndDate) <= new Date(this.engineerSkills[i].StartDate)) {\r\n areEndDatesValid = \"\";\r\n break;\r\n }\r\n }\r\n this.startdatevalid.emit(areStartDatesValid);\r\n this.enddatevalid.emit(areEndDatesValid);\r\n }\r\n}\r\n","import { Component, EventEmitter, Input, Output } from \"@angular/core\";\r\n\r\n@Component({\r\n selector: \"app-employee-limits\",\r\n templateUrl: \"./employee-limits.component.html\",\r\n styleUrls: [\"./employee-limits.component.scss\"]\r\n})\r\nexport class EmployeeLimitsComponent {\r\n @Input() employee: any;\r\n @Input() disabled: boolean = false;\r\n @Output() valueChanged: EventEmitter = new EventEmitter();\r\n\r\n public baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n\r\n constructor() { }\r\n\r\n public SetFormDirty(): void {\r\n this.valueChanged.emit();\r\n }\r\n}\r\n","\r\n\r\n\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n {{ \"engineer-location.no-location-data-message\" | translate }}\r\n
\r\n
","
\r\n
\r\n
\r\n
\r\n

{{ 'employee.limits.purchase-limits' | translate }}

\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { Component, Input, OnChanges, OnInit, SimpleChanges } from \"@angular/core\";\r\nimport * as moment from \"moment\";\r\nimport { MapPins } from \"src/app/shared/constants/map-pins.constants\";\r\nimport { EmployeeService } from \"src/app/shared/services/employee/employee.service\";\r\nimport { CustomerLocation } from \"../../shared/models/customer-location.model\";\r\nimport { EmployeeLocationData } from \"../../shared/models/employee-location.model\";\r\nimport { CustomerService } from \"../../shared/services/customer/customer.service\";\r\n\r\n@Component({\r\n selector: \"app-engineer-location\",\r\n templateUrl: \"./engineer-location.component.html\",\r\n styleUrls: [\"./engineer-location.component.scss\"]\r\n})\r\nexport class EngineerLocationComponent implements OnInit, OnChanges {\r\n @Input() employeeId: number = null;\r\n\r\n public now: Date = new Date();\r\n public min: Date = new Date();\r\n public disabledDates: Date[] = [];\r\n public mapZoom: number = 14;\r\n public center: { lat: number; lng: number } = null;\r\n public disabled: boolean = false;\r\n public showNoLocationMessage: boolean = false;\r\n\r\n public markers: { iconSrc: string; location: { lat: number; lng: number }; tooltip: { isShown: boolean; text: string }}[] = [];\r\n\r\n private locationZoomLevel = 14;\r\n private depot1CustomerId: number = 1;\r\n // this is the centre of England\r\n private defaultLatitude: number = 52.4032041;\r\n private defaultLongitude: number = -1.5526923;\r\n // this is the zoom level to show the whole of england\r\n private defaultZoomLevel = 7;\r\n\r\n constructor(\r\n private employeeService: EmployeeService,\r\n private customerService: CustomerService) { }\r\n\r\n public ngOnInit(): void {\r\n this.min.setDate(new Date().getDate() - 14);\r\n this.getLocationData(this.now);\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.employeeId.previousValue !== changes.employeeId.currentValue) {\r\n this.getLocationData(this.now);\r\n }\r\n }\r\n\r\n public dateChanged(e: any): void {\r\n this.getLocationData(e.value);\r\n }\r\n\r\n private getLocationData(date: Date): void {\r\n if (this.employeeId && date) {\r\n this.employeeService.GetEmployeeLocationData(this.employeeId, date).subscribe(data => {\r\n if (data && data.length) {\r\n this.showLocations(data);\r\n } else {\r\n // if there is no location data, show depot 1 location and a message\r\n this.customerService.GetCustomerLocation(this.depot1CustomerId).subscribe(customerLocation => {\r\n // if there is a depot 1 with longitude and latitude\r\n if (customerLocation && customerLocation.Latitude && customerLocation.Longitude) {\r\n this.showDepot1Location(customerLocation);\r\n } else {\r\n this.showDefaultLocation();\r\n }\r\n });\r\n }\r\n });\r\n }\r\n }\r\n\r\n private showLocations(locations: EmployeeLocationData[]): void {\r\n this.mapZoom = this.locationZoomLevel;\r\n\r\n const now = new Date();\r\n // get the most recent location i.e. the location in the past that is closest to the current time\r\n const sortedLocations = locations\r\n .filter(location => new Date(location.RecordedTime) <= now)\r\n .sort((a, b) => a.RecordedTime > b.RecordedTime ? -1 : 1);\r\n\r\n if (sortedLocations && sortedLocations.length) {\r\n this.center = {\r\n lat: sortedLocations[0].Latitude,\r\n lng: sortedLocations[0].Longitude\r\n };\r\n } else {\r\n this.center = {\r\n lat: locations[0].Latitude,\r\n lng: locations[0].Longitude\r\n };\r\n }\r\n\r\n this.markers = locations.map(l => {\r\n return {\r\n iconSrc: l.RecordLabel.includes(\"Job\") ? MapPins.standardPin : undefined,\r\n location: {\r\n lat: l.Latitude,\r\n lng: l.Longitude\r\n },\r\n tooltip: {\r\n isShown: false,\r\n text: l.RecordLabel + \": \" + moment(l.RecordedTime).toLocaleString()\r\n }\r\n };\r\n });\r\n\r\n this.disabled = false;\r\n this.showNoLocationMessage = false;\r\n }\r\n\r\n private showDepot1Location(depot1Location: CustomerLocation): void {\r\n this.mapZoom = this.locationZoomLevel;\r\n\r\n this.center = {\r\n lng: depot1Location.Longitude ?? this.defaultLongitude,\r\n lat: depot1Location.Latitude ?? this.defaultLatitude\r\n };\r\n\r\n this.markers = [];\r\n this.disabled = true;\r\n this.showNoLocationMessage = true;\r\n }\r\n\r\n private showDefaultLocation(): void {\r\n this.mapZoom = this.defaultZoomLevel;\r\n\r\n this.center = {\r\n lng: this.defaultLongitude,\r\n lat: this.defaultLatitude\r\n };\r\n\r\n this.markers = [];\r\n this.disabled = true;\r\n this.showNoLocationMessage = true;\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'engineer-type.list.header' | translate }}\r\n
{{ 'engineer-type.list.subheader' | translate }}
\r\n

\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport { EngineerTypeService } from \"../../services/engineer-type.service\";\r\n\r\n@Component({\r\n selector: \"app-engineer-type-list\",\r\n templateUrl: \"./engineer-type-list.component.html\",\r\n styleUrls: [\"./engineer-type-list.component.scss\"]\r\n})\r\nexport class EngineerTypeListComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) dataGrid: DxDataGridComponent;\r\n public engineerTypeDataSource: DataSource;\r\n public searchText: string = \"\";\r\n\r\n constructor(\r\n private engineerTypeService: EngineerTypeService) { }\r\n\r\n public ngOnInit(): void {\r\n this.engineerTypeDataSource = this.engineerTypeService.GetDataSource();\r\n }\r\n\r\n public OnSearchValueChange(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.searchText).replace(/%20/g, \" \"));\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n {{ 'engineer-type.detail.new.header' | translate }}\r\n \r\n {{ 'engineer-type.detail.edit.header' | translate }}\r\n {{ model.Name }}\r\n \r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n","import { AfterViewInit, Component, Input, OnChanges, SimpleChanges, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { finalize } from \"rxjs/operators\";\r\nimport { Location } from \"@angular/common\";\r\nimport { EngineerTypeService } from \"../../services/engineer-type.service\";\r\nimport { FormMesssageService, EngineerType } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-engineer-type\",\r\n templateUrl: \"./engineer-type.component.html\",\r\n styleUrls: [\"./engineer-type.component.scss\"]\r\n})\r\nexport class EngineerTypeComponent implements OnChanges, AfterViewInit {\r\n @Input() id: number = null;\r\n @ViewChild(\"engineerTypeForm\", { static: true }) form: NgForm;\r\n public formName: string = \"engineerTypeForm\";\r\n public model: EngineerType = new EngineerType();\r\n public isLoading: boolean = false;\r\n public showDeleteWarning: boolean = false;\r\n public showDiscardWarning: boolean = false;\r\n\r\n constructor(\r\n private location: Location,\r\n private formMessageService: FormMesssageService,\r\n private engineerTypeService: EngineerTypeService) { }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.id && changes.id.currentValue) {\r\n this.Load();\r\n }\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.formMessageService.ClearForm(this.formName);\r\n }\r\n\r\n public OnSave(): void {\r\n this.isLoading = true;\r\n\r\n if (!this.id) {\r\n this.formMessageService.RegisterObservable(this.engineerTypeService.Create(this.model), this.formName)\r\n .pipe(finalize(() => {\r\n this.isLoading = false;\r\n }))\r\n .subscribe((newId: number) => {\r\n this.id = newId;\r\n this.model.TypeId = newId;\r\n this.isLoading = false;\r\n });\r\n } else {\r\n this.formMessageService.RegisterObservable(this.engineerTypeService.Update(this.model), this.formName)\r\n .pipe(finalize(() => {\r\n this.isLoading = false;\r\n }))\r\n .subscribe(() => {\r\n this.isLoading = false;\r\n });\r\n }\r\n }\r\n public OnDiscard(): void {\r\n this.showDiscardWarning = true;\r\n }\r\n\r\n public OnConfirmDiscard(confirmed: boolean): void {\r\n if (confirmed) {\r\n this.Load();\r\n }\r\n this.showDiscardWarning = false;\r\n }\r\n\r\n public OnDelete(): void {\r\n this.showDeleteWarning = true;\r\n }\r\n\r\n public OnConfirmDeletion(confirmed: boolean): void {\r\n if (confirmed) {\r\n this.isLoading = true;\r\n\r\n this.formMessageService.RegisterObservable(this.engineerTypeService.Delete(this.id), this.formName)\r\n .pipe(finalize(() => {\r\n this.showDeleteWarning = false;\r\n this.isLoading = false;\r\n }))\r\n .subscribe(() => {\r\n this.location.go(\"/proteansystem/systems/engineer-type-settings/engineer-type-list\");\r\n });\r\n }\r\n this.showDeleteWarning = false;\r\n }\r\n\r\n private Load(): void {\r\n this.form.form.reset();\r\n\r\n if (!this.id) {\r\n this.model = new EngineerType();\r\n this.model.Name = \"\";\r\n this.model.Description = \"\";\r\n } else {\r\n this.isLoading = true;\r\n this.engineerTypeService.Get(this.id)\r\n .pipe(finalize(() => this.isLoading = false))\r\n .subscribe(data => {\r\n this.model = data;\r\n });\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'settings.equipment-condition.heading' | translate }}\r\n
{{ 'settings.equipment-condition.subheading' | translate }}
\r\n

\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { EquipmentConditionModel, EquipmentConditionService, HelpItemTagEnum } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-equipment-condition-list\",\r\n templateUrl: \"./equipment-condition-list.component.html\",\r\n styleUrls: [\"./equipment-condition-list.component.scss\"]\r\n})\r\nexport class EquipmentConditionListComponent implements OnInit {\r\n\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n public SearchText: string = \"\";\r\n public equipmentConditions: EquipmentConditionModel[];\r\n public equipmentConditionsDataSource: DataSource;\r\n public helpItemsTags: HelpItemTagEnum[] = [HelpItemTagEnum.EquipmentCondition];\r\n\r\n constructor(private equipmentConditionService: EquipmentConditionService) {\r\n this.OnConditionReordered = this.OnConditionReordered.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.equipmentConditionsDataSource = this.equipmentConditionService.GetConditionDataSource();\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public OnConditionReordered(e) {\r\n this.equipmentConditionService.UpdateSortOrder(e.fromIndex, e.toIndex).subscribe(() => {\r\n this.equipmentConditionsDataSource.reload();\r\n this.dataGrid.instance.refresh();\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n {{ 'settings.equipment-condition.condition' | translate }}  \r\n {{conditionLabel}}\r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n {{ 'settings.equipment-condition.ooa' | translate }}\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n\r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n \r\n \r\n
\r\n\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { Location } from \"@angular/common\";\r\nimport { AfterViewInit, Component, Input, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxAccordionComponent } from \"devextreme-angular\";\r\nimport { EquipmentConditionModel, EquipmentConditionService, FormMesssageService, SettingData, SettingId, SettingsService } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-equipment-condition\",\r\n templateUrl: \"./equipment-condition.component.html\",\r\n styleUrls: [\"./equipment-condition.component.scss\"]\r\n})\r\nexport class EquipmentConditionComponent implements OnInit, AfterViewInit {\r\n public readonly formName: string = \"equipmentConditionForm\";\r\n public EquipmentCondition: EquipmentConditionModel = new EquipmentConditionModel();\r\n public isLoading: boolean = true;\r\n public usageCount: number = 0;\r\n public get conditionLabel(): string {\r\n return this.EquipmentCondition.Name ?? this.translate.instant(\"settings.equipment-condition.new\");\r\n }\r\n\r\n @Input() conditionId: number;\r\n @Input() isNew: boolean;\r\n\r\n @ViewChild(\"conditionForm\", { static: true }) form: NgForm;\r\n @ViewChild(\"accordionComponent\", { static: true }) accordionComponent: DxAccordionComponent;\r\n\r\n private equipmentConditionIdToUseAsOutOfAction: number;\r\n\r\n constructor(\r\n private location: Location,\r\n private formMessageService: FormMesssageService,\r\n private conditionService: EquipmentConditionService,\r\n private settingsService: SettingsService,\r\n private translate: TranslateService\r\n ) { }\r\n\r\n public ngOnInit(): void {\r\n this.conditionId = Number(this.conditionId);\r\n this.isNew = this.isNew || false;\r\n\r\n if (this.conditionId > 0 && !this.isNew) {\r\n this.conditionService.GetCondition(this.conditionId).subscribe(condition => {\r\n this.EquipmentCondition = condition;\r\n });\r\n this.conditionService.GetConditionUsageCount(this.conditionId).subscribe(count => {\r\n this.usageCount = count;\r\n });\r\n } else {\r\n const serviceSightGreen = \"rgba(0,170,60,1)\";\r\n this.EquipmentCondition.Name = null;\r\n this.EquipmentCondition.Ooa = false;\r\n this.EquipmentCondition.Colour = serviceSightGreen;\r\n }\r\n\r\n this.settingsService.getSetting(SettingId.EquipmentConditionToUseAsOutOfAction).subscribe((setting: SettingData) => {\r\n this.equipmentConditionIdToUseAsOutOfAction = setting.ValueListSelectedId;\r\n });\r\n\r\n this.isLoading = false;\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n this.formMessageService.ClearForm(this.formName);\r\n }\r\n\r\n public Delete(): void {\r\n let warningMessage: string = null;\r\n if (this.usageCount > 0) {\r\n warningMessage = this.usageCount > 1 ?\r\n this.translate.instant(\"settings.equipment-condition.in-single-use\") :\r\n this.translate.instant(\"settings.equipment-condition.in-use\", { count: this.usageCount });\r\n } else if (this.equipmentConditionIdToUseAsOutOfAction === this.conditionId) {\r\n warningMessage = this.translate.instant(\"settings.equipment-condition.in-use-by-portal-setting\");\r\n }\r\n else {\r\n this.formMessageService.RegisterObservable(this.conditionService.DeleteCondition(this.EquipmentCondition.ConditionId), this.formName).subscribe(() => {\r\n this.location.go(\"/proteansystem/systems/equipment-settings/equipment-condition-list\");\r\n });\r\n }\r\n\r\n if (warningMessage) {\r\n this.formMessageService.ClearForm(this.formName);\r\n this.formMessageService.ShowWarning(warningMessage, this.formName);\r\n }\r\n }\r\n\r\n public Discard(): void {\r\n this.location.go(\"/proteansystem/systems/equipment-settings/equipment-condition-list\");\r\n }\r\n\r\n public onValueChanged(e: any = null): void {\r\n if (e === null || e.event) {\r\n this.isLoading = false;\r\n }\r\n }\r\n\r\n public Save(): void {\r\n this.isLoading = true;\r\n\r\n this.formMessageService.ClearForm(this.formName);\r\n this.formMessageService.RegisterObservable(this.conditionService.SaveCondition(this.EquipmentCondition), this.formName).subscribe(result => {\r\n if (result && this.isNew) {\r\n this.location.go(`/proteansystem/systems/equipment-settings/equipment-condition/${result}`);\r\n }\r\n this.isLoading = false;\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n\r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n\r\n \r\n\r\n\r\n\r\n\r\n","import { Component, Input, OnInit, ViewChild } from \"@angular/core\";\r\nimport { UntypedFormControl } from \"@angular/forms\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { AddSkillDialogueComponent } from \"src/app/shared/components/add-skill-dialogue/add-skill-dialogue.component\";\r\nimport { MakeModelSkill } from \"../../models/make-model-skill\";\r\nimport { EngineerSkillService } from \"../../services/engineer-skill.service\";\r\n\r\n@Component({\r\n selector: \"app-make-model-skills\",\r\n templateUrl: \"./make-model-skills.component.html\",\r\n styleUrls: [\"./make-model-skills.component.scss\"]\r\n})\r\nexport class MakeModelSkillsComponent implements OnInit {\r\n @ViewChild(\"addSkill\") skillsPopup: AddSkillDialogueComponent;\r\n\r\n @Input() makeModelId: number;\r\n @Input() skills: MakeModelSkill[];\r\n @Input() form: UntypedFormControl;\r\n\r\n public skillsDataSource: DataSource;\r\n public skillsDataStore: ODataStore;\r\n public selectedIds: number[] = [];\r\n\r\n constructor(\r\n private engineerSkillService: EngineerSkillService) {\r\n }\r\n\r\n ngOnInit() {\r\n this.skillsDataStore = this.engineerSkillService.ODataEngineerSkills();\r\n this.skillsDataStore.load();\r\n this.skillsDataSource = this.engineerSkillService.GetEngineerSkills();\r\n this.skillsDataSource.load();\r\n }\r\n\r\n public RemoveSkill(): void {\r\n for (const skillId of this.selectedIds) {\r\n this.skills.splice(this.skills.findIndex(s => s.SkillId === skillId), 1);\r\n }\r\n this.selectedIds = [];\r\n this.form.markAsDirty();\r\n }\r\n\r\n public OpenAddSkill(): void {\r\n const filter = [];\r\n this.skills.forEach(a => {\r\n filter.push([\"SkillID\", \"<>\", a.SkillId]);\r\n filter.push(\"and\");\r\n });\r\n\r\n //FYI - We cant filter based on the correct property as the datasource doesnt like it (filter.push([\"SkillType = \", EngineerSkillTypeEnum.Equipment]))\r\n filter.push([\"SkillTypeDescription\", \"=\", \"Equipment\"]);\r\n\r\n if (filter.length > 0) {\r\n this.skillsDataSource.filter(filter);\r\n }\r\n this.skillsPopup.Show();\r\n }\r\n\r\n public async OnSkillIdsAdded(ids: number[]): Promise {\r\n\r\n for (const skillId of ids) {\r\n const newSkill: MakeModelSkill = {\r\n MakeModelId: this.makeModelId,\r\n SkillId: skillId\r\n };\r\n this.skills.push(newSkill);\r\n }\r\n this.form.markAsDirty();\r\n }\r\n}\r\n","import { SafeResourceUrl } from \"@angular/platform-browser\";\r\nimport { GenericAttribute, ServiceParts, ServicingItem } from \"servicesight-shared\";\r\nimport { MakeModelSkill } from \"./make-model-skill\";\r\nimport { MakeModelOption } from \"../equipment-settings/models/options/make-model-option.model\";\r\nimport { MakeModelSupplierPrice } from \"./make-model-supplier-price\";\r\nimport { MakeModelStore } from \"./make-model-store\";\r\n\r\nexport class MakeModelItem {\r\n MakeModelId: number;\r\n Make: string;\r\n Model: string;\r\n Description: string;\r\n CategoryId: number;\r\n TypeId: number;\r\n SubTypeId: number;\r\n UserRef1Id: number;\r\n UserRef2: string;\r\n SupplierId: number;\r\n SalesWarrantyLength: number;\r\n SalesWarrantyLengthMeterUnits: number;\r\n ProductTaxCodeId?: number;\r\n Image: SafeResourceUrl;\r\n Attributes: Array = [];\r\n Servicing: Array = [];\r\n Skills: Array = [];\r\n ServiceParts: ServiceParts[] = [];\r\n Timestamp?: number;\r\n RecommendedRetailPrice: number;\r\n SellingPrice: number;\r\n Options: MakeModelOption[] = [];\r\n SupplierPrices: MakeModelSupplierPrice[] = [];\r\n Stores: MakeModelStore[] = [];\r\n Sfg20ScheduleId: number;\r\n}\r\n\r\n","export enum MakeModelOptionType {\r\n Manufacturer = 1,\r\n Dealer = 2\r\n}\r\n","import { CollectionViewModel, FormMessage } from \"servicesight-shared\";\r\nimport { MakeModelItem } from \"../../models/makemodel\";\r\nimport { MakeModelOptionType } from \"../enum/make-model-option-type.enum\";\r\nimport { MakeModelOption } from \"../models/options/make-model-option.model\";\r\nimport { StockSupplierModel } from \"./../../../stock/models/stock-supplier.model\";\r\n\r\nexport class MakeModelOptionsViewModel extends CollectionViewModel {\r\n\r\n public OptionTypes: { id: number; name: string}[] = [\r\n { id: 1, name: \"make-model.option-type.manufacturer\"},\r\n { id: 2, name: \"make-model.option-type.dealer\"}\r\n ];\r\n\r\n public constructor(data: MakeModelOption[], public MakeModel: MakeModelItem) {\r\n super(data);\r\n }\r\n\r\n private selectedStockSupplier: StockSupplierModel;\r\n\r\n public get SelectedSupplier(): StockSupplierModel {\r\n return this.selectedStockSupplier;\r\n }\r\n\r\n public set SelectedSupplier(value: StockSupplierModel) {\r\n this.selectedStockSupplier = value;\r\n if (this.SelectedCurrencySymbol !== value.CurrencySymbol && this.SelectedCurrencySymbol !== this.BaseCurrencySymbol) {\r\n this.SelectedCurrencySymbol = this.BaseCurrencySymbol;\r\n }\r\n }\r\n\r\n public get BaseCurrencySymbol(): string {\r\n return JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n }\r\n\r\n public get SupplierCurrencySymbol(): string {\r\n return this.SelectedSupplier?.CurrencySymbol ?? this.BaseCurrencySymbol;\r\n }\r\n\r\n public get SupplierExchangeRate(): number {\r\n return this.SelectedSupplier?.ExchangeRate ?? 1;\r\n }\r\n\r\n public get SelectedExchangeRate(): number {\r\n return this.SelectedCurrencySymbol === this.SupplierCurrencySymbol\r\n ? this.SupplierExchangeRate\r\n : 1;\r\n }\r\n\r\n public OptionCurrencySymbol(option: MakeModelOption): string {\r\n return option.OptionType === MakeModelOptionType.Manufacturer ? this.SelectedCurrencySymbol : this.BaseCurrencySymbol;\r\n }\r\n\r\n public OptionPayment(option: MakeModelOption, amount: number): number {\r\n return option.OptionType === MakeModelOptionType.Manufacturer\r\n ? amount * this.SelectedExchangeRate\r\n : amount;\r\n }\r\n\r\n public get ShowCurrencyToggle(): boolean {\r\n return this.BaseCurrencySymbol !== this.SupplierCurrencySymbol;\r\n }\r\n\r\n public SelectedCurrencySymbol: string = this.BaseCurrencySymbol;\r\n\r\n public get PricingProductTaxCode(): number {\r\n return this.MakeModel.ProductTaxCodeId;\r\n }\r\n\r\n public Validate(): FormMessage[] {\r\n return [];\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n

{{ 'makemodel.pricing.sales' | translate }}

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

{{ 'makemodel.pricing.purchase' | translate }}

\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n {{ \"makemodel.suppliers.lead.time.days\" | translate: { value: data.value } }}\r\n
\r\n
\r\n {{data.value | currency: data.data.UseBaseCurrency ? baseCurrencySymbol : data.data.CurrencySymbol}}\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n","import { Component, Input, OnChanges, OnInit, ViewChild } from \"@angular/core\";\r\nimport { UntypedFormGroup } from \"@angular/forms\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { AccountingService, Module } from \"servicesight-shared\";\r\nimport { LicenseService } from \"./../../../shared/services/licence/license.service\";\r\nimport { MakeModelItem } from \"../../models/makemodel\";\r\nimport { StockTypesService } from \"../../services/stock-types.service\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport { StockSuppliersAddComponent } from \"src/app/shared/components/stock-suppliers-add/stock-suppliers-add.component\";\r\nimport { StockSupplierModel } from \"src/app/stock/models/stock-supplier.model\";\r\nimport { SupplierService } from \"src/app/shared/services/supplier/supplier.service\";\r\n\r\n@Component({\r\n selector: \"app-make-model-pricing\",\r\n templateUrl: \"./make-model-pricing.component.html\",\r\n styleUrls: [\"./make-model-pricing.component.scss\"]\r\n})\r\nexport class MakeModelPricingComponent implements OnChanges, OnInit {\r\n @ViewChild(\"grid\") private grid: DxDataGridComponent;\r\n @ViewChild(\"addSuppliersComponent\") addSuppliersComponent: StockSuppliersAddComponent;\r\n @Input() makeModel: MakeModelItem;\r\n @Input() form: UntypedFormGroup;\r\n public baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n public suppliersDataStore: ODataStore;\r\n public exchangeRate: number = 1;\r\n public salesOrderEnabled: boolean;\r\n public proEnabled: boolean;\r\n public isUkTaxSystem: boolean;\r\n public taxCodeDataStore: ODataStore;\r\n\r\n constructor(\r\n private suppliersService: SupplierService,\r\n private licenseService: LicenseService,\r\n private accountsLinkService: AccountingService,\r\n private stockTypesService: StockTypesService) { }\r\n\r\n public ngOnInit(): void {\r\n this.accountsLinkService.GetAccountsInfo().subscribe(result => {\r\n this.isUkTaxSystem = !result.IsUsaTaxSystem;\r\n if (this.isUkTaxSystem) {\r\n this.taxCodeDataStore = this.stockTypesService.ODataTaxCodeService();\r\n }\r\n });\r\n }\r\n\r\n public ngOnChanges(): void {\r\n this.suppliersDataStore = this.suppliersService.GetSupplierStore();\r\n this.licenseService.GetCompanyHasAccessToModule(Module.SalesOrders).subscribe(enabled => this.salesOrderEnabled = enabled);\r\n this.licenseService.GetCompanyHasAccessToModule(Module.Pro).subscribe(enabled => this.proEnabled = enabled);\r\n }\r\n\r\n public OnRowUpdated(event): void {\r\n if (event.data.Preferred) {\r\n this.makeModel.SupplierPrices.forEach(x => {\r\n if (x.SupplierId !== event.data.SupplierId) {\r\n x.Preferred = false;\r\n }\r\n });\r\n }\r\n this.grid.instance.refresh();\r\n this.grid.instance.columnOption(\"Preferred\", \"sortOrder\", \"desc\");\r\n this.form.markAsDirty();\r\n }\r\n\r\n public OnEditorPreparing(e): void {\r\n if (e.parentType === \"dataRow\" && e.row) {\r\n if (e.dataField === \"Preferred\" && e.row.data.OnHold) {\r\n e.row.data.Preferred = false;\r\n e.editorOptions.readOnly = true;\r\n e.editorOptions.focusStateEnabled = false;\r\n e.editorOptions.hoverStateEnabled = false;\r\n }\r\n\r\n if (e.dataField === \"Price\" || e.dataField === \"Rrp\") {\r\n const allowEditing = e.row.data.UseBaseCurrency && e.row.data.CurrencySymbol !== this.baseCurrencySymbol;\r\n e.editorOptions.disabled = allowEditing;\r\n }\r\n }\r\n }\r\n\r\n public CalculateRRP(rowData): number {\r\n if (rowData.CurrencySymbol !== this.baseCurrencySymbol && rowData.UseBaseCurrency) {\r\n return rowData.Rrp / rowData.ExchangeRate;\r\n } else {\r\n return rowData.Rrp;\r\n }\r\n }\r\n\r\n public AddSupplier(): void {\r\n this.addSuppliersComponent.Show();\r\n }\r\n\r\n public OnSuppliersSelected(selectedSuppliers: StockSupplierModel[]): void {\r\n selectedSuppliers.forEach(x => {\r\n if (this.makeModel.SupplierPrices.length === 0) {\r\n x.Preferred = true;\r\n }\r\n //Add each supplier if they dont already exist\r\n if (this.makeModel.SupplierPrices.findIndex(y => y.SupplierId === x.SupplierId) === -1) {\r\n this.makeModel.SupplierPrices.push({\r\n MakeModelId: this.makeModel.MakeModelId,\r\n SupplierId: x.SupplierId,\r\n Preferred: x.Preferred,\r\n SupplierPartNo: null,\r\n Rrp: 0,\r\n Price: 0,\r\n LeadTime: 0,\r\n MinOrderQty: null,\r\n CurrencySymbol: x.CurrencySymbol,\r\n ExchangeRate: x.ExchangeRate,\r\n UseBaseCurrency: x.UseBaseCurrency,\r\n OnHold: x.OnHold\r\n });\r\n }\r\n });\r\n this.form.markAsDirty();\r\n }\r\n\r\n public RemoveSupplier(): void {\r\n const selectedRows = this.grid.selectedRowKeys;\r\n selectedRows.forEach(x => {\r\n this.makeModel.SupplierPrices.splice(this.makeModel.SupplierPrices.findIndex(y => y.SupplierId === x), 1);\r\n });\r\n this.form.markAsDirty();\r\n }\r\n\r\n public OnItemClick(): void {\r\n this.form.markAsDirty();\r\n }\r\n\r\n public OnTaxSystemClick(): void {\r\n this.form.markAsDirty();\r\n }\r\n\r\n public ToggleCurrency(supplierId: number): void {\r\n const supplier = this.makeModel.SupplierPrices.find(x => x.SupplierId === supplierId);\r\n supplier.UseBaseCurrency = !supplier.UseBaseCurrency;\r\n }\r\n}\r\n","import { CollectionViewModel, FormMessage } from \"servicesight-shared\";\r\nimport { MakeModelOptionPart } from \"../models/options/make-model-option-part.model\";\r\nimport { MakeModelOption } from \"../models/options/make-model-option.model\";\r\n\r\nexport class MakeModelOptionPartsViewModel extends CollectionViewModel {\r\n constructor(data: MakeModelOptionPart[] = null, public Option: MakeModelOption = null) {\r\n super(data ?? []);\r\n }\r\n\r\n public BaseCurrencySymbol = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n\r\n public Validate(): FormMessage[] {\r\n return [];\r\n }\r\n}\r\n","import { FormMessage, ViewModel } from \"servicesight-shared\";\r\nimport { MakeModelOptionMaterial } from \"../models/options/make-model-option-material.model\";\r\nimport { MakeModelOptionViewModel } from \"./make-model-option.viewmodel\";\r\n\r\nexport class MakeModelOptionMaterialViewModel extends ViewModel {\r\n ModelChanged: () => void;\r\n\r\n public get OptionId(): number {\r\n return this.Option.Model.OptionId;\r\n }\r\n\r\n constructor(data: MakeModelOptionMaterial[] = null, public Option: MakeModelOptionViewModel = null) {\r\n super(data);\r\n }\r\n\r\n public Validate(): FormMessage[] {\r\n return [];\r\n }\r\n}\r\n","import { FormMessage, ViewModel } from \"servicesight-shared\";\r\nimport { MakeModelOptionPartsViewModel } from \"./make-model-option-parts.viewmodel\";\r\nimport { MakeModelOption } from \"../models/options/make-model-option.model\";\r\nimport { MakeModelOptionMaterialViewModel } from \"./make-model-option-material.viewmodel\";\r\nimport { MakeModelOptionsViewModel } from \"./make-model-options.viewmodel\";\r\n\r\nexport class MakeModelOptionViewModel extends ViewModel {\r\n ModelChanged: () => void;\r\n\r\n public Parts: MakeModelOptionPartsViewModel;\r\n public Materials: MakeModelOptionMaterialViewModel;\r\n\r\n public get BaseCurrencySymbol(): string {\r\n return this.options?.BaseCurrencySymbol;\r\n }\r\n\r\n public get SupplierCurrencySymbol(): string {\r\n return this.options?.OptionCurrencySymbol(this.Model);\r\n }\r\n\r\n public get SupplierExchangeRate(): number {\r\n return this.options?.SupplierExchangeRate ?? 1;\r\n }\r\n\r\n public get BuyingPriceInSupplierCurrency(): number {\r\n return this.Model.BuyingPrice * this.SupplierExchangeRate;\r\n }\r\n\r\n public get RRPInSupplierCurrency(): number {\r\n return this.Model.RecommendedRetailPrice * this.SupplierExchangeRate;\r\n }\r\n\r\n public get UseSupplierCurrency(): boolean {\r\n return this.SupplierCurrencySymbol !== this.BaseCurrencySymbol;\r\n }\r\n\r\n public get IsNew(): boolean {\r\n return !(this.options?.Model.find(o => o.OptionId === this.Model.OptionId));\r\n }\r\n\r\n constructor(data: MakeModelOption = null, public options: MakeModelOptionsViewModel) {\r\n super(data);\r\n this.Parts = new MakeModelOptionPartsViewModel(data?.Parts, this.Model);\r\n this.Materials = new MakeModelOptionMaterialViewModel(data?.Materials, this);\r\n }\r\n\r\n public Validate(): FormMessage[] {\r\n const results: FormMessage[] = [];\r\n results.push(...this.Parts.Validate());\r\n results.push(...this.Materials.Validate());\r\n\r\n return results;\r\n }\r\n\r\n}\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges\r\n} from \"@angular/core\";\r\nimport { ControlContainer, NgForm } from \"@angular/forms\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { ViewModelComponent } from \"servicesight-shared\";\r\nimport { StockTypesService } from \"../../services/stock-types.service\";\r\nimport { MakeModelOptionType } from \"../enum/make-model-option-type.enum\";\r\nimport { MakeModelOption } from \"../models/options/make-model-option.model\";\r\nimport { MakeModelOptionViewModel } from \"../view-models/make-model-option.viewmodel\";\r\n\r\n@Component({\r\n selector: \"app-make-model-option-detail\",\r\n templateUrl: \"./make-model-option-detail.component.html\",\r\n styleUrls: [\"./make-model-option-detail.component.scss\"],\r\n viewProviders: [{ provide: ControlContainer, useExisting: NgForm }]\r\n})\r\nexport class MakeModelOptionDetailComponent extends ViewModelComponent implements OnInit, OnChanges {\r\n\r\n @Input() public Model: MakeModelOptionViewModel = new MakeModelOptionViewModel({\r\n MakeModelId: null,\r\n Attributes: null,\r\n BuyingPrice: null,\r\n Materials: [],\r\n Name: null,\r\n OptionType: null,\r\n Parts: null,\r\n ProductTaxCodeId: null,\r\n RecommendedRetailPrice: null,\r\n SellingPrice: null\r\n }, null);\r\n @Input() optionForm: any;\r\n @Output() public ModelChanged = new EventEmitter();\r\n\r\n public taxCodeDataSource: ODataStore;\r\n public optionTypes: any[] = [\r\n { Name: \"Manufacturer\", OptionTypeID: MakeModelOptionType.Manufacturer },\r\n { Name: \"Dealer\", OptionTypeID: MakeModelOptionType.Dealer }\r\n ];\r\n\r\n constructor(\r\n private stockTypesService: StockTypesService) {\r\n super();\r\n }\r\n\r\n ngOnInit(): void {\r\n this.taxCodeDataSource = this.stockTypesService.ODataTaxCodeService();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n this.onChanges(changes);\r\n }\r\n\r\n public SetFormDirty(): void {\r\n this.optionForm.form.markAsDirty();\r\n }\r\n}\r\n","
\r\n
\r\n \r\n\r\n \r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n
{{ data.value | currency: data.data.PreferredSupplierCurrencySymbol }}
\r\n
{{ data.value * data.data.Qty | currency: data.data.PreferredSupplierCurrencySymbol }}
\r\n\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n\r\n \r\n
\r\n\r\n\r\n\r\n","
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxTreeViewComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { ViewModelComponent } from \"servicesight-shared\";\r\nimport { AddPartDialogueComponent } from \"src/app/shared/components/add-part-dialogue/add-part-dialogue.component\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\nimport { StockState } from \"src/app/stock/models/enums/stock-state.enum\";\r\nimport { StockSupplierModel } from \"src/app/stock/models/stock-supplier.model\";\r\nimport { StockService } from \"../../../stock/services/stock.service\";\r\nimport { MakeModelOptionAddTo } from \"../enum/make-model-option-add-to.enum\";\r\nimport { MakeModelOptionPart } from \"../models/options/make-model-option-part.model\";\r\nimport { MakeModelOptionPartsViewModel } from \"../view-models/make-model-option-parts.viewmodel\";\r\n\r\n@Component({\r\n selector: \"app-make-model-option-parts\",\r\n templateUrl: \"./make-model-option-parts.component.html\",\r\n styleUrls: [\"./make-model-option-parts.component.scss\"]\r\n})\r\nexport class MakeModelOptionPartsComponent extends ViewModelComponent implements OnInit, OnChanges {\r\n\r\n @Input() public Model: MakeModelOptionPartsViewModel = new MakeModelOptionPartsViewModel([], null);\r\n @Output() public ModelChanged: EventEmitter = new EventEmitter();\r\n @ViewChild(AddPartDialogueComponent, { static: true }) AddPartDialog: AddPartDialogueComponent;\r\n @ViewChild(DxTreeViewComponent, { static: false }) treeView;\r\n\r\n public SelectedParts: number[] = [];\r\n public AddedPartIds: number[] = [];\r\n public currentAddTo: number[];\r\n public editRowKey: number;\r\n private newPartId: number = -1;\r\n\r\n public AddToOptions = [{\r\n Id: MakeModelOptionAddTo.PurchaseOrder,\r\n Name: this.translate.instant(\"makemodel.option.add-to.purchase-order\")\r\n }, {\r\n Id: MakeModelOptionAddTo.InstallationDeliverJob,\r\n Name: this.translate.instant(\"makemodel.option.add-to.delivery-job\")\r\n }, {\r\n Id: MakeModelOptionAddTo.PreparationJob,\r\n Name: this.translate.instant(\"makemodel.option.add-to.preparation-job\")}];\r\n\r\n public PartsDataSource: DataSource;\r\n public PartsDataStore: ODataStore;\r\n public PartsListDataSource: DataSource;\r\n\r\n constructor(\r\n private stockService: StockService,\r\n private odataService: ODataService,\r\n private translate: TranslateService) {\r\n super();\r\n this.sortByAddTo = this.sortByAddTo.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.PartsDataStore = this.stockService.GetStockHeaders();\r\n this.PartsDataSource = this.stockService.GetStockStorePartsDataSource();\r\n this.SetupListDataSource();\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if(changes.Model && changes.Model.currentValue) {\r\n this.SetupListDataSource();\r\n }\r\n }\r\n\r\n public OnRemoveSelectedParts(): void {\r\n if (this.SelectedParts.length > 0) {\r\n this.Model.Model.remove(part => this.SelectedParts.indexOf(part.PartId) >= 0);\r\n this.SetupListDataSource();\r\n }\r\n }\r\n\r\n public OnAddParts(): void {\r\n this.AddPartDialog.Show();\r\n }\r\n\r\n public async OnPartsAdded(parts: { StockHeaderId: number }[]): Promise {\r\n for (const part of parts) {\r\n const partData = await this.PartsDataStore.byKey(part.StockHeaderId);\r\n const stockPart = await this.stockService.GetStockPart(part.StockHeaderId).toPromise();\r\n let preferredSupplier: StockSupplierModel;\r\n if(partData.PreferredSupplierId) {\r\n preferredSupplier = stockPart.Suppliers.find(s => s.Preferred);\r\n }\r\n\r\n this.Model.Model.push({\r\n OptionId: this.Model.Option.OptionId,\r\n PartId: this.newPartId--,\r\n StockHeaderId: part.StockHeaderId,\r\n StockState: StockState.New,\r\n Qty: 1,\r\n Cost: preferredSupplier ? preferredSupplier.BuyingPrice : 0,\r\n Price: stockPart ? stockPart.SellingPrice : 0,\r\n AddTo: [],\r\n PreferredSupplierCurrencySymbol: preferredSupplier ? preferredSupplier.CurrencySymbol : this.Model.BaseCurrencySymbol\r\n });\r\n }\r\n this.SetupListDataSource();\r\n }\r\n\r\n public SetUpValue($event) {\r\n this.currentAddTo = $event;\r\n }\r\n\r\n public OnSaving() {\r\n const row = this.PartsListDataSource.items().filter(i => i.PartId === this.editRowKey);\r\n if(this.currentAddTo) {\r\n row[0].AddTo = this.currentAddTo.slice();\r\n this.currentAddTo = null;\r\n }\r\n }\r\n\r\n public cellTemplate(container, options) {\r\n const noBreakSpace = \"\\u00A0\";\r\n const text = (options.value || []).map((element) => options.column.lookup.calculateCellValue(element)).join(\", \");\r\n container.textContent = text || noBreakSpace;\r\n container.title = text;\r\n }\r\n\r\n public sortByAddTo(rowData) {\r\n return rowData.AddTo.map((e) => (this.AddToOptions || []).find(o => Number(o.Id) === Number(e))?.Name).join(\", \");\r\n }\r\n\r\n public sortByTotalCost(rowData) {\r\n return rowData.Cost * rowData.Qty;\r\n }\r\n\r\n private SetupListDataSource(): void {\r\n this.Model.Model.forEach(async p => {\r\n const stockPart = await this.stockService.GetStockPart(p.StockHeaderId).toPromise();\r\n const preferredSupplier = stockPart.Suppliers.find(s => s.Preferred);\r\n p.PreferredSupplierCurrencySymbol = preferredSupplier ? preferredSupplier.CurrencySymbol : this.Model.BaseCurrencySymbol;\r\n });\r\n this.PartsListDataSource = this.odataService.GetDataSourceWithLookups(\r\n this.Model.Model.map(item => item),\r\n \"PartId\",\r\n [{\r\n store: this.PartsDataStore,\r\n dataKey: \"StockHeaderId\",\r\n lookupKey: \"StockHeaderId\",\r\n displayExprs: [ \"PartNo\", \"Description\" ]\r\n }]\r\n );\r\n }\r\n}\r\n","
\r\n
\r\n 0)\"\r\n class=\"altbtn mgl1\"\r\n (click)=\"onDeleteSelectedClick(selectedMateralIds)\">\r\n {{ 'buttons.remove' | translate }}\r\n \r\n \r\n {{ 'purchase-orders.materials.add-materials' | translate}}\r\n \r\n
\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n
{{ data.value | currency: Model.Option.BaseCurrencySymbol }}
\r\n \r\n
\r\n\r\n\r\n","import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { ViewModelComponent } from \"servicesight-shared\";\r\nimport { IJobMisc } from \"src/app/quotes/models/IJobMisc\";\r\nimport { JobMiscDialogComponent } from \"src/app/shared/components/job-misc-dialog/job-misc-dialog.component\";\r\nimport { MaterialTypeService } from \"src/app/shared/services/material-type/material-type.service\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\nimport { MakeModelOptionAddTo } from \"../enum/make-model-option-add-to.enum\";\r\nimport { MakeModelOptionMaterial } from \"../models/options/make-model-option-material.model\";\r\nimport { MakeModelOptionMaterialViewModel } from \"../view-models/make-model-option-material.viewmodel\";\r\n\r\n@Component({\r\n selector: \"app-make-model-option-materials\",\r\n templateUrl: \"./make-model-option-materials.component.html\",\r\n styleUrls: [\"./make-model-option-materials.component.scss\"]\r\n})\r\nexport class MakeModelOptionMaterialsComponent extends ViewModelComponent implements OnInit, OnChanges {\r\n\r\n @Input() public Model: MakeModelOptionMaterialViewModel = new MakeModelOptionMaterialViewModel([], null);\r\n\r\n @Output() public ModelChanged: EventEmitter = new EventEmitter();\r\n\r\n @ViewChild(JobMiscDialogComponent, { static: true }) AddMaterialDialog: JobMiscDialogComponent;\r\n\r\n public meterialsDataSource: DataSource;\r\n\r\n public selectedMateralIds: number[] = [];\r\n\r\n private newMaterialId: number = -1;\r\n\r\n public AddToOptions = [{\r\n Id: MakeModelOptionAddTo.PurchaseOrder,\r\n Name: \"Purchase order\"\r\n }, {\r\n Id: MakeModelOptionAddTo.InstallationDeliverJob,\r\n Name: \"Installation / Delivery job\"\r\n }, {\r\n Id: MakeModelOptionAddTo.PreparationJob,\r\n Name: \"Preparation job\"}];\r\n\r\n constructor(\r\n private odataService: ODataService,\r\n private materialTypeService: MaterialTypeService\r\n ) {\r\n super();\r\n this.sortByAddTo = this.sortByAddTo.bind(this);\r\n }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n public sortByAddTo(rowData) {\r\n return rowData.AddTo.map((e) => (this.AddToOptions || []).find(o => Number(o.Id) === Number(e))?.Name).join(\", \");\r\n }\r\n\r\n public cellTemplate(container, options) {\r\n const noBreakSpace = \"\\u00A0\";\r\n const text = (options.value || []).map((element) => options.column.lookup.calculateCellValue(element)).join(\", \");\r\n container.textContent = text || noBreakSpace;\r\n container.title = text;\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n this.setupListDataSource();\r\n this.onChanges(changes);\r\n }\r\n\r\n public OpenMaterialDialogue(e, t): void {\r\n e.preventDefault();\r\n const misc: IJobMisc = {\r\n Charge: 0,\r\n Cost: t.data.Cost,\r\n Description: t.data.Description,\r\n MiscID: t.data.MaterialId,\r\n MiscTypeID: t.data.MiscTypeId,\r\n AddTo: t.data.AddTo\r\n };\r\n\r\n this.AddMaterialDialog.ShowEdit(misc, false);\r\n }\r\n\r\n public OpenMaterialAddDialogue(): void {\r\n this.AddMaterialDialog.Show(false);\r\n }\r\n\r\n public onDeleteSelectedClick(selectedMateralIds: number[]): void {\r\n selectedMateralIds.forEach(id => {\r\n const idx = this.Model.Model.map(o => o.MaterialId).indexOf(id);\r\n this.Model.Model.splice(idx, 1);\r\n });\r\n\r\n //ToDo this.Changed.emit();\r\n this.setupListDataSource();\r\n }\r\n\r\n public AddOrUpdateMisc(data: IJobMisc): void {\r\n if (data.MiscID) {\r\n // update\r\n const misc = this.Model.Model.find(m => m.MaterialId === data.MiscID);\r\n misc.Description = data.Description;\r\n misc.Cost = data.Cost;\r\n misc.MiscTypeId = data.MiscTypeID;\r\n misc.AddTo = data.AddTo;\r\n } else {\r\n // add\r\n const misc: MakeModelOptionMaterial = {\r\n MaterialId: this.newMaterialId--,\r\n Cost: data.Cost,\r\n Description: data.Description,\r\n MiscTypeId: data.MiscTypeID,\r\n AddTo: data.AddTo,\r\n OptionId: this.Model.OptionId\r\n };\r\n\r\n this.Model.Model.push(misc);\r\n }\r\n\r\n this.setupListDataSource();\r\n }\r\n\r\n public GetJobMisc(): void {}\r\n\r\n private setupListDataSource(): void {\r\n this.meterialsDataSource = this.odataService.GetDataSourceWithLookups(\r\n this.Model.Model.map(item => item),\r\n \"MaterialId\",\r\n [\r\n {\r\n store: this.materialTypeService.GetMaterialTypeStore(),\r\n dataKey: \"MiscTypeId\",\r\n lookupKey: \"MiscTypeId\",\r\n displayExprs: [\"Name\"]\r\n }\r\n ]);\r\n }\r\n}\r\n","
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n\r\n \r\n
\r\n \r\n \r\n \r\n {{ 'buttons.delete' | translate }}\r\n \r\n
\r\n \r\n
\r\n
\r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { DxTabPanelComponent } from \"devextreme-angular\";\r\nimport { DocumentTypeEnum, FormMesssageService, GenericFormMessagesComponent, Module, ModuleService, ViewModelComponent } from \"servicesight-shared\";\r\nimport { MakeModelOption } from \"../models/options/make-model-option.model\";\r\nimport { MakeModelOptionViewModel } from \"../view-models/make-model-option.viewmodel\";\r\n\r\n@Component({\r\n selector: \"app-make-model-option\",\r\n templateUrl: \"./make-model-option.component.html\",\r\n styleUrls: [\"./make-model-option.component.scss\"]\r\n})\r\nexport class MakeModelOptionComponent extends ViewModelComponent implements OnInit, OnChanges {\r\n\r\n @Input() public Model: MakeModelOptionViewModel = new MakeModelOptionViewModel({\r\n MakeModelId: null,\r\n Attributes: [],\r\n BuyingPrice: null,\r\n Materials: [],\r\n Name: null,\r\n OptionType: null,\r\n Parts: null,\r\n ProductTaxCodeId: null,\r\n RecommendedRetailPrice: null,\r\n SellingPrice: null\r\n }, null);\r\n\r\n @Output() public ModelChanged = new EventEmitter();\r\n @Output() public Save = new EventEmitter();\r\n @Output() public Delete = new EventEmitter();\r\n @Output() public Close = new EventEmitter();\r\n\r\n @ViewChild(\"optionform\", { static: true }) form: NgForm;\r\n @ViewChild(\"formmessages\", { static: true }) formmessages: GenericFormMessagesComponent;\r\n @ViewChild(\"tabPanel\", { static: true }) tabPanel: DxTabPanelComponent;\r\n\r\n public readonly formName: string = \"optionform\";\r\n public stockEnabled = false;\r\n public docType = DocumentTypeEnum;\r\n\r\n constructor(\r\n private formMessageService: FormMesssageService,\r\n private moduleService: ModuleService\r\n ) {\r\n super();\r\n }\r\n\r\n ngOnInit(): void {\r\n this.moduleService.GetEnabledModules().subscribe((m) =>\r\n this.stockEnabled = m.includes(Module.Stock));\r\n }\r\n\r\n public Opened(): void {\r\n this.form.form.markAsPristine();\r\n this.formMessageService.ClearForm(this.formName);\r\n this.formmessages.ClearFormErrors();\r\n this.tabPanel.selectedIndex = 0;\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n this.onChanges(changes);\r\n }\r\n\r\n public onSave(): void {\r\n this.Model.Model.Parts = this.Model.Parts.Model;\r\n this.form.form.markAsPristine();\r\n this.formMessageService.ClearForm(this.formName);\r\n this.Save.emit(this.Model);\r\n }\r\n\r\n public onDiscard(): void {\r\n this.Close.emit();\r\n }\r\n\r\n public onDelete(): void {\r\n this.Delete.emit(this.Model);\r\n }\r\n}\r\n","\r\n
\r\n

{{ 'label.makemodel.option.title' | translate }} {{ Model?.Model?.Name }}

\r\n
\r\n \r\n\r\n","import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from \"@angular/core\";\r\nimport { positionConfig } from \"devextreme/animation/position\";\r\nimport { MakeModelOptionComponent } from \"../make-model-option/make-model-option.component\";\r\nimport { MakeModelOptionViewModel } from \"../view-models/make-model-option.viewmodel\";\r\n\r\n@Component({\r\n selector: \"app-make-model-options-drawer\",\r\n templateUrl: \"./make-model-options-drawer.component.html\",\r\n styleUrls: [\"./make-model-options-drawer.component.scss\"]\r\n})\r\nexport class MakeModelOptionsDrawerComponent implements OnInit {\r\n @Input() public title: string = \"\";\r\n @Input() public isDrawerOpen: boolean = false;\r\n @Input() public Model: MakeModelOptionViewModel = new MakeModelOptionViewModel({\r\n MakeModelId: null,\r\n Attributes: null,\r\n BuyingPrice: null,\r\n Materials: [],\r\n Name: null,\r\n OptionType: null,\r\n Parts: null,\r\n ProductTaxCodeId: null,\r\n RecommendedRetailPrice: null,\r\n SellingPrice: null\r\n }, null);\r\n\r\n @Output() public isDrawerOpenChange: EventEmitter = new EventEmitter();\r\n @Output() public Save = new EventEmitter();\r\n @Output() public Delete = new EventEmitter();\r\n @Output() public Close = new EventEmitter();\r\n\r\n @ViewChild(\"mmo\", { static: true }) mmo: MakeModelOptionComponent;\r\n\r\n private animationType: string = \"slide\";\r\n private animationDuration: number = 400;\r\n private startPosition: any = {\r\n position: {\r\n my: {\r\n x: \"left\",\r\n y: \"center\"\r\n },\r\n at: {\r\n x: \"right\",\r\n y: \"center\"\r\n }\r\n }\r\n };\r\n\r\n public targetPosition: positionConfig = {\r\n my: {\r\n x: \"right\",\r\n y: \"center\"\r\n },\r\n at: {\r\n x: \"right\",\r\n y: \"center\"\r\n }\r\n };\r\n\r\n public animation: any = {\r\n show: {\r\n type: this.animationType,\r\n duration: this.animationDuration,\r\n from: this.startPosition,\r\n to: this.targetPosition\r\n },\r\n hide: {\r\n type: this.animationType,\r\n duration: this.animationDuration,\r\n from: this.targetPosition,\r\n to: this.startPosition\r\n }\r\n };\r\n\r\n constructor() { }\r\n\r\n public ngOnInit(): void {\r\n }\r\n\r\n public onVisibleChange(isDrawerOpen): void {\r\n this.isDrawerOpen = isDrawerOpen;\r\n if (!this.isDrawerOpen) {\r\n this.onClose();\r\n } else {\r\n this.mmo.Opened();\r\n }\r\n }\r\n\r\n public onClose(): void {\r\n this.Close.emit();\r\n }\r\n\r\n public onSave(data: MakeModelOptionViewModel): void {\r\n this.Save.emit(data);\r\n }\r\n\r\n public onDelete(data: MakeModelOptionViewModel): void {\r\n this.Delete.emit(data);\r\n }\r\n}\r\n","
\r\n
\r\n \r\n\r\n \r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n
\r\n \r\n
\r\n\r\n
{{ Model.OptionPayment(data.row.data, data.displayValue) | currency: Model.OptionCurrencySymbol(data.row.data) }}
\r\n\r\n
\r\n\r\n\r\n \r\n","import {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { UntypedFormGroup } from \"@angular/forms\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport ArrayStore from \"devextreme/data/array_store\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { ViewModelComponent } from \"servicesight-shared\";\r\nimport { MakeModelOptionsDrawerComponent } from \"../make-model-options-drawer/make-model-options-drawer.component\";\r\nimport { MakeModelOption } from \"../models/options/make-model-option.model\";\r\nimport { MakeModelOptionViewModel } from \"../view-models/make-model-option.viewmodel\";\r\nimport { MakeModelOptionsViewModel } from \"../view-models/make-model-options.viewmodel\";\r\n\r\n@Component({\r\n selector: \"app-make-model-options\",\r\n templateUrl: \"./make-model-options.component.html\",\r\n styleUrls: [\"./make-model-options.component.scss\"]\r\n})\r\nexport class MakeModelOptionsComponent extends ViewModelComponent implements OnInit, OnChanges {\r\n public isDrawerOpen: boolean = false;\r\n public title: string = \"Option title\";\r\n\r\n @Input() public Model: MakeModelOptionsViewModel = new MakeModelOptionsViewModel([], null);\r\n @Output() public ModelChanged: EventEmitter = new EventEmitter();\r\n\r\n @Input() public Form: UntypedFormGroup;\r\n\r\n @ViewChild(\"drawer\", { static: true }) drawer: MakeModelOptionsDrawerComponent;\r\n\r\n public OptionsDataSource: DataSource;\r\n\r\n public SelectedOptionIds: number[] = [];\r\n\r\n private newOptionId: number = -1;\r\n\r\n public get DisableRemoveOption(): boolean {\r\n return !(this.SelectedOptionIds && this.SelectedOptionIds.length);\r\n }\r\n\r\n constructor(private translate: TranslateService) {\r\n super();\r\n this.Translate = this.Translate.bind(this);\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n this.onChanges(changes);\r\n this.RefreshOptionList();\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.RefreshOptionList();\r\n }\r\n\r\n public OnAdd(): void {\r\n const newOption: MakeModelOption = {\r\n // assign a unique negative id to indicate that this has not been saved\r\n OptionId: this.newOptionId--,\r\n MakeModelId: this.Model.MakeModel.MakeModelId,\r\n Attributes: [],\r\n BuyingPrice: 0,\r\n Name: \"\",\r\n Materials: [],\r\n OptionType: null,\r\n Parts: [],\r\n ProductTaxCodeId: this.Model.PricingProductTaxCode ?? 1,\r\n RecommendedRetailPrice: 0,\r\n SellingPrice: 0\r\n };\r\n\r\n this.ShowDrawer(newOption);\r\n }\r\n\r\n public OnEdit(data: MakeModelOption): boolean {\r\n const dataCopy = this.DeepCopy(data);\r\n\r\n this.ShowDrawer(dataCopy);\r\n\r\n return false;\r\n }\r\n\r\n public OnRemove(): void {\r\n if (this.SelectedOptionIds.length > 0) {\r\n this.Model.Model.remove(option => this.SelectedOptionIds.indexOf(option.OptionId) >= 0);\r\n this.RefreshOptionList();\r\n this.MarkFormAsDirty();\r\n }\r\n }\r\n\r\n public OnSave(data: MakeModelOptionViewModel): void {\r\n const dataModel: MakeModelOption = data?.Model;\r\n if (dataModel) {\r\n const dataIndex = this.Model.Model.findIndex(m => m.OptionId === dataModel.OptionId);\r\n\r\n if (dataIndex >= 0) {\r\n this.Model.Model[dataIndex] = dataModel;\r\n } else {\r\n this.Model.Model.push(dataModel);\r\n }\r\n\r\n this.RefreshOptionList();\r\n this.HideDrawer();\r\n this.MarkFormAsDirty();\r\n }\r\n }\r\n\r\n public OnDelete(data: MakeModelOptionViewModel): void {\r\n const dataModel: MakeModelOption = data?.Model;\r\n if (dataModel) {\r\n this.Model.Model.remove(option => option.OptionId === dataModel.OptionId);\r\n }\r\n\r\n this.RefreshOptionList();\r\n this.HideDrawer();\r\n this.MarkFormAsDirty();\r\n }\r\n\r\n public OnClose(): void {\r\n this.HideDrawer();\r\n }\r\n\r\n public Translate(optionType: {id: number; name: string}): string {\r\n return this.translate.instant(optionType.name);\r\n }\r\n\r\n private ShowDrawer(data: MakeModelOption): void {\r\n this.drawer.Model = new MakeModelOptionViewModel(data, this.Model);\r\n this.isDrawerOpen = true;\r\n }\r\n\r\n private HideDrawer(): void {\r\n this.isDrawerOpen = false;\r\n }\r\n\r\n private DeepCopy(source: T): T {\r\n const sourceJson: string = JSON.stringify(source);\r\n return JSON.parse(sourceJson);\r\n }\r\n\r\n private RefreshOptionList(): void {\r\n this.OptionsDataSource = new DataSource({\r\n store: new ArrayStore({\r\n key: \"OptionId\",\r\n data: this.Model?.Model ?? []\r\n })\r\n });\r\n }\r\n\r\n private MarkFormAsDirty(): void {\r\n if (this.Form) {\r\n this.Form.markAsDirty();\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n {{ 'makemodel.make' | translate }}/{{ 'makemodel.model' | translate }}  \r\n {{MakeModel.Make}} / {{MakeModel.Model}}\r\n

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

{{ 'makemodel.warranty' | translate }}

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

{{ 'makemodel.in-stock' | translate }}

\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \"\"\r\n

\r\n {{ 'messages.accordion.no-image' | translate }}\r\n

\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n","import { Location } from \"@angular/common\";\r\nimport { AfterViewChecked, Component, Input, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { DomSanitizer, SafeUrl } from \"@angular/platform-browser\";\r\nimport { DxAccordionComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { finalize } from \"rxjs/operators\";\r\nimport {\r\n DocumentTypeEnum,\r\n EquipmentPermissionsService,\r\n FormMesssageService,\r\n IUserReferences,\r\n ServicingComponentUsageEnum,\r\n ServicingItem,\r\n StoreService,\r\n UICustomisation,\r\n UserReferenceService,\r\n UserRefType\r\n} from \"servicesight-shared\";\r\nimport { JstranslateService } from \"src/app/shared/services/jstranslate/jstranslate.service\";\r\nimport { MakeModelService } from \"src/app/shared/services/make-model/make-model.service\";\r\nimport { PrimaryImageService } from \"src/app/stock/services/primary-image.service\";\r\nimport { LicenseService } from \"./../../../shared/services/licence/license.service\";\r\nimport { StockSupplierModel } from \"../../../stock/models/stock-supplier.model\";\r\nimport { MakeModelItem } from \"../../models/makemodel\";\r\nimport { DirtyFormService } from \"../../services/dirty-form.service\";\r\nimport { MakeModelOptionsViewModel } from \"../view-models/make-model-options.viewmodel\";\r\nimport { MakeModelStore } from \"../../models/make-model-store\";\r\n\r\n@Component({\r\n selector: \"app-make-model\",\r\n templateUrl: \"./make-model.component.html\",\r\n styleUrls: [\"./make-model.component.scss\"]\r\n})\r\nexport class MakeModelComponent implements OnInit, AfterViewChecked {\r\n @Input() makemodelid: number;\r\n @Input() isNewlyCreated: boolean;\r\n @ViewChild(\"makemodelForm\", { static: true }) form: NgForm;\r\n @ViewChild(\"accordionComponent\", { static: true }) accordionComponent: DxAccordionComponent;\r\n\r\n public MakeModel: MakeModelItem;\r\n public isNew = false;\r\n public isLoading = false;\r\n public readonly formName: string = \"makemodelForm\";\r\n public categoriesDataSource: DataSource;\r\n public typesDataSource: DataSource;\r\n public subtypesDataSource: DataSource;\r\n public userRef1DataSource: DataSource;\r\n public UICustomisations: IUserReferences;\r\n public userRefModelMake1Label: string;\r\n public userRefModelMake2Label: string;\r\n public readonly maxSalesWarrantyLength = 9999;\r\n public showDeleteWarning = false;\r\n public warningMessage: string;\r\n public hasDeletePermission: boolean;\r\n public componentUsedOn = ServicingComponentUsageEnum;\r\n public docType: typeof DocumentTypeEnum = DocumentTypeEnum;\r\n public proEnabled: boolean = false;\r\n public advancedQuotesEnabled: boolean = false;\r\n public purchaseOrderEnabled: boolean = false;\r\n public primaryImage: SafeUrl;\r\n\r\n public makeModelOptions: MakeModelOptionsViewModel = new MakeModelOptionsViewModel([], null);\r\n\r\n constructor(\r\n private service: MakeModelService,\r\n private formMessageService: FormMesssageService,\r\n private location: Location,\r\n private translate: JstranslateService,\r\n private permissionsService: EquipmentPermissionsService,\r\n private dirtyFormService: DirtyFormService,\r\n private userRefsService: UserReferenceService,\r\n private licenseService: LicenseService,\r\n private primaryImageService: PrimaryImageService,\r\n private sanitizer: DomSanitizer,\r\n private storeService: StoreService) {\r\n this.MakeModel = new MakeModelItem();\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.permissionsService.Reload();\r\n this.permissionsService.HasDeleteMakeModelPermission.subscribe(x => this.hasDeletePermission = x);\r\n\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(enabled => {\r\n this.proEnabled = enabled.ProEnabled;\r\n this.purchaseOrderEnabled = enabled.PurchaseOrdersEnabled;\r\n this.advancedQuotesEnabled = enabled.AdvancedQuotesEnabled;\r\n });\r\n\r\n this.GetUserReferences();\r\n if (!this.makemodelid) {\r\n this.makemodelid = 0;\r\n this.isNew = true;\r\n this.MakeModel.Options = [];\r\n this.MakeModel.SupplierPrices = [];\r\n this.storeService.GetStores().subscribe(stores => {\r\n this.MakeModel.Stores = stores.map(s => { return this.CreateNewMakeModelStore(s.StoreId);});\r\n });\r\n this.makeModelOptions = new MakeModelOptionsViewModel(this.MakeModel.Options, this.MakeModel);\r\n }\r\n\r\n this.userRef1DataSource = this.userRefsService.getListDataSource(UserRefType.MAKE_MODEL_1);\r\n this.categoriesDataSource = this.service.GetCategoriesDataSource();\r\n this.typesDataSource = this.service.GetTypesDataSource();\r\n this.subtypesDataSource = this.service.GetSubTypesDataSource();\r\n this.Load();\r\n this.dirtyFormService.canNavigate = false;\r\n }\r\n\r\n public ngAfterViewChecked(): void {\r\n if (this.form.dirty && !this.dirtyFormService.isFormDirty) {\r\n this.dirtyFormService.isFormDirty = true;\r\n }\r\n }\r\n\r\n public Save(): void {\r\n this.isLoading = true;\r\n\r\n this.MakeModel.Servicing.forEach( (item: ServicingItem) => {\r\n if (item.IsNew) {\r\n item.ServiceLevelId = null;\r\n }\r\n });\r\n\r\n this.MakeModel.Options = this.makeModelOptions.Model;\r\n this.formMessageService.RegisterObservable(this.service.Save(this.MakeModel), this.formName)\r\n .subscribe(res => {\r\n this.dirtyFormService.isFormDirty = false;\r\n if (this.isNew) {\r\n location.href = `${location.href.substr(0, location.href.lastIndexOf(\"/\"))}/${res}?isNew=true`;\r\n }\r\n this.isLoading = false;\r\n this.Load();\r\n }, () => this.isLoading = false);\r\n }\r\n\r\n public onConfirmDeletion(isConfirmed: boolean): void {\r\n if (isConfirmed) {\r\n this.isLoading = true;\r\n this.formMessageService.RegisterObservable(this.service.Delete(this.makemodelid), this.formName)\r\n .subscribe(() => {\r\n this.isLoading = false;\r\n this.showDeleteWarning = false;\r\n this.location.go(\"/proteansystem/systems/equipment-settings/make-and-model-list\");\r\n },\r\n () => {\r\n this.isLoading = false;\r\n this.showDeleteWarning = false;\r\n });\r\n } else {\r\n this.showDeleteWarning = false;\r\n }\r\n }\r\n\r\n public Delete(): void {\r\n this.showDeleteWarning = true;\r\n }\r\n\r\n public Discard(): void {\r\n this.Load();\r\n }\r\n\r\n public OnSelectCategory(): void {\r\n this.FilterTypes(this.MakeModel.CategoryId).then(() => {\r\n this.MakeModel.TypeId = null;\r\n this.OnSelectType();\r\n });\r\n }\r\n\r\n public OnSelectType(): void {\r\n this.FilterSubTypes(this.MakeModel.CategoryId, this.MakeModel.TypeId).then(() => {\r\n this.MakeModel.SubTypeId = null;\r\n });\r\n }\r\n\r\n public ValidateWarrantyLength(): void {\r\n if (this.MakeModel.SalesWarrantyLength &&\r\n (this.MakeModel.SalesWarrantyLength < 0 || this.MakeModel.SalesWarrantyLength > this.maxSalesWarrantyLength)) {\r\n this.form.form.controls[\"makemodel.sales.warranty.length\"].setErrors({ outOfRange: { start: 0, end: this.maxSalesWarrantyLength }});\r\n }\r\n }\r\n\r\n public ValidateMakeModel(): void {\r\n if (this.MakeModel.Make && this.MakeModel.Model) {\r\n this.service.MakeModelDuplicated(this.isNew ? 0 : this.MakeModel.MakeModelId, this.MakeModel.Make, this.MakeModel.Model).subscribe(duplicated => {\r\n if (duplicated) {\r\n this.form.form.controls[\"makemodel.make\"].markAsDirty();\r\n this.form.form.controls[\"makemodel.model\"].markAsDirty();\r\n this.form.form.controls[\"makemodel.make\"].setErrors({ duplicatedMakeModel: true});\r\n this.form.form.controls[\"makemodel.model\"].setErrors({ });\r\n } else {\r\n this.form.form.controls[\"makemodel.make\"].setErrors(null);\r\n this.form.form.controls[\"makemodel.model\"].setErrors(null);\r\n }\r\n });\r\n }\r\n }\r\n\r\n public SetWarningMessage(model: MakeModelItem): void {\r\n this.translate.Translate(\"makemodel.delete.message\", { value: `${model.Make} / ${model.Model}`})\r\n .subscribe(res => this.warningMessage = res);\r\n }\r\n\r\n public LoadPrimaryImage(isChanged: boolean = false): void {\r\n this.primaryImageService.primaryImage.subscribe(image => {\r\n if (image) {\r\n const trustedImage = this.sanitizer.bypassSecurityTrustUrl(image.toString());\r\n this.primaryImage = trustedImage;\r\n this.accordionComponent.instance.expandItem(0);\r\n } else {\r\n this.primaryImage = null;\r\n this.accordionComponent.instance.collapseItem(0);\r\n this.accordionComponent.instance.expandItem(1);\r\n }\r\n });\r\n\r\n if (this.makemodelid) {\r\n this.primaryImageService.GetPrimaryImage(this.makemodelid, DocumentTypeEnum.MakeModel);\r\n }\r\n\r\n if (isChanged) {\r\n this.Save();\r\n }\r\n }\r\n\r\n public OnSupplierChange(selectedSupplier: StockSupplierModel): void {\r\n if (this.makeModelOptions) {\r\n this.makeModelOptions.SelectedSupplier = selectedSupplier;\r\n }\r\n }\r\n\r\n private GetUserReferences(): void {\r\n this.UICustomisations = JSON.parse(localStorage.getItem(\"ls.userReferences\"));\r\n const userRefModelMake1 = this.UICustomisations.list.filter((i) => i.UICustomisationID === UICustomisation.MAKE_MODEL_REF1)[0];\r\n this.userRefModelMake1Label = userRefModelMake1.CustomText || userRefModelMake1.OriginalText;\r\n const userRefModelMake2 = this.UICustomisations.list.filter((i) => i.UICustomisationID === UICustomisation.MAKE_MODEL_REF2)[0];\r\n this.userRefModelMake2Label = userRefModelMake2.CustomText || userRefModelMake2.OriginalText;\r\n }\r\n\r\n private FilterTypes(categoryId: number): Promise {\r\n this.typesDataSource.filter([\"CategoryId\", \"=\", categoryId]);\r\n return this.typesDataSource.reload();\r\n }\r\n\r\n private FilterSubTypes(categoryId: number, typeId: number): Promise {\r\n this.subtypesDataSource.filter([[\"CategoryId\", \"=\", categoryId], \"and\", [\"TypeId\", \"=\", typeId]]);\r\n return this.subtypesDataSource.reload();\r\n }\r\n\r\n private SelectSubType(): Promise {\r\n const selectedsubType = this.MakeModel.SubTypeId; // caching selected sub-type\r\n this.MakeModel.SubTypeId = null; // remove selected sub-type from the model before loading the data sources\r\n return this.FilterSubTypes(this.MakeModel.CategoryId, this.MakeModel.TypeId)\r\n .then(() => {\r\n this.MakeModel.SubTypeId = selectedsubType; // assign back the cached selected sub-type after the data sources are reloaded\r\n });\r\n }\r\n\r\n private SelectType(): Promise {\r\n const selectedType = this.MakeModel.TypeId; // caching selected type\r\n this.MakeModel.TypeId = null; // remove selected type from the model before loading the data sources\r\n return this.FilterTypes(this.MakeModel.CategoryId)\r\n .then(() => {\r\n this.MakeModel.TypeId = selectedType; // assign back the cached selected type after the data sources are reloaded\r\n });\r\n }\r\n\r\n private Load(): void {\r\n this.form.form.reset();\r\n if (this.makemodelid) {\r\n this.isLoading = true;\r\n this.categoriesDataSource.load()\r\n .then(() => this.userRef1DataSource.load())\r\n .then(() => {\r\n this.service.Get(this.makemodelid).pipe(finalize(() => this.isLoading = false)).subscribe(m => {\r\n this.MakeModel = m;\r\n this.SetWarningMessage(m);\r\n this.SelectType().then(() => this.SelectSubType());\r\n\r\n this.makeModelOptions = new MakeModelOptionsViewModel(this.MakeModel.Options, this.MakeModel);\r\n });\r\n });\r\n\r\n this.LoadPrimaryImage();\r\n }\r\n }\r\n\r\n private CreateNewMakeModelStore(storeId: number): MakeModelStore {\r\n return {\r\n MakeModelId: 0,\r\n StoreId: storeId,\r\n InStock: 0,\r\n Demand: 0,\r\n Available: 0,\r\n OnPo: 0,\r\n Valuation: 0,\r\n Min: 0,\r\n Max: 0\r\n };\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class MakeModelServiceUploadService {\r\n\r\n private readonly recurringJobsUrl: string;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) appConfig: IAppConfig) {\r\n this.recurringJobsUrl = appConfig.apiLocations.RecurringJob;\r\n }\r\n\r\n public GetServiceScheduleSampleUpload(): Observable {\r\n return this.http.get(this.recurringJobsUrl + `MakeModelServiceUpload`, { observe: \"response\", responseType: \"blob\" as \"json\" });\r\n }\r\n\r\n public GetRemainingCount(): Observable {\r\n return this.http.get(this.recurringJobsUrl + `MakeModelServiceUpload/Progress`);\r\n }\r\n\r\n public GetSummary(): Observable {\r\n return this.http.get(this.recurringJobsUrl + `MakeModelServiceUpload/Summary`);\r\n }\r\n\r\n public Upload(rows: any[]): Observable {\r\n return this.http.post(this.recurringJobsUrl + `MakeModelServiceUpload`, rows);\r\n }\r\n}\r\n","import { Location } from \"@angular/common\";\r\nimport { Component, OnDestroy, OnInit, ViewChild } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { ToasterService, ToastType } from \"servicesight-shared\";\r\nimport { ImporterComponent } from \"src/app/shared/components/importer/importer.component\";\r\nimport { ImportColumnDictionary } from \"src/app/shared/models/import/import-column-dictionary.model\";\r\nimport { ImportMap } from \"src/app/shared/models/import/import-map.model\";\r\nimport { ImportValidationObject } from \"src/app/shared/models/import/import-validation-object.model\";\r\nimport { MakeModelServiceUploadService } from \"../../services/make-model-service-upload.service\";\r\nimport { ServiceScheduleUpload } from \"../models/service-schedule-upload.model\";\r\n\r\n@Component({\r\n selector: \"app-service-schedule-upload\",\r\n templateUrl: \"./service-schedule-upload.component.html\",\r\n styleUrls: [\"./service-schedule-upload.component.scss\"]\r\n})\r\nexport class ServiceScheduleUploadComponent implements OnInit, OnDestroy {\r\n @ViewChild(\"importer\", { static: true }) importer: ImporterComponent;\r\n\r\n private poll: any;\r\n\r\n public noMatch: number = -1;\r\n public isProcessing: boolean = false;\r\n public remainingRows: number = 0;\r\n public defaultMap: ImportColumnDictionary = {\r\n Make: { displayName: \"make-model-service.import.make\", value: this.noMatch, required: true },\r\n Model: { displayName: \"make-model-service.import.model\", value: this.noMatch, required: true },\r\n JobType: { displayName: \"make-model-service.import.job-type\", value: this.noMatch, required: true },\r\n Interval: { displayName: \"make-model-service.import.interval\", value: this.noMatch, required: true },\r\n IntervalUnits: { displayName: \"make-model-service.import.interval-units\", value: this.noMatch, required: true },\r\n CalculationType: { displayName: \"make-model-service.import.calculation-type\", value: this.noMatch, required: true },\r\n SvcPrice: { displayName: \"make-model-service.import.svc-price\", value: this.noMatch, required: false },\r\n InspectionType: { displayName: \"make-model-service.import.inspection-type\", value: this.noMatch, required: false },\r\n BudgetHours: { displayName: \"make-model-service.import.budget-hours\", value: this.noMatch, required: false }\r\n };\r\n\r\n public defaultMaps: { [key: string]: string } = {\r\n Make: \"Make\",\r\n make: \"Make\",\r\n Model: \"Model\",\r\n model: \"Model\",\r\n JobType: \"JobType\",\r\n jobtype: \"JobType\",\r\n Interval: \"Interval\",\r\n interval: \"Interval\",\r\n IntervalUnits: \"IntervalUnits\",\r\n intervalunits: \"IntervalUnits\",\r\n CalculationType: \"CalculationType\",\r\n calculationtype: \"CalculationType\",\r\n SvcPrice: \"SvcPrice\",\r\n svcprice: \"SvcPrice\",\r\n InspectionType: \"InspectionType\",\r\n inspectiontype: \"InspectionType\",\r\n BudgetHours: \"BudgetHours\",\r\n budgethours: \"BudgetHours\",\r\n };\r\n\r\n public preDefinedMaps: Array = [\r\n {\r\n columns: [\r\n \"Make\",\r\n \"Model\",\r\n \"Job Type\",\r\n \"Interval\",\r\n \"Interval Units\",\r\n \"Calculation Type\",\r\n \"Svc Price\",\r\n \"Inspection Type\",\r\n \"Budget Hours\"\r\n ],\r\n name: \"ServiceSight\",\r\n map: {\r\n Make: { displayName: \"make-model-service.import.make\", value: 0 },\r\n Model: { displayName: \"make-model-service.import.model\", value: 1 },\r\n JobType: { displayName: \"make-model-service.import.job-type\", value: 2 },\r\n Interval: { displayName: \"make-model-service.import.interval\", value: 3 },\r\n IntervalUnits: { displayName: \"make-model-service.import.interval-units\", value: 4 },\r\n CalculationType: { displayName: \"make-model-service.import.calculation-type\", value: 5 },\r\n SvcPrice: { displayName: \"make-model-service.import.svc-price\", value: 6 },\r\n InspectionType: { displayName: \"make-model-service.import.inspection-type\", value: 7 },\r\n BudgetHours: { displayName: \"make-model-service.import.budget-hours\", value: 8 }\r\n }\r\n }\r\n ];\r\n\r\n public columnValidations: ImportValidationObject = {\r\n Make: (val) => val && val.toString().length <= 30,\r\n Model: (val) => val && val.toString().length <= 50,\r\n JobType: (val) => val && val.toString().length <= 50,\r\n Interval: (val) => !val || Number.isInteger(Number(val)) && Number(val) > 0,\r\n IntervalUnits: (val) => val && (val.toLowerCase() === \"day\" ||\r\n val.toLowerCase() === \"week\" ||\r\n val.toLowerCase() === \"month\"),\r\n CalculationType: (val) => val && (val.toLowerCase() === \"done date\" ||\r\n val.toLowerCase() === \"due date\"),\r\n SvcPrice: (val) => !val || !isNaN(val) && (!val || Number(val) >= 0),\r\n InspectionType: (val) => !val || val.toString().length <= 50,\r\n BudgetHours: (val) => !Number.isNaN(Number(val)) || (val && Number(val) > 0)\r\n };\r\n\r\n constructor(\r\n private location: Location,\r\n private serviceUploadService: MakeModelServiceUploadService,\r\n private toasterService: ToasterService,\r\n private translateService: TranslateService) { }\r\n\r\n public ngOnInit(): void {\r\n this.getRemainingCount();\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n if (this.poll) {\r\n clearTimeout(this.poll);\r\n this.poll = null;\r\n }\r\n }\r\n\r\n public getSample(): void {\r\n this.serviceUploadService.GetServiceScheduleSampleUpload()\r\n .subscribe((response: any) => {\r\n const contentType = \"text/csv\";\r\n const blob = new Blob([response.body], { type: contentType });\r\n const data = window.URL.createObjectURL(blob);\r\n const link = document.createElement(\"a\");\r\n link.hidden = true;\r\n link.href = data;\r\n link.download = \"makemodelservice-sample.csv\";\r\n document.body.appendChild(link);\r\n link.click();\r\n document.body.removeChild(link);\r\n setTimeout(() => {\r\n // For Firefox it is necessary to delay revoking the ObjectURL\r\n window.URL.revokeObjectURL(data);\r\n }, 100);\r\n });\r\n }\r\n\r\n public upload(rows: ServiceScheduleUpload[]): void {\r\n this.isProcessing = true;\r\n\r\n this.serviceUploadService.Upload(rows).subscribe(() => {\r\n this.getRemainingCount();\r\n }, () => {\r\n this.isProcessing = false;\r\n });\r\n }\r\n\r\n private getRemainingCount(): void {\r\n this.serviceUploadService.GetRemainingCount().subscribe(s => {\r\n this.remainingRows = s;\r\n if (s > 0) {\r\n this.isProcessing = true;\r\n this.poll = setTimeout(this.getRemainingCount.bind(this), 3000);\r\n } else {\r\n if (this.isProcessing) {\r\n this.getSummary();\r\n }\r\n\r\n this.isProcessing = false;\r\n if (this.poll) {\r\n clearTimeout(this.poll);\r\n this.poll = null;\r\n }\r\n }\r\n });\r\n }\r\n\r\n private getSummary(): void {\r\n this.serviceUploadService.GetSummary().subscribe(res => {\r\n if (res.FailedRows === 0) {\r\n this.toasterService.pop(\"make-model-service.import.complete\", ToastType.medium);\r\n this.location.go(\"/proteansystem/systems/equipment-settings/make-and-model-list\");\r\n } else {\r\n this.toasterService.pop(\"make-model-service.import.complete-with-errors\", ToastType.dark);\r\n res.Errors = res.Errors.map(row => {\r\n row.Errors = row.Errors.map(e => this.translateService.instant(e));\r\n return row;\r\n });\r\n this.importer.uploadError(res.FailedRows, res.Errors);\r\n }\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n

{{ 'customer-feedback.list.title' | translate }}  
{{ 'customer-feedback.list.description' | translate }}

\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{ 'customer-feedback.list.name' | translate }}\r\n
\r\n {{item.Name}}\r\n
\r\n
\r\n
\r\n","\r\n\r\n","import { Component, OnInit } from \"@angular/core\";\r\nimport { Location } from \"@angular/common\";\r\nimport { SurveyBase } from \"servicesight-shared\";\r\nimport { SurveyService } from \"../services/survey.service\";\r\n\r\n@Component({\r\n selector: \"app-feedback-survey-list\",\r\n templateUrl: \"./feedback-survey-list.component.html\",\r\n styleUrls: [\"./feedback-survey-list.component.scss\"]\r\n})\r\nexport class FeedbackSurveyListComponent implements OnInit {\r\n public templates: Array = [];\r\n public filteredTemplates: Array = [];\r\n public searchText: string = \"\";\r\n\r\n constructor(\r\n private location: Location,\r\n private surveyService: SurveyService) {\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.surveyService.GetAll().subscribe(x => {\r\n this.templates = x;\r\n this.filteredTemplates = x;\r\n });\r\n }\r\n\r\n public filterChanged(): void {\r\n if (this.searchText) {\r\n this.filteredTemplates = this.templates.filter(x => x.Name.toLowerCase().indexOf(this.searchText.toLowerCase()) > -1);\r\n } else {\r\n this.filteredTemplates = this.templates;\r\n }\r\n }\r\n\r\n public GoToTemplateDesigner(): void {\r\n this.location.go(\"/proteansystem/systems/feedback-survey/0\");\r\n }\r\n}\r\n\r\n","
\r\n
\r\n

{{ 'fgas.settings.cylinder-types' | translate }}\r\n
{{ 'fgas.settings.cylinder-types.subheader' | translate }}
\r\n

\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n -\r\n
\r\n
\r\n\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { AccountingService, PermissionsService } from \"servicesight-shared\";\r\nimport { CylinderTypesService } from \"../../services/cylinder-types.service\";\r\n\r\n@Component({\r\n selector: \"app-cylinder-types\",\r\n templateUrl: \"./cylinder-types.component.html\",\r\n styleUrls: [\"./cylinder-types.component.scss\"]\r\n})\r\nexport class CylinderTypesComponent implements OnInit {\r\n public SearchText = \"\";\r\n public cylinderTypesDataSource: ODataStore;\r\n public taxCodeDataSource: ODataStore;\r\n public isUsaCompany: boolean = true;\r\n public hasAddPermission: boolean = false;\r\n @ViewChild(\"grid\", { static: true }) dataGrid: DxDataGridComponent;\r\n\r\n constructor(\r\n private cylinderTypesService: CylinderTypesService,\r\n private accountingService: AccountingService,\r\n private permissionsService: PermissionsService) { }\r\n\r\n ngOnInit() {\r\n this.accountingService.GetAccountsInfo().subscribe(result => this.isUsaCompany = result.IsUsaTaxSystem);\r\n this.cylinderTypesDataSource = this.cylinderTypesService.ODataCylinderTypeServiceLevels();\r\n this.cylinderTypesDataSource.load();\r\n\r\n this.permissionsService.CurrentUserHasPermission(\"FGasCylinderTypeCreate\").subscribe(permission => {\r\n this.hasAddPermission = permission;\r\n });\r\n }\r\n\r\n public OnSearchValueChange() {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n}\r\n","export class CylinderTypeModel {\r\n public CylinderTypeId?: number;\r\n public Type: string;\r\n public Description: string;\r\n public AllowMixedRefrigerants?: boolean;\r\n public ReadOnly: boolean;\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n {{ 'fgas.settings.cylinder-types.newCylinderType' | translate }}\r\n {{ 'fgas.settings.cylinder-types.CylinderType' | translate }} {{ cylinderTypeModel.Type }}\r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n {{'fgas.newCylinderType.allow-mix' | translate}}\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n ","import { Location } from \"@angular/common\";\r\nimport { Component, HostListener, Input, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable } from \"rxjs\";\r\nimport { ComponentCanDeactivate, FormMesssageService, PermissionsService } from \"servicesight-shared\";\r\nimport { ConfirmationMessageComponent } from \"../../../shared/components/confirmation-message/confirmation-message.component\";\r\nimport { CylinderTypeModel } from \"../../../shared/models/cylinder-type.model\";\r\nimport { CylinderTypesService } from \"../../services/cylinder-types.service\";\r\n\r\n@Component({\r\n selector: \"app-new-cylinder-type\",\r\n templateUrl: \"./new-cylinder-type.component.html\",\r\n styleUrls: [\"./new-cylinder-type.component.scss\"]\r\n})\r\nexport class NewCylinderTypeComponent implements OnInit, ComponentCanDeactivate {\r\n public cylinderTypeModel: CylinderTypeModel;\r\n public productTaxCodes: ODataStore;\r\n public IsUsaCompany: boolean;\r\n public hasDeletePermission: boolean = false;\r\n public hasEditPermission: boolean = false;\r\n\r\n @Input() id: number;\r\n @ViewChild(\"confirmationMessage\", { static: true }) private confirmationMessage: ConfirmationMessageComponent;\r\n @ViewChild(\"cylinderTypeForm\", { static: true }) form: NgForm;\r\n public readonly formName: string = \"cylinderTypeForm\";\r\n\r\n constructor(\r\n private formMessageService: FormMesssageService,\r\n private cylinderTypesService: CylinderTypesService,\r\n private location: Location,\r\n private permissionsService: PermissionsService) {\r\n this.cylinderTypeModel = new CylinderTypeModel();\r\n }\r\n\r\n @HostListener(\"window:beforeunload\")\r\n public canDeactivate(): Observable | boolean {\r\n return !this.form.form.dirty;\r\n }\r\n\r\n public get isNew(): boolean {\r\n return !Boolean(Number(this.id));\r\n }\r\n\r\n ngOnInit() {\r\n if (this.id) {\r\n this.cylinderTypesService.Get(this.id).subscribe(x => {\r\n this.cylinderTypeModel = x;\r\n });\r\n }\r\n\r\n this.permissionsService.CurrentUserHasPermission(\"FGasCylinderTypeDelete\").subscribe(permission => {\r\n this.hasDeletePermission = permission;\r\n });\r\n\r\n this.permissionsService.CurrentUserHasPermission(\"FGasCylinderTypeEdit\").subscribe(permission => {\r\n this.hasEditPermission = permission;\r\n });\r\n }\r\n\r\n public SaveCylinderType() {\r\n this.formMessageService.RegisterObservable(this.cylinderTypesService.CreateUpdate(this.cylinderTypeModel), this.formName)\r\n .subscribe(result => {\r\n if (result) {\r\n if (!this.id) {\r\n this.id = Number(result);\r\n this.cylinderTypesService.Get(this.id).subscribe(x => this.cylinderTypeModel = x);\r\n }\r\n }\r\n });\r\n }\r\n\r\n public DeleteCylinderType() {\r\n this.confirmationMessage.show();\r\n }\r\n\r\n public Delete() {\r\n this.formMessageService.RegisterObservable(this.cylinderTypesService.Delete(this.id), this.formName)\r\n .subscribe(result => {\r\n if (result) {\r\n this.location.go(\"/proteansystem/systems/fgas-settings/cylinder-types-list\");\r\n }\r\n });\r\n }\r\n\r\n public OnDiscardCylinderType() {\r\n this.location.go(\"/proteansystem/systems/fgas-settings/cylinder-types-list\");\r\n }\r\n\r\n public switchValueChanged() {\r\n this.form.form.markAsDirty();\r\n }\r\n}\r\n","
\r\n \r\n \r\n
\r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n {{ data.value }} {{ units }}\r\n
\r\n
\r\n {{ \"refrigerant.days\" | translate: { value: data.value } }}\r\n
\r\n
\r\n {{data.value | currency: data.data.UseBaseCurrency ? baseCurrencySymbol : data.data.CurrencySymbol}}\r\n
\r\n
\r\n {{ data.value | currency: data.data.UseBaseCurrency ? baseCurrencySymbol : data.data.CurrencySymbol}} \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n","import { Component, Input, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport { Guid } from \"guid-typescript\";\r\nimport { SettingData, SettingId, SettingsService, SupplierPricesModel } from \"servicesight-shared\";\r\nimport { StockSuppliersAddComponent } from \"src/app/shared/components/stock-suppliers-add/stock-suppliers-add.component\";\r\nimport { StockSupplierModel } from \"src/app/stock/models/stock-supplier.model\";\r\n\r\n@Component({\r\n selector: \"app-refrigerant-type-purchasing\",\r\n templateUrl: \"./refrigerant-type-purchasing.component.html\",\r\n styleUrls: [\"./refrigerant-type-purchasing.component.scss\"]\r\n})\r\nexport class RefrigerantTypePurchasingComponent implements OnInit {\r\n @ViewChild(\"grid\") private grid: DxDataGridComponent;\r\n @ViewChild(\"addSuppliersComponent\") addSuppliersComponent: StockSuppliersAddComponent;\r\n @Input() form: NgForm;\r\n @Input() suppliersPrices: SupplierPricesModel[] = [];\r\n\r\n public baseCurrencySymbol = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n public units: string = \"kg\";\r\n public selectedIds: [] = [];\r\n\r\n constructor( private settingsService: SettingsService) {\r\n this.CalculateBuyingPrice = this.CalculateBuyingPrice.bind(this);\r\n this.CalculateLateFee = this.CalculateLateFee.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.settingsService.getSetting(SettingId.FGasRefrigerantUnits).subscribe((settingData: SettingData) => {\r\n this.units = settingData.ValueListSelectedId === 1 ? \"kg\" : \"lb\";\r\n });\r\n }\r\n\r\n public OnRowUpdated(event): void {\r\n if (event.data.Preferred) {\r\n this.suppliersPrices.forEach(x => {\r\n x.Preferred = false;\r\n });\r\n\r\n event.data.Preferred = true;\r\n }\r\n this.grid.instance.refresh();\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public OnEditorPreparing(e): void {\r\n if (e.dataField === \"BuyingPrice\" || e.dataField === \"LateFee\") {\r\n const allowEditing = e.row.data.UseBaseCurrency && e.row.data.CurrencySymbol !== this.baseCurrencySymbol;\r\n e.editorOptions.disabled = allowEditing;\r\n }\r\n }\r\n\r\n public RemoveSupplierPrice(): void {\r\n const selectedRows = this.grid.selectedRowKeys;\r\n selectedRows.forEach(x => {\r\n this.suppliersPrices.splice(this.suppliersPrices.findIndex(y => y.SupplierPriceId === x.SupplierPriceId), 1);\r\n });\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public ToggleCurrency(supplierPrice: SupplierPricesModel): void {\r\n supplierPrice.UseBaseCurrency = !supplierPrice.UseBaseCurrency;\r\n }\r\n\r\n public OnSuppliersPriceSelected(selectedSuppliersPrice: SupplierPricesModel[]): void {\r\n selectedSuppliersPrice.forEach(x => {\r\n if (this.suppliersPrices.length === 0) {\r\n x.Preferred = true;\r\n }\r\n this.suppliersPrices.push(x);\r\n });\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public CalculateBuyingPrice(rowData): number {\r\n if (rowData.CurrencySymbol !== this.baseCurrencySymbol && rowData.UseBaseCurrency) {\r\n return rowData.BuyingPrice / rowData.ExchangeRate;\r\n } else {\r\n return rowData.BuyingPrice;\r\n }\r\n }\r\n\r\n public CalculateLateFee(rowData): number {\r\n if (rowData.CurrencySymbol !== this.baseCurrencySymbol && rowData.UseBaseCurrency) {\r\n return rowData.LateFee / rowData.ExchangeRate;\r\n } else {\r\n return rowData.LateFee;\r\n }\r\n }\r\n\r\n public AddSupplierPrice(): void {\r\n this.addSuppliersComponent.Show();\r\n }\r\n\r\n public OnSuppliersSelected(selectedSuppliers: StockSupplierModel[]): void {\r\n selectedSuppliers.forEach(x => {\r\n const supplierPrice: SupplierPricesModel = {\r\n SupplierPriceId: Guid.create().toString(),\r\n RefrigerantTypeId: 0,\r\n SupplierId: x.SupplierId,\r\n SupplierName: x.Name,\r\n CurrencySymbol: x.CurrencySymbol,\r\n SupplierPartNumber: \"\",\r\n Weight: 0,\r\n BuyingPrice: 0,\r\n Preferred: false,\r\n UseBaseCurrency: x.UseBaseCurrency,\r\n ExchangeRate: x.ExchangeRate\r\n };\r\n\r\n if (this.suppliersPrices.length === 0) {\r\n x.Preferred = true;\r\n }\r\n\r\n this.suppliersPrices.push(supplierPrice);\r\n\r\n });\r\n this.form.form.markAsDirty();\r\n }\r\n}\r\n","import { ISelectOption } from \"src/app/shared/models/iselect-option.model\";\r\nimport { NominalAccount } from \"./nominal-account.model\";\r\nimport { NominalDepartment } from \"./nominal-department\";\r\n\r\nexport class RefrigerantTypeAccountsModel {\r\n IsUsTax: boolean;\r\n CostingEnabled: boolean;\r\n SaleAccountCodes: Array;\r\n CostAccountCodes: Array;\r\n NominalDeptCodes: Array;\r\n ProductTaxCodes: Array;\r\n AssetAccountCodes: Array;\r\n}\r\n","
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
","import { Component, Input, OnInit } from \"@angular/core\";\r\nimport { ControlContainer, NgForm } from \"@angular/forms\";\r\nimport { RefrigerantTypeModel, SettingData, SettingId, SettingsService } from \"servicesight-shared\";\r\nimport { RefrigerantTypeAccountsModel } from \"../../models/refrigerant-type-accounts\";\r\nimport { RefrigerantTypeService } from \"../../services/refrigerant-type.service\";\r\n\r\n@Component({\r\n selector: \"app-refrigerant-type-accounts\",\r\n templateUrl: \"./refrigerant-type-accounts.component.html\",\r\n styleUrls: [\"./refrigerant-type-accounts.component.scss\"],\r\n viewProviders: [ { provide: ControlContainer, useExisting: NgForm } ]\r\n})\r\nexport class RefrigerantTypeAccountsComponent implements OnInit {\r\n\r\n @Input() refrigerantType: RefrigerantTypeModel;\r\n @Input() id: number;\r\n\r\n public baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n public model: RefrigerantTypeAccountsModel = new RefrigerantTypeAccountsModel();\r\n public unit: string;\r\n\r\n constructor(\r\n private refrigerantTypeService: RefrigerantTypeService,\r\n private settingsService: SettingsService) { }\r\n\r\n public ngOnInit(): void {\r\n this.settingsService.getSetting(SettingId.FGasRefrigerantUnits).subscribe((settingData: SettingData) => {\r\n this.unit = settingData.ValueListSelectedId === 1 ? \"kg\" : \"lb\";\r\n });\r\n\r\n this.refrigerantTypeService.GetNominalAccounts().subscribe(result => {\r\n this.model = result;\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n {{ 'fgas.refrigerant-type.new-refrigerant' | translate }}\r\n {{ 'fgas.refrigerant-type.refrigerant' | translate }} - {{refrigerantType.Name}}\r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n","import { Location } from \"@angular/common\";\r\nimport { Component, Input, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { CylinderIdentificationStyle } from \"servicesight-components\";\r\nimport { FormMesssageService, RefrigerantTypeModel } from \"servicesight-shared\";\r\nimport { ConfirmationMessageComponent } from \"src/app/shared/components/confirmation-message/confirmation-message.component\";\r\nimport { RefrigerantTypeService } from \"../../services/refrigerant-type.service\";\r\n\r\n@Component({\r\n selector: \"app-refrigerant-type-detail\",\r\n templateUrl: \"./refrigerant-type-detail.component.html\",\r\n styleUrls: [\"./refrigerant-type-detail.component.scss\"]\r\n})\r\nexport class RefrigerantTypeDetailComponent implements OnInit {\r\n @Input() id: number;\r\n @Input() isNewlyCreated: boolean;\r\n @ViewChild(\"confirmationMessage\", { static: true }) private confirmationMessage: ConfirmationMessageComponent;\r\n @ViewChild(\"refrigerantTypeForm\", { static: true }) form: NgForm;\r\n public readonly formName: string = \"refrigerantTypeForm\";\r\n public refrigerantType: RefrigerantTypeModel;\r\n public hasDeletePermission: boolean = true;\r\n public CylinderStyle = CylinderIdentificationStyle;\r\n\r\n public statusDataSource: any[] = [{\r\n Value: true,\r\n Name: this.translate.instant(\"refrigerant.enabled\")\r\n },\r\n {\r\n Value: false,\r\n Name: this.translate.instant(\"refrigerant.disabled\")\r\n }];\r\n\r\n public get isNew(): boolean {\r\n return !Boolean(Number(this.id));\r\n }\r\n\r\n constructor(\r\n private location: Location,\r\n private translate: TranslateService,\r\n private refrigerantTypeService: RefrigerantTypeService,\r\n private formMessageService: FormMesssageService) {\r\n this.refrigerantType = new RefrigerantTypeModel();\r\n this.refrigerantType.SupplierPrices = [];\r\n }\r\n\r\n public ngOnInit(): void {\r\n if (this.id) {\r\n this.refrigerantTypeService.Get(this.id).subscribe(x => this.refrigerantType = x);\r\n } else {\r\n this.refrigerantType.CylinderStyle = CylinderIdentificationStyle.Shoulder;\r\n this.refrigerantTypeService.RefrigerantTypeDefaults().subscribe(res => {\r\n this.refrigerantType.SaleAccount = res.DefaultSaleAccount;\r\n this.refrigerantType.CostAccount = res.DefaultCostAccount;\r\n this.refrigerantType.ValuationAccount = res.DefaultValuationAccount;\r\n this.refrigerantType.ProductTaxCodeId = res.FGasProductTaxCodeId;\r\n });\r\n }\r\n }\r\n\r\n public SaveRefrigerantType(): void {\r\n this.RemoveTemporaryGUIDs();\r\n this.formMessageService.RegisterObservable(this.refrigerantTypeService.CreateUpdate(this.refrigerantType), this.formName)\r\n .subscribe(result => {\r\n if (!this.id || !this.refrigerantType.RefrigerantTypeId) {\r\n this.location.replaceState(`/proteansystem/systems/f-gas-settings/refrigerant-type/${result}?isNew=true`);\r\n }\r\n\r\n if (result && this.refrigerantType.RefrigerantTypeId) {\r\n this.refrigerantTypeService.Get(this.id).subscribe(x => this.refrigerantType = x);\r\n }\r\n });\r\n }\r\n\r\n public DeleteRefrigerantType(): void {\r\n this.formMessageService.RegisterObservable((this.refrigerantTypeService.Delete(this.id)), this.formName)\r\n .subscribe(result => {\r\n if (result) {\r\n this.location.go(\"/proteansystem/systems/f-gas-settings/refrigerant-type-list\");\r\n }\r\n });\r\n }\r\n\r\n public OnDiscard(): void {\r\n this.location.go(\"/proteansystem/systems/f-gas-settings/refrigerant-type-list\");\r\n }\r\n\r\n public OnDelete(): void {\r\n this.confirmationMessage.show();\r\n }\r\n\r\n public SetStyle(style: CylinderIdentificationStyle): void {\r\n this.refrigerantType.CylinderStyle = style;\r\n }\r\n\r\n private RemoveTemporaryGUIDs() {\r\n this.refrigerantType.SupplierPrices.forEach(supplierPrice => {\r\n if (isNaN(Number(supplierPrice.SupplierPriceId))) {\r\n supplierPrice.SupplierPriceId = 0;\r\n }\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'refrigerant.refrigerant-types' | translate }}\r\n   
{{ 'refrigerant.list.subtitle' | translate }}
\r\n

\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
{{ 'refrigerant.enabled' | translate }}
\r\n
{{ 'refrigerant.disabled' | translate }}
\r\n
\r\n \r\n
\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { Orientation } from \"servicesight-components\";\r\nimport { GridKind, GridService } from \"servicesight-shared\";\r\nimport { RefrigerantTypeService } from \"../../services/refrigerant-type.service\";\r\n\r\n@Component({\r\n selector: \"app-refrigerant-type-list\",\r\n templateUrl: \"./refrigerant-type-list.component.html\",\r\n styleUrls: [\"./refrigerant-type-list.component.scss\"]\r\n})\r\nexport class RefrigerantTypeListComponent implements OnInit {\r\n\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n\r\n public refrigerantTypes: DataSource;\r\n public searchText: string = \"\";\r\n public orientation = Orientation;\r\n\r\n private filters: any = { 0: [\"Status\", \"=\", true] };\r\n\r\n constructor(\r\n private refrigerantTypeService: RefrigerantTypeService,\r\n private gridService: GridService)\r\n { }\r\n\r\n public ngOnInit(): void {\r\n this.gridService.GetLayout(GridKind.RefrigerantTypes).subscribe(\r\n (value) => {\r\n if (value) {\r\n this.dataGrid.instance.state(value);\r\n }\r\n this.getDataSources();\r\n }, () => this.getDataSources());\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.searchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public FilterChanged($event): void {\r\n const filterValue = $event.currentTarget.value;\r\n if (filterValue === \"1\") {\r\n this.dataGrid.instance.filter(null);\r\n } else {\r\n this.dataGrid.instance.filter(this.filters[filterValue]);\r\n }\r\n }\r\n\r\n private getDataSources(): void {\r\n const dataSource = this.refrigerantTypeService.GetDataSource();\r\n dataSource.filter([\"Status\", \"=\", true]);\r\n this.refrigerantTypes = dataSource;\r\n }\r\n\r\n public SaveLayout(): void {\r\n const state = this.dataGrid.instance.state();\r\n this.gridService.SaveLayout(state, GridKind.RefrigerantTypes);\r\n }\r\n\r\n public ResetLayout(): void {\r\n this.gridService.ResetLayout(GridKind.RefrigerantTypes);\r\n this.dataGrid.instance.state(null);\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { InspectionReasonsNotDone } from \"../models/inspection-reasons-not-done\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class InspectionReasonsNotDoneServiceService {\r\n\r\n private readonly baseUrl: string;\r\n private readonly reasonsNotDoneUrl: string;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) appConfig: IAppConfig) {\r\n this.baseUrl = appConfig.apiLocations.Inspections;\r\n this.reasonsNotDoneUrl = this.baseUrl + \"inspectreasonnotdone\";\r\n }\r\n\r\n GetAll(): Observable {\r\n return this.http\r\n .get(this.reasonsNotDoneUrl);\r\n }\r\n\r\n Save(reasonsNotDone: InspectionReasonsNotDone) {\r\n if (reasonsNotDone.Id === 0) {\r\n return this.http.post(this.reasonsNotDoneUrl, reasonsNotDone);\r\n } else {\r\n return this.http.put(this.reasonsNotDoneUrl, reasonsNotDone);\r\n }\r\n }\r\n\r\n Delete(id: number) {\r\n return this.http.delete(this.reasonsNotDoneUrl + \"/\" + id);\r\n\r\n }\r\n\r\n GetById(id: number): Observable {\r\n return this.http.get(this.reasonsNotDoneUrl + \"/\" + id);\r\n }\r\n\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n {{ 'inspections.reasons.not.done.new' | translate }} {{ 'inspections.reasons.not.done.title' | translate }}\r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { Location } from \"@angular/common\";\r\nimport { Component, HostListener, Input, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { Observable } from \"rxjs\";\r\nimport { ComponentCanDeactivate, FormMesssageService } from \"servicesight-shared\";\r\nimport { InspectionReasonsNotDone } from \"../models/inspection-reasons-not-done\";\r\nimport { InspectionReasonsNotDoneServiceService } from \"../services/inspection-reasons-not-done-service.service\";\r\n\r\n@Component({\r\n selector: \"app-inspection-reason-not-done\",\r\n templateUrl: \"./inspection-reason-not-done.component.html\",\r\n styleUrls: [\"./inspection-reason-not-done.component.scss\"]\r\n})\r\nexport class InspectionReasonNotDoneComponent implements OnInit, ComponentCanDeactivate {\r\n\r\n @Input() public id: number;\r\n @Input() public isNewlyCreated: boolean;\r\n @ViewChild(\"cancelReasonForm\", { static: true }) form: NgForm;\r\n public readonly formName: string = \"cancelReasonForm\";\r\n public highestTemplateId: number;\r\n inspections: InspectionReasonsNotDone[];\r\n\r\n public get isNew(): boolean {\r\n return !Boolean(Number(this.id));\r\n }\r\n\r\n constructor(\r\n private location: Location,\r\n private reasonsNotDoneService: InspectionReasonsNotDoneServiceService,\r\n private formMessageService: FormMesssageService) { }\r\n\r\n reasonNotDone: InspectionReasonsNotDone = {\r\n Id: 0,\r\n ReasonNotDone: \"test\"\r\n };\r\n\r\n @HostListener(\"window:beforeunload\")\r\n public canDeactivate(): Observable | boolean {\r\n return !this.form.form.dirty;\r\n }\r\n\r\n ngOnInit() {\r\n if (Number(this.id)) {\r\n this.reasonsNotDoneService.GetById(this.id).subscribe((response => {\r\n this.reasonNotDone = response;\r\n }));\r\n } else {\r\n this.reasonNotDone.ReasonNotDone = \"\";\r\n }\r\n }\r\n\r\n GoToReasonsNotDoneList() {\r\n this.location.go(\"/proteansystem/systems/inspection-reasons-not-done-list\");\r\n }\r\n\r\n Save() {\r\n this.formMessageService\r\n .RegisterObservable(this.reasonsNotDoneService.Save(this.reasonNotDone), this.formName)\r\n .subscribe(() => {\r\n if (this.isNew) {\r\n this.reasonsNotDoneService.GetAll().subscribe((response => { // TODO: change invoking subscribe in subscribe\r\n this.inspections = response;\r\n this.highestTemplateId = this.findHighestId(this.inspections);\r\n location.href = `#/proteansystem/systems/inspection-reason-not-done/${this.highestTemplateId}?isNew=true`;\r\n }));\r\n }\r\n });\r\n }\r\n\r\n Delete() {\r\n this.formMessageService.RegisterObservable(\r\n this.reasonsNotDoneService.Delete(this.reasonNotDone.Id), this.formName)\r\n .subscribe(() => this.location.go(\"/proteansystem/systems/inspection-reasons-not-done-list\"));\r\n }\r\n Cancel() {\r\n this.location.go(\"/proteansystem/systems/inspection-reasons-not-done-list\");\r\n }\r\n\r\n findHighestId(templates: InspectionReasonsNotDone[]) {\r\n const ids: Array = [];\r\n for (const item of templates) {\r\n ids.push(item.Id);\r\n }\r\n return Math.max(...ids);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n

{{ 'inspections.reasons.not.done.title' | translate }}  
{{ 'inspections.reasons.not.done.descriptionDetails' | translate }}

\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{ 'inspections.reasons.not.done.description' | translate }}\r\n
{{ item.ReasonNotDone | translate }}
\r\n
\r\n
\r\n","import { Component, OnInit } from \"@angular/core\";\r\nimport { HelpItemTagEnum } from \"servicesight-shared\";\r\nimport { InspectionPermissionsService } from \"../../inspections/services/inspection-permissions.service\";\r\nimport { InspectionReasonsNotDone } from \"../models/inspection-reasons-not-done\";\r\nimport { InspectionReasonsNotDoneServiceService } from \"../services/inspection-reasons-not-done-service.service\";\r\n\r\n@Component({\r\n selector: \"app-inspection-reasons-not-done-list\",\r\n templateUrl: \"./inspection-reasons-not-done-list.component.html\",\r\n styleUrls: [\"./inspection-reasons-not-done-list.component.scss\"]\r\n})\r\nexport class InspectionReasonsNotDoneListComponent implements OnInit {\r\n\r\n searchText: string = \"\";\r\n inspections: InspectionReasonsNotDone[];\r\n filteredTemplates: InspectionReasonsNotDone[];\r\n public hasAddPermissionReasonNotDone: boolean = false;\r\n public helpItemTagEnum = HelpItemTagEnum;\r\n\r\n constructor(\r\n private reasonsNotDoneService: InspectionReasonsNotDoneServiceService,\r\n private reasonNotDonePermisssion: InspectionPermissionsService) { }\r\n\r\n ngOnInit() {\r\n this.reasonsNotDoneService.GetAll().subscribe((response => {\r\n this.inspections = response;\r\n this.filteredTemplates = this.inspections;\r\n }));\r\n this.reasonNotDonePermisssion.HasAddPermissionReasonNotDone.subscribe(x => this.hasAddPermissionReasonNotDone = x);\r\n }\r\n\r\n filterChanged() {\r\n if (this.searchText) {\r\n this.filteredTemplates = this.inspections.filter(function(x: InspectionReasonsNotDone) {\r\n return x.ReasonNotDone.toLowerCase().indexOf(this.searchText.toLowerCase()) > -1; //TODO: add other filtering?\r\n }.bind(this));\r\n } else {\r\n this.filteredTemplates = this.inspections;\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n

{{ 'inspections.templatelist.title' | translate }}  
{{ 'inspections.templatelist.description' | translate }}

\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{ 'inspections.templatelist.name' | translate }}\r\n \r\n {{ 'inspections.templatelist.type' | translate }}\r\n \r\n {{ 'inspections.templatelist.autocomplete' | translate }}\r\n
\r\n {{item.Name}}\r\n {{item.Name}}\r\n {{ item.Type | inspectionType | translate }}{{ item.AutoComplete | inspectionAutocomplete | translate }}
\r\n
\r\n
\r\n","import { Component, OnInit } from \"@angular/core\";\r\nimport { HelpItemTagEnum, SettingId, SettingsService } from \"servicesight-shared\";\r\nimport { TemplateListItem } from \"src/app/inspections/models/inspection-template-list-item\";\r\nimport { AuthService } from \"src/app/shared/services/auth/auth.service\";\r\nimport { InsepectionTemplate } from \"../models/insepection-template\";\r\nimport { InspectionTemplateService } from \"../services/inspection-template.service\";\r\n\r\n@Component({\r\n selector: \"app-inspection-template-list\",\r\n templateUrl: \"./inspection-template-list.component.html\",\r\n styleUrls: [\"./inspection-template-list.component.scss\"]\r\n})\r\nexport class InspectionTemplateListComponent implements OnInit {\r\n templates: Array;\r\n filteredTemplates: Array;\r\n searchText: string;\r\n\r\n public allowImport: boolean = false;\r\n public helpItemTagEnum = HelpItemTagEnum;\r\n private isSupportLogin: boolean = false;\r\n\r\n public get AllowImport(): boolean {\r\n return this.allowImport || this.isSupportLogin;\r\n }\r\n\r\n constructor(\r\n private templateService: InspectionTemplateService,\r\n private settingService: SettingsService,\r\n private authService: AuthService) { }\r\n\r\n public ngOnInit(): void {\r\n this.templateService.GetAll().subscribe(result => {\r\n this.templates = result;\r\n this.filteredTemplates = this.templates;\r\n });\r\n\r\n this.settingService.getSetting(SettingId.AllowInspectionImportExport).subscribe(setting => {\r\n this.allowImport = setting.ValueBool;\r\n });\r\n\r\n this.isSupportLogin = this.authService.IsSupportLogin;\r\n }\r\n\r\n public filterChanged(): void {\r\n if (this.searchText) {\r\n //TODO: add other filtering?\r\n this.filteredTemplates = this.templates.filter(x => x.Name.toLowerCase().indexOf(this.searchText.toLowerCase()) > -1);\r\n } else {\r\n this.filteredTemplates = this.templates;\r\n }\r\n }\r\n\r\n public Import(): void {\r\n const input = document.createElement(\"input\");\r\n input.type = \"file\";\r\n\r\n input.onchange = e => {\r\n const file = (e.target as any).files[0];\r\n\r\n const reader = new FileReader();\r\n reader.readAsText(file, \"UTF-8\");\r\n\r\n reader.onload = readerEvent => {\r\n const content = readerEvent.target.result;\r\n const inspection = JSON.parse(content as string) as InsepectionTemplate;\r\n inspection.Id = 0;\r\n inspection.OverrideReportId = 0;\r\n\r\n this.templateService.Save(inspection, true).subscribe(() => {\r\n this.templateService.GetAll().subscribe(result => {\r\n this.templates = result;\r\n this.filteredTemplates = this.templates;\r\n });\r\n });\r\n };\r\n };\r\n\r\n input.click();\r\n }\r\n}\r\n\r\n","export enum NoteType {\r\n Numeric = 1,\r\n Date = 5,\r\n Text = 6\r\n}\r\n","export class BulkOptions {\r\n show: boolean = false;\r\n title: string = \"\";\r\n description: string = \"\";\r\n example: string = \"\";\r\n text: string = \"\";\r\n create: (text: RegExpExecArray) => T;\r\n splitAndAdd: () => void;\r\n updatePreview: () => void;\r\n preview: Array = [];\r\n addMessages: { [k: string]: string} = { other: \"\"};\r\n totalNumber: number = 0;\r\n public add(list: Array, newItems: Array) {\r\n // eslint-disable-next-line @typescript-eslint/dot-notation\r\n if (list.length === 1 && list[0][\"Text\"].length === 0) {\r\n list.length = 0;\r\n }\r\n newItems.forEach(answer => {\r\n list.push(this.create(answer));\r\n });\r\n }\r\n}\r\n","
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n \r\n
\r\n\r\n
\r\n
\r\n\r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n {{ 'buttons.additem' | translate}}\r\n  {{ 'inspections.template.or' | translate }} \r\n {{ 'inspections.template.bulkinsert' | translate}}\r\n \r\n\r\n \r\n
\r\n
\r\n\r\n
\r\n\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n\r\n
\r\n
\r\n
\r\n
{{ 'label.default' | translate }}
\r\n
{{ 'label.fail' | translate }}
\r\n
{{ 'label.notesrequired' | translate }}
\r\n
{{ 'label.photo' | translate }}
\r\n
{{ 'label.notestype' | translate }}
\r\n
\r\n
\r\n\r\n \r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n
123
\r\n
ABC
\r\n
Date
\r\n
\r\n\r\n \r\n
\r\n
\r\n\r\n
\r\n\r\n
\r\n {{ 'buttons.addoption' | translate }}\r\n  {{ 'inspections.template.or' | translate }} \r\n {{ 'inspections.template.bulkinsert' | translate }}
\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n \r\n\r\n\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n\r\n \r\n\r\n
\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n
\r\n\r\n\r\n\r\n\r\n
\r\n
\r\n

{{ bulkInsert.description | translate }}

\r\n \r\n
{{ bulkInsert.example | translate }}
\r\n \r\n \r\n\r\n
\r\n
\r\n

{{ 'inspections.template.bulk.preview' | translate }}

\r\n\r\n
\r\n
\r\n
\r\n {{ item.Text }}\r\n \r\n \r\n \r\n
\r\n
{{ option.Text }}
\r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n","import { CdkDragDrop, moveItemInArray } from \"@angular/cdk/drag-drop\";\r\nimport { Location } from \"@angular/common\";\r\nimport { Component, HostListener, Input, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { Observable } from \"rxjs\";\r\nimport { ComponentCanDeactivate, FormMesssageService, SettingId, SettingsService } from \"servicesight-shared\";\r\nimport { ModuleAccessModel } from \"src/app/shared/models/module-access.model\";\r\nimport { InspectionType } from \"src/app/shared/pipes/enums/inspection-type.pipe\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { InspectionAutocomplete } from \"../../shared/pipes/enums/inspection-autocomplete.pipe\";\r\nimport { JstranslateService } from \"../../shared/services/jstranslate/jstranslate.service\";\r\nimport { LayoutType } from \"../enums/layout-type.enum\";\r\nimport { NoteType } from \"../enums/note-type.enum\";\r\nimport { BulkOptions } from \"../models/bulkoptions\";\r\nimport { InsepectionTemplate } from \"../models/insepection-template\";\r\nimport { InspectionCategory } from \"../models/inspection-category\";\r\nimport { InspectionItem } from \"../models/inspection-item\";\r\nimport { InspectionOption } from \"../models/inspection-option\";\r\nimport { InspectionTemplateService } from \"../services/inspection-template.service\";\r\n\r\n@Component({\r\n selector: \"app-inspections-designer\",\r\n templateUrl: \"./inspections-designer.component.html\",\r\n styleUrls: [\"./inspections-designer.component.scss\"]\r\n})\r\nexport class InspectionsDesignerComponent implements OnInit, ComponentCanDeactivate {\r\n\r\n @Input() public templateId: number;\r\n @Input() public isNew: boolean;\r\n @ViewChild(\"templateForm\", { static: true }) form: NgForm;\r\n public readonly formName: string = \"templateForm\";\r\n public isLoading: boolean = true;\r\n public modulesAccess: ModuleAccessModel = new ModuleAccessModel();\r\n public noteType: typeof NoteType = NoteType;\r\n public readonly emptyTemplate: InsepectionTemplate = {\r\n Id: 0,\r\n Name: \"\",\r\n Categories: [this.emptyCategory()],\r\n AllowMultiple: true,\r\n SubReport: false,\r\n AutoComplete: InspectionAutocomplete.None,\r\n Type: InspectionType.PreVisit,\r\n OverrideReportId: null\r\n };\r\n\r\n public Inspection: InsepectionTemplate = this.cloneObject(this.emptyTemplate);\r\n\r\n public types: Array = [\r\n InspectionType.PreVisit,\r\n InspectionType.InVisit,\r\n InspectionType.PostVisit\r\n ];\r\n public autcompletes: Array = [\r\n InspectionAutocomplete.None,\r\n InspectionAutocomplete.UseDefaults,\r\n InspectionAutocomplete.FromPrevious\r\n ];\r\n\r\n public layoutTemplateDatasource: DataSource;\r\n public loaded: boolean = false;\r\n public focusOutTimeout: object = { };\r\n public currentEditable: any = { };\r\n public collapseItems: boolean = false;\r\n public allowExport: boolean = false;\r\n public get allCollapsed(): boolean {\r\n return !this.Inspection.Categories.some(i => !i.IsCollapsed);\r\n }\r\n public bulkInsert: BulkOptions = new BulkOptions();\r\n public formErrors: Array = [];\r\n public BoundSave: () => Observable = this.Save.bind(this);\r\n\r\n private saveTimeout: any;\r\n public historyStack: Array = [];\r\n public futureStack: Array = [];\r\n\r\n private get storageKey(): string {\r\n return \"inspection-template-\" + (this.templateId || \"new\");\r\n }\r\n private internalModel: InsepectionTemplate;\r\n\r\n\r\n public get inspectionType(): number {\r\n return this.Inspection.Type;\r\n }\r\n\r\n public set inspectionType(value: number) {\r\n this.Inspection.Type = Number(value);\r\n }\r\n\r\n public get inspectionAutoComplete(): number {\r\n return this.Inspection.AutoComplete;\r\n }\r\n\r\n public set inspectionAutoComplete(value: number) {\r\n this.Inspection.AutoComplete = Number(value);\r\n }\r\n\r\n constructor(\r\n private inspectionTemplateService: InspectionTemplateService,\r\n private router: Router,\r\n private formMessageService: FormMesssageService,\r\n private location: Location,\r\n private licenseService: LicenseService,\r\n private settingService: SettingsService,\r\n translation: JstranslateService,\r\n translate: TranslateService) {\r\n translation.SetupTranslation(translate);\r\n }\r\n\r\n @HostListener(\"window:beforeunload\")\r\n public canDeactivate(): Observable | boolean {\r\n return !this.form.form.dirty;\r\n }\r\n\r\n public ngOnInit(): void {\r\n if (Number(this.templateId)) {\r\n this.inspectionTemplateService.GetById(this.templateId).subscribe((res) => {\r\n this.Inspection = res;\r\n //--- if there are no Categories add an empty one to allow editing\r\n if (this.Inspection.Categories.length === 0) {\r\n this.Inspection.Categories.push(this.emptyCategory());\r\n }\r\n this.internalModel = this.cloneObject(this.Inspection);\r\n this.loaded = true;\r\n this.isLoading = false;\r\n });\r\n } else {\r\n const localVersion = localStorage.getItem(this.storageKey);\r\n if (localVersion) {\r\n //we have one in local storage load that for user to continue working on\r\n this.Inspection = JSON.parse(localVersion);\r\n }\r\n this.internalModel = this.cloneObject(this.Inspection);\r\n this.loaded = true;\r\n this.isLoading = false;\r\n }\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(x => {\r\n this.modulesAccess = x;\r\n if (this.modulesAccess.ProEnabled && !Number(this.templateId)) {\r\n this.settingService.getSetting(SettingId.InspectionsTemplate).subscribe(setting => {\r\n this.Inspection.OverrideReportId = setting.ValueListSelectedId || null;\r\n });\r\n }\r\n });\r\n\r\n this.settingService.getSetting(SettingId.AllowInspectionImportExport).subscribe(setting => {\r\n this.allowExport = setting.ValueBool;\r\n });\r\n\r\n this.layoutTemplateDatasource = this.inspectionTemplateService.GetLayoutTemplateDataSource();\r\n this.layoutTemplateDatasource.sort(\"Name\");\r\n this.layoutTemplateDatasource.filter([\"LayoutType\", \"=\", LayoutType[LayoutType.Inspection]]);\r\n }\r\n\r\n modelChanged() {\r\n if (!this.loaded) { return; }\r\n if (this.saveTimeout !== null) {\r\n clearTimeout(this.saveTimeout);\r\n }\r\n\r\n this.formErrors.length = 0;\r\n this.futureStack.length = 0;\r\n this.historyStack.push(this.internalModel);\r\n this.internalModel = this.cloneObject(this.Inspection);\r\n if (this.historyStack.length === 10) { this.historyStack.shift(); }\r\n\r\n this.form.form.markAsDirty();\r\n this.saveTimeout = setTimeout(() => this.localSave(this.Inspection), 500);\r\n this.duplicatedItemsValidation(this.Inspection);\r\n }\r\n\r\n localSave(inspection: InsepectionTemplate) {\r\n localStorage.setItem(this.storageKey, JSON.stringify(inspection));\r\n }\r\n\r\n public Export(): void {\r\n const json = JSON.stringify(this.Inspection);\r\n const linkElement = document.createElement(\"a\");\r\n const file = new Blob([json], {type: \"application/json\"});\r\n\r\n linkElement.href= URL.createObjectURL(file);\r\n linkElement.download = this.Inspection.Name + \".json\";\r\n linkElement.click();\r\n\r\n URL.revokeObjectURL(linkElement.href);\r\n }\r\n\r\n Save() {\r\n this.isLoading = true;\r\n this.Inspection.Categories.forEach(c => c.Items.forEach(i => i.Options = i.Options.filter(o => !o.isDeleted)));\r\n this.duplicatedItemsValidation(this.Inspection);\r\n this.formMessageService\r\n .RegisterObservable(this.inspectionTemplateService.Save(this.Inspection), this.formName)\r\n .subscribe((result) => {\r\n localStorage.removeItem(this.storageKey);\r\n this.isLoading = false;\r\n location.href = \"#/proteansystem/systems/inspection-template/\" + result.Id + \"?isNew=true\";\r\n }).add(() => this.isLoading = false);\r\n }\r\n\r\n Discard() {\r\n this.location.back();\r\n }\r\n\r\n Undo() {\r\n const last = this.historyStack.pop();\r\n this.futureStack.push(this.Inspection);\r\n this.Inspection = last;\r\n this.internalModel = this.cloneObject(this.Inspection);\r\n }\r\n\r\n Redo() {\r\n const last = this.futureStack.pop();\r\n this.historyStack.push(this.Inspection);\r\n this.Inspection = last;\r\n this.internalModel = this.cloneObject(this.Inspection);\r\n }\r\n\r\n Delete() {\r\n this.isLoading = true;\r\n if (Number(this.templateId)) {\r\n this.formMessageService.RegisterObservable(\r\n this.inspectionTemplateService.DeleteById(this.templateId), this.formName)\r\n .subscribe(() => {\r\n location.href = \"#/proteansystem/systems/inspection-template/0?isDeleted=true\";\r\n localStorage.removeItem(\"inspection-template-0\");\r\n this.templateId = 0;\r\n this.Inspection = this.cloneObject(this.emptyTemplate);\r\n this.internalModel = this.cloneObject(this.emptyTemplate);\r\n this.isLoading = false;\r\n }).add(() => this.isLoading = false); //TODO: handle errors\r\n } else {\r\n localStorage.removeItem(this.storageKey);\r\n this.Inspection = this.cloneObject(this.emptyTemplate);\r\n this.futureStack.length = 0;\r\n this.historyStack.length = 0;\r\n this.internalModel = this.cloneObject(this.Inspection);\r\n this.isLoading = false;\r\n }\r\n }\r\n\r\n Clone() {\r\n this.isLoading = true;\r\n this.inspectionTemplateService.CloneTemplate(this.templateId)\r\n .then((cloneId: number) => {\r\n // Go to clone\r\n location.replace(`#/proteansystem/systems/inspection-template/${cloneId}`);\r\n }).finally(() => this.isLoading = false);\r\n }\r\n\r\n Preview() {\r\n this.router.navigate([`/inspections/report/0/${this.Inspection.Id}`]);\r\n }\r\n\r\n IsCurrentEditable(sectionId: number, questionId: number) {\r\n return this.currentEditable.sectionId === sectionId || this.currentEditable.questionId === questionId;\r\n }\r\n\r\n FocusIn(sectionId: number, questionId: number) {\r\n this.currentEditable = {\r\n sectionId,\r\n questionId\r\n };\r\n }\r\n\r\n FocusOut(item) { //TODO: type\r\n this.focusOutTimeout[item.Id] = setTimeout(() => {\r\n item.hasFocus = false;\r\n }, 50);\r\n }\r\n\r\n AddCategory(currentCategory: InspectionCategory) {\r\n const index = this.Inspection.Categories.indexOf(currentCategory);\r\n this.Inspection.Categories.splice(index + 1, 0, this.emptyCategory());\r\n this.modelChanged();\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n DeleteCategory(category: InspectionCategory) {\r\n const index = this.Inspection.Categories.indexOf(category);\r\n this.Inspection.Categories.splice(index, 1);\r\n if (this.Inspection.Categories.length === 0) {\r\n this.Inspection.Categories.push(this.emptyCategory());\r\n }\r\n this.modelChanged();\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n AddItem(category: InspectionCategory) {\r\n category.Items.push(this.emptyItem());\r\n this.modelChanged();\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n DuplicateItem(category: InspectionCategory, item: InspectionItem) {\r\n const duplicate = this.cloneObject(item);\r\n duplicate.Id = this.newItemId();\r\n duplicate.Options.forEach((o) => o.Id = this.newOptionId());\r\n category.Items.push(duplicate);\r\n setTimeout(() => this.modelChanged(), 0);\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n DeleteItem(category: InspectionCategory, item: InspectionItem) {\r\n const index = category.Items.indexOf(item);\r\n category.Items.splice(index, 1);\r\n if (category.Items.length === 0) {\r\n category.Items.push(this.emptyItem());\r\n }\r\n setTimeout(() => this.modelChanged(), 0);\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n BulkItems(category: InspectionCategory) {\r\n this.bulkInsert = new BulkOptions();\r\n this.bulkInsert.show = true;\r\n this.bulkInsert.title = \"inspections.template.bulkitem.title\";\r\n this.bulkInsert.description = \"inspections.template.bulkitem.description\";\r\n this.bulkInsert.text = \"\";\r\n this.bulkInsert.example = \"inspections.template.bulkitem.example\";\r\n this.bulkInsert.addMessages = {\r\n \"=1\": \"inspections.template.bulk.addsingle\",\r\n // eslint-disable-next-line quote-props\r\n \"other\": \"inspections.template.bulk.addmulti\"\r\n };\r\n this.bulkInsert.totalNumber = 0;\r\n this.bulkInsert.create = (match: RegExpExecArray): InspectionItem => {\r\n const item = this.emptyItem();\r\n item.Text = match[1].trim();\r\n item.Text = item.Text.substring(0, item.Text.length > 255 ? 255 : item.Text.length);\r\n const optionTexts = match[2].trim().split(/[\\r\\n]/g);\r\n item.Options = optionTexts.map((t) => {\r\n let text = t.trim();\r\n if (text.indexOf(\"-\") === 0) {\r\n text = text.substring(1).trim();\r\n }\r\n text = text.substring(0, text.length > 50 ? 50 : text.length);\r\n\r\n return this.emptyOption(text);\r\n });\r\n return item;\r\n };\r\n this.bulkInsert.splitAndAdd = () => {\r\n this.bulkInsert.show = false;\r\n const matches = this.matchAll(/(^[^-].*)([^]*?)([\\r\\n]{2,}|$(?![^]))/gm, this.bulkInsert.text);\r\n this.bulkInsert.add(category.Items, matches);\r\n this.modelChanged();\r\n this.form.form.markAsDirty();\r\n };\r\n this.bulkInsert.updatePreview = () => {\r\n this.bulkInsert.preview.length = 0;\r\n const matches = this.matchAll(/(^[^-].*)([^]*?)([\\r\\n]{2,}|$(?![^]))/gm, this.bulkInsert.text);\r\n this.bulkInsert.add(this.bulkInsert.preview, matches);\r\n this.bulkInsert.totalNumber = this.bulkInsert.preview.length;\r\n };\r\n }\r\n\r\n AddOption(item: InspectionItem) {\r\n item.Options.push(this.emptyOption());\r\n this.modelChanged();\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n DeleteOption(item: InspectionItem, answer) {\r\n const index = item.Options.indexOf(answer);\r\n item.Options.splice(index, 1);\r\n this.modelChanged();\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n SetNoteType(result: InspectionOption, noteType: NoteType) {\r\n result.NoteType = noteType;\r\n this.modelChanged();\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n BulkOptions(item: InspectionItem) {\r\n this.bulkInsert = new BulkOptions();\r\n this.bulkInsert.show = true;\r\n this.bulkInsert.title = \"inspections.template.bulkoption.title\";\r\n this.bulkInsert.description = \"inspections.template.bulkoption.description\";\r\n this.bulkInsert.example = \"inspections.template.bulkoption.example\";\r\n this.bulkInsert.text = \"\";\r\n const itemCopy = this.cloneObject(item);\r\n itemCopy.Options.length = 0;\r\n this.bulkInsert.preview.push(itemCopy);\r\n this.bulkInsert.addMessages = {\r\n \"=1\": \"inspections.template.bulk.results.addsingle\",\r\n // eslint-disable-next-line quote-props\r\n \"other\": \"inspections.template.bulk.results.addmulti\"\r\n };\r\n this.bulkInsert.totalNumber = 0;\r\n this.bulkInsert.create = (match: RegExpExecArray): InspectionOption => {\r\n const option = this.emptyOption();\r\n option.Text = match[0].trim();\r\n return option;\r\n };\r\n\r\n this.bulkInsert.splitAndAdd = () => {\r\n this.bulkInsert.show = false;\r\n const matches = this.matchAll(/[^\\r\\n]+/g, this.bulkInsert.text);\r\n this.bulkInsert.add(item.Options, matches);\r\n this.modelChanged();\r\n this.form.form.markAsDirty();\r\n };\r\n this.bulkInsert.updatePreview = () => {\r\n this.bulkInsert.preview[0].Options.length = 0;\r\n const matches = this.matchAll(/[^\\r\\n]+/g, this.bulkInsert.text);\r\n this.bulkInsert.add(this.bulkInsert.preview[0].Options, matches);\r\n this.bulkInsert.totalNumber = this.bulkInsert.preview[0].Options.length;\r\n };\r\n }\r\n\r\n\r\n dropOption(event: CdkDragDrop, item: InspectionItem) {\r\n moveItemInArray(item.Options, event.previousIndex, event.currentIndex);\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n dropCategory(event: CdkDragDrop) {\r\n moveItemInArray(this.Inspection.Categories, event.previousIndex, event.currentIndex);\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n dropItem(event: CdkDragDrop, category: InspectionCategory) {\r\n moveItemInArray(category.Items, event.previousIndex, event.currentIndex);\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n Collapse() {\r\n const len = this.Inspection.Categories.length;\r\n const target = !this.allCollapsed;\r\n for (let i = 0; i < len; i++) {\r\n this.Inspection.Categories[i].IsCollapsed = target;\r\n }\r\n }\r\n\r\n categoryDragHandle() {\r\n this.collapseItems = true;\r\n }\r\n categoryDragHandleUp() {\r\n this.collapseItems = false;\r\n }\r\n categoryDragEnded() {\r\n this.collapseItems = false;\r\n }\r\n\r\n public optionTextChanged(item, option) {\r\n if (item.Options.filter(o => o.Text === item.DefaultAnswer).length >= 1 && item.DefaultAnswer !== option.Text) {\r\n option.removeDefault = true;\r\n }\r\n }\r\n\r\n private cloneObject(obj: any): T {\r\n return JSON.parse(JSON.stringify(obj));\r\n }\r\n\r\n private emptyCategory(): InspectionCategory {\r\n return {\r\n Id: 0,\r\n lId: this.newCatId(),\r\n Name: \"\",\r\n Items: [this.emptyItem()],\r\n IsCollapsed: false\r\n };\r\n }\r\n\r\n private emptyItem(): InspectionItem {\r\n return {\r\n Id: 0,\r\n lId: this.newItemId(),\r\n Text: \"\",\r\n Mandatory: false,\r\n DefaultAnswer: null,\r\n Options: [this.emptyOption()]\r\n };\r\n }\r\n\r\n private emptyOption(text: string = \"\"): InspectionOption {\r\n return {\r\n Id: 0,\r\n lId: this.newOptionId(),\r\n Text: text,\r\n Fail: false,\r\n NotesRequired: false,\r\n PhotoRequired: false,\r\n NoteType: NoteType.Text,\r\n isDeleted: false\r\n };\r\n }\r\n\r\n private matchAll(regex: RegExp, text: string): Array {\r\n let match: RegExpExecArray;\r\n const matches: Array = [];\r\n // eslint-disable-next-line no-cond-assign\r\n while ((match = regex.exec(text)) !== null) {\r\n matches.push(match);\r\n }\r\n return matches;\r\n }\r\n\r\n private newCatId(): number {\r\n return this.newId(0, 10000);\r\n }\r\n\r\n private newItemId(): number {\r\n return this.newId(10001, 20000);\r\n }\r\n\r\n private newOptionId(): number {\r\n return this.newId(20001, 30000);\r\n }\r\n\r\n private newId(min: number, max: number): number {\r\n const rnd = Math.random() * (max - min);\r\n return Math.round(rnd + min);\r\n }\r\n\r\n private duplicatedItemsValidation(inspections: InsepectionTemplate) {\r\n const categoryNames: Array = [];\r\n const resultsArray: Array> = [];\r\n const inputKeys = Object.keys(this.form.form.controls);\r\n const templateItems: Array = [];\r\n\r\n this.clearValidationHighlight(inputKeys);\r\n inspections.Categories.forEach((category) => {\r\n categoryNames.push(category.Name.toLowerCase());\r\n category.Items.forEach((item) => {\r\n const resultNames: Array = [];\r\n templateItems.push(item);\r\n item.Options.forEach(option => {\r\n if (!option.isDeleted) {\r\n resultNames.push(option.Text.toLowerCase());\r\n }\r\n });\r\n const duplicatedResults = this.findDuplicates(resultNames);\r\n resultsArray.push(duplicatedResults);\r\n });\r\n });\r\n const duplicatedCategories = this.findDuplicates(categoryNames);\r\n\r\n this.markCategoriesAsInvalid(duplicatedCategories, inputKeys);\r\n this.markResultsAsInvalid(resultsArray, templateItems);\r\n }\r\n\r\n private markCategoriesAsInvalid(categories: Set, inputKeys: Array) {\r\n const formControls = this.form.form.controls;\r\n categories.forEach((item) => {\r\n const categoryKeys = inputKeys.filter((key) => {\r\n if (key.includes(\"category\")) {\r\n return key;\r\n }\r\n });\r\n categoryKeys.forEach((key) => {\r\n if (formControls[key].value.toLowerCase() === item) {\r\n formControls[key].setErrors({ duplicatedCategories: true});\r\n formControls[key].markAsDirty();\r\n }\r\n });\r\n });\r\n }\r\n\r\n private markResultsAsInvalid(results: Array>, templateItems: Array) {\r\n const formControls = this.form.form.controls;\r\n results.forEach((result, index) => {\r\n if (result.size) {\r\n result.forEach((value) => {\r\n templateItems[index].Options.forEach((option) => {\r\n if (option.Text.toLowerCase() === value && !option.isDeleted) {\r\n formControls[`result-${option.Id ? option.Id : option.lId}`].setErrors({ duplicatedResults: true});\r\n formControls[`result-${option.Id ? option.Id : option.lId}`].markAsDirty();\r\n }\r\n });\r\n });\r\n }\r\n });\r\n }\r\n\r\n private clearValidationHighlight(inputKeys: Array) {\r\n const formControls = this.form.form.controls;\r\n inputKeys.forEach((key) => {\r\n if (formControls[key].value) {\r\n formControls[key].setErrors(null);\r\n }\r\n });\r\n }\r\n\r\n private findDuplicates(items: Array) {\r\n const duplicates = new Set();\r\n items.sort().forEach((item, index) => {\r\n if (item === items[++index]) {\r\n duplicates.add(item);\r\n }\r\n });\r\n return duplicates;\r\n }\r\n}\r\n\r\n","
\r\n\t

{{ 'accounts-communicator.sage50.invaild-accouts.title' | translate }}

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

{{ 'accounts-communicator.sage50.invaild-accouts.message' | translate }}

\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n
\r\n {{ (data.value ? 'label.customer' : 'label.supplier') | translate }}\r\n
\r\n\r\n \r\n\r\n
\r\n \r\n {{ data.data.Status | customerStatus: 'text' | translate }}\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n
","import { EventEmitter, Input, Output, ViewChild } from \"@angular/core\";\r\nimport { Component, OnInit } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport { InvalidAccount } from \"../accounts-communicator-setup/invalid-account.model\";\r\n\r\n@Component({\r\n selector: \"app-invalid-accounts\",\r\n templateUrl: \"./invalid-accounts.component.html\",\r\n styleUrls: [\r\n \"./invalid-accounts.component.scss\",\r\n \"../../../../projects/servicesight-shared/src/lib/styles/servicesight-shared.scss\"\r\n ]\r\n})\r\nexport class InvalidAccountsComponent implements OnInit {\r\n\r\n @ViewChild(\"grid\") private dataGrid: DxDataGridComponent;\r\n\r\n @Input() public invalidaccounts: InvalidAccount[] = [];\r\n\r\n @Output() public close = new EventEmitter();\r\n\r\n public searchText: string = \"\";\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.dataGrid.instance.searchByText(this.searchText);\r\n }\r\n\r\n public CloseInvalidAccounts(): void {\r\n this.close.emit();\r\n }\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { IServiceSightCollection } from \"../../../quotes/models/IServiceSightCollection\";\r\nimport { Observable } from \"rxjs/internal/Observable\";\r\nimport { ActivityTypeItemModel } from \"../models/activity-type-item.model\";\r\nimport { IAppConfig, APP_CONFIG, IProteanResponse } from \"servicesight-shared\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class ActivityTypesService {\r\n private readonly baseUrl = this.appConfig.apiLocations.ServiceSight;\r\n private readonly activityTypesUrl = this.baseUrl + \"ActivityType/\";\r\n\r\n constructor(private http: HttpClient, @Inject(APP_CONFIG) private appConfig: IAppConfig) { }\r\n\r\n public GetActivityTypesList(): Observable> {\r\n return this.http.get>(this.activityTypesUrl + \"GetAllAsync\");\r\n }\r\n\r\n public GetActivityTypeItem(entityId: number): Observable {\r\n return this.http.get(`${this.activityTypesUrl}GetAsync?entityid=${entityId}`);\r\n }\r\n\r\n public IsOnPlanner(entityId: number): Observable {\r\n return this.http.get(`${this.activityTypesUrl}IsOnPlanner?activityTypeId=${entityId}`);\r\n }\r\n\r\n public IsOnJob(entityId: number): Observable {\r\n return this.http.get(`${this.activityTypesUrl}IsOnJob?activityTypeId=${entityId}`);\r\n }\r\n\r\n public DeleteItem(entityId: number): Observable {\r\n return this.http.post(`${this.activityTypesUrl}DeleteAsync?entityid=${entityId}`, entityId);\r\n }\r\n\r\n public UpdateItem(model: ActivityTypeItemModel): Observable {\r\n return this.http.post(`${this.activityTypesUrl}UpdateAsync`, model);\r\n }\r\n}\r\n","export class ActivityTypeItemModel {\r\n ActivityName: string;\r\n ActivityTypeID: number;\r\n BackColorWeb: string;\r\n BackColour: number;\r\n IsAllowedAdd: boolean;\r\n IsAllowedDelete: boolean;\r\n IsAllowedEdit: boolean;\r\n IsAllowedView: boolean;\r\n OutOfOffice: boolean = false;\r\n Paid: boolean = false;\r\n WorkRelated: boolean = false;\r\n Planner: boolean = true;\r\n Job: boolean = false;\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n \r\n {{ 'settings.activity.new-activity-type' | translate }}\r\n \r\n \r\n {{ 'settings.activity.activity-type'| translate }}\r\n {{ ActivityTypeItemData.ActivityName }}\r\n \r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n\r\n
\r\n \r\n \r\n\r\n
{{ 'settings.activity.planner-board-colour' | translate }}
\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n
{{ 'settings.activity.work-related' | translate }}
\r\n
\r\n\r\n
\r\n \r\n
{{ 'settings.activity.paid' | translate }}
\r\n
\r\n\r\n
\r\n \r\n
{{ 'settings.activity.out-of-office' | translate }}
\r\n
\r\n\r\n
\r\n
\r\n

{{ 'settings.activity.available-in' | translate }}\r\n

\r\n
\r\n\r\n
\r\n \r\n
{{ 'settings.activity.planner' | translate }}
\r\n
\r\n\r\n
\r\n \r\n
{{ 'settings.activity.jobs' | translate }}
\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n {{ 'buttons.delete' | translate }}\r\n \r\n \r\n {{ 'buttons.cancel' | translate }}\r\n \r\n \r\n {{ 'buttons.save' | translate }}\r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import { Component, Input, ViewChild, OnChanges, OnInit } from \"@angular/core\";\r\nimport { Location } from \"@angular/common\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { ActivityTypesService } from \"../services/activity-types.service\";\r\nimport { ActivityTypeItemModel } from \"../models/activity-type-item.model\";\r\nimport { FormMesssageService, Module, ModuleService } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-activity-types-detail\",\r\n templateUrl: \"./activity-types-detail.component.html\",\r\n styleUrls: [\"./activity-types-detail.component.scss\"]\r\n})\r\nexport class ActivityTypesDetailComponent implements OnChanges, OnInit {\r\n @Input() activityTypeId: number = null;\r\n @Input() isNewlyCreated: boolean;\r\n @ViewChild(\"activityTypeForm\", { static: true }) form: NgForm;\r\n\r\n public readonly FormName: string = \"activityTypeForm\";\r\n public get isNew(): boolean {\r\n return this.activityTypeId == null;\r\n }\r\n public get isActivityTypeInUse(): boolean {\r\n return this.IsOnJob || this.IsOnPlanner;\r\n }\r\n public ActivityTypeItemData: ActivityTypeItemModel = new ActivityTypeItemModel();\r\n public ShowDeleteWarning: boolean = false;\r\n public ShowDiscardWarning: boolean = false;\r\n private activityTypeListPath: string = \"/proteansystem/systems/activitytype/list\";\r\n public isProEnabled = false;\r\n public IsOnPlanner: boolean = false;\r\n public IsOnJob: boolean = false;\r\n\r\n constructor(\r\n private activityTypesService: ActivityTypesService,\r\n private formMessageService: FormMesssageService,\r\n private location: Location,\r\n private moduleService: ModuleService) { }\r\n\r\n public ngOnInit(): void {\r\n this.moduleService.GetEnabledModules().subscribe(o => {\r\n this.isProEnabled = o.includes(Module.Pro);\r\n });\r\n }\r\n\r\n public ngOnChanges(): void {\r\n this.loadActivityTypeData();\r\n }\r\n\r\n public OnDeleteActivityType(): void {\r\n this.ShowDeleteWarning = true;\r\n }\r\n\r\n public OnCancelActivityType(): void {\r\n if (this.form.dirty) {\r\n this.ShowDiscardWarning = true;\r\n }\r\n }\r\n\r\n public OnSaveActivityType(): void {\r\n this.formMessageService.RegisterObservable(this.activityTypesService.UpdateItem(this.ActivityTypeItemData), this.FormName)\r\n .subscribe(x => {\r\n if (this.isNew) {\r\n this.location.go(`/proteansystem/systems/activity/detail/${x.EntityId}?isNewlyCreated=true`);\r\n }\r\n });\r\n }\r\n\r\n public OnConfirmDeletion($event: boolean): void {\r\n if ($event && this.activityTypeId) {\r\n this.formMessageService.RegisterObservable(this.activityTypesService.DeleteItem(this.activityTypeId), this.FormName)\r\n .subscribe(() => {\r\n this.location.go(this.activityTypeListPath);\r\n });\r\n }\r\n this.ShowDeleteWarning = false;\r\n }\r\n\r\n public OnConfirmDiscard($event: boolean): void {\r\n if ($event) {\r\n this.location.go(this.activityTypeListPath);\r\n }\r\n this.ShowDiscardWarning = false;\r\n }\r\n\r\n public MarkFormAsDirty(): void {\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n private loadActivityTypeData(): void {\r\n if (this.activityTypeId) {\r\n this.activityTypesService.GetActivityTypeItem(this.activityTypeId).subscribe(x => this.ActivityTypeItemData = x);\r\n this.activityTypesService.IsOnPlanner(this.activityTypeId).subscribe(x => this.IsOnPlanner = x);\r\n this.activityTypesService.IsOnJob(this.activityTypeId).subscribe(x => this.IsOnJob = x);\r\n } else {\r\n this.setDefaultValues();\r\n }\r\n }\r\n\r\n private setDefaultValues(): void {\r\n this.ActivityTypeItemData.WorkRelated = true;\r\n this.ActivityTypeItemData.Planner = true;\r\n this.ActivityTypeItemData.BackColorWeb = \"#C0FFFF\";\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'settings.activity.activity-types' | translate }}\r\n
{{ 'settings.activity.subheading' | translate }}
\r\n

\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n
\r\n \r\n -\r\n
\r\n\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular/ui/data-grid\";\r\nimport { HelpItemTagEnum } from \"servicesight-shared\";\r\nimport { ActivityTypeItemModel } from \"../models/activity-type-item.model\";\r\nimport { ActivityTypesService } from \"../services/activity-types.service\";\r\n\r\n@Component({\r\n selector: \"app-activity-types-list\",\r\n templateUrl: \"./activity-types-list.component.html\",\r\n styleUrls: [\"./activity-types-list.component.scss\"]\r\n})\r\nexport class ActivityTypesListComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n public SearchText: string = \"\";\r\n public ActivityTypesListData: ActivityTypeItemModel[];\r\n public helpItemsTags: HelpItemTagEnum[] = [ HelpItemTagEnum.ActivityType ];\r\n\r\n constructor(\r\n private activityTypesService: ActivityTypesService) {\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.activityTypesService.GetActivityTypesList().subscribe(x => this.ActivityTypesListData = x.ModelCollection);\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n}\r\n","import { IJobMisc } from \"src/app/quotes/models/IJobMisc\";\r\nimport { ICheckBoxModel } from \"src/app/shared/models/icheck-box.model\";\r\nimport { ISelectOption } from \"src/app/shared/models/iselect-option.model\";\r\nimport { DepartmentCodeModel } from \"./department-code.model\";\r\nimport { JobTypeTabsModel } from \"./job-type-tabs.model\";\r\nimport { NominalCodeModel } from \"./nominal-code.model\";\r\n\r\nexport class JobTypeDetailModel {\r\n JobTypeId: number;\r\n Name: string;\r\n Description: string;\r\n AllocateEngineer: boolean;\r\n JobCats: ISelectOption[];\r\n CategoryID: number;\r\n GroupID: number;\r\n JobGroups: ISelectOption[];\r\n InvEquipCategory: boolean;\r\n InvSummariseParts: boolean;\r\n InvEquipGroup: boolean;\r\n InvEquipList: boolean;\r\n CreatesInvoice: boolean;\r\n hasBeenUsedOnJobs: boolean;\r\n UpdatesEquipValue: boolean;\r\n InvShowHeaderText: boolean;\r\n InvSessionSummary: boolean;\r\n InvShowSessionText: boolean;\r\n InvCombineLabourRates: boolean;\r\n InvSummariseLabour: boolean;\r\n InvCombineTravel: boolean;\r\n IncludeLabourInTaxCalculations: boolean;\r\n RechargeLabour: boolean;\r\n ChargeLabour: boolean;\r\n ChargeMileage: boolean;\r\n ChargeTravel: boolean;\r\n ChargeParts: boolean;\r\n ChargeMisc: boolean;\r\n StockExclusions: ICheckBoxModel[];\r\n MiscExclusions: ICheckBoxModel[];\r\n Templates: any[];\r\n Materials: IJobMisc[];\r\n LabourChargeCreditAccount: string;\r\n NominalAccountCodes: NominalCodeModel[];\r\n NominalDeptCodes: DepartmentCodeModel[];\r\n LabourChargeCreditDepartment: string;\r\n NominalExpenseAccountCodes: NominalCodeModel[];\r\n LabourCostDebitAccount: string;\r\n LabourCostDebitDepartment: string;\r\n PartsChargeCreditAccount: string;\r\n PartsCostCreditDepartment: string;\r\n PartsCostDebitAccount: string;\r\n PartsCostDebitDepartment: string;\r\n Tabs: JobTypeTabsModel[];\r\n}\r\n","import {Injectable } from \"@angular/core\";\r\nimport { BehaviorSubject } from \"rxjs\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class JobTypesDetailService {\r\n public createInvoice$ = new BehaviorSubject(false);\r\n\r\n public CreateInvoiceChanged(value: boolean): void {\r\n this.createInvoice$.next(value);\r\n }\r\n}\r\n","import { InspectionTemplate } from \"src/app/shared/models/inspection-template.model\";\r\n\r\nexport class JobTypeTemplateItem extends InspectionTemplate {\r\n IsIncluded: boolean;\r\n InspectionPerVisit: boolean;\r\n}\r\n","
\r\n \r\n \r\n
\r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n {{ data.value | inspectionType | translate }}\r\n
\r\n \r\n
\r\n\r\n\r\n\r\n","import { ViewChild } from \"@angular/core\";\r\nimport {\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n Output\r\n} from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport { InspectionTemplateService } from \"src/app/settings/services/inspection-template.service\";\r\nimport { InspectionTemplate } from \"src/app/shared/models/inspection-template.model\";\r\nimport { JobTypeTemplateItem } from \"../models/jobtype-template-item\";\r\n\r\n@Component({\r\n selector: \"app-jobtype-inspections-list\",\r\n templateUrl: \"./jobtype-inspections-list.component.html\",\r\n styleUrls: [\"./jobtype-inspections-list.component.scss\"]\r\n})\r\n\r\nexport class JobtypeInspectionsListComponent implements OnChanges {\r\n @ViewChild(\"grid\", { static: true }) dataGrid: DxDataGridComponent;\r\n\r\n @Input() jobtypeid: number;\r\n @Output() templateslist: EventEmitter = new EventEmitter();\r\n\r\n public templates: JobTypeTemplateItem[] = [];\r\n public addableTemplates: InspectionTemplate[] = [];\r\n public selectedTemplateIds: number[] = [];\r\n public showTemplateDialog: boolean = false;\r\n public perVisitOptions: { Value: boolean; Text: string }[] = [\r\n { Value: false, Text: \"job-type.inspections.inspection-per-visit.job\" },\r\n { Value: true, Text: \"job-type.inspections.inspection-per-visit.visit\" }\r\n ];\r\n\r\n constructor(\r\n private templateService: InspectionTemplateService,\r\n private translate: TranslateService) {\r\n this.SelectBoxTextExpression = this.SelectBoxTextExpression.bind(this);\r\n this.GridUpdated = this.GridUpdated.bind(this);\r\n }\r\n\r\n public ngOnChanges(): void {\r\n if (this.jobtypeid !== undefined) {\r\n this.templateService\r\n .GetAllByJobTypeId(this.jobtypeid)\r\n .subscribe(t => {\r\n this.templates = t.filter(x => x.IsIncluded);\r\n this.addableTemplates = t.filter(x => !x.IsIncluded);\r\n this.dataGrid.instance.refresh();\r\n });\r\n }\r\n }\r\n\r\n public GridUpdated(): void {\r\n this.EmitData();\r\n }\r\n\r\n public SelectBoxTextExpression(data: any): string {\r\n return this.translate.instant(data.Text);\r\n }\r\n\r\n public ShowAddTemplateDialog(): void {\r\n this.showTemplateDialog = true;\r\n }\r\n\r\n public AddInspecitons(selectedTemplateIds: number[]): void {\r\n const templates = this.addableTemplates.filter(x => selectedTemplateIds.includes(x.Id));\r\n this.addableTemplates = this.addableTemplates.filter(x => !selectedTemplateIds.includes(x.Id));\r\n this.templates.push(...templates.map(x => {\r\n const item = new JobTypeTemplateItem();\r\n item.Id = x.Id;\r\n item.Name = x.Name;\r\n item.Type = x.Type;\r\n item.InspectionPerVisit = false;\r\n item.IsIncluded = true;\r\n return item;\r\n }));\r\n\r\n this.EmitData();\r\n }\r\n\r\n public RemoveSelected(): void {\r\n const templatesToRemove = this.templates.filter(x => this.selectedTemplateIds.includes(x.Id));\r\n this.templates = this.templates.filter(x => !this.selectedTemplateIds.includes(x.Id));\r\n this.addableTemplates = this.addableTemplates.concat(templatesToRemove.map(x => {\r\n const item = new InspectionTemplate();\r\n item.Id = x.Id;\r\n item.Name = x.Name;\r\n item.Type = x.Type;\r\n return item;\r\n }));\r\n\r\n this.EmitData();\r\n }\r\n\r\n private EmitData(): void {\r\n this.templateslist.emit(this.templates.concat(this.addableTemplates.map(x => {\r\n const item = new JobTypeTemplateItem();\r\n item.Id = x.Id;\r\n item.Name = x.Name;\r\n item.Type = x.Type;\r\n item.InspectionPerVisit = false;\r\n item.IsIncluded = false;\r\n return item;\r\n })));\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n","import { Component, Input, OnInit } from \"@angular/core\";\r\nimport { ControlContainer, NgForm } from \"@angular/forms\";\r\nimport { AccountingService } from \"servicesight-shared\";\r\nimport { JobTypeDetailModel } from \"../../models/job-type-detail.model\";\r\nimport { JobTypesDetailService } from \"../job-types-detail.service\";\r\n\r\n@Component({\r\n selector: \"app-job-types-detail-general\",\r\n templateUrl: \"./job-types-detail-general.component.html\",\r\n styleUrls: [\"./job-types-detail-general.component.scss\"],\r\n viewProviders: [{ provide: ControlContainer, useExisting: NgForm }]\r\n})\r\nexport class JobTypesDetailGeneralComponent implements OnInit {\r\n @Input() public model: JobTypeDetailModel;\r\n @Input() public isProEnabled: boolean;\r\n\r\n public isUSTax: boolean = false;\r\n\r\n constructor(\r\n private jobTypeDetailService: JobTypesDetailService,\r\n private accountingService: AccountingService) { }\r\n\r\n ngOnInit(): void {\r\n this.accountingService.IsUsaTaxSystem().subscribe(result => {\r\n this.isUSTax = result;\r\n });\r\n }\r\n\r\n public InvEquipCategoryOutChanged(value: boolean): void {\r\n this.model.InvEquipCategory = value;\r\n }\r\n\r\n public InvEquipGroupOutChanged(value: boolean): void {\r\n this.model.InvEquipGroup = value;\r\n }\r\n\r\n public InvEquipListOutChanged(value: boolean): void {\r\n this.model.InvEquipList = value;\r\n }\r\n\r\n public InvSummarisePartsOutChanged(value: boolean): void {\r\n this.model.InvSummariseParts = value;\r\n }\r\n\r\n public CreateInvoiceChecked(): void {\r\n this.jobTypeDetailService.CreateInvoiceChanged(this.model.CreatesInvoice);\r\n if (!this.model.CreatesInvoice) {\r\n this.model.InvShowHeaderText = false;\r\n this.model.InvSessionSummary = false;\r\n this.model.InvShowSessionText = false;\r\n this.model.InvCombineLabourRates = false;\r\n this.model.IncludeLabourInTaxCalculations = false;\r\n } else {\r\n this.model.IncludeLabourInTaxCalculations = true;\r\n }\r\n }\r\n\r\n public ShowCombinedLabourChanged(): void {\r\n this.model.InvCombineTravel = this.model.InvCombineLabourRates && this.model.CreatesInvoice;\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n {{stock.Description}}\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n {{misc.Description}}\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { Component, Input, OnInit } from \"@angular/core\";\r\nimport { ControlContainer, NgForm } from \"@angular/forms\";\r\nimport { JobTypeDetailModel } from \"../../models/job-type-detail.model\";\r\nimport { JobTypesDetailService } from \"../job-types-detail.service\";\r\n\r\n@Component({\r\n selector: \"app-job-types-detail-charges\",\r\n templateUrl: \"./job-types-detail-charges.component.html\",\r\n styleUrls: [\"./job-types-detail-charges.component.scss\"],\r\n viewProviders: [{ provide: ControlContainer, useExisting: NgForm }]\r\n})\r\nexport class JobTypesDetailChargesComponent implements OnInit {\r\n @Input() public model: JobTypeDetailModel;\r\n @Input() public isStockEnabled: boolean;\r\n\r\n constructor(private jobTypeDetailService: JobTypesDetailService)\r\n { }\r\n\r\n ngOnInit(): void {\r\n this.jobTypeDetailService.createInvoice$.subscribe(createInvoice => {\r\n this.setCheckboxValues(createInvoice);\r\n });\r\n }\r\n\r\n private setCheckboxValues(createInvoice: boolean) {\r\n this.model.ChargeTravel = createInvoice;\r\n this.model.ChargeMileage = createInvoice;\r\n this.model.ChargeLabour = createInvoice;\r\n this.model.ChargeMisc = createInvoice;\r\n this.model.ChargeParts = createInvoice;\r\n }\r\n\r\n}\r\n","
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ 'settings.job-types.detail.nominal-codes' | translate}}{{ 'settings.job-types.detail.charge' | translate}}{{ 'settings.job-types.detail.cost' | translate}}
{{ 'settings.job-types.detail.account' | translate}}{{ 'settings.job-types.detail.dept' | translate}}{{ 'settings.job-types.detail.account' | translate}}{{ 'settings.job-types.detail.dept' | translate}}
{{ 'settings.job-types.detail.labour' | translate}}\r\n \r\n
\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
{{ 'settings.job-types.detail.parts' | translate}}\r\n \r\n
\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n","import { Component, EventEmitter, Input, Output } from \"@angular/core\";\r\nimport { JobTypeDetailModel } from \"../../models/job-type-detail.model\";\r\n\r\n@Component({\r\n selector: \"app-job-types-detail-nominal-account\",\r\n templateUrl: \"./job-types-detail-nominal-account.component.html\",\r\n styleUrls: [\"./job-types-detail-nominal-account.component.scss\"]\r\n})\r\nexport class JobTypesDetailNominalAccountComponent {\r\n @Input() public model: JobTypeDetailModel;\r\n @Input() public isStockEnabled: boolean;\r\n @Input() public costingsEnabled: boolean;\r\n @Output() public nominalAccountValueChanged: EventEmitter = new EventEmitter();\r\n\r\n public isLabourNominalAccountDropDownBoxOpened: boolean = false;\r\n public isPartsNominalAccountDropDownBoxOpened: boolean = false;\r\n public isPartsNominalExpenseAccountDropDownBoxOpened: boolean = false;\r\n public isLabourNominalExpenseAccountDropDownBoxOpened: boolean = false;\r\n constructor()\r\n { }\r\n\r\n public onLabourAccountSelected(args: any): void {\r\n if (this.isLabourNominalAccountDropDownBoxOpened && args.selectedRowKeys.length === 1) {\r\n this.model.LabourChargeCreditAccount = args.selectedRowKeys[0];\r\n this.isLabourNominalAccountDropDownBoxOpened = false;\r\n this.nominalAccountValueChanged.emit();\r\n }\r\n }\r\n\r\n public onPartsAccountSelected(args: any): void {\r\n if (this.isPartsNominalAccountDropDownBoxOpened && args.selectedRowKeys.length === 1) {\r\n this.model.PartsChargeCreditAccount = args.selectedRowKeys[0];\r\n this.isPartsNominalAccountDropDownBoxOpened = false;\r\n this.nominalAccountValueChanged.emit();\r\n }\r\n }\r\n\r\n public onLabourExpenseAccountSelected(args: any): void {\r\n if (this.isLabourNominalExpenseAccountDropDownBoxOpened && args.selectedRowKeys.length === 1) {\r\n this.model.LabourCostDebitAccount = args.selectedRowKeys[0];\r\n this.isLabourNominalExpenseAccountDropDownBoxOpened = false;\r\n this.nominalAccountValueChanged.emit();\r\n }\r\n }\r\n\r\n public onPartsExpenseAccountSelected(args: any): void {\r\n if (this.isPartsNominalExpenseAccountDropDownBoxOpened && args.selectedRowKeys.length === 1) {\r\n this.model.PartsCostDebitAccount = args.selectedRowKeys[0];\r\n this.isPartsNominalExpenseAccountDropDownBoxOpened = false;\r\n this.nominalAccountValueChanged.emit();\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n \r\n {{ 'buttons.remove' | translate }}\r\n \r\n \r\n {{ 'settings.job-types.detail.add-material' | translate }}\r\n \r\n
\r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n
{{ data.value | currency: baseCurrencySymbol }}
\r\n \r\n
\r\n
\r\n\r\n\r\n\r\n","import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from \"@angular/core\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { IJobMisc } from \"src/app/quotes/models/IJobMisc\";\r\nimport { JobMiscDialogComponent } from \"src/app/shared/components/job-misc-dialog/job-misc-dialog.component\";\r\nimport { MaterialTypeService } from \"src/app/shared/services/material-type/material-type.service\";\r\nimport { JobTypesDetailService } from \"../job-types-detail.service\";\r\n\r\n@Component({\r\n selector: \"app-job-types-detail-materials\",\r\n templateUrl: \"./job-types-detail-materials.component.html\",\r\n styleUrls: [\"./job-types-detail-materials.component.scss\"]\r\n})\r\nexport class JobTypesDetailMaterialsComponent implements OnInit {\r\n @ViewChild(JobMiscDialogComponent, { static: true }) AddMaterialDialog: JobMiscDialogComponent;\r\n @Input() materials: IJobMisc[] = [];\r\n @Output() materialTypeList: EventEmitter = new EventEmitter();\r\n\r\n public selectedMateralIds: number[] = [];\r\n public materialTypeStore: ODataStore;\r\n public baseCurrencySymbol: string;\r\n public createInvoice: boolean;\r\n\r\n private newMaterialId: number = -1;\r\n\r\n public get RemoveDisabled(): boolean {\r\n return this.selectedMateralIds.length === 0;\r\n }\r\n\r\n constructor(\r\n private materialTypeService: MaterialTypeService,\r\n private jobTypesDetailService: JobTypesDetailService) {\r\n this.baseCurrencySymbol = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.materialTypeStore = this.materialTypeService.GetMaterialTypeStore();\r\n\r\n this.jobTypesDetailService.createInvoice$.subscribe(createInvoice => {\r\n this.createInvoice = createInvoice;\r\n this.UpdateMaterialsCharge();\r\n });\r\n }\r\n\r\n public RemoveSelected(): void {\r\n this.materials = this.materials.filter(x => !this.selectedMateralIds.includes(x.MiscID));\r\n this.EmitData();\r\n }\r\n\r\n public OpenMaterialAddDialogue(): void {\r\n this.AddMaterialDialog.Show(false);\r\n }\r\n\r\n public OpenMaterialDialogue(event, data): void {\r\n const material = data.data;\r\n event.preventDefault();\r\n const materialToUpdate: IJobMisc = {\r\n MiscID: material.MiscID,\r\n Charge: material.Charge,\r\n Cost: material.Cost,\r\n Description: material.Description,\r\n MiscTypeID: material.MiscTypeID,\r\n };\r\n\r\n this.AddMaterialDialog.ShowEdit(materialToUpdate, false);\r\n }\r\n\r\n public AddOrUpdateMisc(data: IJobMisc): void {\r\n const material = this.materials.find(m => m.MiscID === data.MiscID);\r\n\r\n if (material) {\r\n material.MiscTypeID = data.MiscTypeID;\r\n material.Description = data.Description;\r\n material.Cost = data.Cost;\r\n material.Charge = data.Charge;\r\n } else {\r\n this.materials.push({\r\n MiscID: this.newMaterialId--,\r\n MiscTypeID: data.MiscTypeID,\r\n Description: data.Description,\r\n Cost: data.Cost,\r\n Charge: data.Charge\r\n });\r\n }\r\n this.EmitData();\r\n }\r\n\r\n private EmitData(): void {\r\n this.materialTypeList.emit(this.materials);\r\n }\r\n\r\n private UpdateMaterialsCharge(): void {\r\n if (!this.createInvoice) {\r\n this.materials.forEach(material => {\r\n material.Charge = 0;\r\n });\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'job.sections.header' | translate }}\r\n
{{ 'job.sections.subheader' | translate }}
\r\n

\r\n
\r\n\r\n
\r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n
\r\n \r\n \r\n
\r\n\r\n \r\n
\r\n
","import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from \"@angular/core\";\r\nimport { JobTypeTabsModel } from \"../../models/job-type-tabs.model\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { Module, ModuleService, JobTabEnum } from \"servicesight-shared\";\r\nimport { ActivityTypesService } from \"../../services/activity-types.service\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\n\r\n@Component({\r\n selector: \"app-job-types-detail-sections\",\r\n templateUrl: \"./job-types-detail-sections.component.html\",\r\n styleUrls: [\"./job-types-detail-sections.component.scss\"]\r\n})\r\nexport class JobTypesDetailTabsComponent implements OnInit, OnChanges {\r\n @ViewChild(\"grid\", { static: true}) dataGrid: DxDataGridComponent;\r\n @Input() jobTypeTabs: JobTypeTabsModel[];\r\n @Input() createsInvoice: boolean;\r\n @Output() changed: EventEmitter = new EventEmitter();\r\n\r\n public dataSource: any[];\r\n\r\n private isProEnabled: boolean = false;\r\n private isEquipmentEnabled: boolean = false;\r\n private isfGasEnabled: boolean = false;\r\n private jobActivityTypeExists: boolean = false;\r\n\r\n constructor(\r\n private translateService: TranslateService,\r\n private moduleService: ModuleService,\r\n private activityTypesService: ActivityTypesService) {\r\n this.OnGridReordered = this.OnGridReordered.bind(this);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.moduleService.GetEnabledModules().subscribe(enabledModules => {\r\n this.isProEnabled = enabledModules.includes(Module.Pro);\r\n this.isEquipmentEnabled = enabledModules.includes(Module.Equipment);\r\n this.isfGasEnabled = enabledModules.includes(Module.FGas);\r\n });\r\n this.activityTypesService.GetActivityTypesList().subscribe(x => {\r\n const jobActivityTypes = x.ModelCollection.filter(activityType => activityType.Job);\r\n this.jobActivityTypeExists = jobActivityTypes.length > 0;\r\n });\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.jobTypeTabs && changes.jobTypeTabs.currentValue) {\r\n this.CreateDataSource();\r\n }\r\n if (changes.createsInvoice && this.dataSource){\r\n this.dataSource.find(x => x.JobTab === JobTabEnum.Invoicing).Enabled = this.createsInvoice;\r\n this.jobTypeTabs.find(x => x.JobTab === JobTabEnum.Invoicing).Enabled = this.createsInvoice;\r\n this.dataGrid.instance.refresh();\r\n }\r\n }\r\n\r\n public OnGridReordered(e: any) {\r\n const fromTabDataSource = this.dataSource.find((item) => item.Order === e.fromIndex);\r\n const toTabDataSource = this.dataSource.find((item) => item.Order === e.toIndex);\r\n\r\n //First swap the actual tabs (these might not be sequential indexes if some are hidden)\r\n const fromTab = this.jobTypeTabs.find(x => x.JobTab === fromTabDataSource.JobTab);\r\n const toTab = this.jobTypeTabs.find(x => x.JobTab === toTabDataSource.JobTab);\r\n const fromTabOrder = fromTab.Order;\r\n const toTabOrder = toTab.Order;\r\n fromTab.Order = toTabOrder;\r\n toTab.Order = fromTabOrder;\r\n\r\n //finally swap the visible rows\r\n fromTabDataSource.Order = e.toIndex;\r\n toTabDataSource.Order = e.fromIndex;\r\n\r\n e.component.refresh();\r\n this.EmitChanged();\r\n }\r\n\r\n public ChangeVisible(tab: any, e: any): void {\r\n const tabToChange = this.jobTypeTabs.find(x => x.JobTab === tab.JobTab);\r\n tabToChange.Enabled = e.value;\r\n this.EmitChanged();\r\n }\r\n\r\n public GetName(jobTabEnum: JobTabEnum): string {\r\n switch(jobTabEnum){\r\n case JobTabEnum.Detail:\r\n return this.translateService.instant(\"job.tab.details\");\r\n case JobTabEnum.Equipment:\r\n return this.translateService.instant(\"job.tab.equipment\");\r\n case JobTabEnum.Install:\r\n return this.translateService.instant(\"job.tab.install\");\r\n case JobTabEnum.Labour:\r\n return this.translateService.instant(\"job.tab.labour\");\r\n case JobTabEnum.Inspections:\r\n return this.translateService.instant(\"job.tab.inspections\");\r\n case JobTabEnum.Activities:\r\n return this.translateService.instant(\"job.tab.activities\");\r\n case JobTabEnum.Parts:\r\n return this.translateService.instant(\"job.tab.parts\");\r\n case JobTabEnum.Materials:\r\n return this.translateService.instant(\"job.tab.materials\");\r\n case JobTabEnum.Refrigeration:\r\n return this.translateService.instant(\"job.refrigerant.tab\");\r\n case JobTabEnum.Attributes:\r\n return this.translateService.instant(\"job.detail.attributes\");\r\n case JobTabEnum.Invoicing:\r\n return this.translateService.instant(\"job.tab.invoicing\");\r\n case JobTabEnum.Files:\r\n return this.translateService.instant(\"job.tab.files\");\r\n case JobTabEnum.Comments:\r\n return this.translateService.instant(\"job.tab.comments\");\r\n };\r\n }\r\n\r\n public GetDescription(jobTabEnum: JobTabEnum): string {\r\n switch(jobTabEnum){\r\n case JobTabEnum.Detail:\r\n return this.translateService.instant(\"job.tab.details.description\");\r\n case JobTabEnum.Equipment:\r\n return this.translateService.instant(\"job.tab.equipment.description\");\r\n case JobTabEnum.Install:\r\n return this.translateService.instant(\"job.tab.install.description\");\r\n case JobTabEnum.Labour:\r\n return this.translateService.instant(\"job.tab.labour.description\");\r\n case JobTabEnum.Inspections:\r\n return this.translateService.instant(\"job.tab.inspections.description\");\r\n case JobTabEnum.Activities:\r\n return this.translateService.instant(\"job.tab.activities.description\");\r\n case JobTabEnum.Parts:\r\n return this.translateService.instant(\"job.tab.parts.description\");\r\n case JobTabEnum.Materials:\r\n return this.translateService.instant(\"job.tab.materials.description\");\r\n case JobTabEnum.Refrigeration:\r\n return this.translateService.instant(\"job.tab.refrigerant.description\");\r\n case JobTabEnum.Attributes:\r\n return this.translateService.instant(\"job.tab.attributes.description\");\r\n case JobTabEnum.Invoicing:\r\n return this.translateService.instant(\"job.tab.invoicing.description\");\r\n case JobTabEnum.Files:\r\n return this.translateService.instant(\"job.tab.files.description\");\r\n case JobTabEnum.Comments:\r\n return this.translateService.instant(\"job.tab.comments.description\");\r\n };\r\n }\r\n\r\n private CreateDataSource(): void {\r\n if (this.jobTypeTabs) {\r\n let order = 0;\r\n this.dataSource = this.jobTypeTabs.sort((a, b) => a.Order - b.Order).filter(tab => this.ShowTab(tab.JobTab)).map(tab => {\r\n return {\r\n JobTab: tab.JobTab,\r\n Name: this.GetName(tab.JobTab),\r\n Description: this.GetDescription(tab.JobTab),\r\n Enabled: this.GetEnabled(tab),\r\n Order: order++,\r\n CanChangeVisible: this.CanChangeVisible(tab.JobTab),\r\n };\r\n });\r\n }\r\n }\r\n\r\n private GetEnabled(tab: JobTypeTabsModel): boolean {\r\n if (tab.JobTab === JobTabEnum.Invoicing) {\r\n return this.createsInvoice;\r\n } else {\r\n return tab.Enabled;\r\n }\r\n }\r\n\r\n private CanChangeVisible(jobTabEnum: JobTabEnum): boolean {\r\n return jobTabEnum !== JobTabEnum.Detail &&\r\n jobTabEnum !== JobTabEnum.Labour &&\r\n jobTabEnum !== JobTabEnum.Invoicing;\r\n }\r\n\r\n private ShowTab(jobTabEnum: JobTabEnum): boolean {\r\n switch(jobTabEnum){\r\n case JobTabEnum.Detail:\r\n return true;\r\n case JobTabEnum.Equipment:\r\n return this.isEquipmentEnabled;\r\n case JobTabEnum.Install:\r\n return this.isProEnabled && this.isEquipmentEnabled;\r\n case JobTabEnum.Labour:\r\n return true;\r\n case JobTabEnum.Inspections:\r\n return true;\r\n case JobTabEnum.Activities:\r\n return this.isProEnabled && this.jobActivityTypeExists;\r\n case JobTabEnum.Parts:\r\n return true;\r\n case JobTabEnum.Materials:\r\n return true;\r\n case JobTabEnum.Refrigeration:\r\n return this.isfGasEnabled;\r\n case JobTabEnum.Attributes:\r\n return this.isProEnabled;\r\n case JobTabEnum.Invoicing:\r\n return true;\r\n case JobTabEnum.Files:\r\n return true;\r\n case JobTabEnum.Comments:\r\n return true;\r\n };\r\n }\r\n\r\n private EmitChanged(): void {\r\n this.changed.emit(this.jobTypeTabs);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n \r\n {{ 'settings.job-types.detail.job-type' | translate }}\r\n \r\n {{ model.Name }}\r\n

\r\n

\r\n {{ 'settings.job-types.detail.new-job-type' | translate }}\r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n {{ 'buttons.delete' | translate }}\r\n \r\n \r\n {{ (isNew ? 'buttons.cancel' : 'buttons.discard') | translate }}\r\n \r\n \r\n {{ 'buttons.save' | translate }}\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import { Location } from \"@angular/common\";\r\nimport { Component, Input, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { FormMesssageService } from \"servicesight-shared\";\r\nimport { IJobMisc } from \"src/app/quotes/models/IJobMisc\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { JobTypeDetailModel } from \"../models/job-type-detail.model\";\r\nimport { JobTypeTabsModel } from \"../models/job-type-tabs.model\";\r\nimport { JobTypesService } from \"../services/job-types.service\";\r\nimport { JobTypesDetailService } from \"./job-types-detail.service\";\r\n\r\n@Component({\r\n selector: \"app-job-types-detail\",\r\n templateUrl: \"./job-types-detail.component.html\",\r\n styleUrls: [\"./job-types-detail.component.scss\"]\r\n})\r\nexport class JobTypesDetailComponent implements OnInit {\r\n @Input() jobTypeId: number;\r\n @ViewChild(\"jobTypeForm\", { static: true }) form: NgForm;\r\n public readonly formName: string = \"jobTypeForm\";\r\n\r\n public isProEnabled: boolean;\r\n public isStockEnabled: boolean;\r\n public model: JobTypeDetailModel;\r\n public showDeleteWarning: boolean = false;\r\n public showDiscardWarning: boolean = false;\r\n public deleteMessage: string;\r\n public costingsEnabled: boolean = false;\r\n\r\n private jobTypeListPath: string = \"/proteansystem/systems/jobtypelist\";\r\n\r\n public get isNew(): boolean {\r\n return this.jobTypeId === 0;\r\n }\r\n\r\n constructor(\r\n private location: Location,\r\n private jobTypesService: JobTypesService,\r\n private jobTypeDetailsService: JobTypesDetailService,\r\n private formMessageService: FormMesssageService,\r\n private licenseService: LicenseService,\r\n private translateService: TranslateService\r\n )\r\n {\r\n this.model = new JobTypeDetailModel();\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(x => {\r\n this.isProEnabled = x.ProEnabled;\r\n this.isStockEnabled = x.StockEnabled;\r\n this.costingsEnabled = x.ProEnabled;\r\n });\r\n this.Load();\r\n }\r\n\r\n public OnSaveJobType(): void {\r\n this.formMessageService.RegisterObservable(this.jobTypesService.UpdateJobType(this.model), this.formName)\r\n .subscribe(x => {\r\n if (!this.jobTypeId) {\r\n this.location.go(`proteansystem/systems/jobtype/${x.EntityId}`);\r\n } else {\r\n this.Load();\r\n }\r\n });\r\n }\r\n\r\n public UpdateTemplates(templates: any[]): void {\r\n this.model.Templates = templates;\r\n this.MarkFormAsDirty();\r\n }\r\n\r\n public UpdateMaterialTypes(materialTypes: IJobMisc[]): void {\r\n this.model.Materials = materialTypes;\r\n this.MarkFormAsDirty();\r\n }\r\n\r\n public UpdateJobTabs(jobTypeTabs: JobTypeTabsModel[]): void {\r\n this.model.Tabs = jobTypeTabs;\r\n this.MarkFormAsDirty();\r\n }\r\n\r\n public OnDeleteJobType(): void {\r\n this.deleteMessage = this.translateService.instant(\"generic.delete.item-value\", {value: this.model.Name});\r\n this.showDeleteWarning = true;\r\n }\r\n\r\n public OnConfirmDeletion(confirmed: boolean): void {\r\n if (confirmed && this.jobTypeId) {\r\n this.formMessageService.RegisterObservable(this.jobTypesService.DeleteJobType(this.jobTypeId), this.formName)\r\n .subscribe(() => {\r\n this.location.go(this.jobTypeListPath);\r\n });\r\n }\r\n this.showDeleteWarning = false;\r\n }\r\n\r\n public OnDiscard(): void {\r\n this.showDiscardWarning = true;\r\n }\r\n\r\n public OnConfirmDiscard(confirmed: boolean): void {\r\n if (confirmed) {\r\n this.location.go(this.jobTypeListPath);\r\n }\r\n this.showDiscardWarning = false;\r\n }\r\n\r\n public MarkFormAsDirty(): void {\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n private Load(): void {\r\n this.jobTypesService.GetJobType(this.jobTypeId).subscribe(result => {\r\n this.model = result;\r\n this.jobTypeDetailsService.CreateInvoiceChanged(result.CreatesInvoice);\r\n this.form.form.markAsPristine();\r\n this.form.form.markAsUntouched();\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'settings.job-types.heading' | translate }}\r\n
{{ 'settings.job-types.subheading' | translate }}
\r\n

\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n
\r\n \r\n -\r\n
\r\n\r\n \r\n
\r\n
\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular/ui/data-grid\";\r\nimport { HelpItemTagEnum } from \"servicesight-shared\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { JobTypeModel } from \"../models/job-type.model\";\r\nimport { JobTypesService } from \"../services/job-types.service\";\r\n\r\n@Component({\r\n selector: \"app-job-types-list\",\r\n templateUrl: \"./job-types-list.component.html\",\r\n styleUrls: [\"./job-types-list.component.scss\"]\r\n})\r\nexport class JobTypesListComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n public SearchText: string = \"\";\r\n public jobTypes: JobTypeModel[];\r\n public isProEnabled: boolean = false;\r\n public helpItemsTags: HelpItemTagEnum[] = [ HelpItemTagEnum.JobType ];\r\n\r\n constructor(\r\n private jobTypesService: JobTypesService,\r\n private licenseService: LicenseService) { }\r\n\r\n public ngOnInit(): void {\r\n this.jobTypesService.GetJobTypesList().subscribe(x => this.jobTypes = x.ModelCollection);\r\n\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(x => {\r\n this.isProEnabled = x.ProEnabled;\r\n });\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { IServiceSightCollection } from \"../../../quotes/models/IServiceSightCollection\";\r\nimport { Observable } from \"rxjs/internal/Observable\";\r\nimport { IAppConfig, APP_CONFIG, IProteanResponse, JobGroupModel } from \"servicesight-shared\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class JobGroupsService {\r\n private readonly baseUrl = this.appConfig.apiLocations.ServiceSight;\r\n private readonly jobGroupsUrl = this.baseUrl + \"JobGroup/\";\r\n\r\n constructor(private http: HttpClient, @Inject(APP_CONFIG) private appConfig: IAppConfig) { }\r\n\r\n public GetJobGroupsList(): Observable> {\r\n return this.http.get>(this.jobGroupsUrl + \"GetAllJobGroups\");\r\n }\r\n\r\n public GetJobGroup(jobGroupId: number = null): Observable {\r\n if (jobGroupId) {\r\n return this.http.get(this.jobGroupsUrl + `GetAsync?entityId=${jobGroupId}`);\r\n } else {\r\n return this.http.get(this.jobGroupsUrl + \"GetAsync?entityId=\");\r\n }\r\n }\r\n\r\n public Update(jobGroup: JobGroupModel): Observable {\r\n return this.http.post(`${this.jobGroupsUrl}UpdateAsync`, jobGroup);\r\n }\r\n\r\n public Delete(jobGroupId: number): Observable {\r\n return this.http.post(`${this.jobGroupsUrl}DeleteAsync?entityId=${jobGroupId}`, jobGroupId);\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'settings.job-groups.heading' | translate }}\r\n
{{ 'settings.job-groups.subheading' | translate }}
\r\n

\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n
\r\n
\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular/ui/data-grid\";\r\nimport { HelpItemTagEnum, JobGroupModel } from \"servicesight-shared\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { JobGroupsService } from \"../services/job-groups.service\";\r\n\r\n@Component({\r\n selector: \"app-job-groups-list\",\r\n templateUrl: \"./job-groups-list.component.html\",\r\n styleUrls: [\"./job-groups-list.component.scss\"]\r\n})\r\nexport class JobGroupsListComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n public SearchText: string = \"\";\r\n public jobGroups: JobGroupModel[];\r\n public isProEnabled: boolean = false;\r\n public helpItemsTags: HelpItemTagEnum[] = [ HelpItemTagEnum.JobGroup ];\r\n\r\n constructor(\r\n private jobGroupsService: JobGroupsService,\r\n private licenseService: LicenseService) { }\r\n\r\n public ngOnInit(): void {\r\n this.jobGroupsService.GetJobGroupsList().subscribe(x => this.jobGroups = x.ModelCollection);\r\n\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(x => {\r\n this.isProEnabled = x.ProEnabled;\r\n });\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n \r\n {{ 'settings.job-groups.detail.new-job-group' | translate }}\r\n \r\n \r\n {{ 'settings.job-groups.detail'| translate }}\r\n {{ Model.JobGroup }}\r\n \r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n {{ 'buttons.delete' | translate }}\r\n \r\n \r\n {{ 'buttons.discard' | translate }}\r\n \r\n \r\n {{ 'buttons.save' | translate }}\r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import { Component, Input, ViewChild, OnInit } from \"@angular/core\";\r\nimport { Location } from \"@angular/common\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { JobGroupsService } from \"../services/job-groups.service\";\r\nimport { FormMesssageService, JobGroupModel } from \"servicesight-shared\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\n\r\n@Component({\r\n selector: \"app-job-groups-detail\",\r\n templateUrl: \"./job-groups-detail.component.html\",\r\n styleUrls: [\"./job-groups-detail.component.scss\"]\r\n})\r\nexport class JobGroupsDetailComponent implements OnInit {\r\n @Input() jobGroupId: number = null;\r\n @ViewChild(\"jobGroupForm\", { static: true }) form: NgForm;\r\n\r\n public readonly FormName: string = \"jobGroupForm\";\r\n public get isNew(): boolean {\r\n return this.jobGroupId === null || this.jobGroupId === 0;\r\n }\r\n public Model: JobGroupModel = new JobGroupModel();\r\n public ShowDeleteWarning: boolean = false;\r\n public ShowDiscardWarning: boolean = false;\r\n public isProEnabled: boolean = false;\r\n\r\n private jobGroupListPath: string = \"/proteansystem/systems/jobgrouplist\";\r\n\r\n constructor(\r\n private jobGroupsService: JobGroupsService,\r\n private formMessageService: FormMesssageService,\r\n private location: Location,\r\n private licenseService: LicenseService) {}\r\n\r\n public ngOnInit(): void {\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(x => {\r\n this.isProEnabled = x.ProEnabled;\r\n });\r\n this.jobGroupsService.GetJobGroup(this.jobGroupId).subscribe(x => {\r\n this.Model = x;\r\n });\r\n }\r\n\r\n public OnDelete(): void {\r\n this.ShowDeleteWarning = true;\r\n }\r\n\r\n public OnDiscard(): void {\r\n if (this.form.dirty) {\r\n this.ShowDiscardWarning = true;\r\n } else {\r\n this.location.go(this.jobGroupListPath);\r\n }\r\n }\r\n\r\n public OnSave(): void {\r\n if (this.isNew) {\r\n this.formMessageService.RegisterObservable(this.jobGroupsService.Update(this.Model), this.FormName)\r\n .subscribe(x => {\r\n this.location.go(`/proteansystem/systems/jobgroup/detail/${x.EntityId}`);\r\n });\r\n } else {\r\n this.formMessageService.RegisterObservable(this.jobGroupsService.Update(this.Model), this.FormName).subscribe();\r\n }\r\n }\r\n\r\n public OnConfirmDeletion($event: boolean): void {\r\n if ($event && this.jobGroupId) {\r\n this.formMessageService.RegisterObservable(this.jobGroupsService.Delete(this.jobGroupId), this.FormName)\r\n .subscribe(() => {\r\n this.location.go(this.jobGroupListPath);\r\n });\r\n }\r\n this.ShowDeleteWarning = false;\r\n }\r\n\r\n public OnConfirmDiscard($event: boolean): void {\r\n if ($event) {\r\n this.location.go(this.jobGroupListPath);\r\n }\r\n this.ShowDiscardWarning = false;\r\n }\r\n\r\n public MarkFormAsDirty(): void {\r\n this.form.form.markAsDirty();\r\n }\r\n}\r\n","import { SelectOptionModel } from \"servicesight-shared\";\r\nimport { CommodityCodeModel } from \"./commodity-code.model\";\r\nimport { DepartmentCodeModel } from \"./department-code.model\";\r\nimport { NominalCodeModel } from \"./nominal-code.model\";\r\n\r\nexport class MaterialTypeModel {\r\n MiscTypeID: number;\r\n Description: string;\r\n EngineerAdd: boolean;\r\n SaleAcc: string;\r\n SaleDept: string;\r\n Cost: number;\r\n Price: number;\r\n CostAcc: string;\r\n CostOfSaleAcc: string;\r\n CostOfSaleDept: string;\r\n CommodityIdVisible: boolean;\r\n IsUsTax: boolean;\r\n ProductTaxCodeID: number;\r\n StockTypeID: number;\r\n SalesProductTaxCodeId: number;\r\n PreferredSupplierID: number;\r\n ProductTypeID: number;\r\n Suppliers: SelectOptionModel[];\r\n ProductTaxCodes: SelectOptionModel[];\r\n ProductTypes: SelectOptionModel[];\r\n CommodityCodeID: number;\r\n CommodityCodes: CommodityCodeModel[];\r\n NominalAccountCodes: NominalCodeModel[];\r\n NominalExpenseAccountCodes: NominalCodeModel[];\r\n NominalDeptCodes: DepartmentCodeModel[];\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n \r\n {{ 'settings.material.new-material-type' | translate }}\r\n \r\n \r\n {{ 'settings.material.material-type'| translate }}\r\n {{ Model.Description }}\r\n \r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
    \r\n
  • \r\n \r\n
  • \r\n
  • \r\n \r\n
  • \r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n {{ 'buttons.delete' | translate }}\r\n \r\n \r\n {{ 'buttons.cancel' | translate }}\r\n \r\n \r\n {{ 'buttons.save' | translate }}\r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import { Component, Input, ViewChild, OnChanges, SimpleChanges, OnInit } from \"@angular/core\";\r\nimport { Location } from \"@angular/common\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { MaterialTypesService } from \"../services/material-types.service\";\r\nimport { MaterialTypeModel } from \"../models/material-type.model\";\r\nimport { FormMesssageService } from \"servicesight-shared\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { DxSelectBoxComponent } from \"devextreme-angular\";\r\nimport { NominalCodeModel } from \"../models/nominal-code.model\";\r\n\r\n@Component({\r\n selector: \"app-material-types-detail\",\r\n templateUrl: \"./material-types-detail.component.html\",\r\n styleUrls: [\"./material-types-detail.component.scss\"]\r\n})\r\nexport class MaterialTypesDetailComponent implements OnInit, OnChanges {\r\n @Input() miscTypeId: number = null;\r\n @ViewChild(\"materialTypeForm\", { static: true }) form: NgForm;\r\n @ViewChild(\"costOfSaleDeptCodes\") costOfSaleDeptCodes: DxSelectBoxComponent;\r\n @ViewChild(\"saleDeptCodes\") saleDeptCodes: DxSelectBoxComponent;\r\n\r\n public readonly FormName: string = \"materialTypeForm\";\r\n public get isNew(): boolean {\r\n return this.miscTypeId == null;\r\n }\r\n public Model: MaterialTypeModel = new MaterialTypeModel();\r\n public ShowDeleteWarning: boolean = false;\r\n public ShowDiscardWarning: boolean = false;\r\n public isProEnabled: boolean = false;\r\n public isPurchaseOrdersEnabled: boolean = false;\r\n public baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n public SaleDepartmentRequired: boolean;\r\n public CostDepartmentRequired: boolean;\r\n public isSaleAccountDropDownBoxOpened: boolean = false;\r\n public isCostAccountDropDownBoxOpened: boolean = false;\r\n public selectedCostAccounts: number[] = [];\r\n\r\n private materialTypeListPath: string = \"/proteansystem/systems/materialtype/list\";\r\n\r\n constructor(\r\n private materialTypesService: MaterialTypesService,\r\n private formMessageService: FormMesssageService,\r\n private location: Location,\r\n private licenseService: LicenseService) {}\r\n\r\n public ngOnInit(): void {\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(x => {\r\n this.isProEnabled = x.ProEnabled;\r\n this.isPurchaseOrdersEnabled = x.PurchaseOrdersEnabled;\r\n });\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.miscTypeId) {\r\n if (this.miscTypeId) {\r\n this.materialTypesService.GetMiscType(this.miscTypeId).subscribe(data =>\r\n {\r\n this.Model = data;\r\n const saleNominalAccountCode = this.Model.NominalAccountCodes.find(x => x.AccountCode === this.Model.SaleAcc);\r\n this.SaleDepartmentRequired = this.NominalCodeRequiresDepartment(saleNominalAccountCode);\r\n\r\n const costNominalAccountCode = this.Model.NominalExpenseAccountCodes.find(x => x.AccountCode === this.Model.CostOfSaleAcc);\r\n this.CostDepartmentRequired = this.NominalCodeRequiresDepartment(costNominalAccountCode);\r\n });\r\n } else {\r\n this.materialTypesService.GetNewMiscType().subscribe(x => {\r\n this.Model = x;\r\n });\r\n }\r\n }\r\n }\r\n\r\n public OnDeleteMaterialType(): void {\r\n this.ShowDeleteWarning = true;\r\n }\r\n\r\n public OnCancelMaterialType(): void {\r\n if (this.form.dirty) {\r\n this.ShowDiscardWarning = true;\r\n }\r\n }\r\n\r\n public OnSaveMaterialType(): void {\r\n if (this.isNew) {\r\n this.formMessageService.RegisterObservable(this.materialTypesService.CreateItem(this.Model), this.FormName)\r\n .subscribe(x => {\r\n this.location.go(`/proteansystem/systems/materialtype/detail/${x.EntityId}`);\r\n });\r\n } else {\r\n this.formMessageService.RegisterObservable(this.materialTypesService.UpdateItem(this.Model), this.FormName).subscribe();\r\n }\r\n }\r\n\r\n public OnConfirmDeletion($event: boolean): void {\r\n if ($event && this.miscTypeId) {\r\n this.formMessageService.RegisterObservable(this.materialTypesService.DeleteItem(this.miscTypeId), this.FormName)\r\n .subscribe(() => {\r\n this.location.go(this.materialTypeListPath);\r\n });\r\n }\r\n this.ShowDeleteWarning = false;\r\n }\r\n\r\n public OnConfirmDiscard($event: boolean): void {\r\n if ($event) {\r\n this.location.go(this.materialTypeListPath);\r\n }\r\n this.ShowDiscardWarning = false;\r\n }\r\n\r\n public MarkFormAsDirty(): void {\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public onSaleAccountSelected(args: any): void {\r\n if (this.isSaleAccountDropDownBoxOpened && args.selectedRowKeys.length === 1) {\r\n const newSaleAccount = args.selectedRowKeys[0];\r\n if (newSaleAccount !== this.Model.SaleAcc) {\r\n this.isSaleAccountDropDownBoxOpened = false;\r\n this.Model.SaleAcc = newSaleAccount;\r\n\r\n const nominalAccountCode = this.Model.NominalAccountCodes.find(x => x.AccountCode === newSaleAccount);\r\n const enableDepartment = this.NominalCodeRequiresDepartment(nominalAccountCode);\r\n\r\n this.SaleDepartmentRequired = enableDepartment;\r\n this.saleDeptCodes.value = null;\r\n }\r\n }\r\n }\r\n\r\n public onCostAccountSelected(args: any): void {\r\n if (this.isCostAccountDropDownBoxOpened && args.selectedRowKeys.length === 1) {\r\n const newCostAccount = args.selectedRowKeys[0];\r\n if (newCostAccount !== this.Model.CostOfSaleAcc) {\r\n this.isCostAccountDropDownBoxOpened = false;\r\n this.Model.CostOfSaleAcc = newCostAccount;\r\n\r\n const nominalExpenseAccount = this.Model.NominalExpenseAccountCodes.find(x => x.AccountCode === newCostAccount);\r\n const enableDepartment = this.NominalCodeRequiresDepartment(nominalExpenseAccount);\r\n\r\n this.CostDepartmentRequired = enableDepartment;\r\n this.costOfSaleDeptCodes.value = null;\r\n }\r\n }\r\n }\r\n\r\n private NominalCodeRequiresDepartment(nominalCodeModel: NominalCodeModel): boolean {\r\n return nominalCodeModel && nominalCodeModel.deptAnalysis === -1;\r\n }\r\n\r\n public onCostAccountDropDownValueChanged(e: any) {\r\n if (e.value === null) {\r\n //only way this can happen is when the clear button was pressed\r\n //Clear selected row in grid\r\n this.selectedCostAccounts = [];\r\n //disable department\r\n this.costOfSaleDeptCodes.disabled = true;\r\n this.costOfSaleDeptCodes.value = null;\r\n }\r\n }\r\n}\r\n","import { MaterialTypeModel } from \"./material-type.model\";\r\n\r\nexport class MaterialTypeListModel {\r\n IsUsTax: boolean;\r\n ModelCollection: MaterialTypeModel[];\r\n}\r\n","
\r\n
\r\n

{{ 'settings.material-types.heading' | translate }}\r\n
{{ 'settings.material-types.subheading' | translate }}
\r\n

\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n
\r\n \r\n -\r\n
\r\n\r\n
\r\n
\r\n {{ data.value | currency : baseCurrencySymbol }}\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular/ui/data-grid\";\r\nimport { HelpItemTagEnum } from \"servicesight-shared\";\r\nimport { MaterialTypeListModel } from \"../models/material-type-list.model\";\r\nimport { MaterialTypesService } from \"../services/material-types.service\";\r\n\r\n@Component({\r\n selector: \"app-material-types-list\",\r\n templateUrl: \"./material-types-list.component.html\",\r\n styleUrls: [\"./material-types-list.component.scss\"]\r\n})\r\nexport class MaterialTypesListComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n public SearchText: string = \"\";\r\n public model = new MaterialTypeListModel();\r\n public baseCurrencySymbol: string;\r\n public helpItemsTags: HelpItemTagEnum[] = [ HelpItemTagEnum.MaterialType ];\r\n\r\n constructor(\r\n private materialTypesService: MaterialTypesService) {\r\n this.baseCurrencySymbol = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.materialTypesService.GetMaterialTypesList().subscribe(x => this.model = x);\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { map } from \"rxjs/operators\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class MailchimpService {\r\n\r\n private readonly baseUrl: string;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) appConfig: IAppConfig) {\r\n this.baseUrl = appConfig.apiLocations.ServiceSight;\r\n }\r\n\r\n public IsConnected(): Observable {\r\n return this.http.get(`${this.baseUrl}AccountsLink/GetMailchimpStatus`);\r\n }\r\n\r\n public SetupLink(code: string): Observable {\r\n return this.http.post(`${this.baseUrl}AccountsLink/ConsumeAccessToken`, { code, appId: \"mailchimp\" }, { observe: \"response\" }).pipe(map(response => {\r\n return response.status === 204;\r\n }));\r\n }\r\n\r\n public Sync(): Observable {\r\n return this.http.get(`${this.baseUrl}AccountsLink/MailchimpSync`, { observe: \"response\" }).pipe(map(response => {\r\n return response.status === 204;\r\n }));\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n \"Mailchimp\"\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n

Your Mailchimp account is currently linked to ServiceSight

\r\n \r\n \r\n
\r\n
\r\n
","import { Component, Inject, Input, OnInit } from \"@angular/core\";\r\nimport { APP_CONFIG } from \"servicesight-shared\";\r\nimport { WebAppConfig } from \"src/app/shared/models/web-app-config.model\";\r\nimport { MailchimpService } from \"../services/mailchimp.service\";\r\n\r\n@Component({\r\n selector: \"app-mail-chimp-link\",\r\n templateUrl: \"./mail-chimp-link.component.html\",\r\n styleUrls: [\"./mail-chimp-link.component.scss\"]\r\n})\r\nexport class MailChimpLinkComponent implements OnInit {\r\n @Input() code: string = null;\r\n\r\n public loading: boolean = true;\r\n public accountLinked: boolean = false;\r\n\r\n constructor(\r\n private mailchimpService: MailchimpService,\r\n @Inject(APP_CONFIG) private appConfig: WebAppConfig) { }\r\n\r\n public ngOnInit(): void {\r\n if (this.code !== undefined && this.code !== null) {\r\n this.mailchimpService.SetupLink(this.code).subscribe(success => {\r\n this.loading = false;\r\n this.accountLinked = success;\r\n });\r\n } else {\r\n this.mailchimpService.IsConnected().subscribe(connected => {\r\n this.loading = false;\r\n this.accountLinked = connected;\r\n });\r\n }\r\n }\r\n\r\n public Setup(): void {\r\n const clientId = this.appConfig.mailchimp.ClientId;\r\n const redirectUri = this.appConfig.mailchimp.RedirectUri;\r\n window.location.href = `https://login.mailchimp.com/oauth2/authorize?response_type=code&client_id=${clientId}&redirect_uri=${redirectUri}`;\r\n }\r\n\r\n public Sync(): void {\r\n this.loading = true;\r\n this.mailchimpService.Sync().subscribe(completed => {\r\n this.loading = false;\r\n\r\n if (!completed) {\r\n alert(\"An error occurred\");\r\n }\r\n });\r\n }\r\n\r\n public Remove(): void {\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n

{{ 'planned.jobs.report.title' | translate }}  
{{ 'planned.jobs.report.description' | translate }}

\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n
\r\n","import { Component, OnInit } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { PlannedJobsReportService, ReportModel } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-planned-jobs-report\",\r\n templateUrl: \"./planned-jobs-report.component.html\",\r\n styleUrls: [\"./planned-jobs-report.component.scss\"]\r\n})\r\nexport class PlannedJobsReportComponent implements OnInit {\r\n\r\n public report: ReportModel[];\r\n public successfulMessage: string;\r\n\r\n constructor(\r\n service: PlannedJobsReportService,\r\n private translate: TranslateService) {\r\n this.customizeNotesText = this.customizeNotesText.bind(this);\r\n this.successfulMessage = this.translate.instant(\"planned.jobs.report.successful\");\r\n service.GetReport().subscribe(result => this.report = result);\r\n }\r\n\r\n public customizeNotesText(cellInfo: any) {\r\n if (cellInfo !== null && cellInfo.value !== null) {\r\n return cellInfo.value;\r\n } else {\r\n return this.successfulMessage;\r\n }\r\n }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n}\r\n","
\r\n\t
\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t

{{ 'planner-card.setting.title' | translate }}  
{{ 'planner-card.setting.description' | translate }}

\r\n \r\n\t\t\t
\r\n\t\t
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n {{ data.label | translate }}\r\n
\r\n \r\n\r\n |\r\n \r\n
\r\n {{ data.label | translate }}\r\n
\r\n \r\n |\r\n \r\n
\r\n {{ data.label | translate }}\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n {{ 'label.logo' | translate }}\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n {{ data.label | translate }}\r\n
\r\n \r\n \r\n
\r\n {{ data.label | translate }}\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n {{ data.label | translate }}\r\n
\r\n \r\n \r\n
\r\n {{ data.label | translate }}\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n
","import { Component, OnInit } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { HelpItemTagEnum, UICustomisation, UserReferenceService } from \"servicesight-shared\";\r\nimport { JobProperties } from \"src/app/planner/enums/job-properties.enum\";\r\nimport { PlannerCardLayout } from \"src/app/shared/models/planner/planner-card-layout.model\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { PlannerCardService } from \"src/app/shared/services/planner-card.service\";\r\n\r\n@Component({\r\n selector: \"app-planner-card\",\r\n templateUrl: \"./planner-card.component.html\",\r\n styleUrls: [\"./planner-card.component.scss\"]\r\n})\r\nexport class PlannerCardComponent implements OnInit {\r\n\r\n public helpItemTagEnum = HelpItemTagEnum;\r\n public layout: PlannerCardLayout = {\r\n Header1: JobProperties.JobId,\r\n Header2: JobProperties.JobType,\r\n Header3: JobProperties.Status,\r\n Body1: JobProperties.SiteName,\r\n Body2: JobProperties.JobCatId,\r\n Body3: JobProperties.Due,\r\n Body4: JobProperties.EquipCount,\r\n LogoEnabled: false\r\n };\r\n\r\n public list: PropertyOption[];\r\n\r\n constructor(\r\n private userRefernceService: UserReferenceService,\r\n private plannerCardService: PlannerCardService,\r\n private translateService: TranslateService,\r\n private licenseService: LicenseService\r\n ) {\r\n this.displayValue = this.displayValue.bind(this);\r\n }\r\n\r\n ngOnInit() {\r\n const ref1 = this.userRefernceService.getLabel(UICustomisation.JOB_REF1);\r\n const ref2 = this.userRefernceService.getLabel(UICustomisation.JOB_REF2);\r\n\r\n this.list = [\r\n { prop: JobProperties.JobId, label: \"label.jobs.grid.job.no\" },\r\n { prop: JobProperties.SessionId, label: \"job.labour.visit\" },\r\n { prop: JobProperties.PriorityName, label: \"label.jobs.grid.priority\" },\r\n { prop: JobProperties.JobType, label: \"job.detail.job.type\" },\r\n { prop: JobProperties.JobCatId, label: \"job.detail.category\" },\r\n { prop: JobProperties.Chargeable, label: \"job.detail.chargeable\" },\r\n { prop: JobProperties.ToDo, label: \"job.detail.work.required\" },\r\n { prop: JobProperties.UserRef1Job, label: ref1 },\r\n { prop: JobProperties.UserRef2Job, label: ref2 },\r\n { prop: JobProperties.Logged, label: \"label.jobs.grid.logged\" },\r\n { prop: JobProperties.Due, label: \"job.detail.due\" },\r\n { prop: JobProperties.Status, label: \"quotes.heading.status\" },\r\n { prop: JobProperties.SiteName, label: \"job.detail.site-name\" },\r\n { prop: JobProperties.SitePostCode, label: \"job.detail.site-postcode\" },\r\n { prop: JobProperties.UnassignedSiteJobs, label: \"job.detail.other-jobs\" },\r\n ];\r\n\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(result => {\r\n if (result.EquipmentEnabled) {\r\n this.list.push(...[\r\n { prop: JobProperties.EquipCount, label: \"label.jobs.grid.equipments.count\" },\r\n { prop: JobProperties.EquipCategories, label: \"job.detail.equip-categories\" },\r\n { prop: JobProperties.EquipTypes, label: \"job.detail.equip-types\" },\r\n { prop: JobProperties.MakeModels, label: \"job.detail.equip-make-models\" }\r\n ]);\r\n }\r\n\r\n if (!result.ProEnabled) {\r\n this.list = this.list.filter(x => x.prop !== JobProperties.PriorityName);\r\n }\r\n });\r\n\r\n this.plannerCardService.GetLayout().subscribe(l => this.layout = l || this.layout);\r\n }\r\n\r\n public Save(): void {\r\n this.plannerCardService.UpdateLayout(this.layout).subscribe();\r\n }\r\n\r\n public Cancel(): void {\r\n this.plannerCardService.GetLayout()\r\n .subscribe(l => {\r\n if (!l) {\r\n this.layout = {\r\n Header1: JobProperties.JobId,\r\n Header2: JobProperties.JobType,\r\n Header3: JobProperties.Status,\r\n Body1: JobProperties.SiteName,\r\n Body2: JobProperties.JobCatId,\r\n Body3: JobProperties.Due,\r\n Body4: JobProperties.EquipCount,\r\n LogoEnabled: false\r\n };\r\n } else {\r\n this.layout = l;\r\n }\r\n\r\n });\r\n }\r\n\r\n public Reset(): void {\r\n this.layout = {\r\n Header1: JobProperties.JobId,\r\n Header2: JobProperties.JobType,\r\n Header3: JobProperties.Status,\r\n Body1: JobProperties.SiteName,\r\n Body2: JobProperties.JobCatId,\r\n Body3: JobProperties.Due,\r\n Body4: JobProperties.EquipCount,\r\n LogoEnabled: false\r\n };\r\n this.Save();\r\n }\r\n\r\n public displayValue(option: PropertyOption): string {\r\n return option ? this.translateService.instant(option.label) : null;\r\n }\r\n}\r\n\r\nexport interface PropertyOption {\r\n prop: string;\r\n label: string;\r\n}\r\n\r\n\r\n","export enum PriceCalcType {\r\n SpecialPrice = 1,\r\n StandardPriceLessPercent = 2,\r\n ActualCostPlusPercent = 4,\r\n StandardCostPlusPercent = 8\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { PriceCalcType } from \"./enums/price-calc-type-enum\";\r\n\r\n@Pipe({\r\n name: \"priceCalcType\"\r\n})\r\nexport class PriceCalcTypePipe implements PipeTransform {\r\n\r\n transform(value: any): any {\r\n const status = {\r\n [PriceCalcType.SpecialPrice]: \"price-calc-type.special-price\",\r\n [PriceCalcType.StandardPriceLessPercent]: \"price-calc-type.price-less-percentage\",\r\n [PriceCalcType.StandardCostPlusPercent]: \"price-calc-type.standard-cost-plus-percentage\",\r\n [PriceCalcType.ActualCostPlusPercent]: \"price-calc-type.cost-plus-percentage\"\r\n };\r\n return status[value];\r\n }\r\n}\r\n","import { PriceCalcType } from \"src/app/shared/pipes/enums/price-calc-type-enum\";\r\nimport { EquipmentExceptionModel } from \"./equipment-exception.model\";\r\nimport { MaterialExceptionsModel } from \"./materialExceptionsModel\";\r\nimport { PartPrice } from \"./part-price\";\r\nimport { RefrigerantPrice } from \"./refrigerant-price\";\r\nimport { StockTypePrice } from \"./stock-type-price\";\r\nimport { PriceListCustomerDetailsModel } from \"../../shared/models/price-list-customer-details.model\";\r\n\r\nexport class PriceList {\r\n constructor() {\r\n this.PriceCalcTypeMiscId = PriceCalcType.StandardPriceLessPercent;\r\n this.PriceCalcTypePartId = PriceCalcType.StandardPriceLessPercent;\r\n this.PriceCalcTypeRefrigerantTypeId = PriceCalcType.StandardPriceLessPercent;\r\n }\r\n public PriceListID: number;\r\n public PriceList: string;\r\n public Description: string;\r\n public IsUsedOnCustomers: boolean = true;\r\n public PriceCalcTypeMiscId: number;\r\n public PercentageMisc: number = 0;\r\n public Materials: MaterialExceptionsModel[] = [];\r\n public PriceCalcTypePartId: number;\r\n public PercentageParts: number = 0;\r\n public PriceCalcTypeRefrigerantTypeId: number;\r\n public PercentageRefrigerantTypes: number = 0;\r\n public Parts: PartPrice[] = [];\r\n public Refrigerants: RefrigerantPrice[] = [];\r\n public StockTypes: StockTypePrice[] = [];\r\n public PriceListCustomers: PriceListCustomerDetailsModel[] = [];\r\n public PriceCalcTypeEquipId: number;\r\n public PercentageEquipment: number = 0;\r\n public Equipment: EquipmentExceptionModel[] = [];\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IAppConfig, APP_CONFIG, IProteanResponse } from \"servicesight-shared\";\r\nimport { ODataService } from \"src/app/shared/services/odata/odata.service\";\r\nimport { PriceList } from \"../models/price-list\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class PriceListService {\r\n private readonly baseODataUrl: string;\r\n\r\n constructor(\r\n private odataService: ODataService,\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) {\r\n this.baseODataUrl = appConfig.apiLocations.ServiceSightOData;\r\n }\r\n\r\n public GetPriceListsDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: this.baseODataUrl + \"PriceListOD\",\r\n key: \"PriceListId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetCalcTypesDataStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: this.baseODataUrl + \"PriceCalcTypesOD\",\r\n key: \"Id\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetPriceListMiscDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: this.baseODataUrl + \"PriceListMiscOD\",\r\n key: \"Id\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetNominalListMiscDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: this.baseODataUrl + \"NominalMiscOD\",\r\n key: \"Id\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetNominalListMiscDataStore(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: this.baseODataUrl + \"NominalMiscOD\",\r\n key: \"Id\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetPriceListItem(id: number): Observable {\r\n return this.http.get(`${this.appConfig.apiLocations.ServiceSight}PriceLists/Get?entityId=${id}`);\r\n }\r\n\r\n public DeletePriceListItem(id: number): Observable {\r\n return this.http.delete(`${this.appConfig.apiLocations.ServiceSight}PriceLists/Delete?entityId=${id}`);\r\n }\r\n\r\n public SavePriceListItem(priceList: PriceList): Observable {\r\n return this.http.post(`${this.appConfig.apiLocations.ServiceSight}PriceLists/Update`, priceList);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n

{{ 'price.list.details.materials.defaultPriceCalc' | translate }}

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

{{ 'price.list.details.materials.exceptions' | translate }}

\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n >\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n
\r\n {{data.value | percent:'1.2-2'}}\r\n
\r\n\r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n {{cellInfo.Interval}} {{cellInfo.IntervalUnits}}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n
\r\n
-
\r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n","import { Component, Input, OnInit } from \"@angular/core\";\r\nimport { UntypedFormControl } from \"@angular/forms\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { ISelectOption } from \"src/app/shared/models/iselect-option.model\";\r\nimport { PriceCalcType } from \"src/app/shared/pipes/enums/price-calc-type-enum\";\r\nimport { PriceList } from \"../../models/price-list\";\r\nimport { PriceListService } from \"../../services/price-list.service\";\r\n\r\n@Component({\r\n selector: \"app-price-list-materials\",\r\n templateUrl: \"./price-list-materials.component.html\",\r\n styleUrls: [\"./price-list-materials.component.scss\"]\r\n})\r\nexport class PriceListMaterialsComponent implements OnInit {\r\n @Input() priceList: PriceList = new PriceList();\r\n @Input() form: UntypedFormControl;\r\n @Input() public priceCalcTypes: ISelectOption[];\r\n @Input() public proEnabled: boolean = false;\r\n\r\n public calcTypeDataSource: ODataStore;\r\n public calcTypeValue: Array = [this.translate.instant(\"price-calc-type.price-less-percentage\")];\r\n public nominalMiscListDataSource: DataSource;\r\n public nominalMiscListDataStore: ODataStore;\r\n\r\n public showNominalMiscSelectDialog: boolean = false;\r\n public selectedNominalMiscIds: Array;\r\n public selectedMaterialExceptions: Array;\r\n\r\n public get alreadyAddedNominalMiscs(): number[] {\r\n return this.priceList.Materials.map(i => i.MiscTypeId);\r\n }\r\n\r\n constructor(private priceListService: PriceListService,\r\n private translate: TranslateService) {\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.calcTypeDataSource = this.priceListService.GetCalcTypesDataStore();\r\n this.nominalMiscListDataSource = this.priceListService.GetNominalListMiscDataSource();\r\n const allnominalMiscListDataSource = this.priceListService.GetNominalListMiscDataSource();\r\n this.nominalMiscListDataStore = allnominalMiscListDataSource.store() as ODataStore;\r\n allnominalMiscListDataSource.load();\r\n this.calcTypeDataSource.load();\r\n this.priceCalcTypes = this.priceCalcTypes.filter(p => p.Id !== PriceCalcType.StandardCostPlusPercent);\r\n }\r\n\r\n public ClosedMiscTypeDialog(): void {\r\n this.showNominalMiscSelectDialog = false;\r\n }\r\n\r\n public AddMaterialType(): void {\r\n this.FormMarkDirty(null);\r\n if (this.selectedNominalMiscIds.length) {\r\n this.selectedNominalMiscIds.forEach(item => {\r\n this.priceList.Materials.push({\r\n PriceListId: this.priceList.PriceListID,\r\n MiscTypeId: item,\r\n Percentage: 0,\r\n Method: PriceCalcType.StandardPriceLessPercent\r\n });\r\n });\r\n }\r\n this.showNominalMiscSelectDialog = false;\r\n }\r\n\r\n public OpenMaterialTypeDialog(): void {\r\n this.selectedNominalMiscIds = [];\r\n this.nominalMiscListDataSource.filter(i => this.alreadyAddedNominalMiscs.indexOf(i.Id) < 0);\r\n this.nominalMiscListDataSource.load().then(() => this.showNominalMiscSelectDialog = true);\r\n }\r\n\r\n public Remove(): void {\r\n if (this.selectedMaterialExceptions.length) {\r\n this.selectedMaterialExceptions\r\n .forEach(f => {\r\n return this.priceList.Materials.splice(this.priceList.Materials.findIndex(p => p.MiscTypeId === f), 1);\r\n });\r\n }\r\n this.FormMarkDirty(null);\r\n }\r\n\r\n public FormMarkDirty(e: any): void {\r\n if (e && e.event || !e) { // triggered from user in the UI when e.event or called directly from the component code when !e\r\n this.form.markAsDirty();\r\n }\r\n }\r\n}\r\n","\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n","import { Component, EventEmitter, Input, Output } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\n\r\n@Component({\r\n selector: \"app-select-stock-type-dialogue\",\r\n templateUrl: \"./select-stock-type-dialogue.component.html\",\r\n styleUrls: [\"./select-stock-type-dialogue.component.scss\"]\r\n})\r\nexport class SelectStockTypeDialogueComponent {\r\n @Input() stockTypes: DataSource;\r\n @Input() alreadyAdded: number[];\r\n\r\n @Output() stockTypesAdded = new EventEmitter();\r\n\r\n public selected: number[] = [];\r\n public visible: boolean = false;\r\n\r\n constructor() { }\r\n\r\n public Show(): void {\r\n this.selected = [];\r\n this.stockTypes.filter(i => this.alreadyAdded.indexOf(i.StockTypeId) < 0);\r\n this.stockTypes.load().then(() => this.visible = true);\r\n }\r\n\r\n public Close(): void {\r\n this.visible = false;\r\n }\r\n\r\n public AddStockType(): void {\r\n this.stockTypesAdded.emit(this.selected);\r\n this.Close();\r\n }\r\n\r\n public StockTypeCalcSortValue(row: any): string {\r\n return row.StockTypeName;\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n

{{ 'price.list.parts.default-calculation' | translate }}

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

{{ 'price.list.parts.exceptions' | translate }}

\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ data.displayValue | currency: baseCurrencySymbol }}
\r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n","import { Component, Input, OnInit, ViewChild } from \"@angular/core\";\r\nimport { UntypedFormControl } from \"@angular/forms\";\r\nimport { DxiColumnComponent } from \"devextreme-angular/ui/nested\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable, of } from \"rxjs\";\r\nimport { tap } from \"rxjs/operators\";\r\nimport { AddPartDialogueComponent } from \"src/app/shared/components/add-part-dialogue/add-part-dialogue.component\";\r\nimport { StoreTypesEnum } from \"src/app/shared/enums/store-types.enum\";\r\nimport { ISelectOption } from \"src/app/shared/models/iselect-option.model\";\r\nimport { PriceCalcType } from \"src/app/shared/pipes/enums/price-calc-type-enum\";\r\nimport { StockService } from \"src/app/stock/services/stock.service\";\r\nimport { PriceList } from \"../../models/price-list\";\r\nimport { StockTypesService } from \"../../services/stock-types.service\";\r\nimport { SelectStockTypeDialogueComponent } from \"../select-stock-type-dialogue/select-stock-type-dialogue.component\";\r\n\r\n@Component({\r\n selector: \"app-price-list-detail-parts-tab\",\r\n templateUrl: \"./price-list-detail-parts-tab.component.html\",\r\n styleUrls: [\"./price-list-detail-parts-tab.component.scss\"]\r\n})\r\nexport class PriceListDetailPartsTabComponent implements OnInit {\r\n @ViewChild(\"addPart\", { static: true }) partsPopup: AddPartDialogueComponent;\r\n @ViewChild(\"addStockType\", { static: true }) stockTypesPopup: SelectStockTypeDialogueComponent;\r\n @ViewChild(\"percentage\", { static: true }) percenatge: DxiColumnComponent;\r\n @ViewChild(\"value\", { static: true }) value: DxiColumnComponent;\r\n\r\n @Input() priceList: PriceList = new PriceList();\r\n @Input() form: UntypedFormControl;\r\n @Input() public allPriceCalcTypes: ISelectOption[];\r\n @Input() public priceCalcTypes: ISelectOption[];\r\n @Input() public proEnabled: boolean = false;\r\n\r\n private allStockTypesDataSource: DataSource;\r\n private currentCalcTypeId: number;\r\n\r\n public stockTypesDataStore: ODataStore;\r\n public stockTypesDataSource: DataSource;\r\n public partsDataStore: ODataStore;\r\n public partsDataSource: DataSource;\r\n public baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n public selectedStockTypeIds: number[] = [];\r\n public selectedPartPriceIds: number[] = [];\r\n public calcType: PriceCalcType;\r\n public lookup: any; // that is needed for the StockTypeSortValue function in which this.lookup is the lookup on the dxi-column\r\n\r\n private parts: any[] = [];\r\n private partCosts: { [stockHeaderId: number]: number } = { };\r\n\r\n public get alreadyAddedParts(): number[] {\r\n return this.priceList.Parts.map(i => i.StockHeaderId);\r\n }\r\n\r\n public get alreadyAddedStockTypes(): number[] {\r\n return this.priceList.StockTypes.map(i => i.StockTypeId);\r\n }\r\n\r\n constructor(\r\n private stockService: StockService,\r\n private stockTypesService: StockTypesService) { }\r\n\r\n ngOnInit(): void {\r\n this.loadDataSources();\r\n this.priceList.Parts.forEach(p => {\r\n this.partsDataStore.byKey({ StockHeaderId: p.StockHeaderId, StoreId: StoreTypesEnum.MainStore }).then(part => {\r\n this.parts.push(part);\r\n });\r\n });\r\n }\r\n\r\n public FormMarkDirty(e: any): void {\r\n if (e && e.event || !e) { // triggered from user in the UI when e.event or called directly from the component code when !e\r\n this.form.markAsDirty();\r\n }\r\n }\r\n\r\n public OnEditorPreparing(e: any): void {\r\n const self = this;\r\n if (e.parentType === \"dataRow\" && e.dataField === \"PriceCalcTypeId\") {\r\n this.currentCalcTypeId = e.row.data.PriceCalcTypeId;\r\n const onValueChanged = e.editorOptions.onValueChanged;\r\n e.editorOptions.onValueChanged = function(arg: any) {\r\n onValueChanged.apply(this, arguments);\r\n\r\n if (arg.value === PriceCalcType.ActualCostPlusPercent) {\r\n self.getCost(e.row.data.StockHeaderId, self.partCosts).subscribe(cost => {\r\n e.component.cellValue(e.row.rowIndex, \"Value\", self.addPercent(cost, e.row.data.Percentage));\r\n });\r\n } else if (arg.value === PriceCalcType.StandardPriceLessPercent) {\r\n const item = self.parts.find(i => i.StockHeaderId === e.row.data.StockHeaderId);\r\n e.component.cellValue(e.row.rowIndex, \"Value\", self.subtractPercent(item.SellingPrice, e.row.data.Percentage));\r\n }\r\n\r\n self.percenatge.allowEditing = arg.value !== PriceCalcType.SpecialPrice;\r\n self.value.allowEditing = arg.value === PriceCalcType.SpecialPrice;\r\n };\r\n }\r\n\r\n if (e.parentType === \"dataRow\" && e.dataField === \"Percentage\") {\r\n e.editorOptions.onValueChanged = (arg: any) => {\r\n e.setValue(arg.value);\r\n\r\n if (this.currentCalcTypeId === PriceCalcType.ActualCostPlusPercent) {\r\n this.getCost(e.row.data.StockHeaderId, this.partCosts).subscribe(cost => {\r\n e.component.cellValue(e.row.rowIndex, \"Value\", this.addPercent(cost, arg.value));\r\n });\r\n } else {\r\n const item = this.parts.find(i => i.StockHeaderId === e.row.data.StockHeaderId);\r\n e.component.cellValue(e.row.rowIndex, \"Value\", this.subtractPercent(item.SellingPrice, arg.value));\r\n }\r\n\r\n e.component.focus();\r\n };\r\n this.value.allowEditing = this.currentCalcTypeId === PriceCalcType.SpecialPrice;\r\n }\r\n\r\n if (e.parentType === \"dataRow\" && e.dataField === \"Value\") {\r\n e.editorOptions.onValueChanged = (arg: any) => {\r\n e.setValue(arg.value);\r\n const item = this.parts.find(i => i.StockHeaderId === e.row.data.StockHeaderId);\r\n e.component.cellValue(e.row.rowIndex, \"Percentage\", Math.round(((item.SellingPrice - arg.value) / item.SellingPrice) * 100) / 100);\r\n e.component.focus();\r\n };\r\n this.percenatge.allowEditing = this.currentCalcTypeId !== PriceCalcType.SpecialPrice;\r\n }\r\n }\r\n\r\n public OnPartIdsAdded(added: number[]): void {\r\n this.FormMarkDirty(null);\r\n added.forEach(i => {\r\n this.partsDataStore.byKey({ StockHeaderId: i, StoreId: StoreTypesEnum.MainStore }).then(part => {\r\n this.parts.push(part);\r\n this.priceList.Parts.push({ StockHeaderId: i, Percentage: 0, Value: part.SellingPrice, PriceCalcTypeId: PriceCalcType.StandardPriceLessPercent });\r\n });\r\n });\r\n }\r\n\r\n public OnStockTypeIdsAdded(added: number[]): void {\r\n this.FormMarkDirty(null);\r\n added.forEach(i => {\r\n const item = this.allStockTypesDataSource.items().find(x => x.StockTypeId === i);\r\n this.priceList.StockTypes.push({ StockTypeId: i, Percentage: 0, Value: item.SellingPrice, PriceCalcTypeId: PriceCalcType.StandardPriceLessPercent });\r\n });\r\n }\r\n\r\n public ShowAddPartDialogue(): void {\r\n this.partsPopup.Show();\r\n }\r\n\r\n public ShowAddStockTypeDialogue(): void {\r\n this.stockTypesPopup.Show();\r\n }\r\n\r\n public RemovePart(): void {\r\n if (this.selectedPartPriceIds) {\r\n this.selectedPartPriceIds\r\n .forEach(f => {\r\n return this.priceList.Parts.splice(this.priceList.Parts.findIndex(p => p.StockHeaderId === f), 1);\r\n });\r\n this.FormMarkDirty(null);\r\n }\r\n }\r\n\r\n public RemoveStockType(): void {\r\n if (this.selectedStockTypeIds) {\r\n this.selectedStockTypeIds\r\n .forEach(f => {\r\n return this.priceList.StockTypes.splice(this.priceList.StockTypes.findIndex(p => p.StockTypeId === f), 1);\r\n });\r\n this.FormMarkDirty(null);\r\n }\r\n }\r\n\r\n public StockTypeSortValue(data: any): string {\r\n return this.lookup.calculateCellValue(data.StockTypeId);\r\n }\r\n\r\n public StockHeaderSortValue(data: any): string {\r\n return this.lookup.calculateCellValue(data.StockHeaderId);\r\n }\r\n\r\n private loadDataSources(): void {\r\n this.partsDataSource = this.stockService.GetStockParts();\r\n this.partsDataStore = this.stockService.GetStockStorePartsStore();\r\n this.stockTypesDataSource = this.stockTypesService.GetDataSource();\r\n this.allStockTypesDataSource = this.stockTypesService.GetDataSource();\r\n this.stockTypesDataStore = this.allStockTypesDataSource.store() as ODataStore;\r\n this.allStockTypesDataSource.load();\r\n }\r\n\r\n private getCost(stockHeaderId: number, costLookup: { [stockHeaderId: number]: number }): Observable {\r\n if (costLookup[stockHeaderId] == null) {\r\n // for price list calculations the part cost is taken from the main store\r\n return this.stockService.GetEstimatedCost(stockHeaderId, 1, 1).pipe(tap(cost => costLookup[stockHeaderId] = cost));\r\n }\r\n return of(costLookup[stockHeaderId]);\r\n }\r\n\r\n private addPercent(price: number, percent: number): number {\r\n return Math.round((price * (1 + percent)) * 100) / 100;\r\n }\r\n\r\n private subtractPercent(price: number, percent: number): number {\r\n return Math.round((price * (1 - percent)) * 100) / 100;\r\n }\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\nimport { ODataService } from \"../odata/odata.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class PriceListCustomerService {\r\n\r\n private readonly baseODataUrl: string;\r\n\r\n constructor(\r\n private odataService: ODataService,\r\n @Inject(APP_CONFIG) appConfig: IAppConfig) {\r\n this.baseODataUrl = appConfig.apiLocations.ServiceSightOData;\r\n }\r\n\r\n public GetPriceListsDataSource(): DataSource {\r\n return this.odataService.GetDataSource({\r\n url: this.baseODataUrl + \"OnlyActiveCustomerOD\",\r\n key: \"CustomerId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n\r\n \r\n \r\n\r\n
\r\n \r\n
\r\n\r\n \r\n\r\n\r\n
\r\n\r\n\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n","import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { PriceListCustomerDetailsModel } from \"../../shared/models/price-list-customer-details.model\";\r\nimport { PriceListCustomerService } from \"../../shared/services/price-list/price-list-customer.service\";\r\nimport { PriceListService } from \"../services/price-list.service\";\r\n\r\n@Component({\r\n selector: \"app-price-list-customers\",\r\n templateUrl: \"./price-list-customers.component.html\",\r\n styleUrls: [\"./price-list-customers.component.scss\"]\r\n})\r\nexport class PriceListCustomersComponent implements OnInit {\r\n\r\n @ViewChild(\"gridCustomer\", { static: true }) gridCustomer: DxDataGridComponent;\r\n @Input() public customersSource: PriceListCustomerDetailsModel[] = [];\r\n @Output() update: EventEmitter = new EventEmitter();\r\n public SearchText: string = \"\";\r\n public priceListSource: [];\r\n public selectedCustomerIds: [];\r\n public customers: DataSource;\r\n public showCustomerSelectScheduleDialog: boolean = false;\r\n\r\n constructor(\r\n private priceListCustomerService: PriceListCustomerService,\r\n private priceListService: PriceListService) { }\r\n\r\n ngOnInit() {\r\n this.customers = this.priceListCustomerService.GetPriceListsDataSource();\r\n this.priceListService.GetPriceListsDataSource().load().then(result => {\r\n this.priceListSource = result;\r\n });\r\n }\r\n\r\n public DeleteCustomer() {\r\n if (this.selectedCustomerIds) {\r\n this.selectedCustomerIds\r\n .forEach((f: PriceListCustomerDetailsModel) => {\r\n return this.customersSource.splice(this.customersSource.findIndex(e => e.CustomerId === f.CustomerId), 1);\r\n });\r\n this.update.emit(true);\r\n }\r\n }\r\n\r\n public get removeButtonDisabled(): boolean {\r\n return !(this.selectedCustomerIds && this.selectedCustomerIds.length > 0);\r\n }\r\n\r\n public OnSearchValueChange() {\r\n this.gridCustomer.instance.deselectAll();\r\n this.gridCustomer.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public OpenCustomerDialog() {\r\n this.showCustomerSelectScheduleDialog = true;\r\n if (this.customersSource && this.customersSource.length > 0) {\r\n const filter = [];\r\n\r\n this.customersSource.forEach( (item) => {\r\n if (filter.length > 0) {\r\n filter.push(\"and\");\r\n }\r\n filter.push([\"CustomerId\", \"<>\", item.CustomerId]);\r\n });\r\n this.gridCustomer.instance.deselectAll();\r\n this.gridCustomer.instance.clearSelection();\r\n this.gridCustomer.instance.filter(filter);\r\n }\r\n }\r\n\r\n public ClosedCustomerDialog() {\r\n this.showCustomerSelectScheduleDialog = false;\r\n }\r\n\r\n public AddCustomerToPriceList() {\r\n if (this.gridCustomer) {\r\n const resultItems = this.gridCustomer.instance.getSelectedRowsData();\r\n this.customersSource.push.apply(this.customersSource, resultItems);\r\n this.update.emit(true);\r\n }\r\n this.showCustomerSelectScheduleDialog = false;\r\n }\r\n\r\n public getImageVisible(data): boolean {\r\n return data.data.LogoUrl !== null && data.data.LogoUrl !== undefined;\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n

{{ 'price.list.parts.default-calculation' | translate }}

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

{{ 'price.list.parts.exceptions' | translate }}

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ data.displayValue | currency: baseCurrencySymbol }}
\r\n \r\n
{{ getBaseValue(data.data.RefrigerantTypeId, data.value) | async | currency: baseCurrencySymbol }}
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n","import { Component, Input, OnInit, ViewChild } from \"@angular/core\";\r\nimport { UntypedFormControl } from \"@angular/forms\";\r\nimport { DxiColumnComponent } from \"devextreme-angular/ui/nested\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { Observable, of } from \"rxjs\";\r\nimport { tap } from \"rxjs/operators\";\r\nimport { AddCylinderDialogComponent } from \"src/app/shared/components/add-cylinder-dialog/add-cylinder-dialog.component\";\r\nimport { ISelectOption } from \"src/app/shared/models/iselect-option.model\";\r\nimport { PriceCalcType } from \"src/app/shared/pipes/enums/price-calc-type-enum\";\r\nimport { PriceList } from \"../../models/price-list\";\r\nimport { RefrigerantTypeService } from \"../../services/refrigerant-type.service\";\r\n\r\n@Component({\r\n selector: \"app-price-list-detail-refrigerants-tab\",\r\n templateUrl: \"./price-list-detail-refrigerants-tab.component.html\",\r\n styleUrls: [\"./price-list-detail-refrigerants-tab.component.scss\"]\r\n})\r\nexport class PriceListDetailRefrigerantsTabComponent implements OnInit {\r\n\r\n @ViewChild(\"AddCylinderDialog\", { static: true }) refrigerantsPopup: AddCylinderDialogComponent;\r\n @ViewChild(\"percentage\", { static: true }) percenatge: DxiColumnComponent;\r\n @ViewChild(\"value\", { static: true }) value: DxiColumnComponent;\r\n\r\n @Input() priceList: PriceList = new PriceList();\r\n @Input() form: UntypedFormControl;\r\n @Input() public allPriceCalcTypes: ISelectOption[];\r\n @Input() public priceCalcTypes: ISelectOption[];\r\n @Input() public proEnabled: boolean = false;\r\n\r\n private currentCalcTypeId: number;\r\n\r\n public refrigerantTypesDataStore: ODataStore;\r\n public refrigerantTypesDataSource: DataSource;\r\n public baseCurrencySymbol: string = JSON.parse(localStorage.getItem(\"ls.BaseCurrencySymbol\"));\r\n public selectedRefrigerantPriceIds: number[] = [];\r\n public calcType: PriceCalcType;\r\n public lookup: any; // that is needed for the RefrigerantTypeSortValue function in which this.lookup is the lookup on the dxi-column\r\n\r\n private refrigerants: any[] = [];\r\n private refrigerantCosts: { [refrigerantTypeId: number]: number } = { };\r\n\r\n public get alreadyAddedRefrigerants(): number[] {\r\n return this.priceList.Refrigerants.map(i => i.RefrigerantTypeId);\r\n }\r\n\r\n constructor(\r\n private refrigerantTypeService: RefrigerantTypeService) {\r\n this.OnEditorPreparing = this.OnEditorPreparing.bind(this);\r\n }\r\n\r\n ngOnInit(): void {\r\n this.loadDataSources();\r\n this.priceList.Refrigerants.forEach(p => {\r\n this.refrigerantTypesDataStore.byKey(p.RefrigerantTypeId).then(refrigerant => {\r\n this.refrigerants.push(refrigerant);\r\n });\r\n });\r\n }\r\n\r\n public FormMarkDirty(e: any): void {\r\n if (e && e.event || !e) { // triggered from user in the UI when e.event or called directly from the component code when !e\r\n this.form.markAsDirty();\r\n }\r\n }\r\n\r\n public OnEditorPreparing(e: any): void {\r\n const self = this;\r\n if (e.parentType === \"dataRow\" && e.dataField === \"PriceCalcTypeId\") {\r\n this.currentCalcTypeId = e.row.data.PriceCalcTypeId;\r\n const onValueChanged = e.editorOptions.onValueChanged;\r\n e.editorOptions.onValueChanged = function(arg: any) {\r\n onValueChanged.apply(this, arguments);\r\n if (arg.value === PriceCalcType.ActualCostPlusPercent || arg.value === PriceCalcType.StandardCostPlusPercent) {\r\n self.getCost(e.row.data.RefrigerantTypeId, self.refrigerantCosts).subscribe(cost => {\r\n e.component.cellValue(e.row.rowIndex, \"Value\", cost);\r\n });\r\n } else if (arg.value === PriceCalcType.StandardPriceLessPercent || arg.value === PriceCalcType.SpecialPrice) {\r\n const item = self.refrigerants.find(i => i.RefrigerantTypeId === e.row.data.RefrigerantTypeId);\r\n e.component.cellValue(e.row.rowIndex, \"Value\", item?.SellingPrice ?? 0);\r\n }\r\n\r\n e.component.cellValue(e.row.rowIndex, \"Percentage\", 0);\r\n\r\n self.percenatge.allowEditing = arg.value !== PriceCalcType.SpecialPrice;\r\n self.value.allowEditing = arg.value === PriceCalcType.SpecialPrice;\r\n };\r\n }\r\n\r\n if (e.parentType === \"dataRow\" && e.dataField === \"Percentage\") {\r\n e.editorOptions.onValueChanged = (arg: any) => {\r\n e.setValue(arg.value);\r\n\r\n if (this.currentCalcTypeId === PriceCalcType.ActualCostPlusPercent || this.currentCalcTypeId === PriceCalcType.StandardCostPlusPercent) {\r\n this.getCost(e.row.data.RefrigerantTypeId, this.refrigerantCosts).subscribe(cost => {\r\n e.component.cellValue(e.row.rowIndex, \"Value\", this.addPercent(cost, arg.value));\r\n });\r\n } else {\r\n const item = this.refrigerants.find(i => i.RefrigerantTypeId === e.row.data.RefrigerantTypeId);\r\n e.component.cellValue(e.row.rowIndex, \"Value\", this.subtractPercent(item?.SellingPrice ?? 0, arg.value));\r\n }\r\n\r\n e.component.focus();\r\n };\r\n this.value.allowEditing = this.currentCalcTypeId === PriceCalcType.SpecialPrice;\r\n }\r\n\r\n if (e.parentType === \"dataRow\" && e.dataField === \"Value\") {\r\n e.editorOptions.onValueChanged = (arg: any) => {\r\n e.setValue(arg.value);\r\n const item = this.refrigerants.find(i => i.RefrigerantTypeId === e.row.data.RefrigerantTypeId);\r\n const sellingPrice = item?.SellingPrice ?? 0;\r\n if (sellingPrice > 0) {\r\n e.component.cellValue(e.row.rowIndex, \"Percentage\", Math.round(((sellingPrice - arg.value) / sellingPrice) * 10000) / 10000);\r\n }\r\n e.component.focus();\r\n };\r\n this.percenatge.allowEditing = this.currentCalcTypeId !== PriceCalcType.SpecialPrice;\r\n }\r\n }\r\n\r\n public OnRefrigerantIdsAdded(added: number[]): void {\r\n this.FormMarkDirty(null);\r\n added.forEach(i => {\r\n this.refrigerantTypesDataStore.byKey(i).then(refrigerant => {\r\n this.refrigerants.push(refrigerant);\r\n this.priceList.Refrigerants.push({ RefrigerantTypeId: i, Percentage: 0, Value: refrigerant.SellingPrice, PriceCalcTypeId: PriceCalcType.StandardPriceLessPercent });\r\n });\r\n });\r\n }\r\n\r\n public ShowAddRefrigerantDialogue(): void {\r\n this.refrigerantsPopup.Show();\r\n }\r\n\r\n public RemoveRefrigerant(): void {\r\n if (this.selectedRefrigerantPriceIds) {\r\n this.selectedRefrigerantPriceIds\r\n .forEach(f => {\r\n return this.priceList.Refrigerants.splice(this.priceList.Refrigerants.findIndex(p => p.RefrigerantTypeId === f), 1);\r\n });\r\n this.FormMarkDirty(null);\r\n }\r\n }\r\n\r\n public RefrigerantTypeSortValue(data: any): string {\r\n return this.lookup.calculateCellValue(data.RefrigerantTypeId);\r\n }\r\n\r\n public getBaseValue(refrigerantTypeId: number, priceCalcTypeId: PriceCalcType): Observable {\r\n switch(priceCalcTypeId) {\r\n case PriceCalcType.ActualCostPlusPercent:\r\n case PriceCalcType.StandardCostPlusPercent:\r\n return this.getCost(refrigerantTypeId, this.refrigerantCosts);\r\n case PriceCalcType.StandardPriceLessPercent:\r\n case PriceCalcType.SpecialPrice:\r\n const item = this.refrigerants.find(i => i.RefrigerantTypeId === refrigerantTypeId);\r\n return of(item?.SellingPrice ?? 0);\r\n }\r\n }\r\n\r\n private loadDataSources(): void {\r\n this.refrigerantTypesDataSource = this.refrigerantTypeService.GetDataSource();\r\n this.refrigerantTypesDataStore = this.refrigerantTypeService.GetDataStore();\r\n }\r\n\r\n private getCost(refrigerantTypeId: number, costLookup: { [refrigerantTypeId: number]: number }): Observable {\r\n if (costLookup[refrigerantTypeId] == null) {\r\n return this.refrigerantTypeService.GetEstimatedCost(refrigerantTypeId, 1).pipe(tap(cost => costLookup[refrigerantTypeId] = cost));\r\n }\r\n return of(costLookup[refrigerantTypeId]);\r\n }\r\n\r\n private addPercent(price: number, percent: number): number {\r\n return Math.round((price * (1 + percent)) * 100) / 100;\r\n }\r\n\r\n private subtractPercent(price: number, percent: number): number {\r\n return Math.round((price * (1 - percent)) * 100) / 100;\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n

{{ 'price.list.details.materials.defaultPriceCalc' | translate }}

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

{{ 'price.list.details.materials.exceptions' | translate }}

\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {{data.value | percent:'1.2-2'}}\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n ","import { Component, Input, OnInit, ViewChild } from \"@angular/core\";\r\nimport { UntypedFormControl } from \"@angular/forms\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { MakeModelSharedService } from \"servicesight-shared\";\r\nimport { AddMakeModelDialogueComponent } from \"src/app/shared/components/add-make-model-dialogue/add-make-model-dialogue.component\";\r\nimport { ISelectOption } from \"src/app/shared/models/iselect-option.model\";\r\nimport { PriceCalcType } from \"src/app/shared/pipes/enums/price-calc-type-enum\";\r\nimport { PriceList } from \"../../models/price-list\";\r\nimport { PriceListService } from \"../../services/price-list.service\";\r\n\r\n@Component({\r\n selector: \"app-price-list-equipment-tab\",\r\n templateUrl: \"./price-list-equipment-tab.component.html\",\r\n styleUrls: [\"./price-list-equipment-tab.component.scss\"]\r\n})\r\nexport class PriceListEquipmentTabComponent implements OnInit {\r\n @Input() priceList: PriceList = new PriceList();\r\n @Input() form: UntypedFormControl;\r\n @Input() public priceCalcTypes: ISelectOption[];\r\n @Input() public proEnabled: boolean = false;\r\n @ViewChild(\"addMakeModelDialog\", { static: false }) AddMakeModelDialog: AddMakeModelDialogueComponent;\r\n\r\n\r\n public calcTypeDataSource: ODataStore;\r\n public calcTypeValue: Array = [this.translate.instant(\"price-calc-type.price-less-percentage\")];\r\n public makeModelListDataStore: ODataStore;\r\n public selectedEquipmentExceptions: Array;\r\n\r\n constructor(private priceListService: PriceListService,\r\n private makeModelService: MakeModelSharedService,\r\n private translate: TranslateService) {\r\n }\r\n\r\n public get alreadyAdded(): number[] {\r\n return this.priceList.Equipment?.map(i => i.MakeModelId);\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.calcTypeDataSource = this.priceListService.GetCalcTypesDataStore();\r\n this.calcTypeDataSource.load();\r\n this.makeModelListDataStore = this.makeModelService.GetMakeModelsDataStore();\r\n }\r\n\r\n public ClosedEquipmentDialog(): void {\r\n this.AddMakeModelDialog.Close();\r\n }\r\n\r\n public OnMakeModelIdsAdded(ids: number[]): void {\r\n this.FormMarkDirty(null);\r\n if (ids && ids.length) {\r\n ids.forEach(id => {\r\n this.priceList.Equipment.push({\r\n PriceListId: this.priceList.PriceListID,\r\n MakeModelId: id,\r\n Percentage: 0,\r\n PriceCalcTypeId: PriceCalcType.StandardPriceLessPercent\r\n });\r\n });\r\n }\r\n this.AddMakeModelDialog.Close();\r\n }\r\n\r\n public OpenMakeModelDialog(): void {\r\n this.AddMakeModelDialog.Show();\r\n }\r\n\r\n public Remove(): void {\r\n if (this.selectedEquipmentExceptions.length) {\r\n this.selectedEquipmentExceptions\r\n .forEach(i => {\r\n return this.priceList.Equipment.splice(this.priceList.Equipment.findIndex(p => p.MakeModelId === i), 1);\r\n });\r\n }\r\n this.FormMarkDirty(null);\r\n }\r\n\r\n public FormMarkDirty(e: any): void {\r\n if (e && e.event || !e) { // triggered from user in the UI when e.event or called directly from the component code when !e\r\n this.form.markAsDirty();\r\n }\r\n }\r\n\r\n public customDisplayExpr(data: any): string {\r\n if (data) {\r\n return `${data.Make} / ${data.Model}`;\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n {{ 'price.list.details.header' | translate }} {{PriceList.PriceList}}\r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import { Location } from \"@angular/common\";\r\nimport { Component, HostListener, Input, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { combineLatest, Observable } from \"rxjs\";\r\nimport { tap } from \"rxjs/operators\";\r\nimport { ComponentCanDeactivate, FormMesssageService, IProteanResponse, Module } from \"servicesight-shared\";\r\nimport { ISelectOption } from \"src/app/shared/models/iselect-option.model\";\r\nimport { PriceCalcType } from \"src/app/shared/pipes/enums/price-calc-type-enum\";\r\nimport { PriceCalcTypePipe } from \"src/app/shared/pipes/price-calc-type.pipe\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport { StockPermissionsService } from \"./../../../stock/services/stock-permissions.service\";\r\nimport { PriceList } from \"../../models/price-list\";\r\nimport { PriceListService } from \"../../services/price-list.service\";\r\n\r\n@Component({\r\n selector: \"app-price-list-detail\",\r\n templateUrl: \"./price-list-detail.component.html\",\r\n styleUrls: [\"./price-list-detail.component.scss\"],\r\n providers: [ PriceCalcTypePipe ]\r\n})\r\nexport class PriceListDetailComponent implements OnInit, ComponentCanDeactivate {\r\n @Input() public id: number;\r\n @Input() public isNewlyCreated: boolean;\r\n public readonly formName: string = \"myForm\";\r\n public isNew: boolean;\r\n public PriceList: PriceList;\r\n public canBeDeleted: boolean = true;\r\n public showDeleteInfo: boolean;\r\n public showDeleteWarning: boolean;\r\n public showDiscardWarning: boolean;\r\n public hasDeletePermission: boolean = true;\r\n private pristineFormData: PriceList;\r\n public allPriceCalcTypes: ISelectOption[];\r\n public priceCalcTypes: ISelectOption[];\r\n public priceCalcTypesEquipment: ISelectOption[];\r\n public proEnabled: boolean = true;\r\n public purchaseOrdersEnabled: boolean = true;\r\n public IsFGasModuleEnabled: boolean = false;\r\n @ViewChild(\"priceListForm\", { static: true }) private form: NgForm;\r\n\r\n constructor(\r\n private priceListService: PriceListService,\r\n private locationCommon: Location,\r\n private formMessageService: FormMesssageService,\r\n private permissionService: StockPermissionsService,\r\n private translate: TranslateService,\r\n private priceCalcTypePipe: PriceCalcTypePipe,\r\n private licenseService: LicenseService) {\r\n this.PriceList = new PriceList();\r\n }\r\n\r\n @HostListener(\"window:beforeunload\")\r\n public canDeactivate(): Observable | boolean {\r\n return !this.form.form.dirty;\r\n }\r\n\r\n ngOnInit() {\r\n this.permissionService.Reload();\r\n this.permissionService.HasDeletePriceListPermission.subscribe(x => this.hasDeletePermission = x);\r\n\r\n this.loadModules().subscribe(() => {\r\n this.allPriceCalcTypes = this.getCalcTypes();\r\n this.priceCalcTypes = this.allPriceCalcTypes.filter(t => t.Id !== PriceCalcType.SpecialPrice);\r\n this.priceCalcTypesEquipment = this.priceCalcTypes.filter(t => t.Id !== PriceCalcType.ActualCostPlusPercent);\r\n });\r\n\r\n this.reloadData();\r\n }\r\n\r\n\r\n public startEditing() {\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public onConfirmDeletion($event: boolean) {\r\n if ($event) {\r\n this.formMessageService.RegisterObservable(this.priceListService.DeletePriceListItem(this.id), this.formName).subscribe(() => {\r\n this.showDeleteWarning = false;\r\n this.locationCommon.go(\"/proteansystem/systems/pricelist\");\r\n });\r\n } else {\r\n this.showDeleteWarning = false;\r\n }\r\n }\r\n\r\n Save() {\r\n this.formMessageService.RegisterObservable(this.priceListService.SavePriceListItem(this.PriceList), this.formName)\r\n .subscribe(x => {\r\n if (this.isNew) {\r\n this.isNew = false;\r\n }\r\n this.id = x.EntityId;\r\n this.reloadData();\r\n });\r\n }\r\n\r\n Delete() {\r\n if (!this.PriceList.IsUsedOnCustomers) {\r\n this.showDeleteWarning = true;\r\n } else {\r\n this.showDeleteInfo = true;\r\n }\r\n }\r\n\r\n Discard() {\r\n this.showDiscardWarning = true;\r\n }\r\n\r\n onReadConfirm() {\r\n this.showDeleteInfo = false;\r\n }\r\n\r\n onDiscardConfirm($event: boolean) {\r\n this.showDiscardWarning = false;\r\n if ($event && this.isNew) {\r\n this.PriceList = new PriceList();\r\n } else if ($event && !this.isNew) {\r\n this.PriceList = JSON.parse(JSON.stringify(this.pristineFormData));\r\n this.form.form.markAsPristine();\r\n }\r\n }\r\n\r\n private reloadData() {\r\n if (this.id) {\r\n this.priceListService.GetPriceListItem(this.id).subscribe(x => {\r\n this.PriceList = x;\r\n this.pristineFormData = JSON.parse(JSON.stringify(x));\r\n if (this.PriceList.PriceListID === 1) {\r\n this.canBeDeleted = false;\r\n }\r\n });\r\n } else {\r\n this.isNew = true;\r\n }\r\n }\r\n private getCalcTypes(): ISelectOption[] {\r\n const result = [{\r\n Id: PriceCalcType.StandardPriceLessPercent,\r\n Name: this.translate.instant(this.priceCalcTypePipe.transform(PriceCalcType.StandardPriceLessPercent))\r\n }, {\r\n Id: PriceCalcType.SpecialPrice,\r\n Name: this.translate.instant(this.priceCalcTypePipe.transform(PriceCalcType.SpecialPrice))\r\n }];\r\n\r\n if (this.proEnabled) {\r\n result.push({\r\n Id: PriceCalcType.ActualCostPlusPercent,\r\n Name: this.translate.instant(this.priceCalcTypePipe.transform(PriceCalcType.ActualCostPlusPercent))\r\n });\r\n }\r\n if (this.purchaseOrdersEnabled) {\r\n result.push({\r\n Id: PriceCalcType.StandardCostPlusPercent,\r\n Name: this.translate.instant(this.priceCalcTypePipe.transform(PriceCalcType.StandardCostPlusPercent))\r\n });\r\n }\r\n return result;\r\n }\r\n\r\n private loadModules(): Observable<[boolean, boolean, boolean]> {\r\n return combineLatest([\r\n this.licenseService.GetCompanyHasAccessToModule(Module.Pro),\r\n this.licenseService.GetCompanyHasAccessToModule(Module.PurchaseOrders),\r\n this.licenseService.GetCompanyHasAccessToModule(Module.FGas),\r\n ]).pipe(tap(x => {\r\n this.proEnabled = x[0];\r\n this.purchaseOrdersEnabled = x[1];\r\n this.IsFGasModuleEnabled = x[2];\r\n }));\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'stock.PriceLists.header' | translate }}\r\n
{{ 'stock.PriceLists.subheader' | translate }}
\r\n

\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n","import { Location } from \"@angular/common\";\r\nimport { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { StockPermissionsService } from \"./../../stock/services/stock-permissions.service\";\r\nimport { PriceListService } from \"../services/price-list.service\";\r\n\r\n@Component({\r\n selector: \"app-price-list\",\r\n templateUrl: \"./price-list.component.html\",\r\n styleUrls: [\"./price-list.component.scss\"]\r\n})\r\nexport class PriceListComponent implements OnInit {\r\n public PriceListSource: DataSource;\r\n public SearchText: string = \"\";\r\n public hasAddPermission: boolean;\r\n @ViewChild(\"grid\", { static: true }) dataGrid: DxDataGridComponent;\r\n\r\n constructor(\r\n private priceListService: PriceListService,\r\n private location: Location,\r\n private permissionService: StockPermissionsService) { }\r\n\r\n ngOnInit() {\r\n this.permissionService.Reload();\r\n this.permissionService.HasAddPriceListPermission.subscribe(x => this.hasAddPermission = x);\r\n this.PriceListSource = this.priceListService.GetPriceListsDataSource();\r\n }\r\n\r\n public OnSearchValueChange() {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n createNewPriceList() {\r\n this.location.go(\"/proteansystem/systems/pricelist/new-price-list\");\r\n }\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { Observable } from \"rxjs/internal/Observable\";\r\nimport { IServiceSightCollection } from \"../../quotes/models/IServiceSightCollection\";\r\nimport { SecurityRolesListModel } from \"../security-settings/models/security-roles-list.model\";\r\nimport { RolesMetadataModel } from \"../security-settings/models/roles-metadata.model\";\r\nimport { IAppConfig, APP_CONFIG, IProteanResponse } from \"servicesight-shared\";\r\nimport { SecurityRoleUpdateModel } from \"../security-settings/models/security-role-update.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class SecurityRoleService {\r\n private readonly baseUrl: string;\r\n private readonly securityRoleUrl: string;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) appConfig: IAppConfig) {\r\n this.baseUrl = appConfig.apiLocations.ServiceSight;\r\n this.securityRoleUrl = this.baseUrl + \"SecurityRole/\";\r\n }\r\n\r\n public GetRolesAsync(): Observable> {\r\n return this.http.get>(this.securityRoleUrl + \"GetRolesAsync\");\r\n }\r\n\r\n public GetSecurityRoleItem(entityId: number | string): Observable {\r\n return this.http.post(`${this.securityRoleUrl}GetRoleAsync?entityId=${entityId}`, entityId);\r\n }\r\n\r\n public GetMetadata(entityId: number | string, roleTypeId: number): Observable {\r\n return this.http.get(`${this.securityRoleUrl}GetRolesMetadataAsync?roleId=${entityId}&roleTypeId=${roleTypeId}`);\r\n }\r\n\r\n public DeleteItem(entityId: number): Observable {\r\n return this.http.post(`${this.securityRoleUrl}DeleteAsync?entityId=${entityId}`, entityId);\r\n }\r\n\r\n public UpdateItem(model: SecurityRoleUpdateModel): Observable {\r\n return this.http.post(`${this.securityRoleUrl}UpdateAsync`, model);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n \r\n {{ 'settings.security.security-roles.new-security-role' | translate }}\r\n \r\n \r\n {{ 'settings.security.security-roles.security-role' | translate }}\r\n {{ SecurityRoleData?.Name }}\r\n \r\n

\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n \r\n \r\n\r\n \r\n
\r\n
\r\n
\r\n {{ 'settings.security.security-roles.name' | translate }}\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n\r\n \r\n
\r\n
\r\n
\r\n
\r\n

{{ 'settings.security.security-roles.employees-assigned' | translate }}

\r\n

{{ 'settings.security.security-roles.engineers-assigned' | translate }}

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n {{ item.text }}\r\n
\r\n \r\n
\r\n \r\n\r\n \r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n {{ 'buttons.delete' | translate }}\r\n \r\n \r\n {{ 'buttons.discard' | translate }}\r\n \r\n \r\n {{ 'buttons.save' | translate }}\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n\r\n","import { Location } from \"@angular/common\";\r\nimport { Component, Input, OnChanges, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { DxTreeViewComponent } from \"devextreme-angular\";\r\nimport { FormMesssageService } from \"servicesight-shared\";\r\nimport { SecurityRoleService } from \"../../services/security-role.service\";\r\nimport { BusinessEntitiesModel } from \"../models/business-entities.model\";\r\nimport { PermissionChangesModel } from \"../models/permission-changes.model\";\r\nimport { SecurityRoleEmployeesModel } from \"../models/security-role-employees.model\";\r\nimport { SecurityRoleUpdateModel } from \"../models/security-role-update.model\";\r\nimport { SecurityRolesListModel } from \"../models/security-roles-list.model\";\r\nimport { TreeConfigModel } from \"../models/tree-config.model\";\r\n\r\n@Component({\r\n selector: \"app-security-roles-detail\",\r\n templateUrl: \"./security-roles-detail.component.html\",\r\n styleUrls: [\"./security-roles-detail.component.scss\"]\r\n})\r\nexport class SecurityRolesDetailComponent implements OnChanges {\r\n @Input() securityRoleId: number = null;\r\n @Input() securityRoleTypeId: number = null;\r\n @Input() isNewlyCreated: boolean;\r\n @ViewChild(\"securityRolesForm\", { static: true}) form: NgForm;\r\n @ViewChild(DxTreeViewComponent, { static: false}) treeView: DxTreeViewComponent;\r\n\r\n public AllBusinessEntities: BusinessEntitiesModel[];\r\n public Employees: SecurityRoleEmployeesModel[];\r\n public SecurityRoleData: SecurityRolesListModel = new Object() as SecurityRolesListModel;\r\n public ShowDeleteWarning: boolean = false;\r\n public ShowCopyPermissionsPopup: boolean = false;\r\n public readonly FormName: string = \"securityRolesForm\";\r\n public ShowDiscardWarning: boolean = false;\r\n public SelectedSecurityRoles: BusinessEntitiesModel[] = [];\r\n public SelectedSecurityRoleId: number = null;\r\n private isCopied: boolean = false;\r\n private updatedEmployees: SecurityRoleEmployeesModel[] = [];\r\n\r\n public get IsNew(): boolean {\r\n return this.securityRoleId == null;\r\n }\r\n public SecurityRoles = [];\r\n public SecurityRolesList: SecurityRolesListModel[] = [];\r\n private permissionsChanged: PermissionChangesModel[] = [];\r\n private roleId: number | string = \"\";\r\n private permissionsSet: PermissionChangesModel[] = [];\r\n private securityRolesListPath: string = \"/proteansystem/systems/securityrole/list\";\r\n private warningIsShowing: boolean;\r\n\r\n constructor(\r\n private securityRoleService: SecurityRoleService,\r\n private formMessageService: FormMesssageService,\r\n private location: Location) {\r\n this.TreeViewContentReady = this.TreeViewContentReady.bind(this);\r\n }\r\n\r\n public ngOnChanges(): void {\r\n this.securityRoleTypeId = Number(this.securityRoleTypeId) || 1;\r\n if (this.securityRoleId || this.securityRoleId === null) {\r\n this.roleId = this.securityRoleId ? this.securityRoleId : \"\";\r\n this.loadSecurityRolesData(this.roleId, this.securityRoleTypeId || 1);\r\n }\r\n }\r\n\r\n public OnSaveSecurityRole(): void {\r\n this.handlePermissionChanges();\r\n\r\n const securityRoleUpdate = this.securityRoleUpdateObject();\r\n\r\n this.formMessageService.RegisterObservable(this.securityRoleService.UpdateItem(securityRoleUpdate), this.FormName).subscribe(x => {\r\n if (this.IsNew) {\r\n this.location.go(`/proteansystem/systems/securityrole/detail/${x.EntityId}?isNewlyCreated=true`);\r\n }\r\n this.loadSecurityRolesData(this.roleId, this.securityRoleTypeId || 1);\r\n this.permissionsChanged = [];\r\n this.updatedEmployees = [];\r\n });\r\n }\r\n\r\n public OnDeleteSecurityRole(): void {\r\n this.ShowDeleteWarning = true;\r\n }\r\n\r\n public OnDiscardSecurityRole(): void {\r\n if (this.form.dirty) {\r\n this.ShowDiscardWarning = true;\r\n }\r\n }\r\n\r\n public TreeViewSelectionChanged(e): void {\r\n this.form.form.markAsDirty();\r\n this.syncSelection(e.component);\r\n }\r\n\r\n public TreeViewContentReady(): void {\r\n if (this.AllBusinessEntities && !this.isCopied) {\r\n this.AllBusinessEntities.map(x => {\r\n if (x.state.selected) {\r\n this.treeView.instance.selectItem(x.id);\r\n }\r\n });\r\n this.treeView.instance.expandItem(\"root_01\");\r\n this.isCopied = true;\r\n }\r\n }\r\n\r\n public OnConfirmDeletion($event: boolean): void {\r\n if ($event && this.securityRoleId) {\r\n this.formMessageService.RegisterObservable(this.securityRoleService.DeleteItem(this.securityRoleId), this.FormName)\r\n .subscribe(() => {\r\n this.location.go(this.securityRolesListPath);\r\n });\r\n } else {\r\n this.ShowDeleteWarning = false;\r\n }\r\n }\r\n\r\n public CloseCopyPermissionPopup(): void {\r\n this.ShowCopyPermissionsPopup = false;\r\n }\r\n\r\n public CopySecurityRole(): void {\r\n this.securityRoleService.GetMetadata(this.SelectedSecurityRoleId, this.securityRoleTypeId || 1).subscribe(x => {\r\n this.AllBusinessEntities = x.AllBusinessEntities;\r\n this.Employees = x.Employees;\r\n this.createTreeList();\r\n // eslint-disable-next-line no-underscore-dangle\r\n this.treeView.instance._refresh();\r\n this.form.form.markAsDirty();\r\n });\r\n this.ShowCopyPermissionsPopup = false;\r\n }\r\n\r\n public OnConfirmDiscard($event: boolean): void {\r\n if ($event) {\r\n this.loadSecurityRolesData(this.roleId, this.securityRoleTypeId || 1);\r\n }\r\n this.ShowDiscardWarning = false;\r\n }\r\n\r\n public OpenCopyPermissionModal(): void {\r\n this.securityRoleService.GetRolesAsync().subscribe(x => {\r\n this.SecurityRolesList = x.ModelCollection;\r\n this.ShowCopyPermissionsPopup = true;\r\n });\r\n }\r\n\r\n public handleEmployeeClick(employee: SecurityRoleEmployeesModel): void {\r\n if (!this.warningIsShowing && employee.IsInRole && !employee.IsModified) {\r\n this.warningIsShowing = true;\r\n this.formMessageService.ShowWarning(\"employee.remove-from-role.warning\", this.FormName);\r\n }\r\n }\r\n\r\n public handleEmployeeAssigned($event, employee: SecurityRoleEmployeesModel): void {\r\n this.form.form.markAsDirty();\r\n const foundElement = this.updatedEmployees.find(x => x.EmployeeID === employee.EmployeeID);\r\n this.markEmployeeAsModified(employee.EmployeeID);\r\n\r\n if (foundElement && foundElement.IsInRole !== $event.value) {\r\n this.updatedEmployees = this.updatedEmployees.filter(x => x.EmployeeID !== employee.EmployeeID);\r\n } else {\r\n this.updatedEmployees.push({\r\n EmployeeID: employee.EmployeeID,\r\n EmployeeName: employee.EmployeeName,\r\n IsInRole: $event.value,\r\n IsInRoleSorting: employee.IsInRoleSorting\r\n });\r\n }\r\n }\r\n\r\n private markEmployeeAsModified(employeeId: number): void {\r\n const employee = this.Employees.find(x => x.EmployeeID === employeeId);\r\n if (employee) {\r\n employee.IsModified = true;\r\n }\r\n }\r\n\r\n private syncSelection(treeView): void {\r\n const selectedSecurityRoles = treeView.getSelectedNodes()\r\n .map(node => node.itemData);\r\n this.SelectedSecurityRoles = selectedSecurityRoles;\r\n }\r\n\r\n private processTreeData(id: string, selectedState: boolean = false): PermissionChangesModel {\r\n const systemCode = id.substr(0, 1);\r\n const treeId = Number(id.substr(1));\r\n let systemType: string = \"\";\r\n switch (systemCode) {\r\n case \"S\":\r\n systemType = \"SYSTEM\";\r\n break;\r\n case \"A\":\r\n systemType = \"ACTION\";\r\n break;\r\n case \"Z\":\r\n case \"F\":\r\n systemType = \"FORMS\";\r\n break;\r\n case \"Q\":\r\n systemType = \"REPORTS\";\r\n break;\r\n case \"R\":\r\n systemType = \"REPORT\";\r\n }\r\n\r\n return {\r\n TreeID: treeId,\r\n SystemType: systemType,\r\n IsRemoved: selectedState\r\n };\r\n }\r\n\r\n private createTreeList(): void {\r\n this.permissionsSet = [];\r\n const securityRolesItems = JSON.parse(JSON.stringify(this.AllBusinessEntities));\r\n\r\n securityRolesItems.map((x) => {\r\n const parent = securityRolesItems.find(y => y.id === x.parent);\r\n\r\n if (parent && !parent.items) {\r\n parent.items = [x];\r\n } else if (parent && parent.items) {\r\n parent.items.push(x);\r\n }\r\n\r\n if (x.state.selected) {\r\n const permissionSetItem = this.processTreeData(x.id);\r\n this.permissionsSet.push(permissionSetItem);\r\n }\r\n });\r\n\r\n if (!this.SecurityRoles.length) {\r\n this.SecurityRoles.push(securityRolesItems.find(x => x.parent = \"#\"));\r\n }\r\n }\r\n\r\n private loadSecurityRolesData(roleId: number | string, roleTypeId: number): void {\r\n this.securityRoleService.GetMetadata(roleId, roleTypeId).subscribe(x => {\r\n this.AllBusinessEntities = x.AllBusinessEntities;\r\n this.Employees = x.Employees;\r\n this.createTreeList();\r\n });\r\n\r\n this.securityRoleService.GetSecurityRoleItem(roleId).subscribe(x => {\r\n this.securityRoleTypeId = x.RoleType || this.securityRoleTypeId;\r\n this.SecurityRoleData = x;\r\n if (!this.securityRoleId) {\r\n this.SecurityRoleData.RoleID = -1;\r\n }\r\n });\r\n }\r\n\r\n private treeConfigObject(): TreeConfigModel {\r\n return {\r\n core: {\r\n multiple: true,\r\n animation: true,\r\n check_callback: false,\r\n worker: true,\r\n cache: false,\r\n themes: {\r\n name: \"protean\",\r\n responsive: true\r\n },\r\n initially_open: [\"root_01\"]\r\n },\r\n version: 1,\r\n plugins: [\"checkbox\", \"json_data\", \"hotkeys\"],\r\n checkbox: {\r\n three_state: true,\r\n whole_node: false,\r\n tie_selection: false\r\n }\r\n };\r\n }\r\n\r\n private securityRoleUpdateObject(): SecurityRoleUpdateModel {\r\n return {\r\n AllPermissionChanges: this.permissionsChanged,\r\n Allsystemsselected: null,\r\n IsAllowedAdd: this.SecurityRoleData.IsAllowedAdd,\r\n IsAllowedDelete: this.SecurityRoleData.IsAllowedDelete,\r\n IsAllowedEdit: this.SecurityRoleData.IsAllowedEdit,\r\n IsAllowedView: this.SecurityRoleData.IsAllowedView,\r\n Name: this.SecurityRoleData.Name,\r\n Description: this.SecurityRoleData.Description,\r\n RoleID: this.SecurityRoleData.RoleID,\r\n RoleType: this.securityRoleTypeId,\r\n sourceroleid: 0,\r\n treeConfig: this.treeConfigObject(),\r\n treeData: this.AllBusinessEntities,\r\n UpdatedEmployees: this.updatedEmployees,\r\n Timestamp: this.SecurityRoleData.Timestamp\r\n };\r\n }\r\n\r\n private compareArray(otherArray: PermissionChangesModel[]): (current: PermissionChangesModel) => boolean {\r\n return (current: PermissionChangesModel) => {\r\n return otherArray.filter((other) => {\r\n return other.TreeID === current.TreeID && other.SystemType === current.SystemType && other.IsRemoved === current.IsRemoved;\r\n }).length === 0;\r\n };\r\n }\r\n\r\n private handlePermissionChanges(): void {\r\n this.SelectedSecurityRoles.map(x => {\r\n const permissionsChangedItem = this.processTreeData(x.id, !x.selected);\r\n if (permissionsChangedItem.SystemType === \"ACTION\" || permissionsChangedItem.SystemType === \"REPORT\") {\r\n this.permissionsChanged.push(permissionsChangedItem);\r\n }\r\n });\r\n\r\n const permissionsRemoved = this.permissionsSet.filter(this.compareArray(this.permissionsChanged));\r\n permissionsRemoved.map(x => x.IsRemoved = true);\r\n\r\n const permissionsAdded = this.permissionsChanged.filter(this.compareArray(this.permissionsSet));\r\n\r\n this.permissionsChanged = permissionsRemoved.concat(permissionsAdded);\r\n }\r\n}\r\n","export enum RoleType {\r\n ServiceSight = 1,\r\n Portal = 2,\r\n Mobile = 3\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { Module } from \"servicesight-shared\";\r\nimport { RoleType } from \"../enums/role-type.enum\";\r\n\r\n@Pipe({\r\n name: \"roleType\"\r\n})\r\nexport class RoleTypePipe implements PipeTransform {\r\n\r\n private readonly quoteStatus = {\r\n [RoleType.ServiceSight]: \"settings.security-role.type.servicesight\",\r\n [RoleType.Portal]: \"settings.security-role.type.portal\",\r\n [RoleType.Mobile]: \"settings.security-role.type.mobile\"\r\n };\r\n\r\n private readonly stringValueMapping = {\r\n ServiceSight: RoleType.ServiceSight,\r\n Portal: RoleType.Portal,\r\n Mobile: RoleType.Mobile\r\n };\r\n\r\n public transform(value: Module): string {\r\n let safeValue = Number(value);\r\n if (isNaN(safeValue)) {\r\n safeValue = this.stringValueMapping[value];\r\n }\r\n\r\n return this.quoteStatus[safeValue];\r\n }\r\n\r\n}\r\n","
\r\n
\r\n

{{ 'settings.security.security-roles.header' | translate }}\r\n
{{ 'settings.security.security-roles.subheading' | translate }}
\r\n

\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n
\r\n {{ data.value | roleType | translate }}\r\n
\r\n \r\n
\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular/ui/data-grid\";\r\nimport { HelpItemTagEnum } from \"servicesight-shared\";\r\nimport { DropdownItem } from \"src/app/shared/models/dropdown-item.model\";\r\nimport { RoleType } from \"../../enums/role-type.enum\";\r\nimport { SecurityRoleService } from \"../../services/security-role.service\";\r\nimport { SecurityRolesListModel } from \"../models/security-roles-list.model\";\r\n\r\n@Component({\r\n selector: \"app-security-roles-list\",\r\n templateUrl: \"./security-roles-list.component.html\",\r\n styleUrls: [\"./security-roles-list.component.scss\"]\r\n})\r\nexport class SecurityRolesListComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n\r\n public helpItemTagEnum = HelpItemTagEnum;\r\n public SearchText: string = \"\";\r\n public SecurityRolesItems: SecurityRolesListModel[];\r\n public newRoleOptions: DropdownItem[] = [\r\n { value: RoleType.ServiceSight, nameTranslationKey: \"settings.security-role.type.servicesight\" },\r\n { value: RoleType.Portal, nameTranslationKey: \"settings.security-role.type.portal\" },\r\n { value: RoleType.Mobile, nameTranslationKey: \"settings.security-role.type.mobile\" }\r\n ];\r\n\r\n constructor(private securityRoleService: SecurityRoleService) { }\r\n\r\n public ngOnInit(): void {\r\n this.securityRoleService.GetRolesAsync()\r\n .subscribe(x => this.SecurityRolesItems = x.ModelCollection);\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public NewRoleAction: (event: any) => void = (event: any) => {\r\n const type = event.itemData.value as RoleType;\r\n\r\n switch (type) {\r\n case RoleType.ServiceSight:\r\n location.href = \"#/proteansystem/systems/securityrole/detail/?roleTypeId=1\";\r\n break;\r\n case RoleType.Portal:\r\n location.href = \"#/proteansystem/systems/securityrole/detail/?roleTypeId=2\";\r\n break;\r\n case RoleType.Mobile:\r\n location.href = \"#/proteansystem/systems/securityrole/detail/?roleTypeId=3\";\r\n break;\r\n default:\r\n throw new Error(\"Invalid role type\");\r\n }\r\n };\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { Module } from \"servicesight-shared\";\r\n\r\n@Pipe({\r\n name: \"modules\"\r\n})\r\nexport class ModulesPipe implements PipeTransform {\r\n\r\n private readonly quoteStatus = {\r\n [Module.AccountsLink]: \"settings.licence-viewer.modules.accounts-link\",\r\n [Module.Equipment]: \"settings.licence-viewer.modules.equipment\",\r\n [Module.PhotoEditing]: \"settings.licence-viewer.modules.photo-editing\",\r\n [Module.Portal]: \"settings.licence-viewer.modules.portal\",\r\n [Module.PowerBI]: \"settings.licence-viewer.modules.power-bi\",\r\n [Module.Pro]: \"settings.licence-viewer.modules.pro\",\r\n [Module.PurchaseOrders]: \"settings.licence-viewer.modules.purchase-orders\",\r\n [Module.RecurringJobs]: \"settings.licence-viewer.modules.recurring-jobs\",\r\n [Module.SalesCampaigns]: \"settings.licence-viewer.modules.sales-campaigns\",\r\n [Module.SalesOpportunity]: \"settings.licence-viewer.modules.sales-opportunities\",\r\n [Module.SalesOrders]: \"settings.licence-viewer.modules.sales-orders\",\r\n [Module.ServiceContract]: \"settings.licence-viewer.modules.service-contracts\",\r\n [Module.Stock]: \"settings.licence-viewer.modules.stock\",\r\n [Module.Timesheets]: \"settings.licence-viewer.modules.timesheets\",\r\n [Module.FGas]: \"settings.licence-viewer.modules.fgas\",\r\n [Module.Billing]: \"settings.licence-viewer.modules.billing\",\r\n [Module.LayoutDesigner]: \"settings.licence-viewer.modules.layout-designer\",\r\n [Module.CustomerFeedback]: \"settings.licence-viewer.modules.customer-feedback\",\r\n [Module.GasSafe]: \"settings.licence-viewer.modules.gas-safe\",\r\n [Module.AdvancedQuotes]: \"settings.licence-viewer.modules.advanced-quotes\",\r\n [Module.CFTS]: \"settings.licence-viewer.modules.cfts\",\r\n [Module.Sfg20]: \"settings.licence-viewer.modules.sfg20\",\r\n [Module.Projects]: \"settings.licence-viewer.modules.projects\"\r\n };\r\n\r\n private readonly stringValueMapping = {\r\n AccountsLink: Module.AccountsLink,\r\n Equipment: Module.Equipment,\r\n PhotoEditing: Module.PhotoEditing,\r\n Portal: Module.Portal,\r\n PowerBI: Module.PowerBI,\r\n Pro: Module.Pro,\r\n PurchaseOrders: Module.PurchaseOrders,\r\n RecurringJobs: Module.RecurringJobs,\r\n SalesCampaigns: Module.SalesCampaigns,\r\n SalesOpportunity: Module.SalesOpportunity,\r\n SalesOrders: Module.SalesOrders,\r\n ServiceContract: Module.ServiceContract,\r\n Stock: Module.Stock,\r\n Timesheets: Module.Timesheets,\r\n FGas: Module.FGas,\r\n Billing: Module.Billing,\r\n LayoutDesigner: Module.LayoutDesigner,\r\n CustomerFeedback: Module.CustomerFeedback,\r\n GasSafe: Module.GasSafe,\r\n AdvancedQuotes: Module.AdvancedQuotes,\r\n CFTS: Module.CFTS,\r\n Sfg20: Module.Sfg20,\r\n Projects: Module.Projects\r\n };\r\n\r\n public transform(value: Module): string {\r\n let safeValue = Number(value);\r\n if (isNaN(safeValue)) {\r\n safeValue = this.stringValueMapping[value];\r\n }\r\n\r\n return this.quoteStatus[safeValue];\r\n }\r\n\r\n}\r\n","
\r\n
\r\n

{{ 'settings.licence-viewer.header' | translate }}
{{ 'settings.licence-viewer.subheading' | translate }}

\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {{ 'settings.licence-viewer.general' | translate }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ 'settings.licence-viewer.total-web-licences' | translate }}{{ LicenceViewerData.TotalWebLicences }}
{{ 'settings.licence-viewer.total-assigned-web-licences' | translate }}{{ LicenceViewerData.TotalWebAssigned }}
{{ 'settings.licence-viewer.total-mobile-licences' | translate }}{{ LicenceViewerData.TotalMobileLicences }}
{{ 'settings.licence-viewer.total-assigned-mobile-licences' | translate }}{{ LicenceViewerData.TotalMobileAssigned }}
\r\n
\r\n
\r\n {{ 'settings.licence-viewer.external-services' | translate }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ 'settings.licence-viewer.what-three-words' | translate }}{{ LicenceViewerData.WhatThreeWordsUsage }} / {{ LicenceViewerData.WhatThreeWordsAllowance }}
{{ 'settings.licence-viewer.text-messages' | translate }}{{ LicenceViewerData.TextMessageUsage }} / {{ LicenceViewerData.TextMessageAllowance }}
\r\n
\r\n
\r\n {{ 'settings.licence-viewer.modules' | translate }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{{ module.ModuleId | modules | translate }}\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { Component, OnInit } from \"@angular/core\";\r\nimport { HelpItemTagEnum } from \"servicesight-shared\";\r\nimport { LicenceViewerService } from \"../../services/licence-viewer.service\";\r\nimport { LicenceViewerDataModel } from \"../models/licence-viewer-data.model\";\r\n\r\n@Component({\r\n selector: \"app-licence-viewer\",\r\n templateUrl: \"./licence-viewer.component.html\",\r\n styleUrls: [\"./licence-viewer.component.scss\"]\r\n})\r\nexport class LicenceViewerComponent implements OnInit {\r\n public LicenceViewerData: LicenceViewerDataModel = new Object() as LicenceViewerDataModel;\r\n public helpItemTagEnum = HelpItemTagEnum;\r\n\r\n constructor(\r\n private licenceViewerService: LicenceViewerService) { }\r\n\r\n public ngOnInit(): void {\r\n this.licenceViewerService.GetLicenceData().subscribe(x => this.LicenceViewerData = x);\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { IAppConfig, APP_CONFIG } from \"servicesight-shared\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class PaymentsService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) { }\r\n\r\n Connect(code: string, providerId: number): Promise {\r\n return this.http.get(this.appConfig.apiLocations.ServiceSight + `payments/ConnectToProvider?code=${code}&provider=${providerId}`).toPromise();\r\n }\r\n}\r\n","
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n\r\n\r\n \r\n\r\n \r\n \r\n
\r\n\r\n \r\n\r\n \r\n \r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n {{ 'buttons.additem' | translate}}\r\n \r\n\r\n \r\n
\r\n
\r\n\r\n
\r\n\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n \r\n
\r\n
\r\n \r\n \r\n\r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n \r\n
\r\n
\r\n\r\n \r\n\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n\r\n
\r\n
\r\n

{{ bulkInsert.description | translate }}

\r\n \r\n
{{ bulkInsert.example | translate }}
\r\n \r\n\r\n
\r\n
\r\n

{{ 'inspections.template.bulk.preview' | translate }}

\r\n\r\n
\r\n
\r\n
\r\n {{ item.Text }}\r\n \r\n \r\n \r\n
\r\n
{{ option.Text }}
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n","import { CdkDragDrop, moveItemInArray } from \"@angular/cdk/drag-drop\";\r\nimport { Location } from \"@angular/common\";\r\nimport { Component, HostListener, Input, OnInit, ViewChild } from \"@angular/core\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport {\r\n ComponentCanDeactivate,\r\n FormMesssageService,\r\n Survey,\r\n SurveyPage,\r\n SurveyQuestion,\r\n SurveyQuestionType,\r\n QuestionTypePipe,\r\n SettingsService,\r\n SettingId\r\n} from \"servicesight-shared\";\r\nimport { ModuleAccessModel } from \"src/app/shared/models/module-access.model\";\r\nimport { JstranslateService } from \"../../shared/services/jstranslate/jstranslate.service\";\r\nimport { BulkOptions } from \"../models/bulkoptions\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { NoteType } from \"../enums/note-type.enum\";\r\nimport { SurveyService } from \"../services/survey.service\";\r\n\r\n@Component({\r\n selector: \"app-survey-designer\",\r\n templateUrl: \"./survey-designer.component.html\",\r\n styleUrls: [\"./survey-designer.component.scss\"]\r\n})\r\nexport class SurveyDesignerComponent implements OnInit, ComponentCanDeactivate {\r\n\r\n @Input() public templateId: number;\r\n @Input() public isNew: boolean;\r\n @ViewChild(\"templateForm\", { static: true }) form: NgForm;\r\n\r\n private get storageKey(): string {\r\n return \"feedback-survey-\" + (this.templateId || \"new\");\r\n }\r\n\r\n private internalModel: Survey;\r\n private saveTimeout: any;\r\n private portalUrl: string;\r\n\r\n public readonly formName: string = \"templateForm\";\r\n public isLoading: boolean = true;\r\n public modulesAccess: ModuleAccessModel = new ModuleAccessModel();\r\n public noteType: typeof NoteType = NoteType;\r\n public readonly emptyTemplate: Survey = {\r\n SurveyId: 0,\r\n Name: \"\",\r\n Pages: [this.emptyCategory()]\r\n };\r\n\r\n public Survey: Survey = this.cloneObject(this.emptyTemplate);\r\n public QuestionTypeDataSource: DataSource = new DataSource([\r\n SurveyQuestionType.Text,\r\n SurveyQuestionType.TextArea,\r\n SurveyQuestionType.Rating,\r\n SurveyQuestionType.Thumbs,\r\n SurveyQuestionType.Smiles,\r\n ]);\r\n\r\n public layoutTemplateDatasource: DataSource;\r\n public loaded: boolean = false;\r\n public focusOutTimeout: object = {};\r\n public currentEditable: any = {};\r\n public collapseItems: boolean = false;\r\n public get allCollapsed(): boolean {\r\n return !this.Survey.Pages.some(i => !i.IsCollapsed);\r\n }\r\n public bulkInsert: BulkOptions = new BulkOptions();\r\n public formErrors: Array = [];\r\n public BoundSave: () => Observable = this.Save.bind(this);\r\n\r\n public historyStack: Array = [];\r\n public futureStack: Array = [];\r\n\r\n constructor(\r\n private formMessageService: FormMesssageService,\r\n private location: Location,\r\n private translate: TranslateService,\r\n private questionTypePipe: QuestionTypePipe,\r\n private surveyService: SurveyService,\r\n private settingService: SettingsService,\r\n translation: JstranslateService) {\r\n translation.SetupTranslation(translate);\r\n this.QuestionTypeText = this.QuestionTypeText.bind(this);\r\n }\r\n\r\n @HostListener(\"window:beforeunload\")\r\n public canDeactivate(): Observable | boolean {\r\n return !this.form.form.dirty;\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.settingService.getSetting(SettingId.PortalUrl).subscribe(setting => {\r\n this.portalUrl = setting.ValueUrl;\r\n });\r\n\r\n if (Number(this.templateId)) {\r\n this.surveyService.Get(this.templateId).subscribe(result => {\r\n this.Survey = result;\r\n\r\n //--- if there are no Pages add an empty one to allow editing\r\n if (this.Survey.Pages.length === 0) {\r\n this.Survey.Pages.push(this.emptyCategory());\r\n }\r\n this.internalModel = this.cloneObject(this.Survey);\r\n this.loaded = true;\r\n this.isLoading = false;\r\n });\r\n } else {\r\n const localVersion = localStorage.getItem(this.storageKey);\r\n if (localVersion) {\r\n //we have one in local storage load that for user to continue working on\r\n this.Survey = JSON.parse(localVersion);\r\n }\r\n this.internalModel = this.cloneObject(this.Survey);\r\n this.loaded = true;\r\n this.isLoading = false;\r\n }\r\n }\r\n\r\n public QuestionTypeText(type: SurveyQuestionType): string {\r\n const key = this.questionTypePipe.transform(type);\r\n let text = null;\r\n if (key) {\r\n text = this.translate.instant(key);\r\n }\r\n\r\n return text;\r\n }\r\n\r\n modelChanged() {\r\n if (!this.loaded) { return; }\r\n if (this.saveTimeout !== null) {\r\n clearTimeout(this.saveTimeout);\r\n }\r\n\r\n this.formErrors.length = 0;\r\n this.futureStack.length = 0;\r\n this.historyStack.push(this.internalModel);\r\n this.internalModel = this.cloneObject(this.Survey);\r\n if (this.historyStack.length === 10) { this.historyStack.shift(); }\r\n\r\n this.form.form.markAsDirty();\r\n this.saveTimeout = setTimeout(() => this.localSave(this.Survey), 500);\r\n }\r\n\r\n localSave(inspection: Survey) {\r\n localStorage.setItem(this.storageKey, JSON.stringify(inspection));\r\n }\r\n\r\n public Save(): void {\r\n this.isLoading = true;\r\n this.formMessageService\r\n .RegisterObservable(this.surveyService.Save(this.Survey), this.formName)\r\n .subscribe((result) => {\r\n localStorage.removeItem(this.storageKey);\r\n this.isLoading = false;\r\n location.href = \"#/proteansystem/systems/feedback-survey/\" + result.SurveyId + \"?isNew=true\";\r\n }).add(() => this.isLoading = false);\r\n }\r\n\r\n public Discard(): void {\r\n this.location.back();\r\n }\r\n\r\n public Undo(): void {\r\n const last = this.historyStack.pop();\r\n this.futureStack.push(this.Survey);\r\n this.Survey = last;\r\n this.internalModel = this.cloneObject(this.Survey);\r\n }\r\n\r\n public Redo(): void {\r\n const last = this.futureStack.pop();\r\n this.historyStack.push(this.Survey);\r\n this.Survey = last;\r\n this.internalModel = this.cloneObject(this.Survey);\r\n }\r\n\r\n Delete() {\r\n this.isLoading = true;\r\n if (Number(this.templateId)) {\r\n // this.formMessageService.RegisterObservable(\r\n // this.inspectionTemplateService.DeleteById(this.templateId), this.formName)\r\n // .subscribe(() => {\r\n // location.href = \"#/proteansystem/systems/feedback-survey/0?isDeleted=true\";\r\n // localStorage.removeItem(\"feedback-survey-0\");\r\n // this.templateId = 0;\r\n // this.Survey = this.cloneObject(this.emptyTemplate);\r\n // this.internalModel = this.cloneObject(this.emptyTemplate);\r\n // this.isLoading = false;\r\n // }).add(() => this.isLoading = false); //TODO: handle errors\r\n } else {\r\n localStorage.removeItem(this.storageKey);\r\n this.Survey = this.cloneObject(this.emptyTemplate);\r\n this.futureStack.length = 0;\r\n this.historyStack.length = 0;\r\n this.internalModel = this.cloneObject(this.Survey);\r\n this.isLoading = false;\r\n }\r\n }\r\n\r\n Clone() {\r\n this.isLoading = true;\r\n // this.inspectionTemplateService.CloneTemplate(this.templateId)\r\n // .then((cloneId: number) => {\r\n // // Go to clone\r\n // location.replace(`#/proteansystem/systems/feedback-survey/${cloneId}`);\r\n // }).finally(() => this.isLoading = false);\r\n }\r\n\r\n public Preview(): void {\r\n window.open(`${this.portalUrl}/survey/preview-${this.templateId}`, \"_blank\");\r\n }\r\n\r\n IsCurrentEditable(sectionId: number, questionId: number) {\r\n return this.currentEditable.sectionId === sectionId || this.currentEditable.questionId === questionId;\r\n }\r\n\r\n FocusIn(sectionId: number, questionId: number) {\r\n this.currentEditable = {\r\n sectionId,\r\n questionId\r\n };\r\n }\r\n\r\n FocusOut(item) { //TODO: type\r\n this.focusOutTimeout[item.Id] = setTimeout(() => {\r\n item.hasFocus = false;\r\n }, 50);\r\n }\r\n\r\n AddCategory(currentCategory: SurveyPage) {\r\n const index = this.Survey.Pages.indexOf(currentCategory);\r\n this.Survey.Pages.splice(index + 1, 0, this.emptyCategory());\r\n this.modelChanged();\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n DeleteCategory(category: SurveyPage) {\r\n const index = this.Survey.Pages.indexOf(category);\r\n this.Survey.Pages.splice(index, 1);\r\n if (this.Survey.Pages.length === 0) {\r\n this.Survey.Pages.push(this.emptyCategory());\r\n }\r\n this.modelChanged();\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n AddItem(category: SurveyPage) {\r\n category.Questions.push(this.emptyItem());\r\n this.modelChanged();\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n DeleteItem(page: SurveyPage, item: SurveyQuestion) {\r\n const index = page.Questions.indexOf(item);\r\n page.Questions.splice(index, 1);\r\n if (page.Questions.length === 0) {\r\n page.Questions.push(this.emptyItem());\r\n }\r\n setTimeout(() => this.modelChanged(), 0);\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n dropCategory(event: CdkDragDrop) {\r\n moveItemInArray(this.Survey.Pages, event.previousIndex, event.currentIndex);\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n dropItem(event: CdkDragDrop, page: SurveyPage) {\r\n moveItemInArray(page.Questions, event.previousIndex, event.currentIndex);\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n Collapse() {\r\n const len = this.Survey.Pages.length;\r\n const target = !this.allCollapsed;\r\n for (let i = 0; i < len; i++) {\r\n this.Survey.Pages[i].IsCollapsed = target;\r\n }\r\n }\r\n\r\n categoryDragHandle() {\r\n this.collapseItems = true;\r\n }\r\n categoryDragHandleUp() {\r\n this.collapseItems = false;\r\n }\r\n categoryDragEnded() {\r\n this.collapseItems = false;\r\n }\r\n\r\n public optionTextChanged(item, option) {\r\n if (item.Options.filter(o => o.Text === item.DefaultAnswer).length >= 1 && item.DefaultAnswer !== option.Text) {\r\n option.removeDefault = true;\r\n }\r\n }\r\n\r\n private cloneObject(obj: any): T {\r\n return JSON.parse(JSON.stringify(obj));\r\n }\r\n\r\n private emptyCategory(): SurveyPage {\r\n return {\r\n SurveyPageId: this.newCatId(),\r\n Heading: \"\",\r\n SubHeading: \"\",\r\n Questions: [this.emptyItem()]\r\n };\r\n }\r\n\r\n private emptyItem(): SurveyQuestion {\r\n return {\r\n SurveyQuestionId: this.newItemId(),\r\n Mandatory: true,\r\n Question: \"\",\r\n Type: SurveyQuestionType.TextArea\r\n };\r\n }\r\n\r\n private newCatId(): number {\r\n return this.newId(1, 10000);\r\n }\r\n\r\n private newItemId(): number {\r\n return this.newId(10001, 20000);\r\n }\r\n\r\n private newId(min: number, max: number): number {\r\n const rnd = Math.random() * (max - min);\r\n return 0 - Math.round(rnd + min);\r\n }\r\n}\r\n","import { Component, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { UserReferenceService } from \"servicesight-shared\";\r\n\r\n@Component({\r\n selector: \"app-user-reference-options-list\",\r\n templateUrl: \"./user-reference-options-list.component.html\",\r\n styleUrls: [\"./user-reference-options-list.component.scss\"]\r\n})\r\nexport class UserReferenceOptionsListComponent implements OnInit, OnChanges {\r\n @ViewChild(\"grid\") grid: DxDataGridComponent;\r\n @Input() userRefId: number;\r\n @Input() refreshCounter: number = 0;\r\n\r\n public dataSource: DataSource = null;\r\n\r\n constructor(\r\n private userReferenceService: UserReferenceService) { }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.userRefId && changes.userRefId.currentValue) {\r\n this.dataSource = this.userReferenceService.getListDataSource(this.userRefId, true);\r\n }\r\n\r\n if (changes.refreshCounter && changes.refreshCounter.currentValue) {\r\n setTimeout(() => {\r\n this.grid.instance.repaint();\r\n }, 250);\r\n }\r\n }\r\n\r\n public ngOnInit(): void {\r\n }\r\n\r\n public onToolbarPreparing(e: any): void {\r\n // Modifies an existing item\r\n e.toolbarOptions.items.forEach(item => {\r\n if (item.name === \"addRowButton\") {\r\n item.showText = \"always\";\r\n item.options.text = \"Add\";\r\n item.options.icon = null;\r\n item.options.stylingMode = \"text\";\r\n item.options.elementAttr = {\r\n class: \"primarybtn\"\r\n };\r\n }\r\n });\r\n }\r\n}\r\n","\r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n","import { HttpClient, HttpErrorResponse, HttpResponse } from \"@angular/common/http\";\r\nimport { Injectable } from \"@angular/core\";\r\nimport { catchError, throwError } from \"rxjs\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class Ng2HttpClientService {\r\n\r\n constructor(\r\n private httpClient: HttpClient\r\n ) { }\r\n\r\n public get(url: string): Promise {\r\n return this.webRequest({\r\n url,\r\n method: \"GET\"\r\n });\r\n }\r\n\r\n public delete(url: string): Promise {\r\n return this.webRequest({\r\n url,\r\n method: \"DELETE\"\r\n });\r\n }\r\n\r\n public post(url: string, body: any, headers?: {\r\n [header: string]: string | string[];\r\n }): Promise {\r\n return this.webRequest({\r\n url,\r\n method: \"POST\",\r\n data: body,\r\n headers\r\n });\r\n }\r\n\r\n public webRequest(options: {\r\n url: string;\r\n method: string;\r\n responseType?: \"arraybuffer\" | \"blob\" | \"text\" | \"json\";\r\n data?: any;\r\n headers?: {\r\n [header: string]: string | string[];\r\n };\r\n }): Promise {\r\n return new Promise((resolve, reject) => {\r\n this.httpClient.request(options.method, options.url, {\r\n body: options.data,\r\n headers: options.headers,\r\n responseType: options.responseType || \"json\",\r\n observe: \"response\"\r\n }).pipe(\r\n catchError(error => {\r\n if (error.error) {\r\n reject({\r\n data: error.error\r\n });\r\n } else {\r\n reject(error);\r\n }\r\n return throwError(() => error);\r\n }))\r\n .subscribe(http => {\r\n if (http instanceof HttpResponse) {\r\n const response = http as HttpResponse;\r\n const responseHeaders: {\r\n [header: string]: string | string[];\r\n } = {};\r\n\r\n response.headers.keys().forEach(key => {\r\n const value = response.headers.get(key);\r\n responseHeaders[key] = value;\r\n });\r\n\r\n resolve({\r\n status: response.status,\r\n data: response.body,\r\n headers: responseHeaders\r\n });\r\n } else if ((http as any) instanceof HttpErrorResponse) {\r\n const response = http as HttpErrorResponse;\r\n reject(response);\r\n }\r\n });\r\n });\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class Ng2TranslateDowngradeService {\r\n\r\n constructor(private translate: TranslateService) { }\r\n\r\n public TranslateInstant(key: string): Promise {\r\n return this.translate.get(key).toPromise();\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'settings.employees-list.heading' | translate }}\r\n
{{ 'settings.employees-list.subheading' | translate }}
\r\n

\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n {{ 'generic.no' | translate }}\r\n {{ 'generic.yes' | translate }}\r\n
\r\n\r\n \r\n
\r\n
\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DomSanitizer, SafeResourceUrl } from \"@angular/platform-browser\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport DataSource from \"devextreme/data/data_source\";\r\nimport { GridKind, GridService, HelpItemTagEnum, UICustomisation, UserReferenceService } from \"servicesight-shared\";\r\nimport { EmployeeService } from \"src/app/shared/services/employee/employee.service\";\r\n\r\n@Component({\r\n selector: \"app-employees-list\",\r\n templateUrl: \"./employees-list.component.html\",\r\n styleUrls: [\"./employees-list.component.scss\"]\r\n})\r\nexport class EmployeesListComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n public SearchText: string = \"\";\r\n public employees: DataSource;\r\n public helpItemsTags: HelpItemTagEnum[] = [ HelpItemTagEnum.Employees ];\r\n public userRef1Label: string = null;\r\n public userRef2Label: string = null;\r\n\r\n constructor(\r\n private gridService: GridService,\r\n private employeeService: EmployeeService,\r\n private sanitizer: DomSanitizer,\r\n private userRefsService: UserReferenceService\r\n ) { }\r\n\r\n public ngOnInit(): void {\r\n this.userRef1Label = this.userRefsService.getLabel(UICustomisation.EMPLOYEE_REF1);\r\n this.userRef2Label = this.userRefsService.getLabel(UICustomisation.EMPLOYEE_REF2);\r\n\r\n this.gridService.GetLayout(GridKind.Employees).subscribe(value => {\r\n if (value) {\r\n this.dataGrid.instance.state(value);\r\n }\r\n this.GetDataSources();\r\n }, () => this.GetDataSources());\r\n }\r\n\r\n public SearchTextChanged(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public SaveLayout(): void {\r\n const state = this.dataGrid.instance.state();\r\n this.gridService.SaveLayout(state, GridKind.Employees);\r\n }\r\n\r\n public ResetLayout(): void {\r\n this.gridService.ResetLayout(GridKind.Employees);\r\n this.dataGrid.instance.state(null);\r\n }\r\n\r\n public GetImage(base64string: string): SafeResourceUrl {\r\n return this.sanitizer.bypassSecurityTrustResourceUrl(\"data:image/bmp;charset=utf-8;base64,\" + base64string);\r\n }\r\n\r\n private GetDataSources(): void {\r\n this.employees = this.employeeService.GetEmployeesListDataSource();\r\n }\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { APP_CONFIG, IAppConfig, IProteanResponse } from \"servicesight-shared\";\r\nimport { ODataService } from \"../../../shared/services/odata/odata.service\";\r\nimport { ProjectTypeModel } from \"../models/project-type\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { Observable } from \"rxjs\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class ProjectTypeService {\r\n private readonly baseUrl = this.appConfig.apiLocations.ServiceSight;\r\n private readonly projectTypesUrl = this.baseUrl + \"ProjectType/\";\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private odataService: ODataService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) {\r\n }\r\n\r\n public ODataProjectTypes(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.appConfig.apiLocations.ServiceSightOData}ProjectTypeOD`,\r\n key: \"ProjectTypeId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetProjectType(projectTypeId: number): Observable {\r\n return this.http.get(`${this.projectTypesUrl}Get?projectTypeId=${projectTypeId}`);\r\n }\r\n\r\n public GetNewProjectType(): Observable {\r\n return this.http.get(`${this.projectTypesUrl}GetNew`);\r\n }\r\n\r\n public DeleteProjectType(projectTypeId: number): Observable {\r\n return this.http.post(`${this.projectTypesUrl}Delete?projectTypeId=${projectTypeId}`, projectTypeId);\r\n }\r\n\r\n public CreateProjectType(model: ProjectTypeModel): Observable {\r\n return this.http.post(`${this.projectTypesUrl}Create`, model);\r\n }\r\n\r\n public UpdateProjectType(model: ProjectTypeModel): Observable {\r\n return this.http.post(`${this.projectTypesUrl}Update`, model);\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'project-type.list.header' | translate }}\r\n
{{ 'project-type.list.subheader' | translate }}
\r\n

\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { ProjectTypeService } from \"../services/project-type.service\";\r\n\r\n@Component({\r\n selector: \"app-project-types-list\",\r\n templateUrl: \"./project-types-list.component.html\",\r\n styleUrls: [\"./project-types-list.component.scss\"]\r\n})\r\nexport class ProjectTypesListComponent implements OnInit {\r\n public projectListDataSource: ODataStore;\r\n public SearchText: string = \"\";\r\n\r\n @ViewChild(\"grid\", { static: true }) dataGrid: DxDataGridComponent;\r\n\r\n constructor(private projectTypeService: ProjectTypeService) { }\r\n\r\n public OnSearchValueChange(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.projectListDataSource = this.projectTypeService.ODataProjectTypes();\r\n this.projectListDataSource.load();\r\n }\r\n}\r\n","export class ProjectTypeModel {\r\n ProjectTypeId: number;\r\n Name: string;\r\n Description: string;\r\n NLSalesAccount: string;\r\n NLSalesDept: string;\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { APP_CONFIG, IAppConfig } from \"servicesight-shared\";\r\nimport { NominalCodesModel } from \"../models/nominal-codes.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class NominalCodeService {\r\n private readonly baseUrl: string;\r\n\r\n constructor(\r\n private http: HttpClient,\r\n @Inject(APP_CONFIG) appConfig: IAppConfig\r\n ) {\r\n this.baseUrl = appConfig.apiLocations.ServiceSight;\r\n }\r\n\r\n public GetNominalCodes(): Observable {\r\n return this.http.get(`${this.baseUrl}ServiceContractType/GetNominalCodes`);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n \r\n {{ 'project-type.new-project-type' | translate }}\r\n \r\n \r\n {{ 'project-type.project-type'| translate }}\r\n {{ Model.Name }}\r\n \r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n
\r\n {{data.Code}} - {{data.Description}}\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n {{data.Code}} - {{data.Description}}\r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n {{ 'buttons.delete' | translate }}\r\n \r\n \r\n {{ 'buttons.cancel' | translate }}\r\n \r\n \r\n {{ 'buttons.save' | translate }}\r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import { Component, Input, ViewChild, OnChanges, SimpleChanges, OnInit } from \"@angular/core\";\r\nimport { Location } from \"@angular/common\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { AccountingService, FormMesssageService } from \"servicesight-shared\";\r\nimport { ProjectTypeModel } from \"../models/project-type\";\r\nimport { ProjectTypeService } from \"../services/project-type.service\";\r\nimport { NominalCodeService } from \"src/app/shared/services/nominal-code.service\";\r\nimport { NominalCodeModel } from \"src/app/shared/models/nominal-code.model\";\r\n\r\n@Component({\r\n selector: \"app-project-type-detail\",\r\n templateUrl: \"./project-type-detail.component.html\",\r\n styleUrls: [\"./project-type-detail.component.scss\"]\r\n})\r\nexport class ProjectTypeDetailComponent implements OnInit, OnChanges {\r\n @Input() projectTypeId: number = null;\r\n @ViewChild(\"projectTypeForm\", { static: true }) form: NgForm;\r\n\r\n public readonly FormName: string = \"projectTypeForm\";\r\n public get isNew(): boolean {\r\n return this.projectTypeId == null;\r\n }\r\n public Model: ProjectTypeModel = new ProjectTypeModel();\r\n public ShowDeleteWarning: boolean = false;\r\n public ShowDiscardWarning: boolean = false;\r\n public ConnectedToAccountSystem: boolean = false;\r\n public NominalSalesAccounts: NominalCodeModel[];\r\n public NominalSalesDepartments: NominalCodeModel[];\r\n\r\n private listPath: string = \"/proteansystem/systems/project-types/list\";\r\n\r\n constructor(\r\n private projectTypesService: ProjectTypeService,\r\n private formMessageService: FormMesssageService,\r\n private location: Location,\r\n private accountingService: AccountingService,\r\n private nominalCodeService: NominalCodeService) {}\r\n\r\n public ngOnInit(): void {\r\n this.accountingService.GetAccountsInfo().subscribe((accountingInfo) => {\r\n this.ConnectedToAccountSystem = accountingInfo.LinkStatus.IsConnected;\r\n });\r\n this.nominalCodeService.GetNominalCodes().subscribe(x => {\r\n this.NominalSalesAccounts = x.AccountCodes;\r\n this.NominalSalesDepartments = x.DepartmentCodes;\r\n });\r\n }\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.projectTypeId) {\r\n if (this.projectTypeId) {\r\n this.projectTypesService.GetProjectType(this.projectTypeId).subscribe(data => {\r\n this.Model = data;\r\n });\r\n } else {\r\n this.projectTypesService.GetNewProjectType().subscribe(x => {\r\n this.Model = x;\r\n });\r\n }\r\n }\r\n }\r\n\r\n public OnDelete(): void {\r\n this.ShowDeleteWarning = true;\r\n }\r\n\r\n public OnCancel(): void {\r\n if (this.form.dirty) {\r\n this.ShowDiscardWarning = true;\r\n }\r\n }\r\n\r\n public OnSave(): void {\r\n if (this.isNew) {\r\n this.formMessageService.RegisterObservable(this.projectTypesService.CreateProjectType(this.Model), this.FormName)\r\n .subscribe(x => {\r\n this.location.go(`/proteansystem/systems/project-types/detail/${x.EntityId}`);\r\n });\r\n } else {\r\n this.formMessageService.RegisterObservable(this.projectTypesService.UpdateProjectType(this.Model), this.FormName).subscribe();\r\n }\r\n }\r\n\r\n public OnConfirmDeletion($event: boolean): void {\r\n if ($event && this.projectTypeId) {\r\n this.formMessageService.RegisterObservable(this.projectTypesService.DeleteProjectType(this.projectTypeId), this.FormName)\r\n .subscribe(() => {\r\n this.location.go(this.listPath);\r\n });\r\n }\r\n this.ShowDeleteWarning = false;\r\n }\r\n\r\n public OnConfirmDiscard($event: boolean): void {\r\n if ($event) {\r\n this.location.go(this.listPath);\r\n }\r\n this.ShowDiscardWarning = false;\r\n }\r\n\r\n public MarkFormAsDirty(): void {\r\n this.form.form.markAsDirty();\r\n }\r\n}\r\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { APP_CONFIG, IAppConfig, IProteanResponse } from \"servicesight-shared\";\r\nimport { ODataService } from \"../../../shared/services/odata/odata.service\";\r\nimport { ProjectStatusModel } from \"../models/project-status\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { Observable } from \"rxjs\";\r\nimport { SortUpdateModel } from \"../models/sort-update.model\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class ProjectStatusService {\r\n private readonly baseUrl = this.appConfig.apiLocations.ServiceSight;\r\n private readonly projectStatusUrl = this.baseUrl + \"ProjectStatus/\";\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private odataService: ODataService,\r\n @Inject(APP_CONFIG) private appConfig: IAppConfig) {\r\n }\r\n\r\n public ODataProjectStatuses(): ODataStore {\r\n return this.odataService.GetStore({\r\n url: `${this.appConfig.apiLocations.ServiceSightOData}ProjectStatusOD`,\r\n key: \"ProjectStatusId\",\r\n keyType: \"Int32\"\r\n });\r\n }\r\n\r\n public GetProjectStatus(projectStatusId: number): Observable {\r\n return this.http.get(`${this.projectStatusUrl}Get?projectStatusId=${projectStatusId}`);\r\n }\r\n\r\n public GetNewProjectStatus(): Observable {\r\n return this.http.get(`${this.projectStatusUrl}GetNew`);\r\n }\r\n\r\n public DeleteProjectStatus(projectStatusId: number): Observable {\r\n return this.http.post(`${this.projectStatusUrl}Delete?projectStatusId=${projectStatusId}`, projectStatusId);\r\n }\r\n\r\n public CreateProjectStatus(model: ProjectStatusModel): Observable {\r\n return this.http.post(`${this.projectStatusUrl}Create`, model);\r\n }\r\n\r\n public UpdateProjectStatus(model: ProjectStatusModel): Observable {\r\n return this.http.post(`${this.projectStatusUrl}Update`, model);\r\n }\r\n\r\n public UpdateSortOrder(model: SortUpdateModel): Observable {\r\n return this.http.put(`${this.projectStatusUrl}UpdateSortOrder`, model);\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'project-status.list.header' | translate }}\r\n
{{ 'project-status.list.subheader' | translate }}
\r\n

\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n
\r\n
{{ data.data.Name }}
\r\n
\r\n
\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\nimport { ProjectStatusService } from \"../services/project-status.service\";\r\nimport { SortUpdateModel } from \"../models/sort-update.model\";\r\n\r\n@Component({\r\n selector: \"app-project-statuses-list\",\r\n templateUrl: \"./project-statuses-list.component.html\",\r\n styleUrls: [\"./project-statuses-list.component.scss\"]\r\n})\r\nexport class ProjectStatusesListComponent implements OnInit {\r\n public DataSource: ODataStore;\r\n public SearchText: string = \"\";\r\n\r\n @ViewChild(\"grid\", { static: true }) dataGrid: DxDataGridComponent;\r\n\r\n constructor(private projectStatusService: ProjectStatusService) {\r\n this.OnGridReordered = this.OnGridReordered.bind(this);\r\n }\r\n\r\n public OnSearchValueChange(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.DataSource = this.projectStatusService.ODataProjectStatuses();\r\n this.DataSource.load();\r\n }\r\n\r\n public OnGridReordered(e: any) {\r\n const visibleRows = e.component.getVisibleRows();\r\n const status: SortUpdateModel = {\r\n FromIndex: visibleRows[e.fromIndex].data.SortId,\r\n ToIndex: visibleRows[e.toIndex].data.SortId\r\n };\r\n this.projectStatusService.UpdateSortOrder(status).subscribe(() => {\r\n this.dataGrid.instance.refresh();\r\n });\r\n }\r\n}\r\n","export class ProjectStatusModel {\r\n ProjectStatusId: number;\r\n Name: string;\r\n Description: string;\r\n Colour: string;\r\n SortId: number;\r\n PercentageComplete: number;\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n \r\n {{ 'project-status.new-project-status' | translate }}\r\n \r\n \r\n {{ 'project-status.project-status'| translate }}\r\n {{ Model.Name }}\r\n \r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
{{'project-status.status-color.' + data.ColourName.toLowerCase() | translate}}
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n {{ 'buttons.delete' | translate }}\r\n \r\n \r\n {{ 'buttons.cancel' | translate }}\r\n \r\n \r\n {{ 'buttons.save' | translate }}\r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import { Component, Input, ViewChild, OnChanges, SimpleChanges } from \"@angular/core\";\r\nimport { Location } from \"@angular/common\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { FormMesssageService } from \"servicesight-shared\";\r\nimport { ProjectStatusModel } from \"../models/project-status\";\r\nimport { ProjectStatusService } from \"../services/project-status.service\";\r\n\r\n@Component({\r\n selector: \"app-project-status-detail\",\r\n templateUrl: \"./project-status-detail.component.html\",\r\n styleUrls: [\"./project-status-detail.component.scss\"]\r\n})\r\nexport class ProjectStatusDetailComponent implements OnChanges {\r\n @Input() projectStatusId: number = null;\r\n @ViewChild(\"projectStatusForm\", { static: true }) form: NgForm;\r\n\r\n public readonly FormName: string = \"projectStatusForm\";\r\n public get isNew(): boolean {\r\n return this.projectStatusId == null;\r\n }\r\n public Model: ProjectStatusModel = new ProjectStatusModel();\r\n public ShowDeleteWarning: boolean = false;\r\n public ShowDiscardWarning: boolean = false;\r\n public statusColors: { Colour: string; ColourName: string }[] = this.getStatusColors();\r\n\r\n private listPath: string = \"/proteansystem/systems/project-statuses/list\";\r\n\r\n constructor(\r\n private projectStatusService: ProjectStatusService,\r\n private formMessageService: FormMesssageService,\r\n private location: Location) {}\r\n\r\n public ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.projectStatusId) {\r\n if (this.projectStatusId) {\r\n this.projectStatusService.GetProjectStatus(this.projectStatusId).subscribe(data => {\r\n this.Model = data;\r\n });\r\n } else {\r\n this.projectStatusService.GetNewProjectStatus().subscribe(x => {\r\n this.Model = x;\r\n });\r\n }\r\n }\r\n }\r\n\r\n public onColourChange() {\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n public OnDelete(): void {\r\n this.ShowDeleteWarning = true;\r\n }\r\n\r\n public OnCancel(): void {\r\n if (this.form.dirty) {\r\n this.ShowDiscardWarning = true;\r\n }\r\n }\r\n\r\n public OnSave(): void {\r\n if (this.isNew) {\r\n this.formMessageService.RegisterObservable(this.projectStatusService.CreateProjectStatus(this.Model), this.FormName)\r\n .subscribe(x => {\r\n this.location.replaceState(`#/proteansystem/systems/project-statuses/detail/${x.EntityId}`);\r\n this.projectStatusId = x.EntityId;\r\n this.Model.ProjectStatusId = x.EntityId;\r\n });\r\n } else {\r\n this.formMessageService.RegisterObservable(this.projectStatusService.UpdateProjectStatus(this.Model), this.FormName).subscribe();\r\n }\r\n }\r\n\r\n public OnConfirmDeletion($event: boolean): void {\r\n if ($event && this.projectStatusId) {\r\n this.formMessageService.RegisterObservable(this.projectStatusService.DeleteProjectStatus(this.projectStatusId), this.FormName)\r\n .subscribe(() => {\r\n this.location.go(this.listPath);\r\n });\r\n }\r\n this.ShowDeleteWarning = false;\r\n }\r\n\r\n public OnConfirmDiscard($event: boolean): void {\r\n if ($event) {\r\n this.location.go(this.listPath);\r\n }\r\n this.ShowDiscardWarning = false;\r\n }\r\n\r\n public MarkFormAsDirty(): void {\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n private getStatusColors() {\r\n return [\r\n { Colour: \"grey\", ColourName: \"Grey\" },\r\n { Colour: \"red\", ColourName: \"Red\" },\r\n { Colour: \"yellow\", ColourName: \"Yellow\" },\r\n { Colour: \"green\", ColourName: \"Green\" }\r\n ];\r\n }\r\n}\r\n","
\r\n
\r\n

{{ 'settings.priorities.heading' | translate }}\r\n
{{ 'settings.priorities.subheading' | translate }}
\r\n

\r\n \r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n
\r\n \r\n \r\n
\r\n\r\n \r\n
\r\n
\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DxDataGridComponent } from \"devextreme-angular\";\r\nimport { PriorityService } from \"../services/priority.service\";\r\nimport { LicenseService } from \"src/app/shared/services/licence/license.service\";\r\nimport ODataStore from \"devextreme/data/odata/store\";\r\n\r\n@Component({\r\n selector: \"app-priority-list\",\r\n templateUrl: \"./priority-list.component.html\",\r\n styleUrls: [\"./priority-list.component.scss\"]\r\n})\r\nexport class PriorityListComponent implements OnInit {\r\n @ViewChild(\"grid\", { static: true }) private dataGrid: DxDataGridComponent;\r\n public SearchText: string = \"\";\r\n public prioritiesStore: ODataStore;\r\n public isProEnabled: boolean = false;\r\n\r\n constructor(\r\n private priorityService: PriorityService,\r\n private licenseService: LicenseService) { }\r\n\r\n public ngOnInit(): void {\r\n this.licenseService.GetCompanyHasAccessToModules().subscribe(x => {\r\n this.isProEnabled = x.ProEnabled;\r\n });\r\n\r\n this.OnPriorityReordered = this.OnPriorityReordered.bind(this);\r\n\r\n this.prioritiesStore = this.priorityService.ODataPriorities();\r\n this.prioritiesStore.load();\r\n }\r\n\r\n public OnSearchValueChange(): void {\r\n this.dataGrid.instance.searchByText(encodeURI(this.SearchText).replace(/%20/g, \" \"));\r\n }\r\n\r\n public OnPriorityReordered(e) {\r\n this.priorityService.UpdateSortOrder(e.fromIndex, e.toIndex).subscribe(() => {\r\n this.prioritiesStore.load();\r\n this.dataGrid.instance.refresh();\r\n });\r\n }\r\n\r\n}\r\n","export class PriorityModel {\r\n PriorityId: number;\r\n SortOrder: number;\r\n Name: string;\r\n Description: string;\r\n Colour: string;\r\n Icon: string;\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n \r\n {{ 'settings.priorities.create' | translate }}\r\n \r\n \r\n {{ model.Name }}\r\n \r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n {{ 'buttons.delete' | translate }}\r\n \r\n \r\n {{ 'buttons.cancel' | translate }}\r\n \r\n \r\n {{ 'buttons.save' | translate }}\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { Component, Input, ViewChild, OnInit} from \"@angular/core\";\r\nimport { Location } from \"@angular/common\";\r\nimport { NgForm } from \"@angular/forms\";\r\nimport { PriorityService } from \"../services/priority.service\";\r\nimport { FormMesssageService } from \"servicesight-shared\";\r\nimport { PriorityModel } from \"../models/priority.model\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\n\r\n@Component({\r\n selector: \"app-priority-detail\",\r\n templateUrl: \"./priority-detail.component.html\",\r\n styleUrls: [\"./priority-detail.component.scss\"]\r\n})\r\nexport class PriorityDetailComponent implements OnInit {\r\n @Input() priorityId: number = null;\r\n @ViewChild(\"priorityForm\", { static: true }) form: NgForm;\r\n\r\n public readonly formName: string = \"priorityForm\";\r\n\r\n public readonly icons: string[] = [\r\n \"wifi-slash\",\r\n \"wifi-2\",\r\n \"wifi-1\",\r\n \"wifi\",\r\n \"volume-up\",\r\n \"volume-slash\",\r\n \"volume-off\",\r\n \"volume-mute\",\r\n \"volume-down\",\r\n \"volume\",\r\n \"video-slash\",\r\n \"video\",\r\n \"user-slash\",\r\n \"user-alt-slash\",\r\n \"user-alt\",\r\n \"user\",\r\n \"unlock-alt\",\r\n \"unlock\",\r\n \"toggle-on\",\r\n \"toggle-off\",\r\n \"tint-slash\",\r\n \"tint\",\r\n \"thumbs-up\",\r\n \"thumbs-down\",\r\n \"thermometer-three-quarters\",\r\n \"thermometer-quarter\",\r\n \"thermometer-half\",\r\n \"thermometer-full\",\r\n \"thermometer-empty\",\r\n \"stream\",\r\n \"star-half-alt\",\r\n \"star-half\",\r\n \"star\",\r\n \"smoking-ban\",\r\n \"signal-slash\",\r\n \"signal-alt-slash\",\r\n \"signal-alt-3\",\r\n \"signal-alt-2\",\r\n \"signal-alt-1\",\r\n \"signal-alt\",\r\n \"signal-4\",\r\n \"signal-3\",\r\n \"signal-2\",\r\n \"signal-1\",\r\n \"signal\",\r\n \"sign-out-alt\",\r\n \"sign-out\",\r\n \"sign-in-alt\",\r\n \"sign-in\",\r\n \"shopping-cart\",\r\n \"shield-check\",\r\n \"shield-alt\",\r\n \"shield\",\r\n \"question-square\",\r\n \"question-circle\",\r\n \"question\",\r\n \"print-slash\",\r\n \"print\",\r\n \"plus-square\",\r\n \"plus-octagon\",\r\n \"plus-hexagon\",\r\n \"plus-circle\",\r\n \"plus\",\r\n \"phone-slash\",\r\n \"phone-alt\",\r\n \"phone\",\r\n \"parking-slash\",\r\n \"parking-circle-slash\",\r\n \"parking-circle\",\r\n \"parking\",\r\n \"minus-square\",\r\n \"minus-octagon\",\r\n \"minus-hexagon\",\r\n \"minus-circle\",\r\n \"minus\",\r\n \"microphone-slash\",\r\n \"microphone-alt-slash\",\r\n \"microphone-alt\",\r\n \"microphone\",\r\n \"map-marker-slash\",\r\n \"map-marker-alt-slash\",\r\n \"map-marker-alt\",\r\n \"map-marker\",\r\n \"lock-open-alt\",\r\n \"lock-open\",\r\n \"lock-alt\",\r\n \"lock\",\r\n \"location-slash\",\r\n \"location\",\r\n \"lightbulb-slash\",\r\n \"lightbulb\",\r\n \"info-square\",\r\n \"info-circle\",\r\n \"info\",\r\n \"gas-pump-slash\",\r\n \"gas-pump\",\r\n \"folder-open\",\r\n \"folder\",\r\n \"file-times\",\r\n \"file-plus\",\r\n \"file-minus\",\r\n \"file-exclamation\",\r\n \"file-edit\",\r\n \"file-check\",\r\n \"file-alt\",\r\n \"file\",\r\n \"eye-slash\",\r\n \"eye\",\r\n \"exclamation-triangle\",\r\n \"exclamation-square\",\r\n \"exclamation-circle\",\r\n \"exclamation\",\r\n \"door-open\",\r\n \"door-closed\",\r\n \"compass-slash\",\r\n \"compass\",\r\n \"comment-slash\",\r\n \"comment-alt-slash\",\r\n \"comment-alt\",\r\n \"comment\",\r\n \"cart-plus\",\r\n \"cart-arrow-down\",\r\n \"calendar-week\",\r\n \"calendar-times\",\r\n \"calendar-star\",\r\n \"calendar-plus\",\r\n \"calendar-minus\",\r\n \"calendar-exclamation\",\r\n \"calendar-edit\",\r\n \"calendar-day\",\r\n \"calendar-check\",\r\n \"calendar-alt\",\r\n \"calendar\",\r\n \"bells\",\r\n \"bell-slash\",\r\n \"bell-school-slash\",\r\n \"bell-school\",\r\n \"bell\",\r\n \"battery-three-quarters\",\r\n \"battery-slash\",\r\n \"battery-quarter\",\r\n \"battery-half\",\r\n \"battery-full\",\r\n \"battery-empty\",\r\n \"battery-bolt\",\r\n \"ban\",\r\n \"badge-check\",\r\n \"badge\",\r\n \"wagon-covered\",\r\n \"truck-pickup\",\r\n \"truck-monster\",\r\n \"truck\",\r\n \"trailer\",\r\n \"tire-rugged\",\r\n \"tire-pressure-warning\",\r\n \"tire-flat\",\r\n \"tire\",\r\n \"taxi\",\r\n \"tachometer-slowest\",\r\n \"tachometer-slow\",\r\n \"tachometer-fastest\",\r\n \"tachometer-fast\",\r\n \"tachometer-average\",\r\n \"tachometer-alt-slowest\",\r\n \"tachometer-alt-slow\",\r\n \"tachometer-alt-fastest\",\r\n \"tachometer-alt-fast\",\r\n \"tachometer-alt-average\",\r\n \"tachometer-alt\",\r\n \"tachometer\",\r\n \"steering-wheel\",\r\n \"shuttle-van\",\r\n \"rv\",\r\n \"oil-temp\",\r\n \"oil-can\",\r\n \"motorcycle\",\r\n \"gas-pump-slash\",\r\n \"gas-pump\",\r\n \"garage-open\",\r\n \"garage-car\",\r\n \"garage\",\r\n \"flux-capacitor\",\r\n \"engine-warning\",\r\n \"charging-station\",\r\n \"cars\",\r\n \"caravan-alt\",\r\n \"caravan\",\r\n \"car-wash\",\r\n \"car-tilt\",\r\n \"car-side\",\r\n \"car-mechanic\",\r\n \"car-garage\",\r\n \"car-crash\",\r\n \"car-bus\",\r\n \"car-bump\",\r\n \"car-building\",\r\n \"car-battery\",\r\n \"car-alt\",\r\n \"car\",\r\n \"bus-alt\",\r\n \"bus\",\r\n \"ambulance\",\r\n \"air-freshener\",\r\n \"wind-warning\",\r\n \"star-exclamation\",\r\n \"skull-crossbones\",\r\n \"sensor-smoke\",\r\n \"sensor-on\",\r\n \"sensor-fire\",\r\n \"sensor-alert\",\r\n \"sensor\",\r\n \"radiation-alt\",\r\n \"radiation\",\r\n \"map-marker-exclamation\",\r\n \"lightbulb-exclamation\",\r\n \"file-exclamation\",\r\n \"exclamation-triangle\",\r\n \"exclamation-square\",\r\n \"exclamation-circle\",\r\n \"exclamation\",\r\n \"engine-warning\",\r\n \"comment-exclamation\",\r\n \"comment-alt-exclamation\",\r\n \"calendar-exclamation\",\r\n \"bells\",\r\n \"bell-slash\",\r\n \"bell-school-slash\",\r\n \"bell-on\",\r\n \"bell-exclamation\",\r\n \"bell\",\r\n \"alarm-exclamation\",\r\n \"alarm-clock\",\r\n \"tired\",\r\n \"surprise\",\r\n \"smile-wink\",\r\n \"smile-beam\",\r\n \"smile\",\r\n \"sad-tear\",\r\n \"sad-cry\",\r\n \"meh-rolling-eyes\",\r\n \"meh-blank\",\r\n \"meh\",\r\n \"laugh-wink\",\r\n \"laugh-squint\",\r\n \"laugh-beam\",\r\n \"laugh\",\r\n \"kiss-wink-heart\",\r\n \"kiss-beam\",\r\n \"kiss\",\r\n \"grin-wink\",\r\n \"grin-tongue-wink\",\r\n \"grin-tongue-squint\",\r\n \"grin-tongue\",\r\n \"grin-tears\",\r\n \"grin-stars\",\r\n \"grin-squint-tears\",\r\n \"grin-squint\",\r\n \"grin-hearts\",\r\n \"grin-beam-sweat\",\r\n \"grin-beam\",\r\n \"grin-alt\",\r\n \"grin\",\r\n \"grimace\",\r\n \"frown-open\",\r\n \"frown\",\r\n \"flushed\",\r\n \"dizzy\",\r\n \"angry\",\r\n \"thumbs-up\",\r\n \"thumbs-down\",\r\n \"praying-hands\",\r\n \"handshake-slash\",\r\n \"handshake-alt-slash\",\r\n \"handshake-alt\",\r\n \"handshake\",\r\n \"hands-wash\",\r\n \"hands-usd\",\r\n \"hands-helping\",\r\n \"hands-heart\",\r\n \"hands\",\r\n \"hand-spock\",\r\n \"hand-sparkles\",\r\n \"hand-scissors\",\r\n \"hand-rock\",\r\n \"hand-receiving\",\r\n \"hand-pointer\",\r\n \"hand-point-up\",\r\n \"hand-point-right\",\r\n \"hand-point-left\",\r\n \"hand-point-down\",\r\n \"hand-peace\",\r\n \"hand-paper\",\r\n \"hand-lizard\",\r\n \"hand-holding-water\",\r\n \"hand-holding-usd\",\r\n \"hand-holding-seedling\",\r\n \"hand-holding-medical\",\r\n \"hand-holding-magic\",\r\n \"hand-holding-heart\",\r\n \"hand-holding-box\",\r\n \"hand-holding\",\r\n \"hand-heart\",\r\n \"fist-raised\",\r\n \"allergies\"\r\n ];\r\n\r\n public model: PriorityModel = new PriorityModel();\r\n\r\n private listPath: string = \"/proteansystem/systems/priorities/list\";\r\n private usageCount: number = 0;\r\n\r\n public get isNew(): boolean {\r\n return this.priorityId == null || this.priorityId === 0;\r\n }\r\n\r\n constructor(\r\n private priorityService: PriorityService,\r\n private formMessageService: FormMesssageService,\r\n private location: Location,\r\n private translate: TranslateService) {\r\n this.icons = this.icons.sort();\r\n this.icons = [...new Set(this.icons)];\r\n }\r\n\r\n public ngOnInit() {\r\n if (this.priorityId) {\r\n this.priorityService.GetPriority(this.priorityId).subscribe(data => {\r\n this.model = data;\r\n });\r\n this.priorityService.GetPriorityUsageCount(this.priorityId).subscribe(count => {\r\n this.usageCount = count;\r\n });\r\n } else {\r\n this.model.Colour = \"#00aa3c\"; // Default colour\r\n this.model.Icon = this.icons[0]; // Default icon - always select first.\r\n }\r\n }\r\n\r\n public OnSave(): void {\r\n if (this.isNew) {\r\n this.formMessageService.RegisterObservable(this.priorityService.CreatePriority(this.model), this.formName)\r\n .subscribe(x => {\r\n this.location.go(`/proteansystem/systems/priorities/detail/${x.EntityId}`);\r\n });\r\n } else {\r\n this.formMessageService.RegisterObservable(this.priorityService.UpdatePriority(this.model), this.formName).subscribe();\r\n }\r\n }\r\n\r\n public Delete(): void {\r\n let warningMessage: string = null;\r\n if (this.usageCount > 0) {\r\n warningMessage = this.translate.instant(\"settings.priorities.in-use.message\", { count: this.usageCount });\r\n } else {\r\n this.formMessageService.RegisterObservable(this.priorityService.DeletePriority(this.priorityId), this.formName).subscribe(() => {\r\n this.location.go(this.listPath);\r\n });\r\n }\r\n\r\n if (warningMessage) {\r\n this.formMessageService.ClearForm(this.formName);\r\n this.formMessageService.ShowWarning(warningMessage, this.formName);\r\n }\r\n }\r\n\r\n public Cancel(): void {\r\n this.formMessageService.ClearForm(this.formName);\r\n this.location.go(this.listPath);\r\n }\r\n\r\n public MarkFormAsDirty(e): void {\r\n if (e.event){\r\n this.form.form.markAsDirty();\r\n }\r\n }\r\n\r\n public SetIcon(newIcon: string): void {\r\n this.model.Icon = newIcon;\r\n this.form.form.markAsDirty();\r\n }\r\n\r\n}\r\n","import { registerLocaleData } from \"@angular/common\";\r\nimport localeEnGb from \"@angular/common/locales/en-GB\";\r\nimport localeEnGbExtra from \"@angular/common/locales/extra/en-GB\";\r\nimport localePl from \"@angular/common/locales/pl\";\r\nimport { enableProdMode } from \"@angular/core\";\r\nimport { platformBrowserDynamic } from \"@angular/platform-browser-dynamic\";\r\nimport { downgradeComponent, downgradeInjectable, setAngularJSGlobal, UpgradeModule } from \"@angular/upgrade/static\";\r\nimport \"moment/min/locales\";\r\nimport {\r\n ButtonWithHelpComponent,\r\n EquipmentJobListComponent,\r\n FGasLogComponent,\r\n HelpModalComponent,\r\n InvoiceDataService,\r\n InvoiceListComponent,\r\n JobsListComponent,\r\n MultipleSelectionComponent,\r\n RecurringJobsService,\r\n ReportViewerComponent,\r\n SecondLevelNavigationComponent,\r\n ServicingVisualiserComponent,\r\n SettingsService,\r\n WizardStepComponent,\r\n MakeModelListComponent,\r\n StoreService\r\n} from \"servicesight-shared\";\r\nimport { AppModule } from \"./app/app.module\";\r\nimport { ContactListComponent } from \"./app/contacts/contact-list/contact-list.component\";\r\nimport { ContactUploadComponent } from \"./app/contacts/contact-upload/contact-upload.component\";\r\nimport { AssignEquipmentSystemComponent } from \"./app/customers/assign-equipment-system/assign-equipment-system.component\";\r\nimport { CustomerAccountsComponent } from \"./app/customers/customer-accounts/customer-accounts.component\";\r\nimport { CustomerAttributeComponent } from \"./app/customers/customer-attribute/customer-attribute.component\";\r\nimport { CustomerEquipmentSystemsComponent } from \"./app/customers/customer-equipment-systems/customer-equipment-systems.component\";\r\nimport { CustomerFileComponent } from \"./app/customers/customer-file/customer-file.component\";\r\nimport { CustomerJobAlertsComponent } from \"./app/customers/customer-job-alerts/customer-job-alerts.component\";\r\nimport { CustomerListComponent } from \"./app/customers/customer-list/customer-list.component\";\r\nimport { CustomerSkillsComponent } from \"./app/customers/customer-skills/customer-skills.component\";\r\nimport { CustomerUploadComponent } from \"./app/customers/customer-upload/customer-upload.component\";\r\nimport { ServiceGroupsItemsAssignationComponent } from \"./app/customers/service-groups-items-assignation/service-groups-items-assignation.component\";\r\nimport { ServiceGroupsComponent } from \"./app/customers/service-groups/service-groups.component\";\r\nimport { CustomerAttributesService } from \"./app/customers/services/customer-attributes.service\";\r\nimport { CustomerEquipmentSystemsService } from \"./app/customers/services/customer-equipment-systems.service\";\r\nimport { CustomerJobAlertsService } from \"./app/customers/services/customer-job-alerts.service\";\r\nimport { CustomerSkillsService } from \"./app/customers/services/customer-skills.service\";\r\nimport { CustomerLayoutService } from \"./app/customers/services/customer-layout.service\";\r\nimport { ServiceGroupsService } from \"./app/customers/services/service-groups.service\";\r\nimport { ChartLoaderComponent } from \"./app/dashboard/charts/chart-loader/chart-loader.component\";\r\nimport { WidgetLoaderComponent } from \"./app/dashboard/widgets/widget-loader/widget-loader.component\";\r\nimport { DynamicLocaleService } from \"./app/dynamic-locale.service\";\r\nimport { InspectionsJobListComponent } from \"./app/inspections/inspections-job-list/inspections-job-list.component\";\r\nimport { BatchInvoiceListComponent } from \"./app/invoices/batch-invoice-list/batch-invoice-list.component\";\r\nimport { BatchInvoiceComponent } from \"./app/invoices/batch-invoice/batch-invoice.component\";\r\nimport { JobCreateComponent } from \"./app/jobs/job-create/job-create.component\";\r\nimport { JobDetailComponent } from \"./app/jobs/job-detail/job-detail.component\";\r\nimport { JobFurtherWorkComponent } from \"./app/jobs/job-further-work/job-further-work.component\";\r\nimport { JobInvoicingComponent } from \"./app/jobs/job-invoicing/job-invoicing.component\";\r\nimport { JobLabourComponent } from \"./app/jobs/job-labour/job-labour.component\";\r\nimport { JobMaterialsComponent } from \"./app/jobs/job-materials/job-materials.component\";\r\nimport { JobComponent } from \"./app/jobs/job/job.component\";\r\nimport { RecurringJobsComponent } from \"./app/jobs/recurring-jobs/recurring-jobs.component\";\r\nimport { JobService } from \"./app/jobs/services/job.service\";\r\nimport { MessageService } from \"./app/messages/services/message/message.service\";\r\nimport { PortalContactsTabComponent } from \"./app/portal/portal-contacts-tab/portal-contacts-tab.component\";\r\nimport { SettingsPortalActivityComponent } from \"./app/portal/settings-portal-activity/settings-portal-activity.component\";\r\nimport { QuoteService } from \"./app/quotes/services/quote.service\";\r\nimport { ReminderCustomerComponent } from \"./app/reminders/reminder-customer/reminder-customer.component\";\r\nimport { ReminderFilesComponent } from \"./app/reminders/reminder-files/reminder-files.component\";\r\nimport { ReminderListComponent } from \"./app/reminders/reminder-list/reminder-list.component\";\r\nimport { AccountsCommunicatorSetupComponent } from \"./app/settings/accounts-communicator-setup/accounts-communicator-setup.component\";\r\nimport { AccountsCreateInvoicesComponent } from \"./app/settings/accounts-create-invoices/accounts-create-invoices.component\";\r\nimport { AlertListComponent } from \"./app/settings/alert-settings/alert-list/alert-list.component\";\r\nimport { AlertComponent } from \"./app/settings/alert-settings/alert/alert.component\";\r\nimport { AttributesComponent } from \"./app/settings/attribute-settings/attributes/attributes.component\";\r\nimport { CategoryTypesComponent } from \"./app/settings/attribute-settings/category-types/category-types.component\";\r\nimport { NewAttributeComponent } from \"./app/settings/attribute-settings/new-attribute/new-attribute.component\";\r\nimport { AuditLogComponent } from \"./app/settings/audit-log/audit-log.component\";\r\nimport { HistoryComponent } from \"./app/settings/billing/history/history.component\";\r\nimport { ManageSubscriptionComponent } from \"./app/settings/billing/manage-subscription/manage-subscription.component\";\r\nimport { CompetitorDetailComponent } from \"./app/settings/crm-settings/competitor-detail/competitor-detail.component\";\r\nimport { CompetitorsListComponent } from \"./app/settings/crm-settings/competitors-list/competitors-list.component\";\r\nimport { JobTitlesComponent } from \"./app/settings/crm-settings/job-titles/job-titles.component\";\r\nimport { ReminderTypesDetailComponent } from \"./app/settings/crm-settings/reminder-types-detail/reminder-types-detail.component\";\r\nimport { ReminderTypesListComponent } from \"./app/settings/crm-settings/reminder-types-list/reminder-types-list.component\";\r\nimport { SalesBarrierDetailComponent } from \"./app/settings/crm-settings/sales-barrier-detail/sales-barrier-detail.component\";\r\nimport { SalesBarrierListComponent } from \"./app/settings/crm-settings/sales-barrier-list/sales-barrier-list.component\";\r\nimport { SalesOpportunityStatusDetailComponent } from \"./app/settings/crm-settings/sales-opportunity-status-detail/sales-opportunity-status-detail.component\";\r\nimport { SalesOpportunityStatusListComponent } from \"./app/settings/crm-settings/sales-opportunity-status-list/sales-opportunity-status-list.component\";\r\nimport { EmployeeEngineerSkillsComponent } from \"./app/settings/employee-engineer-skills/employee-engineer-skills.component\";\r\nimport { EmployeeLimitsComponent } from \"./app/settings/employee-limits/employee-limits.component\";\r\nimport { EngineerLocationComponent } from \"./app/settings/engineer-location/engineer-location.component\";\r\nimport { EngineerSkillListComponent } from \"./app/settings/engineer-skill-settings/engineer-skill-list/engineer-skill-list.component\";\r\nimport { EngineerSkillComponent } from \"./app/settings/engineer-skill-settings/engineer-skill/engineer-skill.component\";\r\nimport { EngineerTypeListComponent } from \"./app/settings/engineer-type-settings/engineer-type-list/engineer-type-list.component\";\r\nimport { EngineerTypeComponent } from \"./app/settings/engineer-type-settings/engineer-type/engineer-type.component\";\r\nimport { EquipmentConditionListComponent } from \"./app/settings/equipment-settings/equipment-condition-list/equipment-condition-list.component\";\r\nimport { EquipmentConditionComponent } from \"./app/settings/equipment-settings/equipment-condition/equipment-condition.component\";\r\nimport { MakeModelSkillsComponent } from \"./app/settings/equipment-settings/make-model-skills/make-model-skills.component\";\r\nimport { MakeModelUploadComponent } from \"./app/settings/equipment-settings/make-model-upload/make-model-upload.component\";\r\nimport { MakeModelComponent } from \"./app/settings/equipment-settings/make-model/make-model.component\";\r\nimport { ServiceScheduleUploadComponent } from \"./app/settings/equipment-settings/service-schedule-upload/service-schedule-upload.component\";\r\nimport { ServicingComponent } from \"./app/settings/equipment-settings/servicing/servicing.component\";\r\nimport { FeedbackSurveyListComponent } from \"./app/settings/feedback-survey-list/feedback-survey-list.component\";\r\nimport { CylinderTypesComponent } from \"./app/settings/fgas-settings/cylinder-types/cylinder-types.component\";\r\nimport { NewCylinderTypeComponent } from \"./app/settings/fgas-settings/new-cylinder-type/new-cylinder-type.component\";\r\nimport { RefrigerantTypeDetailComponent } from \"./app/settings/fgas-settings/refrigerant-type-detail/refrigerant-type-detail.component\";\r\nimport { RefrigerantTypeListComponent } from \"./app/settings/fgas-settings/refrigerant-type-list/refrigerant-type-list.component\";\r\nimport { InspectionReasonNotDoneComponent } from \"./app/settings/inspection-reason-not-done/inspection-reason-not-done.component\";\r\nimport { InspectionReasonsNotDoneListComponent } from \"./app/settings/inspection-reasons-not-done-list/inspection-reasons-not-done-list.component\";\r\nimport { InspectionTemplateListComponent } from \"./app/settings/inspection-template-list/inspection-template-list.component\";\r\nimport { InspectionsDesignerComponent } from \"./app/settings/inspections-designer/inspections-designer.component\";\r\nimport { InvalidAccountsComponent } from \"./app/settings/invalid-accounts/invalid-accounts.component\";\r\nimport { ActivityTypesDetailComponent } from \"./app/settings/job-settings/activity-types-detail/activity-types-detail.component\";\r\nimport { ActivityTypesListComponent } from \"./app/settings/job-settings/activity-types-list/activity-types-list.component\";\r\nimport { JobTypesDetailComponent } from \"./app/settings/job-settings/job-types-detail/job-types-detail.component\";\r\nimport { JobTypesListComponent } from \"./app/settings/job-settings/job-types-list/job-types-list.component\";\r\nimport { JobGroupsListComponent } from \"./app/settings/job-settings/job-groups-list/job-groups-list.component\";\r\nimport { JobGroupsDetailComponent } from \"./app/settings/job-settings/job-groups-detail/job-groups-detail.component\";\r\nimport { MaterialTypesDetailComponent } from \"./app/settings/job-settings/material-types-detail/material-types-detail.component\";\r\nimport { MaterialTypesListComponent } from \"./app/settings/job-settings/material-types-list/material-types-list.component\";\r\nimport { JobtypeInspectionsListComponent } from \"./app/settings/jobtype-inspections-list/jobtype-inspections-list.component\";\r\nimport { CreateLayoutTemplateComponent } from \"./app/settings/layout-template-settings/create-layout-template/create-layout-template.component\";\r\nimport { LayoutTemplateListComponent } from \"./app/settings/layout-template-settings/layout-template-list/layout-template-list.component\";\r\nimport { LayoutTemplateComponent } from \"./app/settings/layout-template-settings/layout-template/layout-template.component\";\r\nimport { MailChimpLinkComponent } from \"./app/settings/mail-chimp-link/mail-chimp-link.component\";\r\nimport { PlannedJobsReportComponent } from \"./app/settings/planned-jobs-report/planned-jobs-report.component\";\r\nimport { PlannerCardComponent } from \"./app/settings/planner-card/planner-card.component\";\r\nimport { PriceListDetailComponent } from \"./app/settings/price-list/price-list-detail/price-list-detail.component\";\r\nimport { PriceListComponent } from \"./app/settings/price-list/price-list.component\";\r\nimport { SecurityRolesDetailComponent } from \"./app/settings/security-settings/security-roles-detail/security-roles-detail.component\";\r\nimport { SecurityRolesListComponent } from \"./app/settings/security-settings/security-roles-list/security-roles-list.component\";\r\nimport { LicenceViewerComponent } from \"./app/settings/security/licence-viewer/licence-viewer.component\";\r\nimport { ContractTypeListComponent } from \"./app/settings/service-contracts-settings/contract-type-list/contract-type-list.component\";\r\nimport { NewContractTypeComponent } from \"./app/settings/service-contracts-settings/new-contract-type/new-contract-type.component\";\r\nimport { DirtyFormService } from \"./app/settings/services/dirty-form.service\";\r\nimport { PaymentsService } from \"./app/settings/services/payments.service\";\r\nimport { StockAdjustmentReasonListComponent } from \"./app/settings/stock-settings/adjustment-reason-list/adjustment-reason-list.component\";\r\nimport { StockAdjustmentReasonComponent } from \"./app/settings/stock-settings/adjustment-reason/adjustment-reason.component\";\r\nimport { StockManufacturerComponent } from \"./app/settings/stock-settings/manufacturer/manufacturer.component\";\r\nimport { StockManufacturersListComponent } from \"./app/settings/stock-settings/manufacturers-list/manufacturers-list.component\";\r\nimport { NewStockTypeComponent } from \"./app/settings/stock-settings/new-stock-type/new-stock-type.component\";\r\nimport { StockTypesComponent } from \"./app/settings/stock-settings/stock-types/stock-types.component\";\r\nimport { StoreListComponent } from \"./app/settings/stock-settings/store-list/store-list.component\";\r\nimport { StoreComponent } from \"./app/settings/stock-settings/store/store.component\";\r\nimport { SurveyDesignerComponent } from \"./app/settings/survey-designer/survey-designer.component\";\r\nimport { TwoFactorAuthenticationComponent } from \"./app/settings/two-factor-authentication/two-factor-authentication.component\";\r\nimport { UserReferenceOptionsListComponent } from \"./app/settings/user-reference-options-list/user-reference-options-list.component\";\r\nimport { ContactAccordionItemComponent } from \"./app/shared/components/accordion/contact-accordion-item/contact-accordion-item.component\";\r\nimport { CreditRaisedAccordionItemComponent } from \"./app/shared/components/accordion/credit-raised-accordion-item/credit-raised-accordion-item.component\";\r\nimport { CustomerAccordionItemComponent } from \"./app/shared/components/accordion/customer-accordion-item/customer-accordion-item.component\";\r\nimport { InvoiceStatusAccordionItemComponent } from \"./app/shared/components/accordion/invoice-status-accordion-item/invoice-status-accordion-item.component\";\r\nimport { JobDetailsAccordionItemComponent } from \"./app/shared/components/accordion/job-details-accordion-item/job-details-accordion-item.component\";\r\nimport { MapAccordionItemComponent } from \"./app/shared/components/accordion/map-accordion-item/map-accordion-item.component\";\r\nimport { AccountNumberComponent } from \"./app/shared/components/account-number/account-number.component\";\r\nimport { CustomerContactsSelectBoxComponent } from \"./app/shared/components/customer-contacts-select-box/customer-contacts-select-box.component\";\r\nimport { CustomerHistoryComponent } from \"./app/shared/components/customer-history/customer-history.component\";\r\nimport { DiscussionComponent } from \"./app/shared/components/discussion/discussion.component\";\r\nimport { HtmlBodyComponent } from \"./app/shared/components/html-body/html-body.component\";\r\nimport { InfoButtonComponent } from \"./app/shared/components/info-button/info-button.component\";\r\nimport { InputWithButtonComponent } from \"./app/shared/components/input-with-button/input-with-button.component\";\r\nimport { JobFilesComponent } from \"./app/shared/components/job-files/job-files.component\";\r\nimport { LoginComponent } from \"./app/shared/components/login/login.component\";\r\nimport { NotificationsComponent } from \"./app/shared/components/notifications/notifications.component\";\r\nimport { RecordNavButtonsComponent } from \"./app/shared/components/record-nav-buttons/record-nav-buttons.component\";\r\nimport { SalesOpportunitySelectBoxComponent } from \"./app/shared/components/sales-opportunity-select-box/sales-opportunity-select-box.component\";\r\nimport { SettingsComponent } from \"./app/shared/components/settings/settings.component\";\r\nimport { StripeConnectButtonComponent } from \"./app/shared/components/stripe-connect-button/stripe-connect-button.component\";\r\nimport { SwitchComponent } from \"./app/shared/components/switch/switch.component\";\r\nimport { AuthService } from \"./app/shared/services/auth/auth.service\";\r\nimport { GoToJobEquipService } from \"./app/shared/services/go-to-job-equip/go-to-job-equip.service\";\r\nimport { LicenseService } from \"./app/shared/services/licence/license.service\";\r\nimport { LoggingService } from \"./app/shared/services/logging.service\";\r\nimport { Ng2HttpClientService } from \"./app/shared/services/ng2-http-client.service\";\r\nimport { Ng2TranslateDowngradeService } from \"./app/shared/services/ng2translate/ng2-translate-downgrade.service\";\r\nimport { WalkthoughService } from \"./app/shared/services/walkthough/walkthough.service\";\r\nimport { environment } from \"./environments/environment\";\r\nimport { What3wordsComponent } from \"./app/shared/components/what3words/what3words.component\";\r\nimport { CustomerLayoutsComponent } from \"./app/customers/customer-layouts/customer-layouts.component\";\r\nimport { EmployeesListComponent } from \"./app/settings/employees/employees-list/employees-list.component\";\r\nimport { CustomerSitesComponent } from \"./app/customers/customer-sites/customer-sites.component\";\r\nimport { ProjectTypesListComponent } from \"./app/settings/project-settings/project-types-list/project-types-list.component\";\r\nimport { ProjectTypeDetailComponent } from \"./app/settings/project-settings/project-type-detail/project-type-detail.component\";\r\nimport { ProjectStatusesListComponent } from \"./app/settings/project-settings/project-statuses-list/project-statuses-list.component\";\r\nimport { ProjectStatusDetailComponent } from \"./app/settings/project-settings/project-status-detail/project-status-detail.component\";\r\nimport { PriorityListComponent } from \"./app/settings/job-settings/priority-list/priority-list.component\";\r\nimport { PriorityDetailComponent } from \"./app/settings/job-settings/priority-detail/priority-detail.component\";\r\nimport { PriorityIconComponent } from \"./app/shared/components/priority-icon/priority-icon.component\";\r\nimport { PrioritySelectBoxComponent } from \"./app/shared/components/priority-select-box/priority-select-box.component\";\r\n\r\n// eslint-disable-next-line no-var\r\ndeclare var window: any;\r\n\r\nif (environment.production) {\r\n enableProdMode();\r\n}\r\nregisterLocaleData(localeEnGb, \"en-GB\", localeEnGbExtra);\r\nregisterLocaleData(localePl, \"pl\");\r\n\r\nconst interval = setInterval(() => {\r\n if (window.angular !== undefined && window.appFinishedLoading) {\r\n try {\r\n window.angular.module(\"app\");\r\n } catch {\r\n return; // module not yet loaded\r\n }\r\n\r\n clearInterval(interval);\r\n setAngularJSGlobal(window.angular);\r\n\r\n window.angular.module(\"app\")\r\n .directive(\"ng2InspectionsJobList\", downgradeComponent({\r\n component: InspectionsJobListComponent,\r\n inputs: [\"jobId\"]\r\n })).directive(\"ng2InspectionTemplateList\", downgradeComponent({\r\n component: InspectionTemplateListComponent\r\n })).directive(\"jobtypetemplates\", downgradeComponent({\r\n component: JobtypeInspectionsListComponent\r\n })).directive(\"ng2InspectionsDesigner\", downgradeComponent({\r\n component: InspectionsDesignerComponent,\r\n inputs: [\"templateId\"]\r\n })).directive(\"ng2SurveyDesigner\", downgradeComponent({\r\n component: SurveyDesignerComponent,\r\n inputs: [\"templateId\"]\r\n })).directive(\"ng2FeedbackSurveyList\", downgradeComponent({\r\n component: FeedbackSurveyListComponent\r\n })).directive(\"customerAccordionItem\", downgradeComponent({\r\n component: CustomerAccordionItemComponent,\r\n inputs: [\"customerId\"]\r\n })).directive(\"contactAccordionItem\", downgradeComponent({\r\n component: ContactAccordionItemComponent,\r\n inputs: [\"contactId\"]\r\n })).directive(\"mapAccordionItem\", downgradeComponent({\r\n component: MapAccordionItemComponent,\r\n inputs: [\"customerId\"]\r\n })).directive(\"jobDetailsAccordionItem\", downgradeComponent({\r\n component: JobDetailsAccordionItemComponent,\r\n inputs: [\"jobId\"]\r\n })).directive(\"ng2InspectionReasonsNotDoneList\", downgradeComponent({\r\n component: InspectionReasonsNotDoneListComponent\r\n })).directive(\"ng2InspectionReasonNotDone\", downgradeComponent({\r\n component: InspectionReasonNotDoneComponent,\r\n inputs: [\"Id\"]\r\n })).directive(\"ng2JobsList\", downgradeComponent({\r\n component: JobsListComponent,\r\n inputs: [\"isAllowedCreateJob\", \"preselectedFilter\"]\r\n })).directive(\"ng2InvoiceBatchList\", downgradeComponent({\r\n component: BatchInvoiceListComponent\r\n })).directive(\"ng2InvoiceBatch\", downgradeComponent({\r\n component: BatchInvoiceComponent\r\n })).directive(\"ng2JobCreate\", downgradeComponent({\r\n component: JobCreateComponent,\r\n inputs: [\"prefillValues\"]\r\n })).directive(\"ng2RecurringJobs\", downgradeComponent({\r\n component: RecurringJobsComponent\r\n })).directive(\"ng2JobDetail\", downgradeComponent({\r\n component: JobDetailComponent,\r\n inputs: [\"job\", \"jobForm\"],\r\n outputs: [\"load\"]\r\n })).directive(\"ng2JobLabour\", downgradeComponent({\r\n component: JobLabourComponent,\r\n inputs: [\"job\", \"jobForm\"],\r\n outputs: [\"load\"]\r\n })).directive(\"ng2JobMaterials\", downgradeComponent({\r\n component: JobMaterialsComponent,\r\n inputs: [\"job\", \"jobForm\"],\r\n outputs: [\"load\"]\r\n })).directive(\"ng2JobFiles\", downgradeComponent({\r\n component: JobFilesComponent,\r\n inputs: [\"entityId\", \"documentType\", \"job\", \"jobForm\"],\r\n outputs: [\"load\"]\r\n })).directive(\"ng2JobInvoicing\", downgradeComponent({\r\n component: JobInvoicingComponent,\r\n inputs: [\"job\", \"jobForm\"],\r\n outputs: [\"load\"]\r\n })).directive(\"ng2Job\", downgradeComponent({\r\n component: JobComponent\r\n })).directive(\"ng2JobFurtherWork\", downgradeComponent({\r\n component: JobFurtherWorkComponent,\r\n inputs: [\"jobFurtherWork\"],\r\n outputs: [\"load\"]\r\n })).directive(\"wizzard\", downgradeComponent({\r\n component: WizardStepComponent,\r\n inputs: [\"Steps\", \"CurrentStep\"]\r\n })).directive(\"reportViewer\", downgradeComponent({\r\n component: ReportViewerComponent,\r\n inputs: [\"reportUrl\", \"hostUrl\"]\r\n })).directive(\"portal\", downgradeComponent({\r\n component: PortalContactsTabComponent,\r\n inputs: [\"Email\", \"AllowLogin\", \"DefaultEmail\", \"DisableResetButton\", \"StartDate\", \"ConsumerUserRolesModel\", \"DisableReSendButton\", \"RoleSelected\"],\r\n outputs: [\"AddEmail\", \"ResetPasswordEvent\", \"SwitchLoginAccess\", \"SetRoleSelected\"]\r\n })).directive(\"ng2SettingsPortalActivity\", downgradeComponent({\r\n component: SettingsPortalActivityComponent\r\n }))\r\n .factory(\"ng2JobDataService\", downgradeInjectable(JobService) as any)\r\n .directive(\"ng2MakeModel\", downgradeComponent({\r\n component: MakeModelComponent,\r\n inputs: [\"makemodelid\"]\r\n })).directive(\"ng2MakeModelSkills\", downgradeComponent({\r\n component: MakeModelSkillsComponent,\r\n inputs: [\"makemodelid\"]\r\n })).directive(\"ng2MakeModelList\", downgradeComponent({\r\n component: MakeModelListComponent\r\n })).directive(\"ng2MakeModelUpload\", downgradeComponent({\r\n component: MakeModelUploadComponent\r\n })).directive(\"ng2EquipmentConditionList\", downgradeComponent({\r\n component: EquipmentConditionListComponent\r\n })).directive(\"ng2ServiceScheduleUpload\", downgradeComponent({\r\n component: ServiceScheduleUploadComponent\r\n })).directive(\"ng2NewStockType\", downgradeComponent({\r\n component: NewStockTypeComponent,\r\n inputs: [\"Id\"]\r\n })).directive(\"ng2StockTypes\", downgradeComponent({\r\n component: StockTypesComponent\r\n })).directive(\"ng2EngineerType\", downgradeComponent({\r\n component: EngineerTypeComponent\r\n })).directive(\"ng2EngineerTypeList\", downgradeComponent({\r\n component: EngineerTypeListComponent\r\n })).directive(\"ng2EngineerSkillList\", downgradeComponent({\r\n component: EngineerSkillListComponent\r\n })).directive(\"ng2LayoutTemplateList\", downgradeComponent({\r\n component: LayoutTemplateListComponent\r\n })).directive(\"ng2LayoutTemplate\", downgradeComponent({\r\n component: LayoutTemplateComponent,\r\n inputs: [\"templateId\"]\r\n })).directive(\"ng2CreateLayoutTemplate\", downgradeComponent({\r\n component: CreateLayoutTemplateComponent\r\n })).directive(\"ng2EngineerSkill\", downgradeComponent({\r\n component: EngineerSkillComponent\r\n })).directive(\"ng2EmployeeEngineerSkills\", downgradeComponent({\r\n component: EmployeeEngineerSkillsComponent,\r\n inputs: [\"employeeId\", \"engineerSkills\"]\r\n })).directive(\"ng2EmployeeLimits\", downgradeComponent({\r\n component: EmployeeLimitsComponent,\r\n inputs: [\"employee\", \"disabled\"],\r\n outputs: [\"ValueChanged\"]\r\n })).directive(\"ng2HelpModal\", downgradeComponent({\r\n component: HelpModalComponent,\r\n inputs: [\"helpVisible\", \"suggestedHelpLink\"],\r\n outputs: [\"helpVisibleChange\"]\r\n })).directive(\"ng2ButtonWithHelp\", downgradeComponent({\r\n component: ButtonWithHelpComponent,\r\n inputs: [\"helpItemsTags\"],\r\n })).directive(\"ng2InfoButton\", downgradeComponent({\r\n component: InfoButtonComponent,\r\n inputs: [\"primaryActionTranslationKey\", \"primaryActionLink\", \"helpItemsTags\", \"disabled\"],\r\n })).directive(\"ng2SettingsList\", downgradeComponent({\r\n component: SettingsComponent\r\n })).directive(\"ng2StockAdjustmentReasonList\", downgradeComponent({\r\n component: StockAdjustmentReasonListComponent\r\n })).directive(\"ng2StockAdjustmentReason\", downgradeComponent({\r\n component: StockAdjustmentReasonComponent\r\n })).directive(\"ng2PriceListDetail\", downgradeComponent({\r\n component: PriceListDetailComponent,\r\n inputs: [\"Id\", \"IsNewlyCreated\"]\r\n })).directive(\"ng2ServiceGroups\", downgradeComponent({\r\n component: ServiceGroupsComponent,\r\n inputs: [\"ServiceGroupId\", \"CustomerId\"]\r\n })).directive(\"ng2CustomerEquipmentSystems\", downgradeComponent({\r\n component: CustomerEquipmentSystemsComponent,\r\n inputs: [\"CustomerId\"]\r\n })).directive(\"ng2AssignEquipmentSystem\", downgradeComponent({\r\n component: AssignEquipmentSystemComponent,\r\n inputs: [\"EquipmentSystemId\", \"CustomerId\"]\r\n })).directive(\"ng2ServiceGroupsAssignation\", downgradeComponent({\r\n component: ServiceGroupsItemsAssignationComponent\r\n })).directive(\"ng2CustomerAccountNumber\", downgradeComponent({\r\n component: AccountNumberComponent,\r\n inputs: [\"PopupVisible\"],\r\n outputs: [\"cancelAccountNumber\", \"okAccountNumber\"]\r\n })).directive(\"ng2HtmlBody\", downgradeComponent({\r\n component: HtmlBodyComponent,\r\n inputs: [\"html\"]\r\n })).directive(\"ng2CylinderTypes\", downgradeComponent({\r\n component: CylinderTypesComponent\r\n })).directive(\"ng2NewCylinderType\", downgradeComponent({\r\n component: NewCylinderTypeComponent,\r\n inputs: [\"Id\"]\r\n })).directive(\"ng2FGasLog\", downgradeComponent({\r\n component: FGasLogComponent,\r\n inputs: [\"cylinderId\", \"siteId\", \"customerId\", \"agentId\"]\r\n }))\r\n .factory(\"ng2JobDataService\", downgradeInjectable(JobService) as any)\r\n .factory(\"ng2WalkthoughService\", downgradeInjectable(WalkthoughService) as any)\r\n .factory(\"ng2LicenseService\", downgradeInjectable(LicenseService) as any)\r\n .factory(\"ng2AuthService\", downgradeInjectable(AuthService) as any)\r\n .factory(\"ng2WalkthoughService\", downgradeInjectable(WalkthoughService) as any)\r\n .factory(\"ng2PaymentsService\", downgradeInjectable(PaymentsService) as any)\r\n .factory(\"ng2MessageService\", downgradeInjectable(MessageService) as any)\r\n .factory(\"ng2GoToJobEquipService\", downgradeInjectable(GoToJobEquipService) as any)\r\n .factory(\"ng2RecurringJobsService\", downgradeInjectable(RecurringJobsService) as any)\r\n .factory(\"ng2DirtyFormService\", downgradeInjectable(DirtyFormService) as any)\r\n .factory(\"ng2TranslateDowngradeService\", downgradeInjectable(Ng2TranslateDowngradeService) as any)\r\n .factory(\"ng2CustomerAttributesService\", downgradeInjectable(CustomerAttributesService) as any)\r\n .factory(\"ng2CustomerSkillsService\", downgradeInjectable(CustomerSkillsService) as any)\r\n .factory(\"ng2CustomerJobAlertsService\", downgradeInjectable(CustomerJobAlertsService) as any)\r\n .factory(\"ng2CustomerLayoutService\", downgradeInjectable(CustomerLayoutService) as any)\r\n .factory(\"ng2ServiceGroupsService\", downgradeInjectable(ServiceGroupsService) as any)\r\n .factory(\"ng2DynamicLocaleService\", downgradeInjectable(DynamicLocaleService) as any)\r\n .factory(\"ng2SettingService\", downgradeInjectable(SettingsService) as any)\r\n .factory(\"ng2StoreService\", downgradeInjectable(StoreService) as any)\r\n .factory(\"ng2CustomerSystemsService\", downgradeInjectable(CustomerEquipmentSystemsService) as any)\r\n .factory(\"ng2LoggingService\", downgradeInjectable(LoggingService) as any)\r\n .factory(\"ng2QuoteService\", downgradeInjectable(QuoteService) as any)\r\n .factory(\"ng2InvoiceDataService\", downgradeInjectable(InvoiceDataService) as any)\r\n .factory(\"ng2HttpClient\", downgradeInjectable(Ng2HttpClientService) as any)\r\n .directive(\"ng2ChartLoader\", downgradeComponent({\r\n component: ChartLoaderComponent,\r\n inputs: [\"chartName\"]\r\n }))\r\n .directive(\"ng2WidgetLoader\", downgradeComponent({\r\n component: WidgetLoaderComponent,\r\n inputs: [\"widgetType\"]\r\n }))\r\n .directive(\"ng2Attributes\", downgradeComponent({\r\n component: AttributesComponent,\r\n inputs: [\"docTypeId\"]\r\n }))\r\n .directive(\"ng2EquipmentCategory\", downgradeComponent({ component: CategoryTypesComponent }))\r\n .directive(\"ng2EquipmentJobList\", downgradeComponent({\r\n component: EquipmentJobListComponent,\r\n inputs: [\"jobId\"]\r\n }))\r\n .directive(\"ng2NewAttribute\", downgradeComponent({\r\n component: NewAttributeComponent,\r\n inputs: [\"id\", \"docType\"]\r\n }))\r\n .directive(\"ng2EquipmentCategory\", downgradeComponent({ component: CategoryTypesComponent }))\r\n .directive(\"ng2EquipmentCondition\", downgradeComponent({\r\n component: EquipmentConditionComponent,\r\n inputs: [\"conditionId\", \"isNew\"]\r\n }))\r\n .directive(\"ng2ContractTypeList\", downgradeComponent({ component: ContractTypeListComponent }))\r\n .directive(\"ng2AccountsCommunicatorSetup\", downgradeComponent({\r\n component: AccountsCommunicatorSetupComponent,\r\n inputs: [\"showInvalidAccounts\", \"invalidAccounts\"]\r\n }))\r\n .directive(\"ng2AccountsCreateInvoices\", downgradeComponent({\r\n component: AccountsCreateInvoicesComponent,\r\n inputs: [\"invEquipCategory\", \"invEquipGroup\", \"invEquipList\"],\r\n outputs: [\"invEquipCategoryOut\", \"invEquipGroupOut\", \"invEquipListOut\"]\r\n }))\r\n .directive(\"libServicingVisualiser\", downgradeComponent({\r\n component: ServicingVisualiserComponent,\r\n inputs: [\"headerName\", \"headerDetails\", \"genericId\", \"usedOn\"]\r\n }))\r\n .directive(\"ng2Servicing\", downgradeComponent({\r\n component: ServicingComponent,\r\n inputs: [\"form\", \"servicingsSource\", \"isCustomer\", \"displayedOn\", \"headerName\", \"headerDetails\"],\r\n outputs: [\"servicingsSourceChanged\"]\r\n }))\r\n .directive(\"multipleSelection\", downgradeComponent({\r\n component: MultipleSelectionComponent,\r\n inputs: [\"selectionDataSource\", \"displayExpr\", \"keyExpr\", \"placeholder\"],\r\n outputs: [\"selectedItems\"]\r\n }))\r\n .directive(\"ng2PlannedJobsReport\", downgradeComponent({ component: PlannedJobsReportComponent }))\r\n .directive(\"ng2StripeConnectButton\", downgradeComponent({\r\n component: StripeConnectButtonComponent,\r\n inputs: [\"isConnected\"],\r\n outputs: [\"disconnect\"]\r\n }))\r\n .directive(\"ng2NewContractType\", downgradeComponent({ component: NewContractTypeComponent }))\r\n .directive(\"ng2TwoFactorAuthentication\", downgradeComponent({\r\n component: TwoFactorAuthenticationComponent\r\n }))\r\n .directive(\"ng2InvoiceList\", downgradeComponent({\r\n component: InvoiceListComponent\r\n }))\r\n .directive(\"ng2PriceList\", downgradeComponent({ component: PriceListComponent }))\r\n .directive(\"ng2CustomerAttributes\", downgradeComponent({\r\n component: CustomerAttributeComponent,\r\n inputs: [\"customerId\"]\r\n }))\r\n .directive(\"ng2CustomerAccounts\", downgradeComponent({\r\n component: CustomerAccountsComponent,\r\n inputs: [\"customer\", \"rcvat\", \"eori\", \"allowedstock\", \"allowedpro\"]\r\n }))\r\n .directive(\"ng2CustomerSites\", downgradeComponent({\r\n component: CustomerSitesComponent,\r\n inputs: [\"customerId\"]\r\n }))\r\n .directive(\"ng2CustomerSkills\", downgradeComponent({\r\n component: CustomerSkillsComponent,\r\n inputs: [\"customerId\"]\r\n }))\r\n .directive(\"ng2CustomerLayouts\", downgradeComponent({\r\n component: CustomerLayoutsComponent,\r\n inputs: [\"customerId\"]\r\n }))\r\n .directive(\"ng2CustomerJobAlerts\", downgradeComponent({\r\n component: CustomerJobAlertsComponent,\r\n inputs: [\"customerId\", \"serviceContactId\"]\r\n }))\r\n .directive(\"ng2EmployeesList\", downgradeComponent({\r\n component: EmployeesListComponent\r\n }))\r\n .directive(\"ng2CustomerFile\", downgradeComponent({\r\n component: CustomerFileComponent,\r\n inputs: [\"customerId\"]\r\n }))\r\n .directive(\"ng2PriceList\", downgradeComponent({ component: PriceListComponent }))\r\n .directive(\"ng2Switch\", downgradeComponent({\r\n component: SwitchComponent\r\n }))\r\n .directive(\"libSecondLevelNavigationJs\", downgradeComponent({\r\n component: SecondLevelNavigationComponent,\r\n inputs: [\"items\", \"hasAnyDevice\"]\r\n }))\r\n .directive(\"ng2PlannerCard\", downgradeComponent({\r\n component: PlannerCardComponent\r\n }))\r\n .directive(\"ng2CreditRaisedAccordion\", downgradeComponent({\r\n component: CreditRaisedAccordionItemComponent,\r\n inputs: [\"noteIds\"],\r\n outputs: [\"raisedCreditsExists\"]\r\n }))\r\n .directive(\"ng2AuditLog\", downgradeComponent({ component: AuditLogComponent }))\r\n .directive(\"ng2StockManufacturersList\", downgradeComponent({ component: StockManufacturersListComponent }))\r\n .directive(\"ng2StockManufacturer\", downgradeComponent({ component: StockManufacturerComponent }))\r\n .directive(\"ng2AlertList\", downgradeComponent({\r\n component: AlertListComponent\r\n }))\r\n .directive(\"ng2Alert\", downgradeComponent({\r\n component: AlertComponent\r\n }))\r\n .directive(\"ng2SalesBarrierList\", downgradeComponent({\r\n component: SalesBarrierListComponent\r\n }))\r\n .directive(\"ng2SalesBarrierDetail\", downgradeComponent({\r\n component: SalesBarrierDetailComponent,\r\n inputs: [\"salesBarrierId\", \"isNewlyCreated\"]\r\n }))\r\n .directive(\"ng2JobTitles\", downgradeComponent({\r\n component: JobTitlesComponent\r\n }))\r\n .directive(\"ng2ReminderTypesDetail\", downgradeComponent({\r\n component: ReminderTypesDetailComponent,\r\n inputs: [\"reminderTypeId\", \"isNewlyCreated\"]\r\n }))\r\n .directive(\"ng2ReminderTypesList\", downgradeComponent({\r\n component: ReminderTypesListComponent\r\n }))\r\n .directive(\"ng2SalesOpportunityStatuses\", downgradeComponent({\r\n component: SalesOpportunityStatusDetailComponent,\r\n inputs: [\"statusId\", \"isNewlyCreated\"]\r\n }))\r\n .directive(\"ng2CompetitorsList\", downgradeComponent({\r\n component: CompetitorsListComponent\r\n }))\r\n .directive(\"ng2LicenceViewer\", downgradeComponent({\r\n component: LicenceViewerComponent\r\n }))\r\n .directive(\"ng2CompetitorDetail\", downgradeComponent({\r\n component: CompetitorDetailComponent,\r\n inputs: [\"competitorId\", \"isNewlyCreated\"]\r\n }))\r\n .directive(\"ng2MailChimpLink\", downgradeComponent({\r\n component: MailChimpLinkComponent,\r\n inputs: [\"code\"]\r\n }))\r\n .directive(\"ng2SecurityRolesList\", downgradeComponent({\r\n component: SecurityRolesListComponent,\r\n }))\r\n .directive(\"ng2SecurityRolesDetail\", downgradeComponent({\r\n component: SecurityRolesDetailComponent,\r\n inputs: [\"securityRoleId\", \"securityRoleTypeId\", \"isNewlyCreated\"]\r\n }))\r\n .directive(\"ng2SalesOpportunityStatusList\", downgradeComponent({\r\n component: SalesOpportunityStatusListComponent\r\n }))\r\n .directive(\"ng2SalesOpportunitySelectBox\", downgradeComponent({\r\n component: SalesOpportunitySelectBoxComponent,\r\n inputs: [\"value\", \"customerId\", \"disabled\"],\r\n outputs: [\"valueChange\"]\r\n }))\r\n .directive(\"ng2ActivityTypesList\", downgradeComponent({\r\n component: ActivityTypesListComponent,\r\n }))\r\n .directive(\"ng2JobTypesList\", downgradeComponent({\r\n component: JobTypesListComponent,\r\n }))\r\n .directive(\"ng2JobGroupsList\", downgradeComponent({\r\n component: JobGroupsListComponent,\r\n }))\r\n .directive(\"ng2JobGroupsDetail\", downgradeComponent({\r\n component: JobGroupsDetailComponent,\r\n inputs: [\"jobGroupId\"]\r\n }))\r\n .directive(\"ng2MaterialTypesList\", downgradeComponent({\r\n component: MaterialTypesListComponent,\r\n }))\r\n .directive(\"ng2MaterialTypesDetail\", downgradeComponent({\r\n component: MaterialTypesDetailComponent,\r\n inputs: [\"miscTypeId\"]\r\n }))\r\n .directive(\"ng2ActivityTypesDetail\", downgradeComponent({\r\n component: ActivityTypesDetailComponent,\r\n inputs: [\"activityTypeId\", \"isNewlyCreated\"]\r\n }))\r\n .directive(\"ng2JobTypesDetail\", downgradeComponent({\r\n component: JobTypesDetailComponent,\r\n inputs: [\"jobTypeId\"]\r\n }))\r\n .directive(\"ng2CustomerContactsSelectBox\", downgradeComponent({\r\n component: CustomerContactsSelectBoxComponent,\r\n inputs: [\"customerId\", \"contactId\"],\r\n outputs: [\"updateContact\", \"updateCustomer\"]\r\n }))\r\n .directive(\"ng2ReminderList\", downgradeComponent({\r\n component: ReminderListComponent\r\n }))\r\n .directive(\"ng2ContactList\", downgradeComponent({\r\n component: ContactListComponent\r\n }))\r\n .directive(\"ng2ContactUpload\", downgradeComponent({\r\n component: ContactUploadComponent\r\n }))\r\n .directive(\"ng2CustomerUpload\", downgradeComponent({\r\n component: CustomerUploadComponent\r\n }))\r\n .directive(\"ng2ReminderFiles\", downgradeComponent({\r\n component: ReminderFilesComponent,\r\n inputs: [\"reminderId\"]\r\n }))\r\n .directive(\"ng2CustomerList\", downgradeComponent({\r\n component: CustomerListComponent\r\n }))\r\n .directive(\"ng2StoreList\", downgradeComponent({\r\n component: StoreListComponent\r\n }))\r\n .directive(\"ng2Store\", downgradeComponent({\r\n component: StoreComponent,\r\n inputs: [\"storeId\", \"isNewlyCreated\"]\r\n }))\r\n .directive(\"ng2InputWithButton\", downgradeComponent({\r\n component: InputWithButtonComponent,\r\n inputs: [\"value\", \"controlId\", \"inputType\", \"labelText\", \"labelImgSrc\", \"iconClass\", \"mode\", \"action\", \"iconActive\"],\r\n outputs: [\"valueChange\"]\r\n }))\r\n .directive(\"ng2What3words\", downgradeComponent({\r\n component: What3wordsComponent,\r\n inputs: [\"value\", \"updated\"],\r\n outputs: [\"valueChange\"]\r\n }))\r\n .directive(\"ng2PriorityIcon\", downgradeComponent({\r\n component: PriorityIconComponent,\r\n inputs: [\"priorityId\", \"size\"],\r\n }))\r\n .directive(\"ng2PrioritySelectBox\", downgradeComponent({\r\n component: PrioritySelectBoxComponent,\r\n inputs: [\"value\"]\r\n }))\r\n .directive(\"ng2EngineerLocation\", downgradeComponent({\r\n component: EngineerLocationComponent,\r\n inputs: [\"employeeId\"]\r\n }))\r\n .directive(\"ng2UserReferenceOptionsList\", downgradeComponent({\r\n component: UserReferenceOptionsListComponent,\r\n inputs: [\"userRefId\", \"refreshCounter\"]\r\n }))\r\n .directive(\"ng2InvalidAccounts\", downgradeComponent({\r\n component: InvalidAccountsComponent,\r\n inputs: [\"invalidaccounts\"],\r\n outputs: [\"close\"]\r\n }))\r\n .directive(\"ng2CustomerHistory\", downgradeComponent({\r\n component: CustomerHistoryComponent,\r\n inputs: [\"customerId\", \"repaint\"]\r\n }))\r\n .directive(\"ng2ReminderCustomer\", downgradeComponent({\r\n component: ReminderCustomerComponent,\r\n inputs: [\"customerId\", \"selected\"]\r\n }))\r\n .directive(\"ng2Discussion\", downgradeComponent({\r\n component: DiscussionComponent,\r\n inputs: [\"documentType\", \"documentId\", \"disabled\"]\r\n }))\r\n .directive(\"ng2RefrigerantTypeList\", downgradeComponent({\r\n component: RefrigerantTypeListComponent\r\n }))\r\n .directive(\"ng2RefrigerantTypeDetail\", downgradeComponent({\r\n component: RefrigerantTypeDetailComponent,\r\n inputs: [\"id\"]\r\n }))\r\n .directive(\"ng2ManageSubscription\", downgradeComponent({\r\n component: ManageSubscriptionComponent\r\n }))\r\n .directive(\"ng2BillingHistory\", downgradeComponent({\r\n component: HistoryComponent\r\n }))\r\n .directive(\"ng2Notifications\", downgradeComponent({\r\n component: NotificationsComponent\r\n }))\r\n .directive(\"ng2InvoiceStatusAccordionItem\", downgradeComponent({\r\n component: InvoiceStatusAccordionItemComponent,\r\n inputs: [\"accItems\", \"accInvDocuments\"]\r\n }))\r\n .directive(\"ng2Login\", downgradeComponent({\r\n component: LoginComponent,\r\n inputs: [\"isSupportLogin\", \"message\"]\r\n }))\r\n .directive(\"ng2RecordNavButtons\", downgradeComponent({\r\n component: RecordNavButtonsComponent,\r\n inputs: [ \"canNavigatePrevious\", \"canNavigateNext\" ],\r\n outputs: [ \"navigatePrevious\", \"navigateNext\" ]\r\n }))\r\n .directive(\"ng2ProjectTypesList\", downgradeComponent({\r\n component: ProjectTypesListComponent\r\n }))\r\n .directive(\"ng2ProjectTypeDetail\", downgradeComponent({\r\n component: ProjectTypeDetailComponent,\r\n inputs: [\"projectTypeId\"]\r\n }))\r\n .directive(\"ng2ProjectStatusesList\", downgradeComponent({\r\n component: ProjectStatusesListComponent\r\n }))\r\n .directive(\"ng2ProjectStatusDetail\", downgradeComponent({\r\n component: ProjectStatusDetailComponent,\r\n inputs: [\"projectStatusId\"]\r\n }))\r\n .directive(\"ng2PrioritiesList\", downgradeComponent({\r\n component: PriorityListComponent\r\n }))\r\n .directive(\"ng2PriorityDetail\", downgradeComponent({\r\n component: PriorityDetailComponent,\r\n inputs: [\"priorityId\"]\r\n }));\r\n platformBrowserDynamic().bootstrapModule(AppModule).then(platformRef => {\r\n const upgrade = platformRef.injector.get(UpgradeModule) as UpgradeModule;\r\n upgrade.bootstrap(document.body, [\"app\"], { strictDi: false });\r\n }).catch(err =>\r\n // eslint-disable-next-line no-console\r\n console.error(err)\r\n );\r\n }\r\n}, 250);\r\n","/**\r\n * Intro.js v2.9.3 (MODIFIED)\r\n *\r\n * -- This file has been modified to lazy load the step.element (Dave C, 2019)\r\n * -- This should attempted to be pull requested bak into the original source\r\n *\r\n * https://github.com/usablica/intro.js\r\n *\r\n * Copyright (C) 2017 Afshin Mehrabani (@afshinmeh)\r\n */\r\n\r\n(function(f) {\r\n if (typeof exports === \"object\" && typeof module !== \"undefined\") {\r\n module.exports = f();\r\n // deprecated function\r\n // @since 2.8.0\r\n module.exports.introJs = function () {\r\n console.warn('Deprecated: please use require(\"intro.js\") directly, instead of the introJs method of the function');\r\n // introJs()\r\n return f().apply(this, arguments);\r\n };\r\n } else if (typeof define === \"function\" && define.amd) {\r\n define([], f);\r\n } else {\r\n var g;\r\n if (typeof window !== \"undefined\") {\r\n g = window;\r\n } else if (typeof global !== \"undefined\") {\r\n g = global;\r\n } else if (typeof self !== \"undefined\") {\r\n g = self;\r\n } else {\r\n g = this;\r\n }\r\n g.introJs = f();\r\n }\r\n})(function () {\r\n //Default config/variables\r\n var VERSION = '2.9.3';\r\n var PLACEHOLDER_ELEMENT = \"PLACEHOLDER\";\r\n\r\n /**\r\n * IntroJs main class\r\n *\r\n * @class IntroJs\r\n */\r\n function IntroJs(obj) {\r\n this._targetElement = obj;\r\n this._originalTargetElement = obj;\r\n this._introItems = [];\r\n\r\n this._options = {\r\n /* Next button label in tooltip box */\r\n nextLabel: 'Next →',\r\n /* Previous button label in tooltip box */\r\n prevLabel: '← Back',\r\n /* Skip button label in tooltip box */\r\n skipLabel: 'Skip',\r\n /* Done button label in tooltip box */\r\n doneLabel: 'Done',\r\n /* Hide previous button in the first step? Otherwise, it will be disabled button. */\r\n hidePrev: false,\r\n /* Hide next button in the last step? Otherwise, it will be disabled button. */\r\n hideNext: false,\r\n /* Default tooltip box position */\r\n tooltipPosition: 'bottom',\r\n /* Next CSS class for tooltip boxes */\r\n tooltipClass: '',\r\n /* CSS class that is added to the helperLayer */\r\n highlightClass: '',\r\n /* Close introduction when pressing Escape button? */\r\n exitOnEsc: true,\r\n /* Close introduction when clicking on overlay layer? */\r\n exitOnOverlayClick: true,\r\n /* Show step numbers in introduction? */\r\n showStepNumbers: true,\r\n /* Let user use keyboard to navigate the tour? */\r\n keyboardNavigation: true,\r\n /* Show tour control buttons? */\r\n showButtons: true,\r\n /* Show tour bullets? */\r\n showBullets: true,\r\n /* Show tour progress? */\r\n showProgress: false,\r\n /* Scroll to highlighted element? */\r\n scrollToElement: true,\r\n /*\r\n * Should we scroll the tooltip or target element?\r\n *\r\n * Options are: 'element' or 'tooltip'\r\n */\r\n scrollTo: 'element',\r\n /* Padding to add after scrolling when element is not in the viewport (in pixels) */\r\n scrollPadding: 30,\r\n /* Set the overlay opacity */\r\n overlayOpacity: 0.8,\r\n /* Precedence of positions, when auto is enabled */\r\n positionPrecedence: [\"bottom\", \"top\", \"right\", \"left\"],\r\n /* Disable an interaction with element? */\r\n disableInteraction: false,\r\n /* Set how much padding to be used around helper element */\r\n helperElementPadding: 10,\r\n /* Default hint position */\r\n hintPosition: 'top-middle',\r\n /* Hint button label */\r\n hintButtonLabel: 'Got it',\r\n /* Adding animation to hints? */\r\n hintAnimation: true,\r\n /* additional classes to put on the buttons */\r\n buttonClass: \"introjs-button\"\r\n };\r\n }\r\n\r\n /**\r\n * Initiate a new introduction/guide from an element in the page\r\n *\r\n * @api private\r\n * @method _introForElement\r\n * @param {Object} targetElm\r\n * @param {String} group\r\n * @returns {Boolean} Success or not?\r\n */\r\n function _introForElement(targetElm, group) {\r\n var allIntroSteps = targetElm.querySelectorAll(\"*[data-intro]\"),\r\n introItems = [];\r\n\r\n if (this._options.steps) {\r\n //use steps passed programmatically\r\n _forEach(this._options.steps, function (step) {\r\n var currentItem = _cloneObject(step);\r\n currentItem.hasElement = true;\r\n currentItem.original = currentItem.element;\r\n currentItem.element = null;\r\n Object.defineProperty(currentItem, \"element\", {\r\n get: function() {\r\n if(!this._el || this._el === PLACEHOLDER_ELEMENT) {\r\n\r\n if (typeof (this.original) === 'string') { //use querySelector function only when developer used CSS selector\r\n //grab the element with given selector from the page\r\n this._el = document.querySelector(currentItem.original);\r\n } else if (typeof (this.original) === 'undefined' || this.original === null) { //intro without element\r\n var floatingElementQuery = document.querySelector(\".introjsFloatingElement\");\r\n\r\n if (floatingElementQuery === null) {\r\n floatingElementQuery = document.createElement('div');\r\n floatingElementQuery.className = 'introjsFloatingElement';\r\n\r\n document.body.appendChild(floatingElementQuery);\r\n }\r\n this.position = 'floating';\r\n this._el = floatingElementQuery;\r\n } else { //element was provided use that\r\n this._el = this.original;\r\n }\r\n //ensure we have a non empty value to keep the step alive\r\n if(!this._el) {\r\n this._el = PLACEHOLDER_ELEMENT;\r\n }\r\n }\r\n return this._el;\r\n }\r\n });\r\n Object.defineProperty(currentItem, \"targetEl\", {\r\n get: function() {\r\n return document.querySelector(this.targetSelector);\r\n }\r\n });\r\n\r\n //set the step\r\n currentItem.step = introItems.length + 1;\r\n\r\n currentItem.scrollTo = currentItem.scrollTo || this._options.scrollTo;\r\n\r\n if (typeof (currentItem.disableInteraction) === 'undefined') {\r\n currentItem.disableInteraction = this._options.disableInteraction;\r\n }\r\n\r\n if (currentItem.element !== null) {\r\n introItems.push(currentItem);\r\n }\r\n }.bind(this));\r\n\r\n } else {\r\n //use steps from data-* annotations\r\n var elmsLength = allIntroSteps.length;\r\n var disableInteraction;\r\n\r\n //if there's no element to intro\r\n if (elmsLength < 1) {\r\n return false;\r\n }\r\n\r\n _forEach(allIntroSteps, function (currentElement) {\r\n\r\n // PR #80\r\n // start intro for groups of elements\r\n if (group && (currentElement.getAttribute(\"data-intro-group\") !== group)) {\r\n return;\r\n }\r\n\r\n // skip hidden elements\r\n if (currentElement.style.display === 'none') {\r\n return;\r\n }\r\n\r\n var step = parseInt(currentElement.getAttribute('data-step'), 10);\r\n\r\n if (typeof (currentElement.getAttribute('data-disable-interaction')) !== 'undefined') {\r\n disableInteraction = !!currentElement.getAttribute('data-disable-interaction');\r\n } else {\r\n disableInteraction = this._options.disableInteraction;\r\n }\r\n\r\n if (step > 0) {\r\n introItems[step - 1] = {\r\n element: currentElement,\r\n intro: currentElement.getAttribute('data-intro'),\r\n step: parseInt(currentElement.getAttribute('data-step'), 10),\r\n tooltipClass: currentElement.getAttribute('data-tooltipclass'),\r\n highlightClass: currentElement.getAttribute('data-highlightclass'),\r\n position: currentElement.getAttribute('data-position') || this._options.tooltipPosition,\r\n scrollTo: currentElement.getAttribute('data-scrollto') || this._options.scrollTo,\r\n disableInteraction: disableInteraction\r\n };\r\n }\r\n }.bind(this));\r\n\r\n //next add intro items without data-step\r\n //todo: we need a cleanup here, two loops are redundant\r\n var nextStep = 0;\r\n\r\n _forEach(allIntroSteps, function (currentElement) {\r\n\r\n // PR #80\r\n // start intro for groups of elements\r\n if (group && (currentElement.getAttribute(\"data-intro-group\") !== group)) {\r\n return;\r\n }\r\n\r\n if (currentElement.getAttribute('data-step') === null) {\r\n\r\n while (true) {\r\n if (typeof introItems[nextStep] === 'undefined') {\r\n break;\r\n } else {\r\n nextStep++;\r\n }\r\n }\r\n\r\n if (typeof (currentElement.getAttribute('data-disable-interaction')) !== 'undefined') {\r\n disableInteraction = !!currentElement.getAttribute('data-disable-interaction');\r\n } else {\r\n disableInteraction = this._options.disableInteraction;\r\n }\r\n\r\n introItems[nextStep] = {\r\n element: currentElement,\r\n intro: currentElement.getAttribute('data-intro'),\r\n step: nextStep + 1,\r\n tooltipClass: currentElement.getAttribute('data-tooltipclass'),\r\n highlightClass: currentElement.getAttribute('data-highlightclass'),\r\n position: currentElement.getAttribute('data-position') || this._options.tooltipPosition,\r\n scrollTo: currentElement.getAttribute('data-scrollto') || this._options.scrollTo,\r\n disableInteraction: disableInteraction\r\n };\r\n }\r\n }.bind(this));\r\n }\r\n\r\n //removing undefined/null elements\r\n var tempIntroItems = [];\r\n for (var z = 0; z < introItems.length; z++) {\r\n if (introItems[z]) {\r\n // copy non-falsy values to the end of the array\r\n tempIntroItems.push(introItems[z]);\r\n }\r\n }\r\n\r\n introItems = tempIntroItems;\r\n\r\n //Ok, sort all items with given steps\r\n introItems.sort(function (a, b) {\r\n return a.step - b.step;\r\n });\r\n\r\n //set it to the introJs object\r\n this._introItems = introItems;\r\n\r\n //add overlay layer to the page\r\n if(_addOverlayLayer.call(this, targetElm)) {\r\n //then, start the show\r\n _nextStep.call(this);\r\n\r\n if (this._options.keyboardNavigation) {\r\n DOMEvent.on(window, 'keydown', _onKeyDown, this, true);\r\n }\r\n //for window resize\r\n DOMEvent.on(window, 'resize', _onResize, this, true);\r\n }\r\n return false;\r\n }\r\n\r\n function _onResize () {\r\n this.refresh.call(this);\r\n }\r\n\r\n /**\r\n * on keyCode:\r\n * https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode\r\n * This feature has been removed from the Web standards.\r\n * Though some browsers may still support it, it is in\r\n * the process of being dropped.\r\n * Instead, you should use KeyboardEvent.code,\r\n * if it's implemented.\r\n *\r\n * jQuery's approach is to test for\r\n * (1) e.which, then\r\n * (2) e.charCode, then\r\n * (3) e.keyCode\r\n * https://github.com/jquery/jquery/blob/a6b0705294d336ae2f63f7276de0da1195495363/src/event.js#L638\r\n *\r\n * @param type var\r\n * @return type\r\n */\r\n function _onKeyDown (e) {\r\n var code = (e.code === null) ? e.which : e.code;\r\n\r\n // if code/e.which is null\r\n if (code === null) {\r\n code = (e.charCode === null) ? e.keyCode : e.charCode;\r\n }\r\n\r\n if ((code === 'Escape' || code === 27) && this._options.exitOnEsc === true) {\r\n //escape key pressed, exit the intro\r\n //check if exit callback is defined\r\n _exitIntro.call(this, this._targetElement);\r\n } else if (code === 'ArrowLeft' || code === 37) {\r\n //left arrow\r\n _previousStep.call(this);\r\n } else if (code === 'ArrowRight' || code === 39) {\r\n //right arrow\r\n _nextStep.call(this);\r\n } else if (code === 'Enter' || code === 13) {\r\n //srcElement === ie\r\n var target = e.target || e.srcElement;\r\n if (target && target.className.match('introjs-prevbutton')) {\r\n //user hit enter while focusing on previous button\r\n _previousStep.call(this);\r\n } else if (target && target.className.match('introjs-skipbutton')) {\r\n //user hit enter while focusing on skip button\r\n if (this._introItems.length - 1 === this._currentStep && typeof (this._introCompleteCallback) === 'function') {\r\n this._introCompleteCallback.call(this);\r\n }\r\n\r\n _exitIntro.call(this, this._targetElement);\r\n } else if (target && target.getAttribute('data-stepnumber')) {\r\n // user hit enter while focusing on step bullet\r\n target.click();\r\n } else {\r\n //default behavior for responding to enter\r\n _nextStep.call(this);\r\n }\r\n\r\n //prevent default behaviour on hitting Enter, to prevent steps being skipped in some browsers\r\n if(e.preventDefault) {\r\n e.preventDefault();\r\n } else {\r\n e.returnValue = false;\r\n }\r\n }\r\n }\r\n\r\n /*\r\n * makes a copy of the object\r\n * @api private\r\n * @method _cloneObject\r\n */\r\n function _cloneObject(object) {\r\n if (object === null || typeof (object) !== 'object' || typeof (object.nodeType) !== 'undefined') {\r\n return object;\r\n }\r\n var temp = {};\r\n for (var key in object) {\r\n if (typeof(window.jQuery) !== 'undefined' && object[key] instanceof window.jQuery) {\r\n temp[key] = object[key];\r\n } else {\r\n temp[key] = _cloneObject(object[key]);\r\n }\r\n }\r\n return temp;\r\n }\r\n /**\r\n * Go to specific step of introduction\r\n *\r\n * @api private\r\n * @method _goToStep\r\n */\r\n function _goToStep(step) {\r\n //because steps starts with zero\r\n this._currentStep = step - 2;\r\n if (typeof (this._introItems) !== 'undefined') {\r\n _nextStep.call(this);\r\n }\r\n }\r\n\r\n /**\r\n * Go to the specific step of introduction with the explicit [data-step] number\r\n *\r\n * @api private\r\n * @method _goToStepNumber\r\n */\r\n function _goToStepNumber(step) {\r\n this._currentStepNumber = step;\r\n if (typeof (this._introItems) !== 'undefined') {\r\n _nextStep.call(this);\r\n }\r\n }\r\n\r\n /**\r\n * Go to next step on intro\r\n *\r\n * @api private\r\n * @method _nextStep\r\n */\r\n function _nextStep() {\r\n this._direction = 'forward';\r\n\r\n if (typeof (this._currentStepNumber) !== 'undefined') {\r\n _forEach(this._introItems, function (item, i) {\r\n if( item.step === this._currentStepNumber ) {\r\n this._currentStep = i - 1;\r\n this._currentStepNumber = undefined;\r\n }\r\n }.bind(this));\r\n }\r\n\r\n if (typeof (this._currentStep) === 'undefined') {\r\n this._currentStep = 0;\r\n } else {\r\n ++this._currentStep;\r\n }\r\n\r\n // BUG: calling next step on last step does not call complete and finish. FIX: moved further up function\r\n if ((this._introItems.length) === this._currentStep) {\r\n //end of the intro\r\n //check if any callback is defined\r\n if (typeof (this._introCompleteCallback) === 'function') {\r\n this._introCompleteCallback.call(this);\r\n }\r\n _exitIntro.call(this, this._targetElement);\r\n return;\r\n }\r\n\r\n var nextStep = this._introItems[this._currentStep];\r\n var continueStep = true;\r\n\r\n //--- Use the target on the step if it's available\r\n if(nextStep.targetEl) this._targetElement = nextStep.targetEl;\r\n else this._targetElement = this._originalTargetElement\r\n\r\n if (typeof (this._introBeforeChangeCallback) !== 'undefined') {\r\n continueStep = this._introBeforeChangeCallback.call(this, nextStep.element);\r\n }\r\n\r\n // if `onbeforechange` returned `false`, stop displaying the element\r\n if (continueStep === false) {\r\n --this._currentStep;\r\n return false;\r\n }\r\n\r\n _showElement.call(this, nextStep);\r\n }\r\n\r\n /**\r\n * Go to previous step on intro\r\n *\r\n * @api private\r\n * @method _previousStep\r\n */\r\n function _previousStep() {\r\n this._direction = 'backward';\r\n\r\n if (this._currentStep === 0) {\r\n return false;\r\n }\r\n\r\n --this._currentStep;\r\n\r\n var nextStep = this._introItems[this._currentStep];\r\n var continueStep = true;\r\n\r\n //--- Use the target on the step if it's available\r\n if(nextStep.targetEl) this._targetElement = nextStep.targetEl;\r\n else this._targetElement = this._originalTargetElement\r\n\r\n if (typeof (this._introBeforeChangeCallback) !== 'undefined') {\r\n continueStep = this._introBeforeChangeCallback.call(this, nextStep.element);\r\n }\r\n\r\n // if `onbeforechange` returned `false`, stop displaying the element\r\n if (continueStep === false) {\r\n ++this._currentStep;\r\n return false;\r\n }\r\n\r\n _showElement.call(this, nextStep);\r\n }\r\n\r\n /**\r\n * Update placement of the intro objects on the screen\r\n * @api private\r\n */\r\n function _refresh() {\r\n // re-align intros\r\n _setHelperLayerPosition.call(this, document.querySelector('.introjs-helperLayer'));\r\n _setHelperLayerPosition.call(this, document.querySelector('.introjs-tooltipReferenceLayer'));\r\n _setHelperLayerPosition.call(this, document.querySelector('.introjs-disableInteraction'));\r\n\r\n // re-align tooltip\r\n if(this._currentStep !== undefined && this._currentStep !== null) {\r\n var oldHelperNumberLayer = document.querySelector('.introjs-helperNumberLayer'),\r\n oldArrowLayer = document.querySelector('.introjs-arrow'),\r\n oldtooltipContainer = document.querySelector('.introjs-tooltip');\r\n _placeTooltip.call(this, this._introItems[this._currentStep].element, oldtooltipContainer, oldArrowLayer, oldHelperNumberLayer);\r\n }\r\n\r\n //re-align hints\r\n _reAlignHints.call(this);\r\n return this;\r\n }\r\n\r\n /**\r\n * Exit from intro\r\n *\r\n * @api private\r\n * @method _exitIntro\r\n * @param {Object} targetElement\r\n * @param {Boolean} force - Setting to `true` will skip the result of beforeExit callback\r\n */\r\n function _exitIntro(targetElement, force) {\r\n var continueExit = true;\r\n\r\n // calling onbeforeexit callback\r\n //\r\n // If this callback return `false`, it would halt the process\r\n if (this._introBeforeExitCallback !== undefined) {\r\n continueExit = this._introBeforeExitCallback.call(this);\r\n }\r\n\r\n // skip this check if `force` parameter is `true`\r\n // otherwise, if `onbeforeexit` returned `false`, don't exit the intro\r\n if (!force && continueExit === false) return;\r\n\r\n //remove overlay layers from the page\r\n var overlayLayers = targetElement.querySelectorAll('.introjs-overlay');\r\n\r\n if (overlayLayers && overlayLayers.length) {\r\n _forEach(overlayLayers, function (overlayLayer) {\r\n overlayLayer.style.opacity = 0;\r\n window.setTimeout(function () {\r\n if (this.parentNode) {\r\n this.parentNode.removeChild(this);\r\n }\r\n }.bind(overlayLayer), 500);\r\n }.bind(this));\r\n }\r\n\r\n //remove all helper layers\r\n var helperLayer = targetElement.querySelector('.introjs-helperLayer');\r\n if (helperLayer) {\r\n helperLayer.parentNode.removeChild(helperLayer);\r\n }\r\n\r\n var referenceLayer = targetElement.querySelector('.introjs-tooltipReferenceLayer');\r\n if (referenceLayer) {\r\n referenceLayer.parentNode.removeChild(referenceLayer);\r\n }\r\n\r\n //remove disableInteractionLayer\r\n var disableInteractionLayer = targetElement.querySelector('.introjs-disableInteraction');\r\n if (disableInteractionLayer) {\r\n disableInteractionLayer.parentNode.removeChild(disableInteractionLayer);\r\n }\r\n\r\n //remove intro floating element\r\n var floatingElement = document.querySelector('.introjsFloatingElement');\r\n if (floatingElement) {\r\n floatingElement.parentNode.removeChild(floatingElement);\r\n }\r\n\r\n _removeShowElement();\r\n\r\n //remove `introjs-fixParent` class from the elements\r\n var fixParents = document.querySelectorAll('.introjs-fixParent');\r\n _forEach(fixParents, function (parent) {\r\n _removeClass(parent, /introjs-fixParent/g);\r\n });\r\n\r\n //clean listeners\r\n DOMEvent.off(window, 'keydown', _onKeyDown, this, true);\r\n DOMEvent.off(window, 'resize', _onResize, this, true);\r\n\r\n //check if any callback is defined\r\n if (this._introExitCallback !== undefined) {\r\n this._introExitCallback.call(this);\r\n }\r\n\r\n //set the step to zero\r\n this._currentStep = undefined;\r\n }\r\n\r\n /**\r\n * Render tooltip box in the page\r\n *\r\n * @api private\r\n * @method _placeTooltip\r\n * @param {HTMLElement} targetElement\r\n * @param {HTMLElement} tooltipLayer\r\n * @param {HTMLElement} arrowLayer\r\n * @param {HTMLElement} helperNumberLayer\r\n * @param {Boolean} hintMode\r\n */\r\n function _placeTooltip(targetElement, tooltipLayer, arrowLayer, helperNumberLayer, hintMode) {\r\n var tooltipCssClass = '',\r\n currentStepObj,\r\n tooltipOffset,\r\n targetOffset,\r\n windowSize,\r\n currentTooltipPosition;\r\n\r\n hintMode = hintMode || false;\r\n\r\n //reset the old style\r\n tooltipLayer.style.top = null;\r\n tooltipLayer.style.right = null;\r\n tooltipLayer.style.bottom = null;\r\n tooltipLayer.style.left = null;\r\n tooltipLayer.style.marginLeft = null;\r\n tooltipLayer.style.marginTop = null;\r\n\r\n arrowLayer.style.display = 'inherit';\r\n\r\n if (typeof(helperNumberLayer) !== 'undefined' && helperNumberLayer !== null) {\r\n helperNumberLayer.style.top = null;\r\n helperNumberLayer.style.left = null;\r\n }\r\n\r\n //prevent error when `this._currentStep` is undefined\r\n if (!this._introItems[this._currentStep]) return;\r\n\r\n //if we have a custom css class for each step\r\n currentStepObj = this._introItems[this._currentStep];\r\n if (typeof (currentStepObj.tooltipClass) === 'string') {\r\n tooltipCssClass = currentStepObj.tooltipClass;\r\n } else {\r\n tooltipCssClass = this._options.tooltipClass;\r\n }\r\n\r\n tooltipLayer.className = ('introjs-tooltip ' + tooltipCssClass).replace(/^\\s+|\\s+$/g, '');\r\n tooltipLayer.setAttribute('role', 'dialog');\r\n\r\n currentTooltipPosition = this._introItems[this._currentStep].position;\r\n\r\n // Floating is always valid, no point in calculating\r\n if (currentTooltipPosition !== \"floating\") {\r\n currentTooltipPosition = _determineAutoPosition.call(this, targetElement, tooltipLayer, currentTooltipPosition);\r\n }\r\n\r\n var tooltipLayerStyleLeft;\r\n targetOffset = _getOffset(targetElement);\r\n tooltipOffset = _getOffset(tooltipLayer);\r\n windowSize = _getWinSize();\r\n\r\n _addClass(tooltipLayer, 'introjs-' + currentTooltipPosition);\r\n\r\n switch (currentTooltipPosition) {\r\n case 'top-right-aligned':\r\n arrowLayer.className = 'introjs-arrow bottom-right';\r\n\r\n var tooltipLayerStyleRight = 0;\r\n _checkLeft(targetOffset, tooltipLayerStyleRight, tooltipOffset, tooltipLayer);\r\n tooltipLayer.style.bottom = (targetOffset.height + 20) + 'px';\r\n break;\r\n\r\n case 'top-middle-aligned':\r\n arrowLayer.className = 'introjs-arrow bottom-middle';\r\n\r\n var tooltipLayerStyleLeftRight = targetOffset.width / 2 - tooltipOffset.width / 2;\r\n\r\n // a fix for middle aligned hints\r\n if (hintMode) {\r\n tooltipLayerStyleLeftRight += 5;\r\n }\r\n\r\n if (_checkLeft(targetOffset, tooltipLayerStyleLeftRight, tooltipOffset, tooltipLayer)) {\r\n tooltipLayer.style.right = null;\r\n _checkRight(targetOffset, tooltipLayerStyleLeftRight, tooltipOffset, windowSize, tooltipLayer);\r\n }\r\n tooltipLayer.style.bottom = (targetOffset.height + 20) + 'px';\r\n break;\r\n\r\n case 'top-left-aligned':\r\n // top-left-aligned is the same as the default top\r\n case 'top':\r\n arrowLayer.className = 'introjs-arrow bottom';\r\n\r\n tooltipLayerStyleLeft = (hintMode) ? 0 : 15;\r\n\r\n _checkRight(targetOffset, tooltipLayerStyleLeft, tooltipOffset, windowSize, tooltipLayer);\r\n tooltipLayer.style.bottom = (targetOffset.height + 20) + 'px';\r\n break;\r\n case 'right':\r\n tooltipLayer.style.left = (targetOffset.width + 20) + 'px';\r\n if (targetOffset.top + tooltipOffset.height > windowSize.height) {\r\n // In this case, right would have fallen below the bottom of the screen.\r\n // Modify so that the bottom of the tooltip connects with the target\r\n arrowLayer.className = \"introjs-arrow left-bottom\";\r\n tooltipLayer.style.top = \"-\" + (tooltipOffset.height - targetOffset.height - 20) + \"px\";\r\n } else {\r\n arrowLayer.className = 'introjs-arrow left';\r\n }\r\n break;\r\n case 'left':\r\n if (!hintMode && this._options.showStepNumbers === true) {\r\n tooltipLayer.style.top = '15px';\r\n }\r\n\r\n if (targetOffset.top + tooltipOffset.height > windowSize.height) {\r\n // In this case, left would have fallen below the bottom of the screen.\r\n // Modify so that the bottom of the tooltip connects with the target\r\n tooltipLayer.style.top = \"-\" + (tooltipOffset.height - targetOffset.height - 20) + \"px\";\r\n arrowLayer.className = 'introjs-arrow right-bottom';\r\n } else {\r\n arrowLayer.className = 'introjs-arrow right';\r\n }\r\n tooltipLayer.style.right = (targetOffset.width + 20) + 'px';\r\n\r\n break;\r\n case 'floating':\r\n arrowLayer.style.display = 'none';\r\n\r\n //we have to adjust the top and left of layer manually for intro items without element\r\n tooltipLayer.style.left = '50%';\r\n tooltipLayer.style.top = '50%';\r\n tooltipLayer.style.marginLeft = '-' + (tooltipOffset.width / 2) + 'px';\r\n tooltipLayer.style.marginTop = '-' + (tooltipOffset.height / 2) + 'px';\r\n\r\n if (typeof(helperNumberLayer) !== 'undefined' && helperNumberLayer !== null) {\r\n helperNumberLayer.style.left = '-' + ((tooltipOffset.width / 2) + 18) + 'px';\r\n helperNumberLayer.style.top = '-' + ((tooltipOffset.height / 2) + 18) + 'px';\r\n }\r\n\r\n break;\r\n case 'bottom-right-aligned':\r\n arrowLayer.className = 'introjs-arrow top-right';\r\n\r\n tooltipLayerStyleRight = 0;\r\n _checkLeft(targetOffset, tooltipLayerStyleRight, tooltipOffset, tooltipLayer);\r\n tooltipLayer.style.top = (targetOffset.height + 20) + 'px';\r\n break;\r\n\r\n case 'bottom-middle-aligned':\r\n arrowLayer.className = 'introjs-arrow top-middle';\r\n\r\n tooltipLayerStyleLeftRight = targetOffset.width / 2 - tooltipOffset.width / 2;\r\n\r\n // a fix for middle aligned hints\r\n if (hintMode) {\r\n tooltipLayerStyleLeftRight += 5;\r\n }\r\n\r\n if (_checkLeft(targetOffset, tooltipLayerStyleLeftRight, tooltipOffset, tooltipLayer)) {\r\n tooltipLayer.style.right = null;\r\n _checkRight(targetOffset, tooltipLayerStyleLeftRight, tooltipOffset, windowSize, tooltipLayer);\r\n }\r\n tooltipLayer.style.top = (targetOffset.height + 20) + 'px';\r\n break;\r\n\r\n // case 'bottom-left-aligned':\r\n // Bottom-left-aligned is the same as the default bottom\r\n // case 'bottom':\r\n // Bottom going to follow the default behavior\r\n default:\r\n arrowLayer.className = 'introjs-arrow top';\r\n\r\n tooltipLayerStyleLeft = 0;\r\n _checkRight(targetOffset, tooltipLayerStyleLeft, tooltipOffset, windowSize, tooltipLayer);\r\n tooltipLayer.style.top = (targetOffset.height + 20) + 'px';\r\n }\r\n }\r\n\r\n /**\r\n * Set tooltip left so it doesn't go off the right side of the window\r\n *\r\n * @return boolean true, if tooltipLayerStyleLeft is ok. false, otherwise.\r\n */\r\n function _checkRight(targetOffset, tooltipLayerStyleLeft, tooltipOffset, windowSize, tooltipLayer) {\r\n if (targetOffset.left + tooltipLayerStyleLeft + tooltipOffset.width > windowSize.width) {\r\n // off the right side of the window\r\n tooltipLayer.style.left = (windowSize.width - tooltipOffset.width - targetOffset.left) + 'px';\r\n return false;\r\n }\r\n tooltipLayer.style.left = tooltipLayerStyleLeft + 'px';\r\n return true;\r\n }\r\n\r\n /**\r\n * Set tooltip right so it doesn't go off the left side of the window\r\n *\r\n * @return boolean true, if tooltipLayerStyleRight is ok. false, otherwise.\r\n */\r\n function _checkLeft(targetOffset, tooltipLayerStyleRight, tooltipOffset, tooltipLayer) {\r\n if (targetOffset.left + targetOffset.width - tooltipLayerStyleRight - tooltipOffset.width < 0) {\r\n // off the left side of the window\r\n tooltipLayer.style.left = (-targetOffset.left) + 'px';\r\n return false;\r\n }\r\n tooltipLayer.style.right = tooltipLayerStyleRight + 'px';\r\n return true;\r\n }\r\n\r\n /**\r\n * Determines the position of the tooltip based on the position precedence and availability\r\n * of screen space.\r\n *\r\n * @param {Object} targetElement\r\n * @param {Object} tooltipLayer\r\n * @param {String} desiredTooltipPosition\r\n * @return {String} calculatedPosition\r\n */\r\n function _determineAutoPosition(targetElement, tooltipLayer, desiredTooltipPosition) {\r\n\r\n // Take a clone of position precedence. These will be the available\r\n var possiblePositions = this._options.positionPrecedence.slice();\r\n\r\n var windowSize = _getWinSize();\r\n var tooltipHeight = _getOffset(tooltipLayer).height + 10;\r\n var tooltipWidth = _getOffset(tooltipLayer).width + 20;\r\n var targetElementRect = targetElement.getBoundingClientRect();\r\n\r\n // If we check all the possible areas, and there are no valid places for the tooltip, the element\r\n // must take up most of the screen real estate. Show the tooltip floating in the middle of the screen.\r\n var calculatedPosition = \"floating\";\r\n\r\n /*\r\n * auto determine position\r\n */\r\n\r\n // Check for space below\r\n if (targetElementRect.bottom + tooltipHeight + tooltipHeight > windowSize.height) {\r\n _removeEntry(possiblePositions, \"bottom\");\r\n }\r\n\r\n // Check for space above\r\n if (targetElementRect.top - tooltipHeight < 0) {\r\n _removeEntry(possiblePositions, \"top\");\r\n }\r\n\r\n // Check for space to the right\r\n if (targetElementRect.right + tooltipWidth > windowSize.width) {\r\n _removeEntry(possiblePositions, \"right\");\r\n }\r\n\r\n // Check for space to the left\r\n if (targetElementRect.left - tooltipWidth < 0) {\r\n _removeEntry(possiblePositions, \"left\");\r\n }\r\n\r\n // @var {String} ex: 'right-aligned'\r\n var desiredAlignment = (function (pos) {\r\n var hyphenIndex = pos.indexOf('-');\r\n if (hyphenIndex !== -1) {\r\n // has alignment\r\n return pos.substr(hyphenIndex);\r\n }\r\n return '';\r\n })(desiredTooltipPosition || '');\r\n\r\n // strip alignment from position\r\n if (desiredTooltipPosition) {\r\n // ex: \"bottom-right-aligned\"\r\n // should return 'bottom'\r\n desiredTooltipPosition = desiredTooltipPosition.split('-')[0];\r\n }\r\n\r\n if (possiblePositions.length) {\r\n if (desiredTooltipPosition !== \"auto\" &&\r\n possiblePositions.indexOf(desiredTooltipPosition) > -1) {\r\n // If the requested position is in the list, choose that\r\n calculatedPosition = desiredTooltipPosition;\r\n } else {\r\n // Pick the first valid position, in order\r\n calculatedPosition = possiblePositions[0];\r\n }\r\n }\r\n\r\n // only top and bottom positions have optional alignments\r\n if (['top', 'bottom'].indexOf(calculatedPosition) !== -1) {\r\n calculatedPosition += _determineAutoAlignment(targetElementRect.left, tooltipWidth, windowSize, desiredAlignment);\r\n }\r\n\r\n return calculatedPosition;\r\n }\r\n\r\n /**\r\n * auto-determine alignment\r\n * @param {Integer} offsetLeft\r\n * @param {Integer} tooltipWidth\r\n * @param {Object} windowSize\r\n * @param {String} desiredAlignment\r\n * @return {String} calculatedAlignment\r\n */\r\n function _determineAutoAlignment (offsetLeft, tooltipWidth, windowSize, desiredAlignment) {\r\n var halfTooltipWidth = tooltipWidth / 2,\r\n winWidth = Math.min(windowSize.width, window.screen.width),\r\n possibleAlignments = ['-left-aligned', '-middle-aligned', '-right-aligned'],\r\n calculatedAlignment = '';\r\n\r\n // valid left must be at least a tooltipWidth\r\n // away from right side\r\n if (winWidth - offsetLeft < tooltipWidth) {\r\n _removeEntry(possibleAlignments, '-left-aligned');\r\n }\r\n\r\n // valid middle must be at least half\r\n // width away from both sides\r\n if (offsetLeft < halfTooltipWidth ||\r\n winWidth - offsetLeft < halfTooltipWidth) {\r\n _removeEntry(possibleAlignments, '-middle-aligned');\r\n }\r\n\r\n // valid right must be at least a tooltipWidth\r\n // width away from left side\r\n if (offsetLeft < tooltipWidth) {\r\n _removeEntry(possibleAlignments, '-right-aligned');\r\n }\r\n\r\n if (possibleAlignments.length) {\r\n if (possibleAlignments.indexOf(desiredAlignment) !== -1) {\r\n // the desired alignment is valid\r\n calculatedAlignment = desiredAlignment;\r\n } else {\r\n // pick the first valid position, in order\r\n calculatedAlignment = possibleAlignments[0];\r\n }\r\n } else {\r\n // if screen width is too small\r\n // for ANY alignment, middle is\r\n // probably the best for visibility\r\n calculatedAlignment = '-middle-aligned';\r\n }\r\n\r\n return calculatedAlignment;\r\n }\r\n\r\n /**\r\n * Remove an entry from a string array if it's there, does nothing if it isn't there.\r\n *\r\n * @param {Array} stringArray\r\n * @param {String} stringToRemove\r\n */\r\n function _removeEntry(stringArray, stringToRemove) {\r\n if (stringArray.indexOf(stringToRemove) > -1) {\r\n stringArray.splice(stringArray.indexOf(stringToRemove), 1);\r\n }\r\n }\r\n\r\n /**\r\n * Update the position of the helper layer on the screen\r\n *\r\n * @api private\r\n * @method _setHelperLayerPosition\r\n * @param {Object} helperLayer\r\n */\r\n function _setHelperLayerPosition(helperLayer) {\r\n if (helperLayer) {\r\n //prevent error when `this._currentStep` in undefined\r\n if (!this._introItems[this._currentStep]) return;\r\n\r\n var currentElement = this._introItems[this._currentStep],\r\n elementPosition = _getOffset(currentElement.element),\r\n widthHeightPadding = this._options.helperElementPadding;\r\n\r\n // If the target element is fixed, the tooltip should be fixed as well.\r\n // Otherwise, remove a fixed class that may be left over from the previous\r\n // step.\r\n if (_isFixed(currentElement.element)) {\r\n _addClass(helperLayer, 'introjs-fixedTooltip');\r\n } else {\r\n _removeClass(helperLayer, 'introjs-fixedTooltip');\r\n }\r\n\r\n if (currentElement.position === 'floating') {\r\n widthHeightPadding = 0;\r\n }\r\n\r\n //set new position to helper layer\r\n helperLayer.style.cssText = 'width: ' + (elementPosition.width + widthHeightPadding) + 'px; ' +\r\n 'height:' + (elementPosition.height + widthHeightPadding) + 'px; ' +\r\n 'top:' + (elementPosition.top - widthHeightPadding / 2) + 'px;' +\r\n 'left: ' + (elementPosition.left - widthHeightPadding / 2) + 'px;';\r\n\r\n }\r\n }\r\n\r\n /**\r\n * Add disableinteraction layer and adjust the size and position of the layer\r\n *\r\n * @api private\r\n * @method _disableInteraction\r\n */\r\n function _disableInteraction() {\r\n var disableInteractionLayer = document.querySelector('.introjs-disableInteraction');\r\n\r\n if (disableInteractionLayer === null) {\r\n disableInteractionLayer = document.createElement('div');\r\n disableInteractionLayer.className = 'introjs-disableInteraction';\r\n this._targetElement.appendChild(disableInteractionLayer);\r\n }\r\n\r\n _setHelperLayerPosition.call(this, disableInteractionLayer);\r\n }\r\n\r\n /**\r\n * Setting anchors to behave like buttons\r\n *\r\n * @api private\r\n * @method _setAnchorAsButton\r\n */\r\n function _setAnchorAsButton(anchor){\r\n anchor.setAttribute('role', 'button');\r\n anchor.tabIndex = 0;\r\n }\r\n\r\n /**\r\n * Show an element on the page\r\n *\r\n * @api private\r\n * @method _showElement\r\n * @param {Object} targetElement\r\n */\r\n function _showElement(targetElement) {\r\n if (typeof (this._introChangeCallback) !== 'undefined') {\r\n this._introChangeCallback.call(this, targetElement.element);\r\n }\r\n\r\n var self = this,\r\n oldHelperLayer = document.querySelector('.introjs-helperLayer'),\r\n oldReferenceLayer = document.querySelector('.introjs-tooltipReferenceLayer'),\r\n highlightClass = 'introjs-helperLayer',\r\n nextTooltipButton,\r\n prevTooltipButton,\r\n skipTooltipButton,\r\n scrollParent;\r\n\r\n //check for a current step highlight class\r\n if (typeof (targetElement.highlightClass) === 'string') {\r\n highlightClass += (' ' + targetElement.highlightClass);\r\n }\r\n //check for options highlight class\r\n if (typeof (this._options.highlightClass) === 'string') {\r\n highlightClass += (' ' + this._options.highlightClass);\r\n }\r\n\r\n if (oldHelperLayer !== null) {\r\n var oldHelperNumberLayer = oldReferenceLayer.querySelector('.introjs-helperNumberLayer'),\r\n oldtooltipLayer = oldReferenceLayer.querySelector('.introjs-tooltiptext'),\r\n oldArrowLayer = oldReferenceLayer.querySelector('.introjs-arrow'),\r\n oldtooltipContainer = oldReferenceLayer.querySelector('.introjs-tooltip');\r\n\r\n skipTooltipButton = oldReferenceLayer.querySelector('.introjs-skipbutton');\r\n prevTooltipButton = oldReferenceLayer.querySelector('.introjs-prevbutton');\r\n nextTooltipButton = oldReferenceLayer.querySelector('.introjs-nextbutton');\r\n\r\n //update or reset the helper highlight class\r\n oldHelperLayer.className = highlightClass;\r\n //hide the tooltip\r\n oldtooltipContainer.style.opacity = 0;\r\n oldtooltipContainer.style.display = \"none\";\r\n\r\n if (oldHelperNumberLayer !== null) {\r\n var lastIntroItem = this._introItems[(targetElement.step - 2 >= 0 ? targetElement.step - 2 : 0)];\r\n\r\n if (lastIntroItem !== null && (this._direction === 'forward' && lastIntroItem.position === 'floating') || (this._direction === 'backward' && targetElement.position === 'floating')) {\r\n oldHelperNumberLayer.style.opacity = 0;\r\n }\r\n }\r\n\r\n // scroll to element\r\n scrollParent = _getScrollParent( targetElement.element );\r\n\r\n if (scrollParent !== document.body) {\r\n // target is within a scrollable element\r\n _scrollParentToElement(scrollParent, targetElement.element);\r\n }\r\n\r\n // set new position to helper layer\r\n _setHelperLayerPosition.call(self, oldHelperLayer);\r\n _setHelperLayerPosition.call(self, oldReferenceLayer);\r\n\r\n //remove `introjs-fixParent` class from the elements\r\n var fixParents = document.querySelectorAll('.introjs-fixParent');\r\n _forEach(fixParents, function (parent) {\r\n _removeClass(parent, /introjs-fixParent/g);\r\n });\r\n\r\n //remove old classes if the element still exist\r\n _removeShowElement();\r\n\r\n //we should wait until the CSS3 transition is competed (it's 0.3 sec) to prevent incorrect `height` and `width` calculation\r\n if (self._lastShowElementTimer) {\r\n window.clearTimeout(self._lastShowElementTimer);\r\n }\r\n\r\n self._lastShowElementTimer = window.setTimeout(function() {\r\n\r\n //set current step to the label\r\n if (oldHelperNumberLayer !== null) {\r\n oldHelperNumberLayer.innerHTML = targetElement.step;\r\n }\r\n //set current tooltip text\r\n oldtooltipLayer.innerHTML = targetElement.intro;\r\n //set the tooltip position\r\n oldtooltipContainer.style.display = \"block\";\r\n _placeTooltip.call(self, targetElement.element, oldtooltipContainer, oldArrowLayer, oldHelperNumberLayer);\r\n\r\n //change active bullet\r\n if (self._options.showBullets) {\r\n oldReferenceLayer.querySelector('.introjs-bullets li > a.active').className = '';\r\n oldReferenceLayer.querySelector('.introjs-bullets li > a[data-stepnumber=\"' + targetElement.step + '\"]').className = 'active';\r\n }\r\n oldReferenceLayer.querySelector('.introjs-progress .introjs-progressbar').style.cssText = 'width:' + _getProgress.call(self) + '%;';\r\n oldReferenceLayer.querySelector('.introjs-progress .introjs-progressbar').setAttribute('aria-valuenow', _getProgress.call(self));\r\n\r\n //show the tooltip\r\n oldtooltipContainer.style.opacity = 1;\r\n if (oldHelperNumberLayer) oldHelperNumberLayer.style.opacity = 1;\r\n\r\n //reset button focus\r\n if (typeof skipTooltipButton !== \"undefined\" && skipTooltipButton !== null && /introjs-donebutton/gi.test(skipTooltipButton.className)) {\r\n // skip button is now \"done\" button\r\n skipTooltipButton.focus();\r\n } else if (typeof nextTooltipButton !== \"undefined\" && nextTooltipButton !== null) {\r\n //still in the tour, focus on next\r\n nextTooltipButton.focus();\r\n }\r\n\r\n // change the scroll of the window, if needed\r\n _scrollTo.call(self, targetElement.scrollTo, targetElement, oldtooltipLayer);\r\n }, 350);\r\n\r\n // end of old element if-else condition\r\n } else {\r\n var helperLayer = document.createElement('div'),\r\n referenceLayer = document.createElement('div'),\r\n arrowLayer = document.createElement('div'),\r\n tooltipLayer = document.createElement('div'),\r\n tooltipTextLayer = document.createElement('div'),\r\n bulletsLayer = document.createElement('div'),\r\n progressLayer = document.createElement('div'),\r\n buttonsLayer = document.createElement('div');\r\n\r\n helperLayer.className = highlightClass;\r\n referenceLayer.className = 'introjs-tooltipReferenceLayer';\r\n\r\n // scroll to element\r\n scrollParent = _getScrollParent( targetElement.element );\r\n\r\n if (scrollParent !== document.body) {\r\n // target is within a scrollable element\r\n _scrollParentToElement(scrollParent, targetElement.element);\r\n }\r\n\r\n //set new position to helper layer\r\n _setHelperLayerPosition.call(self, helperLayer);\r\n _setHelperLayerPosition.call(self, referenceLayer);\r\n\r\n //add helper layer to target element\r\n this._targetElement.appendChild(helperLayer);\r\n this._targetElement.appendChild(referenceLayer);\r\n\r\n arrowLayer.className = 'introjs-arrow';\r\n\r\n tooltipTextLayer.className = 'introjs-tooltiptext';\r\n tooltipTextLayer.innerHTML = targetElement.intro;\r\n\r\n bulletsLayer.className = 'introjs-bullets';\r\n\r\n if (this._options.showBullets === false) {\r\n bulletsLayer.style.display = 'none';\r\n }\r\n\r\n var ulContainer = document.createElement('ul');\r\n ulContainer.setAttribute('role', 'tablist');\r\n\r\n var anchorClick = function () {\r\n self.goToStep(this.getAttribute('data-stepnumber'));\r\n };\r\n\r\n _forEach(this._introItems, function (item, i) {\r\n var innerLi = document.createElement('li');\r\n var anchorLink = document.createElement('a');\r\n\r\n innerLi.setAttribute('role', 'presentation');\r\n anchorLink.setAttribute('role', 'tab');\r\n\r\n anchorLink.onclick = anchorClick;\r\n\r\n if (i === (targetElement.step-1)) {\r\n anchorLink.className = 'active';\r\n }\r\n\r\n _setAnchorAsButton(anchorLink);\r\n anchorLink.innerHTML = \" \";\r\n anchorLink.setAttribute('data-stepnumber', item.step);\r\n\r\n innerLi.appendChild(anchorLink);\r\n ulContainer.appendChild(innerLi);\r\n });\r\n\r\n bulletsLayer.appendChild(ulContainer);\r\n\r\n progressLayer.className = 'introjs-progress';\r\n\r\n if (this._options.showProgress === false) {\r\n progressLayer.style.display = 'none';\r\n }\r\n var progressBar = document.createElement('div');\r\n progressBar.className = 'introjs-progressbar';\r\n progressBar.setAttribute('role', 'progress');\r\n progressBar.setAttribute('aria-valuemin', 0);\r\n progressBar.setAttribute('aria-valuemax', 100);\r\n progressBar.setAttribute('aria-valuenow', _getProgress.call(this));\r\n progressBar.style.cssText = 'width:' + _getProgress.call(this) + '%;';\r\n\r\n progressLayer.appendChild(progressBar);\r\n\r\n buttonsLayer.className = 'introjs-tooltipbuttons';\r\n if (this._options.showButtons === false) {\r\n buttonsLayer.style.display = 'none';\r\n }\r\n\r\n tooltipLayer.className = 'introjs-tooltip';\r\n tooltipLayer.appendChild(tooltipTextLayer);\r\n tooltipLayer.appendChild(bulletsLayer);\r\n tooltipLayer.appendChild(progressLayer);\r\n\r\n //add helper layer number\r\n var helperNumberLayer = document.createElement('span');\r\n if (this._options.showStepNumbers === true) {\r\n helperNumberLayer.className = 'introjs-helperNumberLayer';\r\n helperNumberLayer.innerHTML = targetElement.step;\r\n referenceLayer.appendChild(helperNumberLayer);\r\n }\r\n\r\n tooltipLayer.appendChild(arrowLayer);\r\n referenceLayer.appendChild(tooltipLayer);\r\n\r\n //next button\r\n nextTooltipButton = document.createElement('a');\r\n\r\n nextTooltipButton.onclick = function() {\r\n if (self._introItems.length - 1 !== self._currentStep) {\r\n _nextStep.call(self);\r\n }\r\n };\r\n\r\n _setAnchorAsButton(nextTooltipButton);\r\n nextTooltipButton.innerHTML = this._options.nextLabel;\r\n\r\n //previous button\r\n prevTooltipButton = document.createElement('a');\r\n\r\n prevTooltipButton.onclick = function() {\r\n if (self._currentStep !== 0) {\r\n _previousStep.call(self);\r\n }\r\n };\r\n\r\n _setAnchorAsButton(prevTooltipButton);\r\n prevTooltipButton.innerHTML = this._options.prevLabel;\r\n\r\n //skip button\r\n skipTooltipButton = document.createElement('a');\r\n skipTooltipButton.className = this._options.buttonClass + ' introjs-skipbutton ';\r\n _setAnchorAsButton(skipTooltipButton);\r\n skipTooltipButton.innerHTML = this._options.skipLabel;\r\n\r\n skipTooltipButton.onclick = function() {\r\n if (self._introItems.length - 1 === self._currentStep && typeof (self._introCompleteCallback) === 'function') {\r\n self._introCompleteCallback.call(self);\r\n }\r\n\r\n if (self._introItems.length - 1 !== self._currentStep && typeof (self._introExitCallback) === 'function') {\r\n self._introExitCallback.call(self);\r\n }\r\n\r\n if (typeof(self._introSkipCallback) === 'function') {\r\n self._introSkipCallback.call(self);\r\n }\r\n\r\n _exitIntro.call(self, self._targetElement);\r\n };\r\n\r\n buttonsLayer.appendChild(skipTooltipButton);\r\n\r\n //in order to prevent displaying next/previous button always\r\n if (this._introItems.length > 1) {\r\n buttonsLayer.appendChild(prevTooltipButton);\r\n buttonsLayer.appendChild(nextTooltipButton);\r\n }\r\n\r\n tooltipLayer.appendChild(buttonsLayer);\r\n\r\n //set proper position\r\n _placeTooltip.call(self, targetElement.element, tooltipLayer, arrowLayer, helperNumberLayer);\r\n\r\n // change the scroll of the window, if needed\r\n _scrollTo.call(this, targetElement.scrollTo, targetElement, tooltipLayer);\r\n\r\n //end of new element if-else condition\r\n }\r\n\r\n // removing previous disable interaction layer\r\n var disableInteractionLayer = self._targetElement.querySelector('.introjs-disableInteraction');\r\n if (disableInteractionLayer) {\r\n disableInteractionLayer.parentNode.removeChild(disableInteractionLayer);\r\n }\r\n\r\n //disable interaction\r\n if (targetElement.disableInteraction) {\r\n _disableInteraction.call(self);\r\n }\r\n\r\n // when it's the first step of tour\r\n if (this._currentStep === 0 && this._introItems.length > 1) {\r\n if (typeof skipTooltipButton !== \"undefined\" && skipTooltipButton !== null) {\r\n skipTooltipButton.className = this._options.buttonClass + ' introjs-skipbutton';\r\n }\r\n if (typeof nextTooltipButton !== \"undefined\" && nextTooltipButton !== null) {\r\n nextTooltipButton.className = this._options.buttonClass + ' introjs-nextbutton';\r\n }\r\n\r\n if (this._options.hidePrev === true) {\r\n if (typeof prevTooltipButton !== \"undefined\" && prevTooltipButton !== null) {\r\n prevTooltipButton.className = this._options.buttonClass + ' introjs-prevbutton introjs-hidden';\r\n }\r\n if (typeof nextTooltipButton !== \"undefined\" && nextTooltipButton !== null) {\r\n _addClass(nextTooltipButton, 'introjs-fullbutton');\r\n }\r\n } else {\r\n if (typeof prevTooltipButton !== \"undefined\" && prevTooltipButton !== null) {\r\n prevTooltipButton.className = this._options.buttonClass + ' introjs-prevbutton introjs-disabled';\r\n }\r\n }\r\n\r\n if (typeof skipTooltipButton !== \"undefined\" && skipTooltipButton !== null) {\r\n skipTooltipButton.innerHTML = this._options.skipLabel;\r\n }\r\n } else if (this._introItems.length - 1 === this._currentStep || this._introItems.length === 1) {\r\n // last step of tour\r\n if (typeof skipTooltipButton !== \"undefined\" && skipTooltipButton !== null) {\r\n skipTooltipButton.innerHTML = this._options.doneLabel;\r\n // adding donebutton class in addition to skipbutton\r\n _addClass(skipTooltipButton, 'introjs-donebutton');\r\n }\r\n if (typeof prevTooltipButton !== \"undefined\" && prevTooltipButton !== null) {\r\n prevTooltipButton.className = this._options.buttonClass + ' introjs-prevbutton';\r\n }\r\n\r\n if (this._options.hideNext === true) {\r\n if (typeof nextTooltipButton !== \"undefined\" && nextTooltipButton !== null) {\r\n nextTooltipButton.className = this._options.buttonClass + ' introjs-nextbutton introjs-hidden';\r\n }\r\n if (typeof prevTooltipButton !== \"undefined\" && prevTooltipButton !== null) {\r\n _addClass(prevTooltipButton, 'introjs-fullbutton');\r\n }\r\n } else {\r\n if (typeof nextTooltipButton !== \"undefined\" && nextTooltipButton !== null) {\r\n nextTooltipButton.className = this._options.buttonClass + ' introjs-nextbutton introjs-disabled';\r\n }\r\n }\r\n } else {\r\n // steps between start and end\r\n if (typeof skipTooltipButton !== \"undefined\" && skipTooltipButton !== null) {\r\n skipTooltipButton.className = this._options.buttonClass + ' introjs-skipbutton';\r\n }\r\n if (typeof prevTooltipButton !== \"undefined\" && prevTooltipButton !== null) {\r\n prevTooltipButton.className = this._options.buttonClass + ' introjs-prevbutton';\r\n }\r\n if (typeof nextTooltipButton !== \"undefined\" && nextTooltipButton !== null) {\r\n nextTooltipButton.className = this._options.buttonClass + ' introjs-nextbutton';\r\n }\r\n if (typeof skipTooltipButton !== \"undefined\" && skipTooltipButton !== null) {\r\n skipTooltipButton.innerHTML = this._options.skipLabel;\r\n }\r\n }\r\n\r\n prevTooltipButton.setAttribute('role', 'button');\r\n nextTooltipButton.setAttribute('role', 'button');\r\n skipTooltipButton.setAttribute('role', 'button');\r\n\r\n //Set focus on \"next\" button, so that hitting Enter always moves you onto the next step\r\n if (typeof nextTooltipButton !== \"undefined\" && nextTooltipButton !== null) {\r\n nextTooltipButton.focus();\r\n }\r\n\r\n _setShowElement(targetElement);\r\n\r\n if (typeof (this._introAfterChangeCallback) !== 'undefined') {\r\n this._introAfterChangeCallback.call(this, targetElement.element);\r\n }\r\n }\r\n\r\n /**\r\n * To change the scroll of `window` after highlighting an element\r\n *\r\n * @api private\r\n * @method _scrollTo\r\n * @param {String} scrollTo\r\n * @param {Object} targetElement\r\n * @param {Object} tooltipLayer\r\n */\r\n function _scrollTo(scrollTo, targetElement, tooltipLayer) {\r\n if (scrollTo === 'off') return;\r\n var rect;\r\n\r\n if (!this._options.scrollToElement) return;\r\n\r\n if (scrollTo === 'tooltip') {\r\n rect = tooltipLayer.getBoundingClientRect();\r\n } else {\r\n rect = targetElement.element.getBoundingClientRect();\r\n }\r\n\r\n if (!_elementInViewport(targetElement.element)) {\r\n var winHeight = _getWinSize().height;\r\n var top = rect.bottom - (rect.bottom - rect.top);\r\n\r\n // TODO (afshinm): do we need scroll padding now?\r\n // I have changed the scroll option and now it scrolls the window to\r\n // the center of the target element or tooltip.\r\n\r\n if (top < 0 || targetElement.element.clientHeight > winHeight) {\r\n window.scrollBy(0, rect.top - ((winHeight / 2) - (rect.height / 2)) - this._options.scrollPadding); // 30px padding from edge to look nice\r\n\r\n //Scroll down\r\n } else {\r\n window.scrollBy(0, rect.top - ((winHeight / 2) - (rect.height / 2)) + this._options.scrollPadding); // 30px padding from edge to look nice\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * To remove all show element(s)\r\n *\r\n * @api private\r\n * @method _removeShowElement\r\n */\r\n function _removeShowElement() {\r\n var elms = document.querySelectorAll('.introjs-showElement');\r\n\r\n _forEach(elms, function (elm) {\r\n _removeClass(elm, /introjs-[a-zA-Z]+/g);\r\n });\r\n }\r\n\r\n /**\r\n * To set the show element\r\n * This function set a relative (in most cases) position and changes the z-index\r\n *\r\n * @api private\r\n * @method _setShowElement\r\n * @param {Object} targetElement\r\n */\r\n function _setShowElement(targetElement) {\r\n var parentElm;\r\n // we need to add this show element class to the parent of SVG elements\r\n // because the SVG elements can't have independent z-index\r\n if (targetElement.element instanceof SVGElement) {\r\n parentElm = targetElement.element.parentNode;\r\n\r\n while (targetElement.element.parentNode !== null) {\r\n if (!parentElm.tagName || parentElm.tagName.toLowerCase() === 'body') break;\r\n\r\n if (parentElm.tagName.toLowerCase() === 'svg') {\r\n _addClass(parentElm, 'introjs-showElement introjs-relativePosition');\r\n }\r\n\r\n parentElm = parentElm.parentNode;\r\n }\r\n }\r\n\r\n _addClass(targetElement.element, 'introjs-showElement');\r\n\r\n var currentElementPosition = _getPropValue(targetElement.element, 'position');\r\n if (currentElementPosition !== 'absolute' &&\r\n currentElementPosition !== 'relative' &&\r\n currentElementPosition !== 'fixed') {\r\n //change to new intro item\r\n _addClass(targetElement.element, 'introjs-relativePosition');\r\n }\r\n\r\n parentElm = targetElement.element.parentNode;\r\n while (parentElm !== null) {\r\n if (!parentElm.tagName || parentElm.tagName.toLowerCase() === 'body') break;\r\n\r\n //fix The Stacking Context problem.\r\n //More detail: https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Understanding_z_index/The_stacking_context\r\n var zIndex = _getPropValue(parentElm, 'z-index');\r\n var opacity = parseFloat(_getPropValue(parentElm, 'opacity'));\r\n var transform = _getPropValue(parentElm, 'transform') || _getPropValue(parentElm, '-webkit-transform') || _getPropValue(parentElm, '-moz-transform') || _getPropValue(parentElm, '-ms-transform') || _getPropValue(parentElm, '-o-transform');\r\n if (/[0-9]+/.test(zIndex) || opacity < 1 || (transform !== 'none' && transform !== undefined)) {\r\n _addClass(parentElm, 'introjs-fixParent');\r\n }\r\n\r\n parentElm = parentElm.parentNode;\r\n }\r\n }\r\n\r\n /**\r\n * Iterates arrays\r\n *\r\n * @param {Array} arr\r\n * @param {Function} forEachFnc\r\n * @param {Function} completeFnc\r\n * @return {Null}\r\n */\r\n function _forEach(arr, forEachFnc, completeFnc) {\r\n // in case arr is an empty query selector node list\r\n if (arr) {\r\n for (var i = 0, len = arr.length; i < len; i++) {\r\n forEachFnc(arr[i], i);\r\n }\r\n }\r\n\r\n if (typeof(completeFnc) === 'function') {\r\n completeFnc();\r\n }\r\n }\r\n\r\n /**\r\n * Mark any object with an incrementing number\r\n * used for keeping track of objects\r\n *\r\n * @param Object obj Any object or DOM Element\r\n * @param String key\r\n * @return Object\r\n */\r\n var _stamp = (function () {\r\n var keys = {};\r\n return function stamp (obj, key) {\r\n\r\n // get group key\r\n key = key || 'introjs-stamp';\r\n\r\n // each group increments from 0\r\n keys[key] = keys[key] || 0;\r\n\r\n // stamp only once per object\r\n if (obj[key] === undefined) {\r\n // increment key for each new object\r\n obj[key] = keys[key]++;\r\n }\r\n\r\n return obj[key];\r\n };\r\n })();\r\n\r\n /**\r\n * DOMEvent Handles all DOM events\r\n *\r\n * methods:\r\n *\r\n * on - add event handler\r\n * off - remove event\r\n */\r\n var DOMEvent = (function () {\r\n function DOMEvent () {\r\n var events_key = 'introjs_event';\r\n\r\n /**\r\n * Gets a unique ID for an event listener\r\n *\r\n * @param Object obj\r\n * @param String type event type\r\n * @param Function listener\r\n * @param Object context\r\n * @return String\r\n */\r\n this._id = function (obj, type, listener, context) {\r\n return type + _stamp(listener) + (context ? '_' + _stamp(context) : '');\r\n };\r\n\r\n /**\r\n * Adds event listener\r\n *\r\n * @param Object obj\r\n * @param String type event type\r\n * @param Function listener\r\n * @param Object context\r\n * @param Boolean useCapture\r\n * @return null\r\n */\r\n this.on = function (obj, type, listener, context, useCapture) {\r\n var id = this._id.apply(this, arguments),\r\n handler = function (e) {\r\n return listener.call(context || obj, e || window.event);\r\n };\r\n\r\n if ('addEventListener' in obj) {\r\n obj.addEventListener(type, handler, useCapture);\r\n } else if ('attachEvent' in obj) {\r\n obj.attachEvent('on' + type, handler);\r\n }\r\n\r\n obj[events_key] = obj[events_key] || {};\r\n obj[events_key][id] = handler;\r\n };\r\n\r\n /**\r\n * Removes event listener\r\n *\r\n * @param Object obj\r\n * @param String type event type\r\n * @param Function listener\r\n * @param Object context\r\n * @param Boolean useCapture\r\n * @return null\r\n */\r\n this.off = function (obj, type, listener, context, useCapture) {\r\n var id = this._id.apply(this, arguments),\r\n handler = obj[events_key] && obj[events_key][id];\r\n\r\n if (!handler) {\r\n return;\r\n }\r\n\r\n if ('removeEventListener' in obj) {\r\n obj.removeEventListener(type, handler, useCapture);\r\n } else if ('detachEvent' in obj) {\r\n obj.detachEvent('on' + type, handler);\r\n }\r\n\r\n obj[events_key][id] = null;\r\n };\r\n }\r\n\r\n return new DOMEvent();\r\n })();\r\n\r\n /**\r\n * Append a class to an element\r\n *\r\n * @api private\r\n * @method _addClass\r\n * @param {Object} element\r\n * @param {String} className\r\n * @returns null\r\n */\r\n function _addClass(element, className) {\r\n if (element instanceof SVGElement) {\r\n // svg\r\n var pre = element.getAttribute('class') || '';\r\n\r\n element.setAttribute('class', pre + ' ' + className);\r\n } else {\r\n if (element.classList !== undefined) {\r\n // check for modern classList property\r\n var classes = className.split(' ');\r\n _forEach(classes, function (cls) {\r\n element.classList.add( cls );\r\n });\r\n } else if (!element.className.match( className )) {\r\n // check if element doesn't already have className\r\n element.className += ' ' + className;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Remove a class from an element\r\n *\r\n * @api private\r\n * @method _removeClass\r\n * @param {Object} element\r\n * @param {RegExp|String} classNameRegex can be regex or string\r\n * @returns null\r\n */\r\n function _removeClass(element, classNameRegex) {\r\n if (element instanceof SVGElement) {\r\n var pre = element.getAttribute('class') || '';\r\n\r\n element.setAttribute('class', pre.replace(classNameRegex, '').replace(/^\\s+|\\s+$/g, ''));\r\n } else {\r\n element.className = element.className.replace(classNameRegex, '').replace(/^\\s+|\\s+$/g, '');\r\n }\r\n }\r\n\r\n /**\r\n * Get an element CSS property on the page\r\n * Thanks to JavaScript Kit: http://www.javascriptkit.com/dhtmltutors/dhtmlcascade4.shtml\r\n *\r\n * @api private\r\n * @method _getPropValue\r\n * @param {Object} element\r\n * @param {String} propName\r\n * @returns Element's property value\r\n */\r\n function _getPropValue (element, propName) {\r\n var propValue = '';\r\n if (element.currentStyle) { //IE\r\n propValue = element.currentStyle[propName];\r\n } else if (document.defaultView && document.defaultView.getComputedStyle) { //Others\r\n propValue = document.defaultView.getComputedStyle(element, null).getPropertyValue(propName);\r\n }\r\n\r\n //Prevent exception in IE\r\n if (propValue && propValue.toLowerCase) {\r\n return propValue.toLowerCase();\r\n } else {\r\n return propValue;\r\n }\r\n }\r\n\r\n /**\r\n * Checks to see if target element (or parents) position is fixed or not\r\n *\r\n * @api private\r\n * @method _isFixed\r\n * @param {Object} element\r\n * @returns Boolean\r\n */\r\n function _isFixed (element) {\r\n var p = element.parentNode;\r\n\r\n if (!p || p.nodeName === 'HTML') {\r\n return false;\r\n }\r\n\r\n if (_getPropValue(element, 'position') === 'fixed') {\r\n return true;\r\n }\r\n\r\n return _isFixed(p);\r\n }\r\n\r\n /**\r\n * Provides a cross-browser way to get the screen dimensions\r\n * via: http://stackoverflow.com/questions/5864467/internet-explorer-innerheight\r\n *\r\n * @api private\r\n * @method _getWinSize\r\n * @returns {Object} width and height attributes\r\n */\r\n function _getWinSize() {\r\n if (window.innerWidth !== undefined) {\r\n return { width: window.innerWidth, height: window.innerHeight };\r\n } else {\r\n var D = document.documentElement;\r\n return { width: D.clientWidth, height: D.clientHeight };\r\n }\r\n }\r\n\r\n /**\r\n * Check to see if the element is in the viewport or not\r\n * http://stackoverflow.com/questions/123999/how-to-tell-if-a-dom-element-is-visible-in-the-current-viewport\r\n *\r\n * @api private\r\n * @method _elementInViewport\r\n * @param {Object} el\r\n */\r\n function _elementInViewport(el) {\r\n var rect = el.getBoundingClientRect();\r\n\r\n return (\r\n rect.top >= 0 &&\r\n rect.left >= 0 &&\r\n (rect.bottom+80) <= window.innerHeight && // add 80 to get the text right\r\n rect.right <= window.innerWidth\r\n );\r\n }\r\n\r\n /**\r\n * Add overlay layer to the page\r\n *\r\n * @api private\r\n * @method _addOverlayLayer\r\n * @param {Object} targetElm\r\n */\r\n function _addOverlayLayer(targetElm) {\r\n var overlayLayer = document.createElement('div'),\r\n styleText = '',\r\n self = this;\r\n\r\n //set css class name\r\n overlayLayer.className = 'introjs-overlay';\r\n\r\n //check if the target element is body, we should calculate the size of overlay layer in a better way\r\n if (!targetElm.tagName || targetElm.tagName.toLowerCase() === 'body') {\r\n styleText += 'top: 0;bottom: 0; left: 0;right: 0;position: fixed;';\r\n overlayLayer.style.cssText = styleText;\r\n } else {\r\n //set overlay layer position\r\n var elementPosition = _getOffset(targetElm);\r\n if (elementPosition) {\r\n styleText += 'width: ' + elementPosition.width + 'px; height:' + elementPosition.height + 'px; top:' + elementPosition.top + 'px;left: ' + elementPosition.left + 'px;';\r\n overlayLayer.style.cssText = styleText;\r\n }\r\n }\r\n\r\n targetElm.appendChild(overlayLayer);\r\n\r\n overlayLayer.onclick = function() {\r\n if (self._options.exitOnOverlayClick === true) {\r\n _exitIntro.call(self, targetElm);\r\n }\r\n };\r\n\r\n window.setTimeout(function() {\r\n styleText += 'opacity: ' + self._options.overlayOpacity.toString() + ';';\r\n overlayLayer.style.cssText = styleText;\r\n }, 10);\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Removes open hint (tooltip hint)\r\n *\r\n * @api private\r\n * @method _removeHintTooltip\r\n */\r\n function _removeHintTooltip() {\r\n var tooltip = document.querySelector('.introjs-hintReference');\r\n\r\n if (tooltip) {\r\n var step = tooltip.getAttribute('data-step');\r\n tooltip.parentNode.removeChild(tooltip);\r\n return step;\r\n }\r\n }\r\n\r\n /**\r\n * Start parsing hint items\r\n *\r\n * @api private\r\n * @param {Object} targetElm\r\n * @method _startHint\r\n */\r\n function _populateHints(targetElm) {\r\n\r\n this._introItems = [];\r\n\r\n if (this._options.hints) {\r\n _forEach(this._options.hints, function (hint) {\r\n var currentItem = _cloneObject(hint);\r\n\r\n if (typeof(currentItem.element) === 'string') {\r\n //grab the element with given selector from the page\r\n currentItem.element = document.querySelector(currentItem.element);\r\n }\r\n\r\n currentItem.hintPosition = currentItem.hintPosition || this._options.hintPosition;\r\n currentItem.hintAnimation = currentItem.hintAnimation || this._options.hintAnimation;\r\n\r\n if (currentItem.element !== null) {\r\n this._introItems.push(currentItem);\r\n }\r\n }.bind(this));\r\n } else {\r\n var hints = targetElm.querySelectorAll('*[data-hint]');\r\n\r\n if (!hints || !hints.length) {\r\n return false;\r\n }\r\n\r\n //first add intro items with data-step\r\n _forEach(hints, function (currentElement) {\r\n // hint animation\r\n var hintAnimation = currentElement.getAttribute('data-hintanimation');\r\n\r\n if (hintAnimation) {\r\n hintAnimation = (hintAnimation === 'true');\r\n } else {\r\n hintAnimation = this._options.hintAnimation;\r\n }\r\n\r\n this._introItems.push({\r\n element: currentElement,\r\n hint: currentElement.getAttribute('data-hint'),\r\n hintPosition: currentElement.getAttribute('data-hintposition') || this._options.hintPosition,\r\n hintAnimation: hintAnimation,\r\n tooltipClass: currentElement.getAttribute('data-tooltipclass'),\r\n position: currentElement.getAttribute('data-position') || this._options.tooltipPosition\r\n });\r\n }.bind(this));\r\n }\r\n\r\n _addHints.call(this);\r\n\r\n /*\r\n todo:\r\n these events should be removed at some point\r\n */\r\n DOMEvent.on(document, 'click', _removeHintTooltip, this, false);\r\n DOMEvent.on(window, 'resize', _reAlignHints, this, true);\r\n }\r\n\r\n /**\r\n * Re-aligns all hint elements\r\n *\r\n * @api private\r\n * @method _reAlignHints\r\n */\r\n function _reAlignHints() {\r\n _forEach(this._introItems, function (item) {\r\n if (typeof(item.targetElement) === 'undefined') {\r\n return;\r\n }\r\n\r\n _alignHintPosition.call(this, item.hintPosition, item.element, item.targetElement);\r\n }.bind(this));\r\n }\r\n\r\n /**\r\n * Get a queryselector within the hint wrapper\r\n *\r\n * @param {String} selector\r\n * @return {NodeList|Array}\r\n */\r\n function _hintQuerySelectorAll(selector) {\r\n var hintsWrapper = document.querySelector('.introjs-hints');\r\n return (hintsWrapper) ? hintsWrapper.querySelectorAll(selector) : [];\r\n }\r\n\r\n /**\r\n * Hide a hint\r\n *\r\n * @api private\r\n * @method _hideHint\r\n */\r\n function _hideHint(stepId) {\r\n var hint = _hintQuerySelectorAll('.introjs-hint[data-step=\"' + stepId + '\"]')[0];\r\n\r\n _removeHintTooltip.call(this);\r\n\r\n if (hint) {\r\n _addClass(hint, 'introjs-hidehint');\r\n }\r\n\r\n // call the callback function (if any)\r\n if (typeof (this._hintCloseCallback) !== 'undefined') {\r\n this._hintCloseCallback.call(this, stepId);\r\n }\r\n }\r\n\r\n /**\r\n * Hide all hints\r\n *\r\n * @api private\r\n * @method _hideHints\r\n */\r\n function _hideHints() {\r\n var hints = _hintQuerySelectorAll('.introjs-hint');\r\n\r\n _forEach(hints, function (hint) {\r\n _hideHint.call(this, hint.getAttribute('data-step'));\r\n }.bind(this));\r\n }\r\n\r\n /**\r\n * Show all hints\r\n *\r\n * @api private\r\n * @method _showHints\r\n */\r\n function _showHints() {\r\n var hints = _hintQuerySelectorAll('.introjs-hint');\r\n\r\n if (hints && hints.length) {\r\n _forEach(hints, function (hint) {\r\n _showHint.call(this, hint.getAttribute('data-step'));\r\n }.bind(this));\r\n } else {\r\n _populateHints.call(this, this._targetElement);\r\n }\r\n }\r\n\r\n /**\r\n * Show a hint\r\n *\r\n * @api private\r\n * @method _showHint\r\n */\r\n function _showHint(stepId) {\r\n var hint = _hintQuerySelectorAll('.introjs-hint[data-step=\"' + stepId + '\"]')[0];\r\n\r\n if (hint) {\r\n _removeClass(hint, /introjs-hidehint/g);\r\n }\r\n }\r\n\r\n /**\r\n * Removes all hint elements on the page\r\n * Useful when you want to destroy the elements and add them again (e.g. a modal or popup)\r\n *\r\n * @api private\r\n * @method _removeHints\r\n */\r\n function _removeHints() {\r\n var hints = _hintQuerySelectorAll('.introjs-hint');\r\n\r\n _forEach(hints, function (hint) {\r\n _removeHint.call(this, hint.getAttribute('data-step'));\r\n }.bind(this));\r\n }\r\n\r\n /**\r\n * Remove one single hint element from the page\r\n * Useful when you want to destroy the element and add them again (e.g. a modal or popup)\r\n * Use removeHints if you want to remove all elements.\r\n *\r\n * @api private\r\n * @method _removeHint\r\n */\r\n function _removeHint(stepId) {\r\n var hint = _hintQuerySelectorAll('.introjs-hint[data-step=\"' + stepId + '\"]')[0];\r\n\r\n if (hint) {\r\n hint.parentNode.removeChild(hint);\r\n }\r\n }\r\n\r\n /**\r\n * Add all available hints to the page\r\n *\r\n * @api private\r\n * @method _addHints\r\n */\r\n function _addHints() {\r\n var self = this;\r\n\r\n var hintsWrapper = document.querySelector('.introjs-hints');\r\n\r\n if (hintsWrapper === null) {\r\n hintsWrapper = document.createElement('div');\r\n hintsWrapper.className = 'introjs-hints';\r\n }\r\n\r\n /**\r\n * Returns an event handler unique to the hint iteration\r\n *\r\n * @param {Integer} i\r\n * @return {Function}\r\n */\r\n var getHintClick = function (i) {\r\n return function(e) {\r\n var evt = e ? e : window.event;\r\n\r\n if (evt.stopPropagation) {\r\n evt.stopPropagation();\r\n }\r\n\r\n if (evt.cancelBubble !== null) {\r\n evt.cancelBubble = true;\r\n }\r\n\r\n _showHintDialog.call(self, i);\r\n };\r\n };\r\n\r\n _forEach(this._introItems, function(item, i) {\r\n // avoid append a hint twice\r\n if (document.querySelector('.introjs-hint[data-step=\"' + i + '\"]')) {\r\n return;\r\n }\r\n\r\n var hint = document.createElement('a');\r\n _setAnchorAsButton(hint);\r\n\r\n hint.onclick = getHintClick(i);\r\n\r\n hint.className = 'introjs-hint';\r\n\r\n if (!item.hintAnimation) {\r\n _addClass(hint, 'introjs-hint-no-anim');\r\n }\r\n\r\n // hint's position should be fixed if the target element's position is fixed\r\n if (_isFixed(item.element)) {\r\n _addClass(hint, 'introjs-fixedhint');\r\n }\r\n\r\n var hintDot = document.createElement('div');\r\n hintDot.className = 'introjs-hint-dot';\r\n var hintPulse = document.createElement('div');\r\n hintPulse.className = 'introjs-hint-pulse';\r\n\r\n hint.appendChild(hintDot);\r\n hint.appendChild(hintPulse);\r\n hint.setAttribute('data-step', i);\r\n\r\n // we swap the hint element with target element\r\n // because _setHelperLayerPosition uses `element` property\r\n item.targetElement = item.element;\r\n item.element = hint;\r\n\r\n // align the hint position\r\n _alignHintPosition.call(this, item.hintPosition, hint, item.targetElement);\r\n\r\n hintsWrapper.appendChild(hint);\r\n }.bind(this));\r\n\r\n // adding the hints wrapper\r\n document.body.appendChild(hintsWrapper);\r\n\r\n // call the callback function (if any)\r\n if (typeof (this._hintsAddedCallback) !== 'undefined') {\r\n this._hintsAddedCallback.call(this);\r\n }\r\n }\r\n\r\n /**\r\n * Aligns hint position\r\n *\r\n * @api private\r\n * @method _alignHintPosition\r\n * @param {String} position\r\n * @param {Object} hint\r\n * @param {Object} element\r\n */\r\n function _alignHintPosition(position, hint, element) {\r\n // get/calculate offset of target element\r\n var offset = _getOffset.call(this, element);\r\n var iconWidth = 20;\r\n var iconHeight = 20;\r\n\r\n // align the hint element\r\n switch (position) {\r\n default:\r\n case 'top-left':\r\n hint.style.left = offset.left + 'px';\r\n hint.style.top = offset.top + 'px';\r\n break;\r\n case 'top-right':\r\n hint.style.left = (offset.left + offset.width - iconWidth) + 'px';\r\n hint.style.top = offset.top + 'px';\r\n break;\r\n case 'bottom-left':\r\n hint.style.left = offset.left + 'px';\r\n hint.style.top = (offset.top + offset.height - iconHeight) + 'px';\r\n break;\r\n case 'bottom-right':\r\n hint.style.left = (offset.left + offset.width - iconWidth) + 'px';\r\n hint.style.top = (offset.top + offset.height - iconHeight) + 'px';\r\n break;\r\n case 'middle-left':\r\n hint.style.left = offset.left + 'px';\r\n hint.style.top = (offset.top + (offset.height - iconHeight) / 2) + 'px';\r\n break;\r\n case 'middle-right':\r\n hint.style.left = (offset.left + offset.width - iconWidth) + 'px';\r\n hint.style.top = (offset.top + (offset.height - iconHeight) / 2) + 'px';\r\n break;\r\n case 'middle-middle':\r\n hint.style.left = (offset.left + (offset.width - iconWidth) / 2) + 'px';\r\n hint.style.top = (offset.top + (offset.height - iconHeight) / 2) + 'px';\r\n break;\r\n case 'bottom-middle':\r\n hint.style.left = (offset.left + (offset.width - iconWidth) / 2) + 'px';\r\n hint.style.top = (offset.top + offset.height - iconHeight) + 'px';\r\n break;\r\n case 'top-middle':\r\n hint.style.left = (offset.left + (offset.width - iconWidth) / 2) + 'px';\r\n hint.style.top = offset.top + 'px';\r\n break;\r\n }\r\n }\r\n\r\n /**\r\n * Triggers when user clicks on the hint element\r\n *\r\n * @api private\r\n * @method _showHintDialog\r\n * @param {Number} stepId\r\n */\r\n function _showHintDialog(stepId) {\r\n var hintElement = document.querySelector('.introjs-hint[data-step=\"' + stepId + '\"]');\r\n var item = this._introItems[stepId];\r\n\r\n // call the callback function (if any)\r\n if (typeof (this._hintClickCallback) !== 'undefined') {\r\n this._hintClickCallback.call(this, hintElement, item, stepId);\r\n }\r\n\r\n // remove all open tooltips\r\n var removedStep = _removeHintTooltip.call(this);\r\n\r\n // to toggle the tooltip\r\n if (parseInt(removedStep, 10) === stepId) {\r\n return;\r\n }\r\n\r\n var tooltipLayer = document.createElement('div');\r\n var tooltipTextLayer = document.createElement('div');\r\n var arrowLayer = document.createElement('div');\r\n var referenceLayer = document.createElement('div');\r\n\r\n tooltipLayer.className = 'introjs-tooltip';\r\n\r\n tooltipLayer.onclick = function (e) {\r\n //IE9 & Other Browsers\r\n if (e.stopPropagation) {\r\n e.stopPropagation();\r\n }\r\n //IE8 and Lower\r\n else {\r\n e.cancelBubble = true;\r\n }\r\n };\r\n\r\n tooltipTextLayer.className = 'introjs-tooltiptext';\r\n\r\n var tooltipWrapper = document.createElement('p');\r\n tooltipWrapper.innerHTML = item.hint;\r\n\r\n var closeButton = document.createElement('a');\r\n closeButton.className = this._options.buttonClass;\r\n closeButton.setAttribute('role', 'button');\r\n closeButton.innerHTML = this._options.hintButtonLabel;\r\n closeButton.onclick = _hideHint.bind(this, stepId);\r\n\r\n tooltipTextLayer.appendChild(tooltipWrapper);\r\n tooltipTextLayer.appendChild(closeButton);\r\n\r\n arrowLayer.className = 'introjs-arrow';\r\n tooltipLayer.appendChild(arrowLayer);\r\n\r\n tooltipLayer.appendChild(tooltipTextLayer);\r\n\r\n // set current step for _placeTooltip function\r\n this._currentStep = hintElement.getAttribute('data-step');\r\n\r\n // align reference layer position\r\n referenceLayer.className = 'introjs-tooltipReferenceLayer introjs-hintReference';\r\n referenceLayer.setAttribute('data-step', hintElement.getAttribute('data-step'));\r\n _setHelperLayerPosition.call(this, referenceLayer);\r\n\r\n referenceLayer.appendChild(tooltipLayer);\r\n document.body.appendChild(referenceLayer);\r\n\r\n //set proper position\r\n _placeTooltip.call(this, hintElement, tooltipLayer, arrowLayer, null, true);\r\n }\r\n\r\n /**\r\n * Get an element position on the page\r\n * Thanks to `meouw`: http://stackoverflow.com/a/442474/375966\r\n *\r\n * @api private\r\n * @method _getOffset\r\n * @param {Object} element\r\n * @returns Element's position info\r\n */\r\n function _getOffset(element) {\r\n var body = document.body;\r\n var docEl = document.documentElement;\r\n var scrollTop = window.pageYOffset || docEl.scrollTop || body.scrollTop;\r\n var scrollLeft = window.pageXOffset || docEl.scrollLeft || body.scrollLeft;\r\n var x = element.getBoundingClientRect();\r\n return {\r\n top: x.top + scrollTop,\r\n width: x.width,\r\n height: x.height,\r\n left: x.left + scrollLeft\r\n };\r\n }\r\n\r\n /**\r\n * Find the nearest scrollable parent\r\n * copied from https://stackoverflow.com/questions/35939886/find-first-scrollable-parent\r\n *\r\n * @param Element element\r\n * @return Element\r\n */\r\n function _getScrollParent(element) {\r\n var style = window.getComputedStyle(element);\r\n var excludeStaticParent = (style.position === \"absolute\");\r\n var overflowRegex = /(auto|scroll)/;\r\n\r\n if (style.position === \"fixed\") return document.body;\r\n\r\n for (var parent = element; (parent = parent.parentElement);) {\r\n style = window.getComputedStyle(parent);\r\n if (excludeStaticParent && style.position === \"static\") {\r\n continue;\r\n }\r\n if (overflowRegex.test(style.overflow + style.overflowY + style.overflowX)) return parent;\r\n }\r\n\r\n return document.body;\r\n }\r\n\r\n /**\r\n * scroll a scrollable element to a child element\r\n *\r\n * @param Element parent\r\n * @param Element element\r\n * @return Null\r\n */\r\n function _scrollParentToElement (parent, element) {\r\n parent.scrollTop = element.offsetTop - parent.offsetTop;\r\n }\r\n\r\n /**\r\n * Gets the current progress percentage\r\n *\r\n * @api private\r\n * @method _getProgress\r\n * @returns current progress percentage\r\n */\r\n function _getProgress() {\r\n // Steps are 0 indexed\r\n var currentStep = parseInt((this._currentStep + 1), 10);\r\n return ((currentStep / this._introItems.length) * 100);\r\n }\r\n\r\n /**\r\n * Overwrites obj1's values with obj2's and adds obj2's if non existent in obj1\r\n * via: http://stackoverflow.com/questions/171251/how-can-i-merge-properties-of-two-javascript-objects-dynamically\r\n *\r\n * @param obj1\r\n * @param obj2\r\n * @returns obj3 a new object based on obj1 and obj2\r\n */\r\n function _mergeOptions(obj1,obj2) {\r\n var obj3 = {},\r\n attrname;\r\n for (attrname in obj1) { obj3[attrname] = obj1[attrname]; }\r\n for (attrname in obj2) { obj3[attrname] = obj2[attrname]; }\r\n return obj3;\r\n }\r\n\r\n var introJs = function (targetElm) {\r\n var instance;\r\n\r\n if (typeof (targetElm) === 'object') {\r\n //Ok, create a new instance\r\n instance = new IntroJs(targetElm);\r\n\r\n } else if (typeof (targetElm) === 'string') {\r\n //select the target element with query selector\r\n var targetElement = document.querySelector(targetElm);\r\n\r\n if (targetElement) {\r\n instance = new IntroJs(targetElement);\r\n } else {\r\n throw new Error('There is no element with given selector.');\r\n }\r\n } else {\r\n instance = new IntroJs(document.body);\r\n }\r\n // add instance to list of _instances\r\n // passing group to _stamp to increment\r\n // from 0 onward somewhat reliably\r\n introJs.instances[ _stamp(instance, 'introjs-instance') ] = instance;\r\n\r\n return instance;\r\n };\r\n\r\n /**\r\n * Current IntroJs version\r\n *\r\n * @property version\r\n * @type String\r\n */\r\n introJs.version = VERSION;\r\n\r\n /**\r\n * key-val object helper for introJs instances\r\n *\r\n * @property instances\r\n * @type Object\r\n */\r\n introJs.instances = {};\r\n\r\n //Prototype\r\n introJs.fn = IntroJs.prototype = {\r\n clone: function () {\r\n return new IntroJs(this);\r\n },\r\n setOption: function(option, value) {\r\n this._options[option] = value;\r\n return this;\r\n },\r\n setOptions: function(options) {\r\n this._options = _mergeOptions(this._options, options);\r\n return this;\r\n },\r\n start: function (group) {\r\n _introForElement.call(this, this._targetElement, group);\r\n return this;\r\n },\r\n goToStep: function(step) {\r\n _goToStep.call(this, step);\r\n return this;\r\n },\r\n addStep: function(options) {\r\n if (!this._options.steps) {\r\n this._options.steps = [];\r\n }\r\n\r\n this._options.steps.push(options);\r\n\r\n return this;\r\n },\r\n addSteps: function(steps) {\r\n if (!steps.length) return;\r\n\r\n for(var index = 0; index < steps.length; index++) {\r\n this.addStep(steps[index]);\r\n }\r\n\r\n return this;\r\n },\r\n goToStepNumber: function(step) {\r\n _goToStepNumber.call(this, step);\r\n\r\n return this;\r\n },\r\n nextStep: function() {\r\n _nextStep.call(this);\r\n return this;\r\n },\r\n previousStep: function() {\r\n _previousStep.call(this);\r\n return this;\r\n },\r\n exit: function(force) {\r\n _exitIntro.call(this, this._targetElement, force);\r\n return this;\r\n },\r\n refresh: function() {\r\n _refresh.call(this);\r\n return this;\r\n },\r\n onbeforechange: function(providedCallback) {\r\n if (typeof (providedCallback) === 'function') {\r\n this._introBeforeChangeCallback = providedCallback;\r\n } else {\r\n throw new Error('Provided callback for onbeforechange was not a function');\r\n }\r\n return this;\r\n },\r\n onchange: function(providedCallback) {\r\n if (typeof (providedCallback) === 'function') {\r\n this._introChangeCallback = providedCallback;\r\n } else {\r\n throw new Error('Provided callback for onchange was not a function.');\r\n }\r\n return this;\r\n },\r\n onafterchange: function(providedCallback) {\r\n if (typeof (providedCallback) === 'function') {\r\n this._introAfterChangeCallback = providedCallback;\r\n } else {\r\n throw new Error('Provided callback for onafterchange was not a function');\r\n }\r\n return this;\r\n },\r\n oncomplete: function(providedCallback) {\r\n if (typeof (providedCallback) === 'function') {\r\n this._introCompleteCallback = providedCallback;\r\n } else {\r\n throw new Error('Provided callback for oncomplete was not a function.');\r\n }\r\n return this;\r\n },\r\n onhintsadded: function(providedCallback) {\r\n if (typeof (providedCallback) === 'function') {\r\n this._hintsAddedCallback = providedCallback;\r\n } else {\r\n throw new Error('Provided callback for onhintsadded was not a function.');\r\n }\r\n return this;\r\n },\r\n onhintclick: function(providedCallback) {\r\n if (typeof (providedCallback) === 'function') {\r\n this._hintClickCallback = providedCallback;\r\n } else {\r\n throw new Error('Provided callback for onhintclick was not a function.');\r\n }\r\n return this;\r\n },\r\n onhintclose: function(providedCallback) {\r\n if (typeof (providedCallback) === 'function') {\r\n this._hintCloseCallback = providedCallback;\r\n } else {\r\n throw new Error('Provided callback for onhintclose was not a function.');\r\n }\r\n return this;\r\n },\r\n onexit: function(providedCallback) {\r\n if (typeof (providedCallback) === 'function') {\r\n this._introExitCallback = providedCallback;\r\n } else {\r\n throw new Error('Provided callback for onexit was not a function.');\r\n }\r\n return this;\r\n },\r\n onskip: function(providedCallback) {\r\n if (typeof (providedCallback) === 'function') {\r\n this._introSkipCallback = providedCallback;\r\n } else {\r\n throw new Error('Provided callback for onskip was not a function.');\r\n }\r\n return this;\r\n },\r\n onbeforeexit: function(providedCallback) {\r\n if (typeof (providedCallback) === 'function') {\r\n this._introBeforeExitCallback = providedCallback;\r\n } else {\r\n throw new Error('Provided callback for onbeforeexit was not a function.');\r\n }\r\n return this;\r\n },\r\n addHints: function() {\r\n _populateHints.call(this, this._targetElement);\r\n return this;\r\n },\r\n hideHint: function (stepId) {\r\n _hideHint.call(this, stepId);\r\n return this;\r\n },\r\n hideHints: function () {\r\n _hideHints.call(this);\r\n return this;\r\n },\r\n showHint: function (stepId) {\r\n _showHint.call(this, stepId);\r\n return this;\r\n },\r\n showHints: function () {\r\n _showHints.call(this);\r\n return this;\r\n },\r\n removeHints: function () {\r\n _removeHints.call(this);\r\n return this;\r\n },\r\n removeHint: function (stepId) {\r\n _removeHint.call(this, stepId);\r\n return this;\r\n },\r\n showHintDialog: function (stepId) {\r\n _showHintDialog.call(this, stepId);\r\n return this;\r\n }\r\n };\r\n\r\n return introJs;\r\n});\r\n","var map = {\n\t\"./af\": 58685,\n\t\"./af.js\": 58685,\n\t\"./ar\": 254,\n\t\"./ar-dz\": 4312,\n\t\"./ar-dz.js\": 4312,\n\t\"./ar-kw\": 32614,\n\t\"./ar-kw.js\": 32614,\n\t\"./ar-ly\": 18630,\n\t\"./ar-ly.js\": 18630,\n\t\"./ar-ma\": 28674,\n\t\"./ar-ma.js\": 28674,\n\t\"./ar-sa\": 49032,\n\t\"./ar-sa.js\": 49032,\n\t\"./ar-tn\": 24730,\n\t\"./ar-tn.js\": 24730,\n\t\"./ar.js\": 254,\n\t\"./az\": 53052,\n\t\"./az.js\": 53052,\n\t\"./be\": 60150,\n\t\"./be.js\": 60150,\n\t\"./bg\": 63069,\n\t\"./bg.js\": 63069,\n\t\"./bm\": 13466,\n\t\"./bm.js\": 13466,\n\t\"./bn\": 18516,\n\t\"./bn-bd\": 90557,\n\t\"./bn-bd.js\": 90557,\n\t\"./bn.js\": 18516,\n\t\"./bo\": 26273,\n\t\"./bo.js\": 26273,\n\t\"./br\": 9588,\n\t\"./br.js\": 9588,\n\t\"./bs\": 19815,\n\t\"./bs.js\": 19815,\n\t\"./ca\": 83331,\n\t\"./ca.js\": 83331,\n\t\"./cs\": 21320,\n\t\"./cs.js\": 21320,\n\t\"./cv\": 72219,\n\t\"./cv.js\": 72219,\n\t\"./cy\": 68266,\n\t\"./cy.js\": 68266,\n\t\"./da\": 66427,\n\t\"./da.js\": 66427,\n\t\"./de\": 67435,\n\t\"./de-at\": 52871,\n\t\"./de-at.js\": 52871,\n\t\"./de-ch\": 12994,\n\t\"./de-ch.js\": 12994,\n\t\"./de.js\": 67435,\n\t\"./dv\": 82357,\n\t\"./dv.js\": 82357,\n\t\"./el\": 95649,\n\t\"./el.js\": 95649,\n\t\"./en-au\": 59961,\n\t\"./en-au.js\": 59961,\n\t\"./en-ca\": 19878,\n\t\"./en-ca.js\": 19878,\n\t\"./en-gb\": 3924,\n\t\"./en-gb.js\": 3924,\n\t\"./en-ie\": 70864,\n\t\"./en-ie.js\": 70864,\n\t\"./en-il\": 91579,\n\t\"./en-il.js\": 91579,\n\t\"./en-in\": 30940,\n\t\"./en-in.js\": 30940,\n\t\"./en-nz\": 16181,\n\t\"./en-nz.js\": 16181,\n\t\"./en-sg\": 44301,\n\t\"./en-sg.js\": 44301,\n\t\"./eo\": 85291,\n\t\"./eo.js\": 85291,\n\t\"./es\": 54529,\n\t\"./es-do\": 53764,\n\t\"./es-do.js\": 53764,\n\t\"./es-mx\": 12584,\n\t\"./es-mx.js\": 12584,\n\t\"./es-us\": 63425,\n\t\"./es-us.js\": 63425,\n\t\"./es.js\": 54529,\n\t\"./et\": 35203,\n\t\"./et.js\": 35203,\n\t\"./eu\": 70678,\n\t\"./eu.js\": 70678,\n\t\"./fa\": 83483,\n\t\"./fa.js\": 83483,\n\t\"./fi\": 96262,\n\t\"./fi.js\": 96262,\n\t\"./fil\": 52521,\n\t\"./fil.js\": 52521,\n\t\"./fo\": 34555,\n\t\"./fo.js\": 34555,\n\t\"./fr\": 63131,\n\t\"./fr-ca\": 88239,\n\t\"./fr-ca.js\": 88239,\n\t\"./fr-ch\": 21702,\n\t\"./fr-ch.js\": 21702,\n\t\"./fr.js\": 63131,\n\t\"./fy\": 267,\n\t\"./fy.js\": 267,\n\t\"./ga\": 23821,\n\t\"./ga.js\": 23821,\n\t\"./gd\": 71753,\n\t\"./gd.js\": 71753,\n\t\"./gl\": 4074,\n\t\"./gl.js\": 4074,\n\t\"./gom-deva\": 92762,\n\t\"./gom-deva.js\": 92762,\n\t\"./gom-latn\": 5969,\n\t\"./gom-latn.js\": 5969,\n\t\"./gu\": 82809,\n\t\"./gu.js\": 82809,\n\t\"./he\": 45402,\n\t\"./he.js\": 45402,\n\t\"./hi\": 315,\n\t\"./hi.js\": 315,\n\t\"./hr\": 10410,\n\t\"./hr.js\": 10410,\n\t\"./hu\": 38288,\n\t\"./hu.js\": 38288,\n\t\"./hy-am\": 67928,\n\t\"./hy-am.js\": 67928,\n\t\"./id\": 71334,\n\t\"./id.js\": 71334,\n\t\"./is\": 86959,\n\t\"./is.js\": 86959,\n\t\"./it\": 34864,\n\t\"./it-ch\": 51124,\n\t\"./it-ch.js\": 51124,\n\t\"./it.js\": 34864,\n\t\"./ja\": 36141,\n\t\"./ja.js\": 36141,\n\t\"./jv\": 29187,\n\t\"./jv.js\": 29187,\n\t\"./ka\": 42136,\n\t\"./ka.js\": 42136,\n\t\"./kk\": 94332,\n\t\"./kk.js\": 94332,\n\t\"./km\": 18607,\n\t\"./km.js\": 18607,\n\t\"./kn\": 84305,\n\t\"./kn.js\": 84305,\n\t\"./ko\": 70234,\n\t\"./ko.js\": 70234,\n\t\"./ku\": 16003,\n\t\"./ku.js\": 16003,\n\t\"./ky\": 75061,\n\t\"./ky.js\": 75061,\n\t\"./lb\": 32786,\n\t\"./lb.js\": 32786,\n\t\"./lo\": 66183,\n\t\"./lo.js\": 66183,\n\t\"./lt\": 50029,\n\t\"./lt.js\": 50029,\n\t\"./lv\": 24169,\n\t\"./lv.js\": 24169,\n\t\"./me\": 68577,\n\t\"./me.js\": 68577,\n\t\"./mi\": 68177,\n\t\"./mi.js\": 68177,\n\t\"./mk\": 50337,\n\t\"./mk.js\": 50337,\n\t\"./ml\": 65260,\n\t\"./ml.js\": 65260,\n\t\"./mn\": 52325,\n\t\"./mn.js\": 52325,\n\t\"./mr\": 14695,\n\t\"./mr.js\": 14695,\n\t\"./ms\": 75334,\n\t\"./ms-my\": 37151,\n\t\"./ms-my.js\": 37151,\n\t\"./ms.js\": 75334,\n\t\"./mt\": 63570,\n\t\"./mt.js\": 63570,\n\t\"./my\": 97963,\n\t\"./my.js\": 97963,\n\t\"./nb\": 88028,\n\t\"./nb.js\": 88028,\n\t\"./ne\": 86638,\n\t\"./ne.js\": 86638,\n\t\"./nl\": 50302,\n\t\"./nl-be\": 66782,\n\t\"./nl-be.js\": 66782,\n\t\"./nl.js\": 50302,\n\t\"./nn\": 33501,\n\t\"./nn.js\": 33501,\n\t\"./oc-lnc\": 50563,\n\t\"./oc-lnc.js\": 50563,\n\t\"./pa-in\": 50869,\n\t\"./pa-in.js\": 50869,\n\t\"./pl\": 65302,\n\t\"./pl.js\": 65302,\n\t\"./pt\": 49687,\n\t\"./pt-br\": 74884,\n\t\"./pt-br.js\": 74884,\n\t\"./pt.js\": 49687,\n\t\"./ro\": 79107,\n\t\"./ro.js\": 79107,\n\t\"./ru\": 33627,\n\t\"./ru.js\": 33627,\n\t\"./sd\": 30355,\n\t\"./sd.js\": 30355,\n\t\"./se\": 83427,\n\t\"./se.js\": 83427,\n\t\"./si\": 11848,\n\t\"./si.js\": 11848,\n\t\"./sk\": 54590,\n\t\"./sk.js\": 54590,\n\t\"./sl\": 20184,\n\t\"./sl.js\": 20184,\n\t\"./sq\": 56361,\n\t\"./sq.js\": 56361,\n\t\"./sr\": 78965,\n\t\"./sr-cyrl\": 81287,\n\t\"./sr-cyrl.js\": 81287,\n\t\"./sr.js\": 78965,\n\t\"./ss\": 25456,\n\t\"./ss.js\": 25456,\n\t\"./sv\": 70451,\n\t\"./sv.js\": 70451,\n\t\"./sw\": 77558,\n\t\"./sw.js\": 77558,\n\t\"./ta\": 51356,\n\t\"./ta.js\": 51356,\n\t\"./te\": 73693,\n\t\"./te.js\": 73693,\n\t\"./tet\": 21243,\n\t\"./tet.js\": 21243,\n\t\"./tg\": 42500,\n\t\"./tg.js\": 42500,\n\t\"./th\": 55768,\n\t\"./th.js\": 55768,\n\t\"./tk\": 77761,\n\t\"./tk.js\": 77761,\n\t\"./tl-ph\": 35780,\n\t\"./tl-ph.js\": 35780,\n\t\"./tlh\": 29590,\n\t\"./tlh.js\": 29590,\n\t\"./tr\": 33807,\n\t\"./tr.js\": 33807,\n\t\"./tzl\": 93857,\n\t\"./tzl.js\": 93857,\n\t\"./tzm\": 60654,\n\t\"./tzm-latn\": 8806,\n\t\"./tzm-latn.js\": 8806,\n\t\"./tzm.js\": 60654,\n\t\"./ug-cn\": 30845,\n\t\"./ug-cn.js\": 30845,\n\t\"./uk\": 19232,\n\t\"./uk.js\": 19232,\n\t\"./ur\": 47052,\n\t\"./ur.js\": 47052,\n\t\"./uz\": 77967,\n\t\"./uz-latn\": 32233,\n\t\"./uz-latn.js\": 32233,\n\t\"./uz.js\": 77967,\n\t\"./vi\": 98615,\n\t\"./vi.js\": 98615,\n\t\"./x-pseudo\": 12320,\n\t\"./x-pseudo.js\": 12320,\n\t\"./yo\": 31313,\n\t\"./yo.js\": 31313,\n\t\"./zh-cn\": 64490,\n\t\"./zh-cn.js\": 64490,\n\t\"./zh-hk\": 55910,\n\t\"./zh-hk.js\": 55910,\n\t\"./zh-mo\": 98262,\n\t\"./zh-mo.js\": 98262,\n\t\"./zh-tw\": 44223,\n\t\"./zh-tw.js\": 44223\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 46700;"],"x_google_ignoreList":[1628]}